Curl_altsvc_init:
  325|  10.8k|{
  326|  10.8k|  struct altsvcinfo *asi = curlx_calloc(1, sizeof(struct altsvcinfo));
  ------------------
  |  | 1485|  10.8k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  327|  10.8k|  if(!asi)
  ------------------
  |  Branch (327:6): [True: 0, False: 10.8k]
  ------------------
  328|      0|    return NULL;
  329|  10.8k|  Curl_llist_init(&asi->list, NULL);
  330|       |
  331|       |  /* set default behavior */
  332|  10.8k|  asi->flags = CURLALTSVC_H1
  ------------------
  |  | 1035|  10.8k|#define CURLALTSVC_H1           (1L << 3)
  ------------------
  333|  10.8k|#ifdef USE_HTTP2
  334|  10.8k|    | CURLALTSVC_H2
  ------------------
  |  | 1036|  10.8k|#define CURLALTSVC_H2           (1L << 4)
  ------------------
  335|  10.8k|#endif
  336|       |#ifdef USE_HTTP3
  337|       |    | CURLALTSVC_H3
  338|       |#endif
  339|  10.8k|    ;
  340|  10.8k|  return asi;
  341|  10.8k|}
Curl_altsvc_load:
  347|  10.8k|{
  348|  10.8k|  DEBUGASSERT(asi);
  ------------------
  |  | 1077|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (348:3): [True: 0, False: 10.8k]
  |  Branch (348:3): [True: 10.8k, False: 0]
  ------------------
  349|  10.8k|  return altsvc_load(asi, file);
  350|  10.8k|}
Curl_altsvc_ctrl:
  356|     38|{
  357|     38|  DEBUGASSERT(data);
  ------------------
  |  | 1077|     38|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (357:3): [True: 0, False: 38]
  |  Branch (357:3): [True: 38, False: 0]
  ------------------
  358|     38|  if(!ctrl)
  ------------------
  |  Branch (358:6): [True: 1, False: 37]
  ------------------
  359|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  360|       |
  361|     37|  if(!data->asi) {
  ------------------
  |  Branch (361:6): [True: 37, False: 0]
  ------------------
  362|     37|    data->asi = Curl_altsvc_init();
  363|     37|    if(!data->asi)
  ------------------
  |  Branch (363:8): [True: 0, False: 37]
  ------------------
  364|      0|      return CURLE_OUT_OF_MEMORY;
  365|     37|  }
  366|     37|  data->asi->flags = ctrl;
  367|     37|  return CURLE_OK;
  368|     37|}
Curl_altsvc_cleanup:
  375|  23.9k|{
  376|  23.9k|  if(*asi) {
  ------------------
  |  Branch (376:6): [True: 10.8k, False: 13.1k]
  ------------------
  377|  10.8k|    struct Curl_llist_node *e;
  378|  10.8k|    struct Curl_llist_node *n;
  379|  10.8k|    struct altsvcinfo *altsvc = *asi;
  380|  10.8k|    for(e = Curl_llist_head(&altsvc->list); e; e = n) {
  ------------------
  |  Branch (380:45): [True: 0, False: 10.8k]
  ------------------
  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|  10.8k|    curlx_free(altsvc->filename);
  ------------------
  |  | 1488|  10.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  386|  10.8k|    curlx_free(altsvc);
  ------------------
  |  | 1488|  10.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  387|       |    *asi = NULL; /* clear the pointer */
  388|  10.8k|  }
  389|  23.9k|}
Curl_altsvc_save:
  396|  23.9k|{
  397|  23.9k|  CURLcode result = CURLE_OK;
  398|  23.9k|  FILE *out;
  399|  23.9k|  char *tempstore = NULL;
  400|       |
  401|  23.9k|  if(!asi)
  ------------------
  |  Branch (401:6): [True: 13.1k, False: 10.8k]
  ------------------
  402|       |    /* no cache activated */
  403|  13.1k|    return CURLE_OK;
  404|       |
  405|       |  /* if not new name is given, use the one we stored from the load */
  406|  10.8k|  if(!file && asi->filename)
  ------------------
  |  Branch (406:6): [True: 6, False: 10.8k]
  |  Branch (406:15): [True: 0, False: 6]
  ------------------
  407|      0|    file = asi->filename;
  408|       |
  409|  10.8k|  if((asi->flags & CURLALTSVC_READONLYFILE) || !file || !file[0])
  ------------------
  |  | 1034|  10.8k|#define CURLALTSVC_READONLYFILE (1L << 2)
  ------------------
  |  Branch (409:6): [True: 22, False: 10.7k]
  |  Branch (409:48): [True: 4, False: 10.7k]
  |  Branch (409:57): [True: 0, False: 10.7k]
  ------------------
  410|       |    /* marked as read-only, no file or zero length filename */
  411|     26|    return CURLE_OK;
  412|       |
  413|  10.7k|  result = Curl_fopen(data, file, &out, &tempstore);
  414|  10.7k|  if(!result) {
  ------------------
  |  Branch (414:6): [True: 10.7k, False: 0]
  ------------------
  415|  10.7k|    struct Curl_llist_node *e;
  416|  10.7k|    struct Curl_llist_node *n;
  417|  10.7k|    fputs("# Your alt-svc cache. https://curl.se/docs/alt-svc.html\n"
  418|  10.7k|          "# This file was generated by libcurl! Edit at your own risk.\n",
  419|  10.7k|          out);
  420|  10.7k|    for(e = Curl_llist_head(&asi->list); e; e = n) {
  ------------------
  |  Branch (420:42): [True: 0, False: 10.7k]
  ------------------
  421|      0|      struct altsvc *as = Curl_node_elem(e);
  422|      0|      n = Curl_node_next(e);
  423|      0|      result = altsvc_out(as, out);
  424|      0|      if(result)
  ------------------
  |  Branch (424:10): [True: 0, False: 0]
  ------------------
  425|      0|        break;
  426|      0|    }
  427|  10.7k|    curlx_fclose(out);
  ------------------
  |  |   79|  10.7k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  428|  10.7k|    if(!result && tempstore && curlx_rename(tempstore, file))
  ------------------
  |  |   70|      0|#define curlx_rename            rename
  ------------------
  |  Branch (428:8): [True: 10.7k, False: 0]
  |  Branch (428:19): [True: 0, False: 10.7k]
  |  Branch (428:32): [True: 0, False: 0]
  ------------------
  429|      0|      result = CURLE_WRITE_ERROR;
  430|       |
  431|  10.7k|    if(result && tempstore)
  ------------------
  |  Branch (431:8): [True: 0, False: 10.7k]
  |  Branch (431:18): [True: 0, False: 0]
  ------------------
  432|      0|      unlink(tempstore);
  433|  10.7k|  }
  434|  10.7k|  curlx_free(tempstore);
  ------------------
  |  | 1488|  10.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  435|  10.7k|  return result;
  436|  10.8k|}
altsvc.c:altsvc_load:
  238|  10.8k|{
  239|  10.8k|  CURLcode result = CURLE_OK;
  240|  10.8k|  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|  10.8k|  curlx_free(asi->filename);
  ------------------
  |  | 1488|  10.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  245|  10.8k|  asi->filename = curlx_strdup(file);
  ------------------
  |  | 1482|  10.8k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  246|  10.8k|  if(!asi->filename)
  ------------------
  |  Branch (246:6): [True: 0, False: 10.8k]
  ------------------
  247|      0|    return CURLE_OUT_OF_MEMORY;
  248|       |
  249|  10.8k|  fp = curlx_fopen(file, FOPEN_READTEXT);
  ------------------
  |  |   74|  10.8k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  250|  10.8k|  if(fp) {
  ------------------
  |  Branch (250:6): [True: 10.8k, False: 0]
  ------------------
  251|  10.8k|    curlx_struct_stat stat;
  ------------------
  |  |   63|  10.8k|#define curlx_struct_stat       struct stat
  ------------------
  252|  10.8k|    if((curlx_fstat(fileno(fp), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|  10.8k|#define curlx_fstat             fstat
  ------------------
  |  Branch (252:8): [True: 0, False: 10.8k]
  |  Branch (252:50): [True: 10.8k, False: 0]
  ------------------
  253|  10.8k|      bool eof = FALSE;
  ------------------
  |  | 1054|  10.8k|#define FALSE false
  ------------------
  254|  10.8k|      struct dynbuf buf;
  255|  10.8k|      curlx_dyn_init(&buf, MAX_ALTSVC_LINE);
  ------------------
  |  |   41|  10.8k|#define MAX_ALTSVC_LINE    4095
  ------------------
  256|  10.8k|      do {
  257|  10.8k|        result = Curl_get_line(&buf, fp, &eof);
  258|  10.8k|        if(!result) {
  ------------------
  |  Branch (258:12): [True: 10.8k, False: 0]
  ------------------
  259|  10.8k|          const char *lineptr = curlx_dyn_ptr(&buf);
  260|  10.8k|          curlx_str_passblanks(&lineptr);
  261|  10.8k|          if(curlx_str_single(&lineptr, '#'))
  ------------------
  |  Branch (261:14): [True: 10.8k, False: 0]
  ------------------
  262|  10.8k|            altsvc_add(asi, lineptr);
  263|  10.8k|        }
  264|  10.8k|      } while(!result && !eof);
  ------------------
  |  Branch (264:15): [True: 10.8k, False: 0]
  |  Branch (264:26): [True: 0, False: 10.8k]
  ------------------
  265|  10.8k|      curlx_dyn_free(&buf); /* free the line buffer */
  266|  10.8k|    }
  267|  10.8k|    curlx_fclose(fp);
  ------------------
  |  |   79|  10.8k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  268|  10.8k|  }
  269|  10.8k|  return result;
  270|  10.8k|}
altsvc.c:altsvc_add:
  169|  10.8k|{
  170|       |  /* Example line:
  171|       |     h2 example.com 443 h3 shiny.example.com 8443 "20191231 10:00:00" 1
  172|       |   */
  173|  10.8k|  struct Curl_str srchost;
  174|  10.8k|  struct Curl_str dsthost;
  175|  10.8k|  struct Curl_str srcalpn;
  176|  10.8k|  struct Curl_str dstalpn;
  177|  10.8k|  struct Curl_str date;
  178|  10.8k|  curl_off_t srcport;
  179|  10.8k|  curl_off_t dstport;
  180|  10.8k|  curl_off_t persist;
  181|  10.8k|  curl_off_t prio;
  182|       |
  183|  10.8k|  if(curlx_str_word(&line, &srcalpn, MAX_ALTSVC_ALPNLEN) ||
  ------------------
  |  |   44|  10.8k|#define MAX_ALTSVC_ALPNLEN 10
  ------------------
  |  Branch (183:6): [True: 0, False: 10.8k]
  ------------------
  184|  10.8k|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (184:6): [True: 10.8k, 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|  10.8k|    ;
  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|  10.8k|  return CURLE_OK;
  227|  10.8k|}

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

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|    806|{
  261|    806|  Curl_async_thrdd_destroy(data, async);
  262|    806|}
Curl_async_thrdd_destroy:
  278|  1.60k|{
  279|  1.60k|  (void)data;
  280|  1.60k|  if(async->queries_ongoing && !async->done &&
  ------------------
  |  Branch (280:6): [True: 508, False: 1.09k]
  |  Branch (280:32): [True: 508, False: 0]
  ------------------
  281|    508|     data->multi && data->multi->resolv_thrdq) {
  ------------------
  |  Branch (281:6): [True: 254, False: 254]
  |  Branch (281:21): [True: 254, False: 0]
  ------------------
  282|       |    /* Remove any resolve items still queued */
  283|    254|    struct async_thrdd_match_ctx mctx;
  284|    254|    mctx.mid = data->mid;
  285|    254|    mctx.resolv_id = async->id;
  286|    254|    Curl_thrdq_clear(data->multi->resolv_thrdq,
  287|    254|                     async_thrdd_match_item, &mctx);
  288|    254|  }
  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.60k|  async_thrdd_item_destroy(async->thrdd.res_A);
  297|  1.60k|  async->thrdd.res_A = NULL;
  298|  1.60k|  async_thrdd_item_destroy(async->thrdd.res_AAAA);
  299|       |  async->thrdd.res_AAAA = NULL;
  300|  1.60k|}
Curl_async_await:
  308|    166|{
  309|    166|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  310|    166|  struct async_thrdd_ctx *thrdd = async ? &async->thrdd : NULL;
  ------------------
  |  Branch (310:35): [True: 166, False: 0]
  ------------------
  311|    166|  timediff_t milli, ms;
  312|       |
  313|    166|  if(!thrdd)
  ------------------
  |  Branch (313:6): [True: 0, False: 166]
  ------------------
  314|      0|    return CURLE_FAILED_INIT;
  315|       |
  316|   689k|  while(async->queries_ongoing && !async->done) {
  ------------------
  |  Branch (316:9): [True: 689k, False: 0]
  |  Branch (316:35): [True: 689k, False: 0]
  ------------------
  317|   689k|    Curl_async_thrdd_multi_process(data->multi);
  318|   689k|    if(async->done)
  ------------------
  |  Branch (318:8): [True: 166, False: 689k]
  ------------------
  319|    166|      break;
  320|       |
  321|   689k|    ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  322|   689k|    if(ms < 3)
  ------------------
  |  Branch (322:8): [True: 689k, False: 78]
  ------------------
  323|   689k|      milli = 0;
  324|     78|    else if(ms <= 50)
  ------------------
  |  Branch (324:13): [True: 76, False: 2]
  ------------------
  325|     76|      milli = ms / 3;
  326|      2|    else if(ms <= 250)
  ------------------
  |  Branch (326:13): [True: 2, False: 0]
  ------------------
  327|      2|      milli = 50;
  328|      0|    else
  329|      0|      milli = 200;
  330|   689k|    CURL_TRC_DNS(data, "await, waiting %" FMT_TIMEDIFF_T "ms", milli);
  ------------------
  |  |  168|   689k|  do {                                 \
  |  |  169|   689k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|   689k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|   689k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.37M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 689k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 689k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.37M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((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|   689k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|   689k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|   689k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 689k]
  |  |  ------------------
  ------------------
  331|   689k|    curlx_wait_ms(milli);
  332|   689k|  }
  333|    166|  return Curl_async_take_result(data, async, pdns);
  334|    166|}
Curl_async_thrdd_multi_init:
  469|  10.8k|{
  470|  10.8k|  CURLcode result;
  471|  10.8k|  DEBUGASSERT(!multi->resolv_thrdq);
  ------------------
  |  | 1077|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (471:3): [True: 0, False: 10.8k]
  |  Branch (471:3): [True: 10.8k, False: 0]
  ------------------
  472|  10.8k|  result = Curl_thrdq_create(&multi->resolv_thrdq, "DNS", 0,
  473|  10.8k|                             min_threads, max_threads, idle_time_ms,
  474|  10.8k|                             async_thrdd_item_free,
  475|  10.8k|                             async_thrdd_item_process,
  476|  10.8k|                             async_thrdd_event,
  477|  10.8k|                             multi);
  478|  10.8k|#ifdef DEBUGBUILD
  479|  10.8k|  if(!result) {
  ------------------
  |  Branch (479:6): [True: 10.8k, False: 0]
  ------------------
  480|  10.8k|    const char *p = getenv("CURL_DBG_RESOLV_MAX_THREADS");
  481|  10.8k|    if(p) {
  ------------------
  |  Branch (481:8): [True: 0, False: 10.8k]
  ------------------
  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|  10.8k|  }
  489|  10.8k|#endif
  490|  10.8k|  return result;
  491|  10.8k|}
Curl_async_thrdd_multi_destroy:
  495|  10.8k|{
  496|  10.8k|  if(multi->resolv_thrdq) {
  ------------------
  |  Branch (496:6): [True: 10.8k, False: 0]
  ------------------
  497|  10.8k|#ifdef CURLVERBOSE
  498|  10.8k|    CURL_TRC_DNS(multi->admin, "destroy thread queue+pool, join=%d", join);
  ------------------
  |  |  168|  10.8k|  do {                                 \
  |  |  169|  10.8k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  10.8k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.8k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  21.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.8k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  21.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|  10.8k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  10.8k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  10.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
  499|  10.8k|    Curl_thrdq_trace(multi->resolv_thrdq, multi->admin);
  500|  10.8k|#endif
  501|  10.8k|    Curl_thrdq_destroy(multi->resolv_thrdq, join);
  502|       |    multi->resolv_thrdq = NULL;
  503|  10.8k|  }
  504|  10.8k|}
Curl_async_thrdd_multi_process:
  551|   701k|{
  552|   701k|  struct Curl_easy *data;
  553|   701k|  void *qitem;
  554|       |
  555|   702k|  while(!Curl_thrdq_recv(multi->resolv_thrdq, &qitem)) {
  ------------------
  |  Branch (555:9): [True: 327, False: 701k]
  ------------------
  556|       |    /* dispatch resolve result */
  557|    327|    struct async_thrdd_item *item = qitem;
  558|    327|    struct Curl_resolv_async *async = NULL;
  559|       |
  560|    327|    data = Curl_multi_get_easy(multi, item->mid);
  561|    327|    if(data)
  ------------------
  |  Branch (561:8): [True: 327, False: 0]
  ------------------
  562|    327|      async = Curl_async_get(data, item->resolv_id);
  563|    327|    if(async) {
  ------------------
  |  Branch (563:8): [True: 327, False: 0]
  ------------------
  564|    327|      struct async_thrdd_item **pdest = &async->thrdd.res_A;
  565|       |
  566|    327|      async->dns_responses |= item->dns_queries;
  567|    327|      --async->queries_ongoing;
  568|    327|      async->done = !async->queries_ongoing;
  569|       |
  570|    327|#ifdef CURLRES_IPV6
  571|    327|      if(item->dns_queries & CURL_DNSQ_AAAA)
  ------------------
  |  |   52|    327|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (571:10): [True: 109, False: 218]
  ------------------
  572|    109|        pdest = &async->thrdd.res_AAAA;
  573|    327|#endif
  574|    327|      if(!*pdest) {
  ------------------
  |  Branch (574:10): [True: 327, False: 0]
  ------------------
  575|    327|        VERBOSE(async_thrdd_report_item(data, item));
  ------------------
  |  | 1623|    327|#define VERBOSE(x) x
  ------------------
  576|    327|        *pdest = item;
  577|    327|        item = NULL;
  578|    327|      }
  579|      0|      else
  580|    327|        DEBUGASSERT(0); /* should not receive duplicates here */
  ------------------
  |  | 1077|    327|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (580:9): [Folded, False: 0]
  |  Branch (580:9): [Folded, False: 0]
  ------------------
  581|    327|      Curl_multi_mark_dirty(data);
  582|    327|    }
  583|    327|    async_thrdd_item_free(item);
  584|    327|  }
  585|   701k|#ifdef CURLVERBOSE
  586|   701k|  Curl_thrdq_trace(multi->resolv_thrdq, multi->admin);
  587|   701k|#endif
  588|   701k|}
Curl_async_getaddrinfo:
  629|    440|{
  630|    440|  CURLcode result = CURLE_FAILED_INIT;
  631|    440|  void *resolver = NULL;
  632|       |
  633|    440|  if(async->queries_ongoing || async->done)
  ------------------
  |  Branch (633:6): [True: 0, False: 440]
  |  Branch (633:32): [True: 0, False: 440]
  ------------------
  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|    440|  result = Curl_resolv_announce_start(data, resolver);
  647|    440|  if(result)
  ------------------
  |  Branch (647:6): [True: 0, False: 440]
  ------------------
  648|      0|    return result;
  649|       |
  650|    440|#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|    440|  if((async->dns_queries & CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|    440|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (653:6): [True: 292, False: 148]
  ------------------
  654|    292|     !(async->is_ipv4addr && (async->dns_queries & CURL_DNSQ_A))) {
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (654:8): [True: 0, False: 292]
  |  Branch (654:30): [True: 0, False: 0]
  ------------------
  655|    292|    result = async_thrdd_query(data, async, CURL_DNSQ_AAAA);
  ------------------
  |  |   52|    292|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  656|    292|    if(result)
  ------------------
  |  Branch (656:8): [True: 0, False: 292]
  ------------------
  657|      0|      goto out;
  658|    292|  }
  659|    440|#endif
  660|    440|  if(async->dns_queries & CURL_DNSQ_A) {
  ------------------
  |  |   51|    440|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (660:6): [True: 397, False: 43]
  ------------------
  661|    397|    result = async_thrdd_query(data, async, CURL_DNSQ_A);
  ------------------
  |  |   51|    397|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  662|    397|    if(result)
  ------------------
  |  Branch (662:8): [True: 0, False: 397]
  ------------------
  663|      0|      goto out;
  664|    397|  }
  665|       |
  666|    440|#ifdef CURLVERBOSE
  667|    440|  Curl_thrdq_trace(data->multi->resolv_thrdq, data);
  668|    440|#endif
  669|       |
  670|    440|out:
  671|    440|  if(result)
  ------------------
  |  Branch (671:6): [True: 0, False: 440]
  ------------------
  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|    440|                 async->hostname, async->port, (int)result);
  674|    440|  return result;
  675|    440|}
Curl_async_pollset:
  680|    522|{
  681|    522|  timediff_t timeout_ms;
  682|       |
  683|    522|  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|    522|  (void)ps;
  693|    522|#endif
  694|       |
  695|    522|  if(!async->done) {
  ------------------
  |  Branch (695:6): [True: 522, 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|    522|    Curl_expire(data, timeout_ms, EXPIRE_ASYNC_NAME);
  710|    522|  }
  711|    522|  return CURLE_OK;
  712|    522|}
Curl_async_take_result:
  722|    708|{
  723|    708|  struct async_thrdd_ctx *thrdd = &async->thrdd;
  724|    708|  struct Curl_dns_entry *dns = NULL;
  725|    708|  CURLcode result = CURLE_OK;
  726|       |
  727|    708|  DEBUGASSERT(pdns);
  ------------------
  |  | 1077|    708|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (727:3): [True: 0, False: 708]
  |  Branch (727:3): [True: 708, False: 0]
  ------------------
  728|    708|  *pdns = NULL;
  729|    708|  if(!async->queries_ongoing && !async->done) {
  ------------------
  |  Branch (729:6): [True: 186, False: 522]
  |  Branch (729:33): [True: 0, False: 186]
  ------------------
  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|    708|  if(!async->done)
  ------------------
  |  Branch (743:6): [True: 522, False: 186]
  ------------------
  744|    522|    return CURLE_AGAIN;
  745|       |
  746|    186|  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|    186|  {
  753|    186|    const uint8_t ip_queries =
  754|    186|      async->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|    186|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                    async->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|    186|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  755|    186|    bool negative = (async->dns_responses & ip_queries) == ip_queries;
  756|    186|    if(thrdd->res_A && (thrdd->res_A->res || !thrdd->res_A->negative))
  ------------------
  |  Branch (756:8): [True: 143, False: 43]
  |  Branch (756:25): [True: 7, False: 136]
  |  Branch (756:46): [True: 0, False: 136]
  ------------------
  757|      7|      negative = FALSE;
  ------------------
  |  | 1054|      7|#define FALSE false
  ------------------
  758|    186|    if(thrdd->res_AAAA && (thrdd->res_AAAA->res || !thrdd->res_AAAA->negative))
  ------------------
  |  Branch (758:8): [True: 62, False: 124]
  |  Branch (758:28): [True: 2, False: 60]
  |  Branch (758:52): [True: 1, False: 59]
  ------------------
  759|      3|      negative = FALSE;
  ------------------
  |  | 1054|      3|#define FALSE false
  ------------------
  760|    186|    if(!thrdd->res_A && !thrdd->res_AAAA)
  ------------------
  |  Branch (760:8): [True: 43, False: 143]
  |  Branch (760:25): [True: 0, False: 43]
  ------------------
  761|      0|      negative = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  762|    186|    async->negative_answer = negative;
  763|    186|  }
  764|       |
  765|    186|  if(async->result) {
  ------------------
  |  Branch (765:6): [True: 0, False: 186]
  ------------------
  766|      0|    result = async->result;
  767|      0|    goto out;
  768|      0|  }
  769|       |
  770|    186|  if((thrdd->res_A && thrdd->res_A->res) ||
  ------------------
  |  Branch (770:7): [True: 143, False: 43]
  |  Branch (770:23): [True: 7, False: 136]
  ------------------
  771|    179|     (thrdd->res_AAAA && thrdd->res_AAAA->res)) {
  ------------------
  |  Branch (771:7): [True: 62, False: 117]
  |  Branch (771:26): [True: 2, False: 60]
  ------------------
  772|      9|    dns = Curl_dnscache_mk_entry2(
  773|      9|      data, async->dns_queries,
  774|      9|      thrdd->res_A ? &thrdd->res_A->res : NULL,
  ------------------
  |  Branch (774:7): [True: 7, False: 2]
  ------------------
  775|      9|      thrdd->res_AAAA ? &thrdd->res_AAAA->res : NULL,
  ------------------
  |  Branch (775:7): [True: 2, False: 7]
  ------------------
  776|      9|      async->hostname, async->port);
  777|      9|    if(!dns) {
  ------------------
  |  Branch (777:8): [True: 0, False: 9]
  ------------------
  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|      9|  }
  797|       |
  798|    186|  if(dns) {
  ------------------
  |  Branch (798:6): [True: 9, False: 177]
  ------------------
  799|      9|    *pdns = dns;
  800|      9|    dns = NULL;
  801|      9|  }
  802|    186|#ifdef CURLVERBOSE
  803|    186|  Curl_thrdq_trace(data->multi->resolv_thrdq, data);
  804|    186|#endif
  805|       |
  806|    186|out:
  807|    186|  Curl_dns_entry_unlink(data, &dns);
  808|    186|  Curl_async_thrdd_shutdown(data, async);
  809|    186|  if(!result && !*pdns)
  ------------------
  |  Branch (809:6): [True: 186, False: 0]
  |  Branch (809:17): [True: 177, False: 9]
  ------------------
  810|    177|    result = Curl_async_failed(data, async, NULL);
  811|    186|  if(result &&
  ------------------
  |  Branch (811:6): [True: 177, False: 9]
  ------------------
  812|    177|     (result != CURLE_COULDNT_RESOLVE_HOST) &&
  ------------------
  |  Branch (812:6): [True: 4, False: 173]
  ------------------
  813|      4|     (result != CURLE_COULDNT_RESOLVE_PROXY)) {
  ------------------
  |  Branch (813:6): [True: 0, False: 4]
  ------------------
  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|    186|  return result;
  818|    186|}
Curl_async_get_ai:
  839|    202|{
  840|    202|  struct async_thrdd_ctx *thrdd = &async->thrdd;
  841|       |
  842|    202|  (void)data;
  843|    202|  switch(ai_family) {
  844|    110|  case AF_INET:
  ------------------
  |  Branch (844:3): [True: 110, False: 92]
  ------------------
  845|    110|    if(thrdd->res_A)
  ------------------
  |  Branch (845:8): [True: 0, False: 110]
  ------------------
  846|      0|      return async_thrdd_get_ai(thrdd->res_A->res, ai_family, index);
  847|    110|    break;
  848|    110|#ifdef USE_IPV6
  849|    110|  case AF_INET6:
  ------------------
  |  Branch (849:3): [True: 92, False: 110]
  ------------------
  850|     92|    if(thrdd->res_AAAA)
  ------------------
  |  Branch (850:8): [True: 92, False: 0]
  ------------------
  851|     92|      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: 202]
  ------------------
  855|      0|    break;
  856|    202|  }
  857|    110|  return NULL;
  858|    202|}
asyn-thrdd.c:async_thrdd_match_item:
  270|    166|{
  271|    166|  const struct async_thrdd_match_ctx *ctx = match_data;
  272|    166|  struct async_thrdd_item *item = qitem;
  273|    166|  return (item->mid == ctx->mid) && (item->resolv_id == ctx->resolv_id);
  ------------------
  |  Branch (273:10): [True: 166, False: 0]
  |  Branch (273:37): [True: 166, False: 0]
  ------------------
  274|    166|}
asyn-thrdd.c:async_thrdd_item_destroy:
  131|  3.88k|{
  132|  3.88k|  if(item) {
  ------------------
  |  Branch (132:6): [True: 689, False: 3.20k]
  ------------------
  133|    689|    if(item->res)
  ------------------
  |  Branch (133:8): [True: 0, False: 689]
  ------------------
  134|      0|      Curl_freeaddrinfo(item->res);
  135|    689|    curlx_free(item);
  ------------------
  |  | 1488|    689|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  136|    689|  }
  137|  3.88k|}
asyn-thrdd.c:async_thrdd_item_free:
  460|    689|{
  461|    689|  async_thrdd_item_destroy(item);
  462|    689|}
asyn-thrdd.c:async_thrdd_item_process:
  360|    650|{
  361|    650|  struct async_thrdd_item *item = arg;
  362|    650|  struct addrinfo hints;
  363|    650|  char service[12];
  364|    650|  int pf = PF_INET;
  365|    650|  int rc;
  366|       |
  367|    650|#ifdef DEBUGBUILD
  368|    650|  if(item->delay_ms) {
  ------------------
  |  Branch (368:6): [True: 0, False: 650]
  ------------------
  369|      0|    curlx_wait_ms(item->delay_ms);
  370|      0|  }
  371|    650|  if(item->delay_fail_ms) {
  ------------------
  |  Branch (371:6): [True: 0, False: 650]
  ------------------
  372|      0|    curlx_wait_ms(item->delay_fail_ms);
  373|      0|    item->negative = item->dbg_negative;
  374|      0|    return;
  375|      0|  }
  376|    650|#endif
  377|       |
  378|    650|  memset(&hints, 0, sizeof(hints));
  379|    650|#ifdef CURLRES_IPV6
  380|    650|  if(item->dns_queries & CURL_DNSQ_AAAA) {
  ------------------
  |  |   52|    650|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (380:6): [True: 285, False: 365]
  ------------------
  381|    285|    pf = (item->dns_queries & CURL_DNSQ_A) ? PF_UNSPEC : PF_INET6;
  ------------------
  |  |   51|    285|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (381:10): [True: 0, False: 285]
  ------------------
  382|    285|  }
  383|    650|#endif
  384|    650|  hints.ai_family = pf;
  385|    650|  hints.ai_socktype = Curl_socktype_for_transport(item->transport);
  386|    650|  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|    650|  curl_msnprintf(service, sizeof(service), "%u", item->port);
  394|    650|#ifdef AI_NUMERICSERV
  395|    650|  hints.ai_flags |= AI_NUMERICSERV;
  396|    650|#endif
  397|       |
  398|    650|  rc = Curl_getaddrinfo_ex(item->hostname, service, &hints, &item->res);
  399|    650|  if(rc) {
  ------------------
  |  Branch (399:6): [True: 641, False: 9]
  ------------------
  400|    641|    item->sockerr = SOCKERRNO ? SOCKERRNO : rc;
  ------------------
  |  | 1091|    641|#define SOCKERRNO         errno
  ------------------
                  item->sockerr = SOCKERRNO ? SOCKERRNO : rc;
  ------------------
  |  | 1091|    641|#define SOCKERRNO         errno
  ------------------
  |  Branch (400:21): [True: 8, False: 633]
  ------------------
  401|    641|    if(item->sockerr == 0)
  ------------------
  |  Branch (401:8): [True: 0, False: 641]
  ------------------
  402|      0|      item->sockerr = RESOLVER_ENOMEM;
  ------------------
  |  |   46|      0|#define RESOLVER_ENOMEM  EAI_MEMORY  /* = WSA_NOT_ENOUGH_MEMORY on Windows */
  ------------------
  403|    641|    item->negative = gai_negative(rc);
  404|    641|  }
  405|      9|  else {
  406|      9|    Curl_addrinfo_set_port(item->res, item->port);
  407|      9|  }
  408|    650|}
asyn-thrdd.c:gai_negative:
  343|    641|{
  344|    641|  switch(rc) {
  345|      0|#ifdef EAI_NONAME
  346|    614|  case EAI_NONAME:
  ------------------
  |  Branch (346:3): [True: 614, False: 27]
  ------------------
  347|    614|#endif
  348|    614|#if defined(EAI_NODATA) && \
  349|    614|  (!defined(EAI_NONAME) || (EAI_NODATA != EAI_NONAME))
  350|    640|  case EAI_NODATA:
  ------------------
  |  Branch (350:3): [True: 26, False: 615]
  ------------------
  351|    640|#endif
  352|    640|    return TRUE;
  ------------------
  |  | 1051|    640|#define TRUE true
  ------------------
  353|      1|  default:
  ------------------
  |  Branch (353:3): [True: 1, False: 640]
  ------------------
  354|       |    return FALSE;
  ------------------
  |  | 1054|      1|#define FALSE false
  ------------------
  355|    641|  }
  356|    641|}
asyn-thrdd.c:async_thrdd_event:
  444|    456|{
  445|    456|  struct Curl_multi *multi = user_data;
  446|    456|  (void)tqueue;
  447|    456|  switch(ev) {
  448|    456|  case CURL_THRDQ_EV_ITEM_DONE:
  ------------------
  |  Branch (448:3): [True: 456, False: 0]
  ------------------
  449|    456|    (void)curl_multi_wakeup(multi);
  450|    456|    break;
  451|      0|  default:
  ------------------
  |  Branch (451:3): [True: 0, False: 456]
  ------------------
  452|      0|    break;
  453|    456|  }
  454|    456|}
asyn-thrdd.c:async_thrdd_report_item:
  509|    327|{
  510|    327|  char buf[MAX_IPADR_LEN];
  511|    327|  struct dynbuf tmp;
  512|    327|  const char *sep = "";
  513|    327|  const struct Curl_addrinfo *ai = item->res;
  514|    327|  CURLcode result;
  515|    327|  int ai_family;
  516|    327|#ifdef USE_IPV6
  517|    327|  ai_family = (item->dns_queries & CURL_DNSQ_AAAA) ? AF_INET6 : AF_INET;
  ------------------
  |  |   52|    327|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (517:15): [True: 109, False: 218]
  ------------------
  518|       |#else
  519|       |  ai_family = AF_INET;
  520|       |#endif
  521|       |
  522|    327|  if(!CURL_TRC_DNS_is_verbose(data))
  ------------------
  |  |  137|    327|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  ------------------
  |  |  |  |  326|    327|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    654|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 327, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 327]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    654|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|    327|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  523|    327|    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|    689|{
  603|    689|  struct async_thrdd_item *item;
  604|    689|  CURLcode result;
  605|       |
  606|    689|  item = async_thrdd_item_create(data, async->id, dns_queries,
  607|    689|                                 async->hostname, async->port,
  608|    689|                                 async->transport);
  609|    689|  if(!item) {
  ------------------
  |  Branch (609:6): [True: 0, False: 689]
  ------------------
  610|      0|    result = CURLE_OUT_OF_MEMORY;
  611|      0|    goto out;
  612|      0|  }
  613|    689|  CURL_TRC_DNS(data, "queueing query %s", item->description);
  ------------------
  |  |  168|    689|  do {                                 \
  |  |  169|    689|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    689|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    689|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.37k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 689, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 689]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.37k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    689|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    689|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    689|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 689]
  |  |  ------------------
  ------------------
  614|    689|  result = Curl_thrdq_send(data->multi->resolv_thrdq, item,
  615|    689|                           async_item_description(item), async->timeout_ms);
  ------------------
  |  |  104|    689|#define async_item_description(x)   (x)->description
  ------------------
  616|    689|  if(result)
  ------------------
  |  Branch (616:6): [True: 0, False: 689]
  ------------------
  617|      0|    goto out;
  618|    689|  item = NULL;
  619|    689|  async->queries_ongoing++;
  620|       |
  621|    689|out:
  622|    689|  if(item)
  ------------------
  |  Branch (622:6): [True: 0, False: 689]
  ------------------
  623|      0|    async_thrdd_item_free(item);
  624|    689|  return result;
  625|    689|}
asyn-thrdd.c:async_thrdd_item_create:
  145|    689|{
  146|    689|  size_t hostlen = strlen(hostname);
  147|    689|  struct async_thrdd_item *item;
  148|       |
  149|    689|  item = curlx_calloc(1, sizeof(*item) + hostlen);
  ------------------
  |  | 1485|    689|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  150|    689|  if(!item)
  ------------------
  |  Branch (150:6): [True: 0, False: 689]
  ------------------
  151|      0|    return NULL;
  152|       |
  153|    689|  if(hostlen) /* NUL byte of name already in struct size */
  ------------------
  |  Branch (153:6): [True: 689, False: 0]
  ------------------
  154|    689|    memcpy(item->hostname, hostname, hostlen);
  155|    689|  item->mid = data->mid;
  156|    689|  item->resolv_id = resolv_id;
  157|    689|  item->dns_queries = dns_queries;
  158|    689|  item->port = port;
  159|    689|  item->transport = transport;
  160|       |
  161|    689|#ifdef CURLVERBOSE
  162|    689|  curl_msnprintf(item->description, sizeof(item->description),
  163|    689|                 "[%" FMT_OFF_T "/%u] %s %s:%u",
  164|    689|                 data->id, item->resolv_id,
  165|    689|                 Curl_resolv_query_str(dns_queries),
  166|    689|                 item->hostname, item->port);
  167|    689|#endif
  168|       |
  169|    689|#ifdef DEBUGBUILD
  170|    689|  {
  171|    689|    const char *p = getenv("CURL_DBG_RESOLV_DELAY");
  172|    689|    if(p) {
  ------------------
  |  Branch (172:8): [True: 0, False: 689]
  ------------------
  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|    689|    p = getenv("CURL_DBG_RESOLV_FAIL_DELAY");
  179|    689|    if(p) {
  ------------------
  |  Branch (179:8): [True: 0, False: 689]
  ------------------
  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|    689|    if(getenv("CURL_DBG_RESOLV_FAIL_NEGATIVE"))
  ------------------
  |  Branch (187:8): [True: 0, False: 689]
  ------------------
  188|      0|      item->dbg_negative = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  189|    689|  }
  190|    689|#endif
  191|       |
  192|    689|  return item;
  193|    689|}
asyn-thrdd.c:async_thrdd_get_ai:
  823|     92|{
  824|     92|  unsigned int i = 0;
  825|     92|  for(i = 0; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (825:14): [True: 0, False: 92]
  ------------------
  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|     92|  return NULL;
  833|     92|}

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

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

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

Curl_cf_h1_proxy_insert_after:
  962|  1.53k|{
  963|  1.53k|  struct Curl_cfilter *cf;
  964|  1.53k|  struct cf_h1_proxy_ctx *pctx;
  965|  1.53k|  struct h1_tunnel_state *ts;
  966|  1.53k|  CURLcode result;
  967|       |
  968|  1.53k|  (void)data;
  969|  1.53k|  if(!dest)
  ------------------
  |  Branch (969:6): [True: 0, False: 1.53k]
  ------------------
  970|      0|    return CURLE_FAILED_INIT;
  971|  1.53k|  if((httpversion < 10) || (httpversion >= 20))
  ------------------
  |  Branch (971:6): [True: 0, False: 1.53k]
  |  Branch (971:28): [True: 0, False: 1.53k]
  ------------------
  972|      0|    return CURLE_FAILED_INIT;
  973|       |
  974|  1.53k|  ts = curlx_calloc(1, sizeof(*ts));
  ------------------
  |  | 1485|  1.53k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  975|  1.53k|  if(!ts) {
  ------------------
  |  Branch (975:6): [True: 0, False: 1.53k]
  ------------------
  976|      0|    result = CURLE_OUT_OF_MEMORY;
  977|      0|    goto out;
  978|      0|  }
  979|  1.53k|  Curl_peer_link(&ts->dest, dest);
  980|  1.53k|  ts->httpversion = httpversion;
  981|  1.53k|  curlx_dyn_init(&ts->rcvbuf, DYN_PROXY_CONNECT_HEADERS);
  ------------------
  |  |   73|  1.53k|#define DYN_PROXY_CONNECT_HEADERS 16384
  ------------------
  982|  1.53k|  curlx_dyn_init(&ts->request_data, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|  1.53k|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
  983|  1.53k|  Curl_httpchunk_init(data, &ts->ch, TRUE);
  ------------------
  |  | 1051|  1.53k|#define TRUE true
  ------------------
  984|       |
  985|  1.53k|  pctx = curlx_calloc(1, sizeof(*pctx));
  ------------------
  |  | 1485|  1.53k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  986|  1.53k|  if(!pctx) {
  ------------------
  |  Branch (986:6): [True: 0, False: 1.53k]
  ------------------
  987|      0|    result = CURLE_OUT_OF_MEMORY;
  988|      0|    goto out;
  989|      0|  }
  990|  1.53k|  pctx->udp_tunnel = udp_tunnel;
  991|  1.53k|  pctx->ts = ts;
  992|  1.53k|  result = Curl_cf_create(&cf, &Curl_cft_h1_proxy, pctx);
  993|  1.53k|  if(result) {
  ------------------
  |  Branch (993:6): [True: 0, False: 1.53k]
  ------------------
  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.53k|  ts = NULL;
  998|  1.53k|  Curl_conn_cf_insert_after(cf_at, cf);
  999|       |
 1000|  1.53k|out:
 1001|  1.53k|  tunnel_free(ts, data);
 1002|  1.53k|  return result;
 1003|  1.53k|}
cf-h1-proxy.c:cf_h1_proxy_destroy:
  907|  1.53k|{
  908|  1.53k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  1.53k|  do {                                          \
  |  |  154|  1.53k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.53k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.07k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.53k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.53k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.07k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.53k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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.53k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.53k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.53k]
  |  |  ------------------
  ------------------
  909|  1.53k|  cf_tunnel_free(cf, data);
  910|       |  curlx_safefree(cf->ctx);
  ------------------
  |  | 1332|  1.53k|  do {                      \
  |  | 1333|  1.53k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  1.53k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  1.53k|    (ptr) = NULL;           \
  |  | 1335|  1.53k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 1.53k]
  |  |  ------------------
  ------------------
  911|  1.53k|}
cf-h1-proxy.c:cf_tunnel_free:
  214|  1.53k|{
  215|  1.53k|  if(cf) {
  ------------------
  |  Branch (215:6): [True: 1.53k, False: 0]
  ------------------
  216|  1.53k|    struct cf_h1_proxy_ctx *pctx = cf->ctx;
  217|  1.53k|    struct h1_tunnel_state *ts = pctx ? pctx->ts : NULL;
  ------------------
  |  Branch (217:34): [True: 1.53k, False: 0]
  ------------------
  218|  1.53k|    if(ts) {
  ------------------
  |  Branch (218:8): [True: 1.53k, False: 3]
  ------------------
  219|  1.53k|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  220|  1.53k|      tunnel_free(ts, data);
  221|       |      pctx->ts = NULL;
  222|  1.53k|    }
  223|  1.53k|  }
  224|  1.53k|}
cf-h1-proxy.c:h1_tunnel_go_state:
  148|  6.15k|{
  149|  6.15k|  if(ts->tunnel_state == new_state)
  ------------------
  |  Branch (149:6): [True: 1.52k, False: 4.62k]
  ------------------
  150|  1.52k|    return;
  151|       |  /* entering this one */
  152|  4.62k|  switch(new_state) {
  ------------------
  |  Branch (152:10): [True: 4.62k, False: 0]
  ------------------
  153|      0|  case H1_TUNNEL_INIT:
  ------------------
  |  Branch (153:3): [True: 0, False: 4.62k]
  ------------------
  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.52k|  case H1_TUNNEL_CONNECT:
  ------------------
  |  Branch (158:3): [True: 1.52k, False: 3.10k]
  ------------------
  159|  1.52k|    CURL_TRC_CF(data, cf, "new tunnel state 'connect'");
  ------------------
  |  |  153|  1.52k|  do {                                          \
  |  |  154|  1.52k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.52k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.04k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.52k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.52k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.04k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->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.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|  1.52k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.52k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.52k]
  |  |  ------------------
  ------------------
  160|  1.52k|    ts->tunnel_state = H1_TUNNEL_CONNECT;
  161|  1.52k|    ts->keepon = KEEPON_CONNECT;
  162|  1.52k|    curlx_dyn_reset(&ts->rcvbuf);
  163|  1.52k|    break;
  164|       |
  165|  1.52k|  case H1_TUNNEL_RECEIVE:
  ------------------
  |  Branch (165:3): [True: 1.52k, False: 3.10k]
  ------------------
  166|  1.52k|    CURL_TRC_CF(data, cf, "new tunnel state 'receive'");
  ------------------
  |  |  153|  1.52k|  do {                                          \
  |  |  154|  1.52k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.52k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.04k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.52k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.52k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.04k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->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.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|  1.52k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.52k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.52k]
  |  |  ------------------
  ------------------
  167|  1.52k|    ts->tunnel_state = H1_TUNNEL_RECEIVE;
  168|  1.52k|    break;
  169|       |
  170|     41|  case H1_TUNNEL_RESPONSE:
  ------------------
  |  Branch (170:3): [True: 41, False: 4.58k]
  ------------------
  171|     41|    CURL_TRC_CF(data, cf, "new tunnel state 'response'");
  ------------------
  |  |  153|     41|  do {                                          \
  |  |  154|     41|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     41|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     82|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 41, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 41]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     82|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     41|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     41|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     41|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 41]
  |  |  ------------------
  ------------------
  172|     41|    ts->tunnel_state = H1_TUNNEL_RESPONSE;
  173|     41|    break;
  174|       |
  175|      3|  case H1_TUNNEL_ESTABLISHED:
  ------------------
  |  Branch (175:3): [True: 3, False: 4.62k]
  ------------------
  176|      3|    CURL_TRC_CF(data, cf, "new tunnel state 'established'");
  ------------------
  |  |  153|      3|  do {                                          \
  |  |  154|      3|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      3|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      6|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      6|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      3|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      3|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
  177|      3|    infof(data, "CONNECT%s phase completed for HTTP proxy",
  ------------------
  |  |  143|      3|  do {                               \
  |  |  144|      3|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      3|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 3, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  320|      3|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      3|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
  178|      3|          h1_proxy_is_udp(cf) ? "-UDP" : "");
  179|       |
  180|      3|    data->state.authproxy.done = TRUE;
  ------------------
  |  | 1051|      3|#define TRUE true
  ------------------
  181|      3|    data->state.authproxy.multipass = FALSE;
  ------------------
  |  | 1054|      3|#define FALSE false
  ------------------
  182|      3|    FALLTHROUGH();
  ------------------
  |  |  817|      3|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  183|  1.53k|  case H1_TUNNEL_FAILED:
  ------------------
  |  Branch (183:3): [True: 1.53k, False: 3.08k]
  ------------------
  184|  1.53k|    if(new_state == H1_TUNNEL_FAILED)
  ------------------
  |  Branch (184:8): [True: 1.53k, False: 3]
  ------------------
  185|  1.53k|      CURL_TRC_CF(data, cf, "new tunnel state 'failed'");
  ------------------
  |  |  153|  1.53k|  do {                                          \
  |  |  154|  1.53k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.53k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.07k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.53k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.53k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.07k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.53k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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.53k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.53k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.53k]
  |  |  ------------------
  ------------------
  186|  1.53k|    ts->tunnel_state = new_state;
  187|  1.53k|    curlx_dyn_reset(&ts->rcvbuf);
  188|  1.53k|    curlx_dyn_reset(&ts->request_data);
  189|       |    /* restore the protocol pointer */
  190|  1.53k|    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.53k|  do {                      \
  |  | 1333|  1.53k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  1.53k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  1.53k|    (ptr) = NULL;           \
  |  | 1335|  1.53k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 1.53k]
  |  |  ------------------
  ------------------
  196|  1.53k|    break;
  197|  4.62k|  }
  198|  4.62k|}
cf-h1-proxy.c:h1_proxy_is_udp:
   94|  2.82k|{
   95|  2.82k|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
   96|  2.82k|  return (pctx->udp_tunnel ? TRUE : FALSE);
  ------------------
  |  | 1051|  2.82k|#define TRUE true
  ------------------
                return (pctx->udp_tunnel ? TRUE : FALSE);
  ------------------
  |  | 1054|  2.82k|#define FALSE false
  ------------------
  |  Branch (96:11): [True: 0, False: 2.82k]
  ------------------
   97|  2.82k|}
cf-h1-proxy.c:cf_h1_proxy_connect:
  824|  1.75k|{
  825|  1.75k|  CURLcode result;
  826|  1.75k|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  827|  1.75k|  struct h1_tunnel_state *ts = pctx->ts;
  828|       |
  829|  1.75k|  if(cf->connected) {
  ------------------
  |  Branch (829:6): [True: 0, False: 1.75k]
  ------------------
  830|      0|    *done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  831|      0|    return CURLE_OK;
  832|      0|  }
  833|       |
  834|  1.75k|  CURL_TRC_CF(data, cf, "connect");
  ------------------
  |  |  153|  1.75k|  do {                                          \
  |  |  154|  1.75k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  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]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.75k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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.75k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.75k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.75k]
  |  |  ------------------
  ------------------
  835|  1.75k|  result = cf->next->cft->do_connect(cf->next, data, done);
  836|  1.75k|  if(result || !*done)
  ------------------
  |  Branch (836:6): [True: 0, False: 1.75k]
  |  Branch (836:16): [True: 0, False: 1.75k]
  ------------------
  837|      0|    return result;
  838|       |
  839|  1.75k|  *done = FALSE;
  ------------------
  |  | 1054|  1.75k|#define FALSE false
  ------------------
  840|  1.75k|  if(!ts) {
  ------------------
  |  Branch (840:6): [True: 0, False: 1.75k]
  ------------------
  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.75k|  result = H1_CONNECT(cf, data, ts);
  850|  1.75k|  if(result)
  ------------------
  |  Branch (850:6): [True: 1.52k, False: 231]
  ------------------
  851|  1.52k|    goto out;
  852|    231|  curlx_safefree(data->req.hd_proxy_auth);
  ------------------
  |  | 1332|    231|  do {                      \
  |  | 1333|    231|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|    231|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|    231|    (ptr) = NULL;           \
  |  | 1335|    231|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 231]
  |  |  ------------------
  ------------------
  853|       |
  854|  1.75k|out:
  855|  1.75k|  *done = (result == CURLE_OK) && tunnel_is_established(pctx->ts);
  ------------------
  |  Branch (855:11): [True: 231, False: 1.52k]
  |  Branch (855:35): [True: 3, False: 228]
  ------------------
  856|  1.75k|  if(*done) {
  ------------------
  |  Branch (856:6): [True: 3, False: 1.75k]
  ------------------
  857|      3|    cf->connected = TRUE;
  ------------------
  |  | 1051|      3|#define TRUE true
  ------------------
  858|       |    /* The real request will follow the CONNECT, reset request partially */
  859|      3|    Curl_req_soft_reset(&data->req, data);
  860|      3|    Curl_client_reset(data);
  861|      3|    Curl_pgrsReset(data);
  862|      3|    cf_tunnel_free(cf, data);
  863|      3|  }
  864|  1.75k|  return result;
  865|    231|}
cf-h1-proxy.c:H1_CONNECT:
  698|  1.75k|{
  699|  1.75k|  struct connectdata *conn = cf->conn;
  700|  1.75k|  CURLcode result;
  701|  1.75k|  bool done;
  702|       |
  703|  1.75k|  if(tunnel_is_established(ts))
  ------------------
  |  Branch (703:6): [True: 0, False: 1.75k]
  ------------------
  704|      0|    return CURLE_OK;
  705|  1.75k|  if(tunnel_is_failed(ts))
  ------------------
  |  Branch (705:6): [True: 0, False: 1.75k]
  ------------------
  706|      0|    return CURLE_RECV_ERROR; /* Need a cfilter close and new bootstrap */
  707|       |
  708|  1.75k|  do {
  709|       |
  710|  1.75k|    if(Curl_timeleft_ms(data) < 0) {
  ------------------
  |  Branch (710:8): [True: 0, False: 1.75k]
  ------------------
  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.75k|    switch(ts->tunnel_state) {
  717|  1.53k|    case H1_TUNNEL_INIT:
  ------------------
  |  Branch (717:5): [True: 1.53k, False: 224]
  ------------------
  718|       |      /* Prepare the CONNECT request and make a first attempt to send. */
  719|  1.53k|      CURL_TRC_CF(data, cf, "CONNECT start");
  ------------------
  |  |  153|  1.53k|  do {                                          \
  |  |  154|  1.53k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.53k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.07k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.53k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.53k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.07k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.53k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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.53k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.53k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.53k]
  |  |  ------------------
  ------------------
  720|  1.53k|      result = start_CONNECT(cf, data, ts);
  721|  1.53k|      if(result)
  ------------------
  |  Branch (721:10): [True: 13, False: 1.52k]
  ------------------
  722|     13|        goto out;
  723|  1.52k|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_CONNECT, data);
  724|  1.52k|      FALLTHROUGH();
  ------------------
  |  |  817|  1.52k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  725|       |
  726|  1.52k|    case H1_TUNNEL_CONNECT:
  ------------------
  |  Branch (726:5): [True: 0, False: 1.75k]
  ------------------
  727|       |      /* see that the request is completely sent */
  728|  1.52k|      CURL_TRC_CF(data, cf, "CONNECT send");
  ------------------
  |  |  153|  1.52k|  do {                                          \
  |  |  154|  1.52k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.52k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.04k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.52k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.52k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.04k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->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.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|  1.52k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.52k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.52k]
  |  |  ------------------
  ------------------
  729|  1.52k|      result = send_CONNECT(cf, data, ts, &done);
  730|  1.52k|      if(result || !done)
  ------------------
  |  Branch (730:10): [True: 0, False: 1.52k]
  |  Branch (730:20): [True: 0, False: 1.52k]
  ------------------
  731|      0|        goto out;
  732|  1.52k|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_RECEIVE, data);
  733|  1.52k|      FALLTHROUGH();
  ------------------
  |  |  817|  1.52k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  734|       |
  735|  1.74k|    case H1_TUNNEL_RECEIVE:
  ------------------
  |  Branch (735:5): [True: 224, False: 1.53k]
  ------------------
  736|       |      /* read what is there */
  737|  1.74k|      CURL_TRC_CF(data, cf, "CONNECT receive");
  ------------------
  |  |  153|  1.74k|  do {                                          \
  |  |  154|  1.74k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.74k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.49k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.74k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.74k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.49k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->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.74k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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.74k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.74k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.74k]
  |  |  ------------------
  ------------------
  738|  1.74k|      result = recv_CONNECT_resp(cf, data, ts, &done);
  739|  1.74k|      if(result)
  ------------------
  |  Branch (739:10): [True: 1.47k, False: 269]
  ------------------
  740|  1.47k|        CURL_TRC_CF(data, cf, "error receiving CONNECT response: %d",
  ------------------
  |  |  153|  1.47k|  do {                                          \
  |  |  154|  1.47k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.47k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.95k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.47k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.95k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.47k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.47k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.47k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
  741|  1.74k|                    (int)result);
  742|  1.74k|      if(!result)
  ------------------
  |  Branch (742:10): [True: 269, False: 1.47k]
  ------------------
  743|    269|        result = Curl_pgrsUpdate(data);
  744|       |      /* error or not complete yet. return for more multi-multi */
  745|  1.74k|      if(result || !done)
  ------------------
  |  Branch (745:10): [True: 1.47k, False: 269]
  |  Branch (745:20): [True: 228, False: 41]
  ------------------
  746|  1.70k|        goto out;
  747|       |      /* got it */
  748|     41|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_RESPONSE, data);
  749|     41|      FALLTHROUGH();
  ------------------
  |  |  817|     41|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  750|       |
  751|     41|    case H1_TUNNEL_RESPONSE:
  ------------------
  |  Branch (751:5): [True: 0, False: 1.75k]
  ------------------
  752|     41|      CURL_TRC_CF(data, cf, "CONNECT response");
  ------------------
  |  |  153|     41|  do {                                          \
  |  |  154|     41|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     41|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     82|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 41, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 41]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     82|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     41|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     41|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     41|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 41]
  |  |  ------------------
  ------------------
  753|     41|      if(data->req.newurl) {
  ------------------
  |  Branch (753:10): [True: 0, False: 41]
  ------------------
  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|     41|      break;
  775|       |
  776|     41|    default:
  ------------------
  |  Branch (776:5): [True: 0, False: 1.75k]
  ------------------
  777|      0|      break;
  778|  1.75k|    }
  779|       |
  780|  1.75k|  } while(data->req.newurl);
  ------------------
  |  Branch (780:11): [True: 0, False: 41]
  ------------------
  781|       |
  782|     41|  DEBUGASSERT(ts->tunnel_state == H1_TUNNEL_RESPONSE);
  ------------------
  |  | 1077|     41|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (782:3): [True: 0, False: 41]
  |  Branch (782:3): [True: 41, False: 0]
  ------------------
  783|     41|  if(h1_proxy_is_udp(cf)) {
  ------------------
  |  Branch (783:6): [True: 0, False: 41]
  ------------------
  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|     41|  else {
  796|     41|    if(data->info.httpproxycode / 100 != 2) {
  ------------------
  |  Branch (796:8): [True: 38, False: 3]
  ------------------
  797|       |      /* a non-2xx response and we have no next URL to try. */
  798|     38|      curlx_safefree(data->req.newurl);
  ------------------
  |  | 1332|     38|  do {                      \
  |  | 1333|     38|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|     38|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|     38|    (ptr) = NULL;           \
  |  | 1335|     38|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 38]
  |  |  ------------------
  ------------------
  799|     38|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  800|     38|      failf(data, "CONNECT tunnel failed, response %d", data->req.httpcode);
  ------------------
  |  |   62|     38|#define failf Curl_failf
  ------------------
  801|     38|      return CURLE_COULDNT_CONNECT;
  802|     38|    }
  803|     41|  }
  804|       |  /* 2xx response, SUCCESS! */
  805|       |  /* 101 Switching Protocol for CONNECT-UDP */
  806|      3|  h1_tunnel_go_state(cf, ts, H1_TUNNEL_ESTABLISHED, data);
  807|      3|  if(h1_proxy_is_udp(cf))
  ------------------
  |  Branch (807:6): [True: 0, False: 3]
  ------------------
  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|      3|                                    data->info.httpproxycode);
  810|      3|  else
  811|      3|    infof(data, "CONNECT tunnel established, response %d",
  ------------------
  |  |  143|      3|  do {                               \
  |  |  144|      3|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      3|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 3, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  320|      3|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      3|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
  812|      3|                                    data->info.httpproxycode);
  813|      3|  result = CURLE_OK;
  814|       |
  815|  1.72k|out:
  816|  1.72k|  if(result)
  ------------------
  |  Branch (816:6): [True: 1.49k, False: 231]
  ------------------
  817|  1.49k|    h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  818|  1.72k|  return result;
  819|      3|}
cf-h1-proxy.c:tunnel_is_failed:
   89|  1.75k|{
   90|  1.75k|  return ts && (ts->tunnel_state == H1_TUNNEL_FAILED);
  ------------------
  |  Branch (90:10): [True: 1.75k, False: 0]
  |  Branch (90:16): [True: 0, False: 1.75k]
  ------------------
   91|  1.75k|}
cf-h1-proxy.c:start_CONNECT:
  234|  1.53k|{
  235|  1.53k|  struct httpreq *req = NULL;
  236|  1.53k|  int http_minor;
  237|  1.53k|  CURLcode result;
  238|       |
  239|  1.53k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  1.53k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (239:3): [True: 0, False: 1.53k]
  |  Branch (239:3): [True: 1.53k, 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.53k|  curlx_safefree(data->req.newurl);
  ------------------
  |  | 1332|  1.53k|  do {                      \
  |  | 1333|  1.53k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  1.53k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  1.53k|    (ptr) = NULL;           \
  |  | 1335|  1.53k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 1.53k]
  |  |  ------------------
  ------------------
  243|       |
  244|  1.53k|  result = Curl_http_proxy_create_tunnel_request(&req, cf, data, ts->dest,
  245|  1.53k|                                                  PROXY_HTTP_V1,
  246|  1.53k|                                                  h1_proxy_is_udp(cf));
  247|  1.53k|  if(result)
  ------------------
  |  Branch (247:6): [True: 13, False: 1.52k]
  ------------------
  248|     13|    goto out;
  249|       |
  250|  1.52k|  curlx_dyn_reset(&ts->request_data);
  251|  1.52k|  ts->nsent = 0;
  252|  1.52k|  ts->headerlines = 0;
  253|  1.52k|  http_minor = ts->httpversion % 10;
  254|       |
  255|  1.52k|  result = Curl_h1_req_write_head(req, http_minor, &ts->request_data);
  256|  1.52k|  if(!result)
  ------------------
  |  Branch (256:6): [True: 1.52k, False: 0]
  ------------------
  257|  1.52k|    result = Curl_creader_set_null(data);
  258|       |
  259|  1.53k|out:
  260|  1.53k|  if(result)
  ------------------
  |  Branch (260:6): [True: 13, False: 1.52k]
  ------------------
  261|     13|    failf(data, "Failed sending CONNECT to proxy");
  ------------------
  |  |   62|     13|#define failf Curl_failf
  ------------------
  262|  1.53k|  if(req)
  ------------------
  |  Branch (262:6): [True: 1.52k, False: 13]
  ------------------
  263|  1.52k|    Curl_http_req_free(req);
  264|  1.53k|  return result;
  265|  1.52k|}
cf-h1-proxy.c:send_CONNECT:
  271|  1.52k|{
  272|  1.52k|  const uint8_t *buf = curlx_dyn_uptr(&ts->request_data);
  273|  1.52k|  size_t request_len = curlx_dyn_len(&ts->request_data);
  274|  1.52k|  size_t blen = request_len;
  275|  1.52k|  CURLcode result = CURLE_OK;
  276|  1.52k|  size_t nwritten;
  277|       |
  278|  1.52k|  if(blen <= ts->nsent)
  ------------------
  |  Branch (278:6): [True: 0, False: 1.52k]
  ------------------
  279|      0|    goto out;  /* we are done */
  280|       |
  281|  1.52k|  blen -= ts->nsent;
  282|  1.52k|  buf += ts->nsent;
  283|       |
  284|  1.52k|  result = cf->next->cft->do_send(cf->next, data, buf, blen, FALSE, &nwritten);
  ------------------
  |  | 1054|  1.52k|#define FALSE false
  ------------------
  285|  1.52k|  if(result) {
  ------------------
  |  Branch (285:6): [True: 0, False: 1.52k]
  ------------------
  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.52k|  DEBUGASSERT(blen >= nwritten);
  ------------------
  |  | 1077|  1.52k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (291:3): [True: 0, False: 1.52k]
  |  Branch (291:3): [True: 1.52k, False: 0]
  ------------------
  292|  1.52k|  ts->nsent += nwritten;
  293|  1.52k|  Curl_debug(data, CURLINFO_HEADER_OUT, (const char *)buf, nwritten);
  294|       |
  295|  1.52k|out:
  296|  1.52k|  if(result)
  ------------------
  |  Branch (296:6): [True: 0, False: 1.52k]
  ------------------
  297|      0|    failf(data, "Failed sending CONNECT to proxy");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  298|  1.52k|  *done = (!result && (ts->nsent >= request_len));
  ------------------
  |  Branch (298:12): [True: 1.52k, False: 0]
  |  Branch (298:23): [True: 1.52k, False: 0]
  ------------------
  299|  1.52k|  return result;
  300|  1.52k|}
cf-h1-proxy.c:recv_CONNECT_resp:
  550|  1.74k|{
  551|  1.74k|  CURLcode result = CURLE_OK;
  552|  1.74k|  int error;
  553|       |
  554|  1.74k|#define SELECT_OK      0
  555|  1.74k|#define SELECT_ERROR   1
  556|       |
  557|  1.74k|  error = SELECT_OK;
  ------------------
  |  |  554|  1.74k|#define SELECT_OK      0
  ------------------
  558|  1.74k|  *done = FALSE;
  ------------------
  |  | 1054|  1.74k|#define FALSE false
  ------------------
  559|       |
  560|   126k|  while(ts->keepon) {
  ------------------
  |  Branch (560:9): [True: 126k, False: 41]
  ------------------
  561|   126k|    size_t nread;
  562|   126k|    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|   126k|    result = Curl_conn_recv(data, cf->sockindex, &byte, 1, &nread);
  567|   126k|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (567:8): [True: 228, False: 126k]
  ------------------
  568|       |      /* socket buffer drained, return */
  569|    228|      return CURLE_OK;
  570|       |
  571|   126k|    if(!result)
  ------------------
  |  Branch (571:8): [True: 126k, False: 0]
  ------------------
  572|   126k|      result = Curl_pgrsUpdate(data);
  573|       |
  574|   126k|    if(result) {
  ------------------
  |  Branch (574:8): [True: 0, False: 126k]
  ------------------
  575|      0|      ts->keepon = KEEPON_DONE;
  576|      0|      break;
  577|      0|    }
  578|       |
  579|   126k|    if(!nread) {
  ------------------
  |  Branch (579:8): [True: 1.40k, False: 124k]
  ------------------
  580|  1.40k|      if(ts->maybe_folded) {
  ------------------
  |  Branch (580:10): [True: 22, False: 1.37k]
  ------------------
  581|       |        /* EOF right after LF: finalize the pending header line. */
  582|     22|        result = single_header(cf, data, ts);
  583|     22|        if(result)
  ------------------
  |  Branch (583:12): [True: 7, False: 15]
  ------------------
  584|      7|          return result;
  585|     15|        ts->maybe_folded = FALSE;
  ------------------
  |  | 1054|     15|#define FALSE false
  ------------------
  586|     15|      }
  587|  1.39k|      if(data->set.proxyauth && data->state.authproxy.avail &&
  ------------------
  |  Branch (587:10): [True: 1.39k, False: 1]
  |  Branch (587:33): [True: 0, False: 1.39k]
  ------------------
  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.39k|      else {
  595|  1.39k|        error = SELECT_ERROR;
  ------------------
  |  |  555|  1.39k|#define SELECT_ERROR   1
  ------------------
  596|  1.39k|        failf(data, "Proxy CONNECT aborted");
  ------------------
  |  |   62|  1.39k|#define failf Curl_failf
  ------------------
  597|  1.39k|      }
  598|  1.39k|      ts->keepon = KEEPON_DONE;
  599|  1.39k|      break;
  600|  1.40k|    }
  601|       |
  602|   124k|    if(ts->keepon == KEEPON_IGNORE) {
  ------------------
  |  Branch (602:8): [True: 0, False: 124k]
  ------------------
  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|   124k|    if(ts->maybe_folded) {
  ------------------
  |  Branch (632:8): [True: 1.75k, False: 122k]
  ------------------
  633|  1.75k|      if(ISBLANK(byte)) {
  ------------------
  |  |   45|  1.75k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 142, False: 1.60k]
  |  |  |  Branch (45:38): [True: 348, False: 1.26k]
  |  |  ------------------
  ------------------
  634|    490|        Curl_http_to_fold(&ts->rcvbuf);
  635|    490|        ts->leading_unfold = TRUE;
  ------------------
  |  | 1051|    490|#define TRUE true
  ------------------
  636|    490|      }
  637|  1.26k|      else {
  638|  1.26k|        result = single_header(cf, data, ts);
  639|  1.26k|        if(result)
  ------------------
  |  Branch (639:12): [True: 70, False: 1.19k]
  ------------------
  640|     70|          return result;
  641|       |        /* now handle the new byte */
  642|  1.26k|      }
  643|  1.68k|      ts->maybe_folded = FALSE;
  ------------------
  |  | 1054|  1.68k|#define FALSE false
  ------------------
  644|  1.68k|    }
  645|       |
  646|   124k|    if(ts->leading_unfold) {
  ------------------
  |  Branch (646:8): [True: 1.65k, False: 122k]
  ------------------
  647|  1.65k|      if(ISBLANK(byte))
  ------------------
  |  |   45|  1.65k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 361, False: 1.29k]
  |  |  |  Branch (45:38): [True: 811, False: 485]
  |  |  ------------------
  ------------------
  648|       |        /* skip a bit brother */
  649|  1.17k|        continue;
  650|       |      /* non-blank, insert a space then continue the unfolding */
  651|    485|      if(curlx_dyn_addn(&ts->rcvbuf, " ", 1)) {
  ------------------
  |  Branch (651:10): [True: 0, False: 485]
  ------------------
  652|      0|        failf(data, "CONNECT response too large");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  653|      0|        return CURLE_RECV_ERROR;
  654|      0|      }
  655|    485|      ts->leading_unfold = FALSE;
  ------------------
  |  | 1054|    485|#define FALSE false
  ------------------
  656|    485|    }
  657|   123k|    if(curlx_dyn_addn(&ts->rcvbuf, &byte, 1)) {
  ------------------
  |  Branch (657:8): [True: 5, False: 123k]
  ------------------
  658|      5|      failf(data, "CONNECT response too large");
  ------------------
  |  |   62|      5|#define failf Curl_failf
  ------------------
  659|      5|      return CURLE_RECV_ERROR;
  660|      5|    }
  661|       |
  662|       |    /* if this is not the end of a header line then continue */
  663|   123k|    if(byte != 0x0a)
  ------------------
  |  Branch (663:8): [True: 121k, False: 1.81k]
  ------------------
  664|   121k|      continue;
  665|  1.81k|    else {
  666|  1.81k|      const char *linep = curlx_dyn_ptr(&ts->rcvbuf);
  667|  1.81k|      size_t hlen = curlx_dyn_len(&ts->rcvbuf);
  668|  1.81k|      if(hlen && ISNEWLINE(linep[0])) {
  ------------------
  |  |   50|  1.81k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 37, False: 1.77k]
  |  |  |  Branch (50:43): [True: 6, False: 1.77k]
  |  |  ------------------
  ------------------
  |  Branch (668:10): [True: 1.81k, False: 0]
  ------------------
  669|       |        /* end of headers */
  670|     43|        result = single_header(cf, data, ts);
  671|     43|        if(result)
  ------------------
  |  Branch (671:12): [True: 2, False: 41]
  ------------------
  672|      2|          return result;
  673|     43|      }
  674|  1.77k|      else
  675|  1.77k|        ts->maybe_folded = TRUE;
  ------------------
  |  | 1051|  1.77k|#define TRUE true
  ------------------
  676|  1.81k|    }
  677|       |
  678|  1.81k|    if(result)
  ------------------
  |  Branch (678:8): [True: 0, False: 1.81k]
  ------------------
  679|      0|      return result;
  680|  1.81k|  } /* while there is buffer left and loop is requested */
  681|       |
  682|  1.43k|  if(error)
  ------------------
  |  Branch (682:6): [True: 1.39k, False: 41]
  ------------------
  683|  1.39k|    result = CURLE_RECV_ERROR;
  684|  1.43k|  *done = (ts->keepon == KEEPON_DONE);
  685|  1.43k|  if(!result && *done &&
  ------------------
  |  Branch (685:6): [True: 41, False: 1.39k]
  |  Branch (685:17): [True: 41, False: 0]
  ------------------
  686|     41|     data->info.httpproxycode / 100 != 2 &&
  ------------------
  |  Branch (686:6): [True: 38, False: 3]
  ------------------
  687|     38|     !(h1_proxy_is_udp(cf) && data->info.httpproxycode == 101)) {
  ------------------
  |  Branch (687:8): [True: 0, False: 38]
  |  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|     38|    result = Curl_http_auth_act(data);
  691|     38|  }
  692|  1.43k|  return result;
  693|  1.74k|}
cf-h1-proxy.c:single_header:
  468|  1.32k|{
  469|  1.32k|  CURLcode result = CURLE_OK;
  470|  1.32k|  const char *linep = curlx_dyn_ptr(&ts->rcvbuf);
  471|  1.32k|  size_t line_len = curlx_dyn_len(&ts->rcvbuf); /* bytes in this line */
  472|  1.32k|  const struct SingleRequest *k = &data->req;
  473|  1.32k|  int writetype;
  474|  1.32k|  ts->headerlines++;
  475|       |
  476|       |  /* output debug if that is requested */
  477|  1.32k|  Curl_debug(data, CURLINFO_HEADER_IN, linep, line_len);
  478|       |
  479|       |  /* a CONNECT response line is handed to the client as a header, so it must
  480|       |     pass the same checks as a regular response header before delivery */
  481|  1.32k|  result = Curl_verify_header(data, linep, line_len);
  482|  1.32k|  if(result)
  ------------------
  |  Branch (482:6): [True: 42, False: 1.28k]
  ------------------
  483|     42|    return result;
  484|       |
  485|       |  /* send the header to the callback */
  486|  1.28k|  writetype = CLIENTWRITE_HEADER | CLIENTWRITE_CONNECT |
  ------------------
  |  |   44|  1.28k|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
                writetype = CLIENTWRITE_HEADER | CLIENTWRITE_CONNECT |
  ------------------
  |  |   46|  1.28k|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  487|  1.28k|    (ts->headerlines == 1 ? CLIENTWRITE_STATUS : 0);
  ------------------
  |  |   45|    238|#define CLIENTWRITE_STATUS  (1 << 3) /* a special status HEADER */
  ------------------
  |  Branch (487:6): [True: 238, False: 1.04k]
  ------------------
  488|  1.28k|  result = Curl_client_write(data, writetype, linep, line_len);
  489|  1.28k|  if(result)
  ------------------
  |  Branch (489:6): [True: 37, False: 1.24k]
  ------------------
  490|     37|    return result;
  491|       |
  492|  1.24k|  result = Curl_bump_headersize(data, line_len, TRUE);
  ------------------
  |  | 1051|  1.24k|#define TRUE true
  ------------------
  493|  1.24k|  if(result)
  ------------------
  |  Branch (493:6): [True: 0, False: 1.24k]
  ------------------
  494|      0|    return result;
  495|       |
  496|       |  /* Newlines are CRLF, so the CR is ignored as the line is not
  497|       |     really terminated until the LF comes. Treat a following CR
  498|       |     as end-of-headers as well.*/
  499|       |
  500|  1.24k|  if(ISNEWLINE(linep[0])) {
  ------------------
  |  |   50|  1.24k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 37, False: 1.20k]
  |  |  |  Branch (50:43): [True: 4, False: 1.20k]
  |  |  ------------------
  ------------------
  501|       |    /* end of response-headers from the proxy */
  502|       |
  503|     41|    if((407 == k->httpcode) && !data->state.authproblem) {
  ------------------
  |  Branch (503:8): [True: 1, False: 40]
  |  Branch (503:32): [True: 1, 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|      1|      ts->keepon = KEEPON_IGNORE;
  508|       |
  509|      1|      if(ts->cl) {
  ------------------
  |  Branch (509:10): [True: 0, False: 1]
  ------------------
  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|      1|      else if(ts->chunked_encoding) {
  ------------------
  |  Branch (512:15): [True: 0, False: 1]
  ------------------
  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|      1|      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|      1|        CURL_TRC_CF(data, cf, "CONNECT: no content-length or chunked");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  520|      1|        ts->keepon = KEEPON_DONE;
  521|      1|      }
  522|      1|    }
  523|     40|    else {
  524|     40|      ts->keepon = KEEPON_DONE;
  525|     40|    }
  526|       |
  527|     41|    DEBUGASSERT(ts->keepon == KEEPON_IGNORE ||
  ------------------
  |  | 1077|     41|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (527:5): [True: 41, False: 0]
  |  Branch (527:5): [True: 0, False: 0]
  |  Branch (527:5): [True: 0, False: 41]
  |  Branch (527:5): [True: 41, False: 0]
  ------------------
  528|     41|                ts->keepon == KEEPON_DONE);
  529|     41|    return result;
  530|     41|  }
  531|       |
  532|  1.20k|  if(h1_proxy_is_udp(cf)) {
  ------------------
  |  Branch (532:6): [True: 0, False: 1.20k]
  ------------------
  533|      0|    result = on_resp_header_udp(cf, data, ts, linep);
  534|      0|  }
  535|  1.20k|  else {
  536|  1.20k|    result = on_resp_header(cf, data, ts, linep);
  537|  1.20k|  }
  538|       |
  539|  1.20k|  if(result)
  ------------------
  |  Branch (539:6): [True: 0, False: 1.20k]
  ------------------
  540|      0|    return result;
  541|       |
  542|  1.20k|  curlx_dyn_reset(&ts->rcvbuf);
  543|  1.20k|  return result;
  544|  1.20k|}
cf-h1-proxy.c:on_resp_header:
  392|  1.20k|{
  393|  1.20k|  CURLcode result = CURLE_OK;
  394|  1.20k|  struct SingleRequest *k = &data->req;
  395|  1.20k|  (void)cf;
  396|       |
  397|  1.20k|  if((checkprefix("WWW-Authenticate:", header) && (401 == k->httpcode)) ||
  ------------------
  |  |   33|  2.41k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  1.20k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 1.20k]
  |  |  ------------------
  ------------------
  |  Branch (397:51): [True: 0, False: 0]
  ------------------
  398|  1.20k|     (checkprefix("Proxy-authenticate:", header) && (407 == k->httpcode))) {
  ------------------
  |  |   33|  2.41k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  1.20k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 1.20k]
  |  |  ------------------
  ------------------
  |  Branch (398:53): [True: 0, False: 0]
  ------------------
  399|       |
  400|      0|    bool proxy = (k->httpcode == 407);
  401|      0|    char *auth = Curl_copy_header_value(header);
  402|      0|    if(!auth)
  ------------------
  |  Branch (402:8): [True: 0, False: 0]
  ------------------
  403|      0|      return CURLE_OUT_OF_MEMORY;
  404|       |
  405|      0|    CURL_TRC_CF(data, cf, "CONNECT: fwd auth header '%s'", header);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  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|  1.20k|  else if(checkprefix("Content-Length:", header)) {
  ------------------
  |  |   33|  1.20k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  1.20k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 1.20k]
  |  |  ------------------
  ------------------
  414|      0|    if(k->httpcode / 100 == 2) {
  ------------------
  |  Branch (414:8): [True: 0, False: 0]
  ------------------
  415|       |      /* A client MUST ignore any Content-Length or Transfer-Encoding
  416|       |         header fields received in a successful response to CONNECT.
  417|       |         "Successful" described as: 2xx (Successful). RFC 7231 4.3.6 */
  418|      0|      infof(data, "Ignoring Content-Length in CONNECT %03d response",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|  1.20k|  else if(Curl_compareheader(header,
  ------------------
  |  Branch (429:11): [True: 0, False: 1.20k]
  ------------------
  430|  1.20k|                             STRCONST("Connection:"), STRCONST("close")))
  ------------------
  |  | 1297|  1.20k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
                                           STRCONST("Connection:"), STRCONST("close")))
  ------------------
  |  | 1297|  1.20k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  431|      0|    ts->close_connection = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  432|  1.20k|  else if(checkprefix("Transfer-Encoding:", header)) {
  ------------------
  |  |   33|  1.20k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  1.20k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 1.20k]
  |  |  ------------------
  ------------------
  433|      0|    if(k->httpcode / 100 == 2) {
  ------------------
  |  Branch (433:8): [True: 0, False: 0]
  ------------------
  434|       |      /* A client MUST ignore any Content-Length or Transfer-Encoding
  435|       |         header fields received in a successful response to CONNECT.
  436|       |         "Successful" described as: 2xx (Successful). RFC 7231 4.3.6 */
  437|      0|      infof(data, "Ignoring Transfer-Encoding in "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|  1.20k|  else if(Curl_compareheader(header,
  ------------------
  |  Branch (449:11): [True: 0, False: 1.20k]
  ------------------
  450|  1.20k|                             STRCONST("Proxy-Connection:"),
  ------------------
  |  | 1297|  1.20k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  451|  1.20k|                             STRCONST("close")))
  ------------------
  |  | 1297|  1.20k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  452|      0|    ts->close_connection = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  453|  1.20k|  else if(!strncmp(header, "HTTP/1.", 7) &&
  ------------------
  |  Branch (453:11): [True: 38, False: 1.16k]
  ------------------
  454|     38|          ((header[7] == '0') || (header[7] == '1')) &&
  ------------------
  |  Branch (454:12): [True: 18, False: 20]
  |  Branch (454:34): [True: 6, False: 14]
  ------------------
  455|     24|          (header[8] == ' ') &&
  ------------------
  |  Branch (455:11): [True: 23, False: 1]
  ------------------
  456|     23|          ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) &&
  ------------------
  |  |   44|  1.22k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 20, False: 3]
  |  |  |  Branch (44:38): [True: 19, False: 1]
  |  |  ------------------
  ------------------
                        ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) &&
  ------------------
  |  |   44|  1.22k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 17, False: 2]
  |  |  |  Branch (44:38): [True: 16, False: 1]
  |  |  ------------------
  ------------------
                        ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) &&
  ------------------
  |  |   44|  1.22k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 15, False: 1]
  |  |  |  Branch (44:38): [True: 14, False: 1]
  |  |  ------------------
  ------------------
  457|     14|          !ISDIGIT(header[12])) {
  ------------------
  |  |   44|     14|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 3, False: 11]
  |  |  |  Branch (44:38): [True: 1, False: 2]
  |  |  ------------------
  ------------------
  458|       |    /* store the HTTP code from the proxy */
  459|     13|    data->info.httpproxycode = k->httpcode = ((header[9] - '0') * 100) +
  460|     13|      ((header[10] - '0') * 10) + (header[11] - '0');
  461|     13|  }
  462|  1.20k|  return result;
  463|  1.20k|}
cf-h1-proxy.c:tunnel_is_established:
   84|  1.99k|{
   85|  1.99k|  return ts && (ts->tunnel_state == H1_TUNNEL_ESTABLISHED);
  ------------------
  |  Branch (85:10): [True: 1.99k, False: 0]
  |  Branch (85:16): [True: 3, False: 1.98k]
  ------------------
   86|  1.99k|}
cf-h1-proxy.c:cf_h1_proxy_adjust_pollset:
  870|    228|{
  871|    228|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  872|    228|  struct h1_tunnel_state *ts = pctx->ts;
  873|    228|  CURLcode result = CURLE_OK;
  874|       |
  875|    228|  if(!cf->connected) {
  ------------------
  |  Branch (875:6): [True: 228, False: 0]
  ------------------
  876|       |    /* If we are not connected, but the filter "below" is
  877|       |     * and not waiting on something, we are tunneling. */
  878|    228|    curl_socket_t sock = Curl_conn_cf_get_socket(cf, data);
  879|    228|    if(ts) {
  ------------------
  |  Branch (879:8): [True: 228, 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|    228|      if(tunnel_want_send(ts))
  ------------------
  |  Branch (884:10): [True: 0, False: 228]
  ------------------
  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|    228|      else
  887|    228|        result = Curl_pollset_set_in_only(data, ps, sock);
  ------------------
  |  |  172|    228|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|    228|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|    228|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
  888|    228|    }
  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|    228|  }
  892|      0|  else {
  893|      0|    if(cf->next)
  ------------------
  |  Branch (893:8): [True: 0, False: 0]
  ------------------
  894|      0|      result = cf->next->cft->adjust_pollset(cf->next, data, ps);
  895|      0|  }
  896|    228|  return result;
  897|    228|}
cf-h1-proxy.c:tunnel_want_send:
  227|    228|{
  228|    228|  return ts->tunnel_state == H1_TUNNEL_CONNECT;
  229|    228|}
cf-h1-proxy.c:cf_h1_proxy_query:
  916|  3.51k|{
  917|  3.51k|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  918|  3.51k|  struct h1_tunnel_state *ts = pctx ? pctx->ts : NULL;
  ------------------
  |  Branch (918:32): [True: 3.51k, False: 0]
  ------------------
  919|  3.51k|  switch(query) {
  920|      0|  case CF_QUERY_HOST_PORT:
  ------------------
  |  |  173|      0|#define CF_QUERY_HOST_PORT         11  /* port       const char * */
  ------------------
  |  Branch (920:3): [True: 0, False: 3.51k]
  ------------------
  921|      0|    if(!ts || !ts->dest)
  ------------------
  |  Branch (921:8): [True: 0, False: 0]
  |  Branch (921:15): [True: 0, False: 0]
  ------------------
  922|      0|      break;
  923|      0|    *pres1 = (int)ts->dest->port;
  924|      0|    *((const char **)pres2) = ts->dest->hostname;
  925|      0|    return CURLE_OK;
  926|      0|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  177|      0|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (926:3): [True: 0, False: 3.51k]
  ------------------
  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|  3.51k|  default:
  ------------------
  |  Branch (932:3): [True: 3.51k, False: 0]
  ------------------
  933|  3.51k|    break;
  934|  3.51k|  }
  935|  3.51k|  return cf->next ?
  ------------------
  |  Branch (935:10): [True: 3.51k, False: 0]
  ------------------
  936|  3.51k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  937|  3.51k|    CURLE_UNKNOWN_OPTION;
  938|  3.51k|}
cf-h1-proxy.c:tunnel_free:
  202|  3.07k|{
  203|  3.07k|  if(ts) {
  ------------------
  |  Branch (203:6): [True: 1.53k, False: 1.53k]
  ------------------
  204|  1.53k|    Curl_peer_unlink(&ts->dest);
  205|  1.53k|    curlx_dyn_free(&ts->rcvbuf);
  206|  1.53k|    curlx_dyn_free(&ts->request_data);
  207|  1.53k|    Curl_httpchunk_free(data, &ts->ch);
  208|  1.53k|    curlx_free(ts);
  ------------------
  |  | 1488|  1.53k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  209|  1.53k|  }
  210|  3.07k|}

Curl_cf_haproxy_insert_after:
  228|      6|{
  229|      6|  struct Curl_cfilter *cf;
  230|      6|  CURLcode result;
  231|       |
  232|      6|  result = cf_haproxy_create(&cf, data);
  233|      6|  if(result)
  ------------------
  |  Branch (233:6): [True: 0, False: 6]
  ------------------
  234|      0|    goto out;
  235|      6|  Curl_conn_cf_insert_after(cf_at, cf);
  236|       |
  237|      6|out:
  238|      6|  return result;
  239|      6|}
cf-haproxy.c:cf_haproxy_destroy:
  164|      6|{
  165|      6|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|      6|  do {                                          \
  |  |  154|      6|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      6|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     12|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 6, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     12|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      6|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      6|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      6|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 6]
  |  |  ------------------
  ------------------
  166|      6|  cf_haproxy_ctx_free(cf->ctx);
  167|      6|}
cf-haproxy.c:cf_haproxy_ctx_free:
   49|     12|{
   50|     12|  if(ctx) {
  ------------------
  |  Branch (50:6): [True: 6, False: 6]
  ------------------
   51|      6|    curlx_dyn_free(&ctx->data_out);
   52|      6|    curlx_free(ctx);
  ------------------
  |  | 1488|      6|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   53|      6|  }
   54|     12|}
cf-haproxy.c:cf_haproxy_connect:
  108|      6|{
  109|      6|  struct cf_haproxy_ctx *ctx = cf->ctx;
  110|      6|  CURLcode result;
  111|      6|  size_t len;
  112|       |
  113|      6|  DEBUGASSERT(ctx);
  ------------------
  |  | 1077|      6|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (113:3): [True: 0, False: 6]
  |  Branch (113:3): [True: 6, False: 0]
  ------------------
  114|      6|  if(cf->connected) {
  ------------------
  |  Branch (114:6): [True: 0, False: 6]
  ------------------
  115|      0|    *done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  116|      0|    return CURLE_OK;
  117|      0|  }
  118|       |
  119|      6|  result = cf->next->cft->do_connect(cf->next, data, done);
  120|      6|  if(result || !*done)
  ------------------
  |  Branch (120:6): [True: 0, False: 6]
  |  Branch (120:16): [True: 0, False: 6]
  ------------------
  121|      0|    return result;
  122|       |
  123|      6|  switch(ctx->state) {
  124|      6|  case HAPROXY_INIT:
  ------------------
  |  Branch (124:3): [True: 6, False: 0]
  ------------------
  125|      6|    result = cf_haproxy_date_out_set(cf, data);
  126|      6|    if(result)
  ------------------
  |  Branch (126:8): [True: 1, False: 5]
  ------------------
  127|      1|      goto out;
  128|      5|    ctx->state = HAPROXY_SEND;
  129|      5|    FALLTHROUGH();
  ------------------
  |  |  817|      5|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  130|      5|  case HAPROXY_SEND:
  ------------------
  |  Branch (130:3): [True: 0, False: 6]
  ------------------
  131|      5|    len = curlx_dyn_len(&ctx->data_out);
  132|      5|    if(len > 0) {
  ------------------
  |  Branch (132:8): [True: 5, False: 0]
  ------------------
  133|      5|      size_t nwritten;
  134|      5|      result = Curl_conn_cf_send(cf->next, data,
  135|      5|                                 curlx_dyn_uptr(&ctx->data_out), len, FALSE,
  ------------------
  |  | 1054|      5|#define FALSE false
  ------------------
  136|      5|                                 &nwritten);
  137|      5|      if(result) {
  ------------------
  |  Branch (137:10): [True: 0, False: 5]
  ------------------
  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|      5|      curlx_dyn_tail(&ctx->data_out, len - nwritten);
  144|      5|      if(curlx_dyn_len(&ctx->data_out) > 0) {
  ------------------
  |  Branch (144:10): [True: 0, False: 5]
  ------------------
  145|      0|        result = CURLE_OK;
  146|      0|        goto out;
  147|      0|      }
  148|      5|    }
  149|      5|    ctx->state = HAPROXY_DONE;
  150|      5|    FALLTHROUGH();
  ------------------
  |  |  817|      5|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  151|      5|  default:
  ------------------
  |  Branch (151:3): [True: 0, False: 6]
  ------------------
  152|      5|    curlx_dyn_free(&ctx->data_out);
  153|      5|    break;
  154|      6|  }
  155|       |
  156|      6|out:
  157|      6|  *done = (!result) && (ctx->state == HAPROXY_DONE);
  ------------------
  |  Branch (157:11): [True: 5, False: 1]
  |  Branch (157:24): [True: 5, False: 0]
  ------------------
  158|      6|  cf->connected = *done;
  159|      6|  return result;
  160|      6|}
cf-haproxy.c:cf_haproxy_date_out_set:
   58|      6|{
   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|      6|  const char *client_source_ip;
   66|      6|  const char *client_dest_ip;
   67|      6|  struct cf_haproxy_ctx *ctx = cf->ctx;
   68|      6|  CURLcode result;
   69|      6|  struct ip_quadruple ipquad;
   70|      6|  bool is_ipv6;
   71|       |
   72|      6|  DEBUGASSERT(ctx);
  ------------------
  |  | 1077|      6|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (72:3): [True: 0, False: 6]
  |  Branch (72:3): [True: 6, False: 0]
  ------------------
   73|      6|  DEBUGASSERT(ctx->state == HAPROXY_INIT);
  ------------------
  |  | 1077|      6|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (73:3): [True: 0, False: 6]
  |  Branch (73:3): [True: 6, False: 0]
  ------------------
   74|      6|#ifdef USE_UNIX_SOCKETS
   75|      6|  if(Curl_conn_get_first_peer(cf->conn, cf->sockindex)->unix_socket)
  ------------------
  |  Branch (75:6): [True: 1, False: 5]
  ------------------
   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|      5|  else {
   79|      5|#endif /* USE_UNIX_SOCKETS */
   80|      5|  result = Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad);
   81|      5|  if(result)
  ------------------
  |  Branch (81:6): [True: 0, False: 5]
  ------------------
   82|      0|    return result;
   83|       |
   84|      5|  if(data->set.str[STRING_HAPROXY_CLIENT_IP]) {
  ------------------
  |  Branch (84:6): [True: 4, False: 1]
  ------------------
   85|      4|    client_source_ip = data->set.str[STRING_HAPROXY_CLIENT_IP];
   86|      4|    client_dest_ip = client_source_ip;
   87|      4|    is_ipv6 = !Curl_is_ipv4addr(client_source_ip);
   88|      4|  }
   89|      1|  else {
   90|      1|    client_source_ip = ipquad.local_ip;
   91|      1|    client_dest_ip = ipquad.remote_ip;
   92|      1|  }
   93|       |
   94|      5|  result = curlx_dyn_addf(&ctx->data_out, "PROXY %s %s %s %d %d\r\n",
   95|      5|                          is_ipv6 ? "TCP6" : "TCP4",
  ------------------
  |  Branch (95:27): [True: 4, False: 1]
  ------------------
   96|      5|                          client_source_ip, client_dest_ip,
   97|      5|                          ipquad.local_port, ipquad.remote_port);
   98|       |
   99|      5|#ifdef USE_UNIX_SOCKETS
  100|      5|  }
  101|      6|#endif /* USE_UNIX_SOCKETS */
  102|      6|  return result;
  103|      6|}
cf-haproxy.c:cf_haproxy_adjust_pollset:
  172|      1|{
  173|      1|  if(cf->next->connected && !cf->connected) {
  ------------------
  |  Branch (173:6): [True: 1, False: 0]
  |  Branch (173:29): [True: 0, False: 1]
  ------------------
  174|       |    /* If we are not connected, but the filter "below" is
  175|       |     * and not waiting on something, we are sending. */
  176|      0|    return Curl_pollset_set_out_only(
  ------------------
  |  |  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
  |  |  ------------------
  ------------------
  177|      0|      data, ps, Curl_conn_cf_get_socket(cf, data));
  178|      0|  }
  179|      1|  return CURLE_OK;
  180|      1|}
cf-haproxy.c:cf_haproxy_create:
  201|      6|{
  202|      6|  struct Curl_cfilter *cf = NULL;
  203|      6|  struct cf_haproxy_ctx *ctx;
  204|      6|  CURLcode result;
  205|       |
  206|      6|  (void)data;
  207|      6|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1485|      6|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  208|      6|  if(!ctx) {
  ------------------
  |  Branch (208:6): [True: 0, False: 6]
  ------------------
  209|      0|    result = CURLE_OUT_OF_MEMORY;
  210|      0|    goto out;
  211|      0|  }
  212|      6|  ctx->state = HAPROXY_INIT;
  213|      6|  curlx_dyn_init(&ctx->data_out, DYN_HAXPROXY);
  ------------------
  |  |   68|      6|#define DYN_HAXPROXY        2048
  ------------------
  214|       |
  215|      6|  result = Curl_cf_create(&cf, &Curl_cft_haproxy, ctx);
  216|      6|  if(result)
  ------------------
  |  Branch (216:6): [True: 0, False: 6]
  ------------------
  217|      0|    goto out;
  218|      6|  ctx = NULL;
  219|       |
  220|      6|out:
  221|      6|  cf_haproxy_ctx_free(ctx);
  222|      6|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (222:10): [True: 0, False: 6]
  ------------------
  223|      6|  return result;
  224|      6|}

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

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

Curl_cf_setup_add:
  451|     76|{
  452|     76|  struct Curl_cfilter *cf;
  453|     76|  CURLcode result = CURLE_OK;
  454|       |
  455|     76|  DEBUGASSERT(data);
  ------------------
  |  | 1077|     76|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (455:3): [True: 0, False: 76]
  |  Branch (455:3): [True: 76, False: 0]
  ------------------
  456|     76|  result = cf_setup_create(&cf, data, transport, ssl_mode);
  457|     76|  if(result)
  ------------------
  |  Branch (457:6): [True: 0, False: 76]
  ------------------
  458|      0|    goto out;
  459|     76|  Curl_conn_cf_add(data, conn, sockindex, cf);
  460|     76|out:
  461|     76|  return result;
  462|     76|}
Curl_cf_setup_insert_after:
  468|  5.02k|{
  469|  5.02k|  struct Curl_cfilter *cf;
  470|  5.02k|  CURLcode result;
  471|       |
  472|  5.02k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  5.02k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (472:3): [True: 0, False: 5.02k]
  |  Branch (472:3): [True: 5.02k, False: 0]
  ------------------
  473|  5.02k|  result = cf_setup_create(&cf, data, transport, ssl_mode);
  474|  5.02k|  if(result)
  ------------------
  |  Branch (474:6): [True: 0, False: 5.02k]
  ------------------
  475|      0|    goto out;
  476|  5.02k|  Curl_conn_cf_insert_after(cf_at, cf);
  477|  5.02k|out:
  478|  5.02k|  return result;
  479|  5.02k|}
cf-setup.c:cf_setup_destroy:
  390|  5.10k|{
  391|  5.10k|  struct cf_setup_ctx *ctx = cf->ctx;
  392|       |
  393|  5.10k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  5.10k|  do {                                          \
  |  |  154|  5.10k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.10k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.10k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.10k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.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|  5.10k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.10k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.10k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.10k]
  |  |  ------------------
  ------------------
  394|       |  curlx_safefree(ctx);
  ------------------
  |  | 1332|  5.10k|  do {                      \
  |  | 1333|  5.10k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  5.10k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  5.10k|    (ptr) = NULL;           \
  |  | 1335|  5.10k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 5.10k]
  |  |  ------------------
  ------------------
  395|  5.10k|}
cf-setup.c:cf_setup_connect:
  364|  5.88k|{
  365|  5.88k|  struct cf_setup_ctx *ctx = cf->ctx;
  366|  5.88k|  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|  5.88k|retry:
  374|  5.88k|  result = cf_setup_connect_steps(cf, data, done);
  375|       |
  376|  5.88k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (376:6): [True: 0, False: 5.88k]
  ------------------
  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|  5.88k|  return result;
  387|  5.88k|}
cf-setup.c:cf_setup_connect_steps:
  302|  5.88k|{
  303|  5.88k|  struct cf_setup_ctx *ctx = cf->ctx;
  304|  5.88k|  CURLcode result = CURLE_OK;
  305|       |
  306|  5.88k|  if(cf->connected) {
  ------------------
  |  Branch (306:6): [True: 0, False: 5.88k]
  ------------------
  307|      0|    *done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  308|      0|    return CURLE_OK;
  309|      0|  }
  310|       |
  311|       |  /* connect current sub-chain */
  312|  15.7k|connect_sub_chain:
  313|  15.7k|  VERBOSE(Curl_conn_trc_filters(data, cf->sockindex, "cf_setup_connect"));
  ------------------
  |  | 1623|  15.7k|#define VERBOSE(x) x
  ------------------
  314|       |
  315|  15.7k|  if(cf->next && !cf->next->connected) {
  ------------------
  |  Branch (315:6): [True: 10.7k, False: 5.09k]
  |  Branch (315:18): [True: 10.7k, False: 0]
  ------------------
  316|  10.7k|    result = Curl_conn_cf_connect(cf->next, data, done);
  317|  10.7k|    if(result || !*done)
  ------------------
  |  Branch (317:8): [True: 4.95k, False: 5.75k]
  |  Branch (317:18): [True: 929, False: 4.82k]
  ------------------
  318|  5.88k|      return result;
  319|  10.7k|  }
  320|       |
  321|  9.91k|  result = cf_setup_add_ip_happy(cf, data);
  322|  9.91k|  if(result)
  ------------------
  |  Branch (322:6): [True: 0, False: 9.91k]
  ------------------
  323|      0|    return result;
  324|  9.91k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (324:6): [True: 0, False: 9.91k]
  |  Branch (324:19): [True: 5.09k, False: 4.82k]
  ------------------
  325|  5.09k|    goto connect_sub_chain;
  326|       |
  327|  4.82k|#ifndef CURL_DISABLE_PROXY
  328|  4.82k|  result = cf_setup_add_socks(cf, data);
  329|  4.82k|  if(result)
  ------------------
  |  Branch (329:6): [True: 0, False: 4.82k]
  ------------------
  330|      0|    return result;
  331|  4.82k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (331:6): [True: 0, False: 4.82k]
  |  Branch (331:19): [True: 145, False: 4.67k]
  ------------------
  332|    145|    goto connect_sub_chain;
  333|       |
  334|  4.67k|#ifndef CURL_DISABLE_HTTP
  335|  4.67k|  result = cf_setup_add_http_proxy(cf, data);
  336|  4.67k|  if(result)
  ------------------
  |  Branch (336:6): [True: 0, False: 4.67k]
  ------------------
  337|      0|    return result;
  338|  4.67k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (338:6): [True: 0, False: 4.67k]
  |  Branch (338:19): [True: 1.95k, False: 2.72k]
  ------------------
  339|  1.95k|    goto connect_sub_chain;
  340|  2.72k|#endif /* !CURL_DISABLE_HTTP */
  341|       |
  342|  2.72k|  result = cf_setup_add_haproxy(cf, data);
  343|  2.72k|  if(result)
  ------------------
  |  Branch (343:6): [True: 0, False: 2.72k]
  ------------------
  344|      0|    return result;
  345|  2.72k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (345:6): [True: 0, False: 2.72k]
  |  Branch (345:19): [True: 6, False: 2.72k]
  ------------------
  346|      6|    goto connect_sub_chain;
  347|  2.72k|#endif /* !CURL_DISABLE_PROXY */
  348|       |
  349|  2.72k|  result = cf_setup_add_origin_filters(cf, data);
  350|  2.72k|  if(result)
  ------------------
  |  Branch (350:6): [True: 2, False: 2.71k]
  ------------------
  351|      2|    return result;
  352|  2.71k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (352:6): [True: 0, False: 2.71k]
  |  Branch (352:19): [True: 2.71k, False: 0]
  ------------------
  353|  2.71k|    goto connect_sub_chain;
  354|       |
  355|      0|  ctx->state = CF_SETUP_DONE;
  356|      0|  cf->connected = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  357|       |  *done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  358|      0|  return CURLE_OK;
  359|  2.71k|}
cf-setup.c:cf_setup_add_ip_happy:
  175|  9.91k|{
  176|  9.91k|  struct cf_setup_ctx *ctx = cf->ctx;
  177|  9.91k|  CURLcode result = CURLE_OK;
  178|       |
  179|  9.91k|  if(ctx->state < CF_SETUP_CNNCT_EYEBALLS) {
  ------------------
  |  Branch (179:6): [True: 5.09k, False: 4.82k]
  ------------------
  180|       |    /* What is the first hop we directly connect to and what transport
  181|       |     * do we use for it? Only on the first hop we can do Happy Eyeballs.
  182|       |     * first_origin and first_peer differ on --connect-to. */
  183|  5.09k|    struct Curl_peer *first_origin =
  184|  5.09k|      conn_get_first_origin(cf->conn, cf->sockindex);
  185|  5.09k|    struct Curl_peer *first_peer =
  186|  5.09k|      Curl_conn_get_first_peer(cf->conn, cf->sockindex);
  187|  5.09k|    struct Curl_peer *tunnel_peer = NULL;
  188|  5.09k|    uint8_t first_transport = ctx->transport;
  189|       |
  190|  5.09k|    if(!first_peer)
  ------------------
  |  Branch (190:8): [True: 0, False: 5.09k]
  ------------------
  191|      0|      return CURLE_FAILED_INIT;
  192|       |
  193|  5.09k|#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
  194|  5.09k|    if(cf->conn->http_proxy.peer && !cf->conn->bits.origin_is_proxy) {
  ------------------
  |  Branch (194:8): [True: 2.00k, False: 3.08k]
  |  Branch (194:37): [True: 2.00k, False: 0]
  ------------------
  195|  2.00k|      first_transport =
  196|  2.00k|        Curl_http_proxy_transport(cf->conn->http_proxy.proxytype);
  197|  2.00k|      tunnel_peer = Curl_conn_get_destination(cf->conn, cf->sockindex);
  198|  2.00k|      if((first_transport == TRNSPRT_QUIC) && cf->conn->socks_proxy.peer) {
  ------------------
  |  |  251|  2.00k|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (198:10): [True: 0, False: 2.00k]
  |  Branch (198:47): [True: 0, False: 0]
  ------------------
  199|      0|        failf(data, "HTTP/3 proxy not possible via SOCKS");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  200|      0|        return CURLE_UNSUPPORTED_PROTOCOL;
  201|      0|      }
  202|  2.00k|    }
  203|  5.09k|#endif /* !CURL_DISABLE_PROXY && !CURL_DISABLE_HTTP */
  204|       |
  205|  5.09k|    result = Curl_cf_ip_happy_insert_after(cf, data, first_origin, first_peer,
  206|  5.09k|                                           first_transport,
  207|  5.09k|                                           tunnel_peer, ctx->transport);
  208|  5.09k|    if(result) {
  ------------------
  |  Branch (208:8): [True: 0, False: 5.09k]
  ------------------
  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|  5.09k|    if(tunnel_peer && (first_transport == TRNSPRT_QUIC)) {
  ------------------
  |  |  251|  2.00k|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (213:8): [True: 2.00k, False: 3.08k]
  |  Branch (213:23): [True: 0, False: 2.00k]
  ------------------
  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|  5.09k|    else {
  219|  5.09k|      CURL_TRC_CF(data, cf, "happy eyeballing to %s %s:%u",
  ------------------
  |  |  153|  5.09k|  do {                                          \
  |  |  154|  5.09k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.09k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.09k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.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]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.09k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.09k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  5.09k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.09k]
  |  |  ------------------
  ------------------
  220|  5.09k|                  tunnel_peer ? "proxy" : "origin",
  221|  5.09k|                  first_peer->hostname, first_peer->port);
  222|  5.09k|      ctx->state = CF_SETUP_CNNCT_EYEBALLS;
  223|  5.09k|    }
  224|  5.09k|  }
  225|  9.91k|  return result;
  226|  9.91k|}
cf-setup.c:conn_get_first_origin:
  163|  5.09k|{
  164|  5.09k|#ifndef CURL_DISABLE_PROXY
  165|  5.09k|  if(conn->socks_proxy.peer)
  ------------------
  |  Branch (165:6): [True: 208, False: 4.88k]
  ------------------
  166|    208|    return conn->socks_proxy.peer;
  167|  4.88k|  if(conn->http_proxy.peer)
  ------------------
  |  Branch (167:6): [True: 1.95k, False: 2.92k]
  ------------------
  168|  1.95k|    return conn->http_proxy.peer;
  169|  2.92k|#endif
  170|  2.92k|  return (sockindex == SECONDARYSOCKET) ? conn->origin2 : conn->origin;
  ------------------
  |  |  246|  2.92k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (170:10): [True: 0, False: 2.92k]
  ------------------
  171|  4.88k|}
cf-setup.c:cf_setup_add_socks:
   86|  4.82k|{
   87|  4.82k|  struct cf_setup_ctx *ctx = cf->ctx;
   88|  4.82k|  CURLcode result = CURLE_OK;
   89|  4.82k|  if(ctx->state < CF_SETUP_CNNCT_SOCKS && cf->conn->socks_proxy.peer) {
  ------------------
  |  Branch (89:6): [True: 4.80k, False: 14]
  |  Branch (89:43): [True: 145, False: 4.66k]
  ------------------
   90|       |    /* Add a SOCKS proxy to go through `first_peer` to `second_peer`*/
   91|    145|    struct Curl_peer *second_peer;
   92|       |
   93|    145|    if(cf->conn->http_proxy.peer)
  ------------------
  |  Branch (93:8): [True: 43, False: 102]
  ------------------
   94|     43|      second_peer = cf->conn->http_proxy.peer;
   95|    102|    else
   96|    102|      second_peer = Curl_conn_get_destination(cf->conn, cf->sockindex);
   97|    145|    if(!second_peer)
  ------------------
  |  Branch (97:8): [True: 0, False: 145]
  ------------------
   98|      0|      return CURLE_FAILED_INIT;
   99|       |
  100|    145|    result = Curl_cf_socks_proxy_insert_after(
  101|    145|      cf, data, second_peer, cf->conn->ip_version,
  102|    145|      cf->conn->socks_proxy.proxytype,
  103|    145|      cf->conn->socks_proxy.creds);
  104|    145|    if(result) {
  ------------------
  |  Branch (104:8): [True: 0, False: 145]
  ------------------
  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|    145|    CURL_TRC_CF(data, cf, "added SOCKS filter to %s:%u",
  ------------------
  |  |  153|    145|  do {                                          \
  |  |  154|    145|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    145|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    290|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 145, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 145]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    290|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    145|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    145|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    145|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 145]
  |  |  ------------------
  ------------------
  110|    145|                second_peer->hostname, second_peer->port);
  111|    145|    ctx->state = CF_SETUP_CNNCT_SOCKS;
  112|    145|  }
  113|  4.82k|  return result;
  114|  4.82k|}
cf-setup.c:cf_setup_add_http_proxy:
  119|  4.67k|{
  120|  4.67k|  struct cf_setup_ctx *ctx = cf->ctx;
  121|  4.67k|  CURLcode result = CURLE_OK;
  122|       |
  123|  4.67k|  if(ctx->state < CF_SETUP_CNNCT_HTTP_PROXY &&
  ------------------
  |  Branch (123:6): [True: 4.66k, False: 8]
  ------------------
  124|  4.66k|     cf->conn->http_proxy.peer && !cf->conn->bits.origin_is_proxy) {
  ------------------
  |  Branch (124:6): [True: 1.95k, False: 2.71k]
  |  Branch (124:35): [True: 1.95k, False: 0]
  ------------------
  125|  1.95k|    struct Curl_peer *peer = cf->conn->http_proxy.peer;
  126|  1.95k|    struct Curl_peer *tunnel_peer =
  127|  1.95k|      Curl_conn_get_destination(cf->conn, cf->sockindex);
  128|       |
  129|  1.95k|#ifdef USE_SSL
  130|  1.95k|    if(CURL_PROXY_IS_HTTPS(cf->conn->http_proxy.proxytype) &&
  ------------------
  |  |   42|  3.90k|  (((t) == CURLPROXY_HTTPS) ||  \
  |  |  ------------------
  |  |  |  |  794|  1.95k|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 414, False: 1.53k]
  |  |  ------------------
  |  |   43|  1.95k|   ((t) == CURLPROXY_HTTPS2) || \
  |  |  ------------------
  |  |  |  |  796|  1.53k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  |  |  ------------------
  |  |  |  Branch (43:4): [True: 1, False: 1.53k]
  |  |  ------------------
  |  |   44|  3.90k|   ((t) == CURLPROXY_HTTPS3))
  |  |  ------------------
  |  |  |  |  805|  1.53k|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  |  |  ------------------
  |  |  |  Branch (44:4): [True: 0, False: 1.53k]
  |  |  ------------------
  ------------------
  131|    415|       !Curl_conn_is_ssl(cf->conn, cf->sockindex)) {
  ------------------
  |  Branch (131:8): [True: 415, False: 0]
  ------------------
  132|    415|      result = Curl_cf_ssl_proxy_insert_after(
  133|    415|        cf, data, cf->conn->http_proxy.peer);
  134|    415|      if(result) {
  ------------------
  |  Branch (134:10): [True: 0, False: 415]
  ------------------
  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|    415|      CURL_TRC_CF(data, cf, "added SSL filter for HTTP proxy");
  ------------------
  |  |  153|    415|  do {                                          \
  |  |  154|    415|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    415|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    830|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 415, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 415]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    830|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    415|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    415|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    415|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 415]
  |  |  ------------------
  ------------------
  140|    415|    }
  141|  1.95k|#endif /* USE_SSL */
  142|       |
  143|  1.95k|    result = Curl_cf_http_proxy_insert_after(
  144|  1.95k|      cf, data, peer, tunnel_peer,
  145|  1.95k|      ctx->transport, cf->conn->http_proxy.proxytype);
  146|  1.95k|    if(result) {
  ------------------
  |  Branch (146:8): [True: 0, False: 1.95k]
  ------------------
  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.95k|    CURL_TRC_CF(data, cf, "added HTTP proxy tunnel filter");
  ------------------
  |  |  153|  1.95k|  do {                                          \
  |  |  154|  1.95k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.95k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.90k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.95k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.90k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.95k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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.95k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.95k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.95k]
  |  |  ------------------
  ------------------
  152|  1.95k|    ctx->state = CF_SETUP_CNNCT_HTTP_PROXY;
  153|  1.95k|  }
  154|  4.67k|  return result;
  155|  4.67k|}
cf-setup.c:cf_setup_add_haproxy:
   61|  2.72k|{
   62|  2.72k|  struct cf_setup_ctx *ctx = cf->ctx;
   63|  2.72k|  CURLcode result = CURLE_OK;
   64|       |
   65|  2.72k|  if(ctx->state < CF_SETUP_CNNCT_HAPROXY) {
  ------------------
  |  Branch (65:6): [True: 2.72k, False: 5]
  ------------------
   66|  2.72k|    if(data->set.haproxyprotocol) {
  ------------------
  |  Branch (66:8): [True: 6, False: 2.71k]
  ------------------
   67|      6|      if(ctx->transport == TRNSPRT_QUIC) {
  ------------------
  |  |  251|      6|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (67:10): [True: 0, False: 6]
  ------------------
   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|      6|      result = Curl_cf_haproxy_insert_after(cf, data);
   72|      6|      if(result) {
  ------------------
  |  Branch (72:10): [True: 0, False: 6]
  ------------------
   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|      6|      CURL_TRC_CF(data, cf, "added HAPROXY filter");
  ------------------
  |  |  153|      6|  do {                                          \
  |  |  154|      6|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      6|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     12|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 6, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     12|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      6|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      6|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      6|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 6]
  |  |  ------------------
  ------------------
   78|      6|    }
   79|  2.72k|    ctx->state = CF_SETUP_CNNCT_HAPROXY;
   80|  2.72k|  }
   81|  2.72k|  return result;
   82|  2.72k|}
cf-setup.c:cf_setup_add_origin_filters:
  230|  2.72k|{
  231|  2.72k|  struct cf_setup_ctx *ctx = cf->ctx;
  232|  2.72k|  CURLcode result = CURLE_OK;
  233|       |
  234|  2.72k|  (void)data; /* not used in all builds */
  235|  2.72k|  if(ctx->state < CF_SETUP_CNNCT_SSL) {
  ------------------
  |  Branch (235:6): [True: 2.72k, 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|  2.72k|#ifdef USE_SSL
  264|  2.72k|    if((ctx->ssl_mode == CURL_CF_SSL_ENABLE ||
  ------------------
  |  |  361|  5.44k|#define CURL_CF_SSL_ENABLE   1
  ------------------
  |  Branch (264:9): [True: 2.71k, False: 3]
  ------------------
  265|      3|        (ctx->ssl_mode != CURL_CF_SSL_DISABLE &&
  ------------------
  |  |  360|      6|#define CURL_CF_SSL_DISABLE  0
  ------------------
  |  Branch (265:10): [True: 3, False: 0]
  ------------------
  266|      3|         cf->conn->scheme->flags & PROTOPT_SSL)) && /* we want SSL */
  ------------------
  |  |  207|      3|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (266:10): [True: 3, False: 0]
  ------------------
  267|  2.72k|       !Curl_conn_is_ssl(cf->conn, cf->sockindex)) { /* it is missing */
  ------------------
  |  Branch (267:8): [True: 2.72k, False: 0]
  ------------------
  268|       |
  269|  2.72k|#ifndef CURL_DISABLE_PROXY
  270|  2.72k|      if(cf->conn->bits.origin_is_proxy) {
  ------------------
  |  Branch (270:10): [True: 0, False: 2.72k]
  ------------------
  271|      0|        result = Curl_cf_ssl_proxy_insert_after(cf, data, cf->conn->origin);
  272|      0|      }
  273|  2.72k|      else
  274|  2.72k|#endif
  275|  2.72k|      {
  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.72k|        result = Curl_cf_ssl_insert_after(cf, data,
  283|  2.72k|          Curl_conn_get_origin(cf->conn, FIRSTSOCKET),
  ------------------
  |  |  245|  2.72k|#define FIRSTSOCKET     0
  ------------------
  284|  2.72k|          Curl_conn_get_destination(cf->conn, FIRSTSOCKET));
  ------------------
  |  |  245|  2.72k|#define FIRSTSOCKET     0
  ------------------
  285|  2.72k|      }
  286|  2.72k|      if(result) {
  ------------------
  |  Branch (286:10): [True: 2, False: 2.71k]
  ------------------
  287|      2|        CURL_TRC_CF(data, cf, "adding SSL filter for origin failed -> %d",
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      2|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  288|      2|                    (int)result);
  289|      2|        return result;
  290|      2|      }
  291|  2.71k|      CURL_TRC_CF(data, cf, "added SSL filter for origin");
  ------------------
  |  |  153|  2.71k|  do {                                          \
  |  |  154|  2.71k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.71k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  5.43k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.71k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  5.43k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  2.71k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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.71k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.71k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.71k]
  |  |  ------------------
  ------------------
  292|  2.71k|    }
  293|  2.71k|#endif /* USE_SSL */
  294|  2.71k|    ctx->state = CF_SETUP_CNNCT_SSL;
  295|  2.71k|  }
  296|  2.71k|  return result;
  297|  2.72k|}
cf-setup.c:cf_setup_create:
  418|  5.10k|{
  419|  5.10k|  struct Curl_cfilter *cf = NULL;
  420|  5.10k|  struct cf_setup_ctx *ctx;
  421|  5.10k|  CURLcode result = CURLE_OK;
  422|       |
  423|  5.10k|  (void)data;
  424|  5.10k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1485|  5.10k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  425|  5.10k|  if(!ctx) {
  ------------------
  |  Branch (425:6): [True: 0, False: 5.10k]
  ------------------
  426|      0|    result = CURLE_OUT_OF_MEMORY;
  427|      0|    goto out;
  428|      0|  }
  429|  5.10k|  ctx->state = CF_SETUP_INIT;
  430|  5.10k|  ctx->ssl_mode = ssl_mode;
  431|  5.10k|  ctx->transport = transport;
  432|       |
  433|  5.10k|  result = Curl_cf_create(&cf, &Curl_cft_setup, ctx);
  434|  5.10k|  if(result)
  ------------------
  |  Branch (434:6): [True: 0, False: 5.10k]
  ------------------
  435|      0|    goto out;
  436|  5.10k|  ctx = NULL;
  437|       |
  438|  5.10k|out:
  439|  5.10k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (439:10): [True: 0, False: 5.10k]
  ------------------
  440|  5.10k|  if(ctx) {
  ------------------
  |  Branch (440:6): [True: 0, False: 5.10k]
  ------------------
  441|      0|    curlx_free(ctx);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  442|      0|  }
  443|  5.10k|  return result;
  444|  5.10k|}

sockaddr2string:
   94|  10.0k|{
   95|  10.0k|  struct sockaddr_in *si = NULL;
   96|  10.0k|#ifdef USE_IPV6
   97|  10.0k|  struct sockaddr_in6 *si6 = NULL;
   98|  10.0k|#endif
   99|  10.0k|#ifdef USE_UNIX_SOCKETS
  100|  10.0k|  struct sockaddr_un *su = NULL;
  101|       |#else
  102|       |  (void)salen;
  103|       |#endif
  104|       |
  105|  10.0k|  switch(sa->sa_family) {
  106|  5.00k|  case AF_INET:
  ------------------
  |  Branch (106:3): [True: 5.00k, False: 5.03k]
  ------------------
  107|  5.00k|    si = (struct sockaddr_in *)(void *)sa;
  108|  5.00k|    if(curlx_inet_ntop(sa->sa_family, &si->sin_addr, addr, MAX_IPADR_LEN)) {
  ------------------
  |  |   41|  5.00k|#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
  ------------------
  |  Branch (108:8): [True: 5.00k, False: 0]
  ------------------
  109|  5.00k|      *port = ntohs(si->sin_port);
  110|  5.00k|      return TRUE;
  ------------------
  |  | 1051|  5.00k|#define TRUE true
  ------------------
  111|  5.00k|    }
  112|      0|    break;
  113|      0|#ifdef USE_IPV6
  114|    206|  case AF_INET6:
  ------------------
  |  Branch (114:3): [True: 206, False: 9.82k]
  ------------------
  115|    206|    si6 = (struct sockaddr_in6 *)(void *)sa;
  116|    206|    if(curlx_inet_ntop(sa->sa_family, &si6->sin6_addr, addr, MAX_IPADR_LEN)) {
  ------------------
  |  |   41|    206|#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
  ------------------
  |  Branch (116:8): [True: 206, False: 0]
  ------------------
  117|    206|      *port = ntohs(si6->sin6_port);
  118|    206|      return TRUE;
  ------------------
  |  | 1051|    206|#define TRUE true
  ------------------
  119|    206|    }
  120|      0|    break;
  121|      0|#endif
  122|      0|#ifdef USE_UNIX_SOCKETS
  123|  4.82k|  case AF_UNIX:
  ------------------
  |  Branch (123:3): [True: 4.82k, False: 5.20k]
  ------------------
  124|  4.82k|    if(salen > (curl_socklen_t)sizeof(CURL_SA_FAMILY_T)) {
  ------------------
  |  Branch (124:8): [True: 18, False: 4.80k]
  ------------------
  125|     18|      su = (struct sockaddr_un *)sa;
  126|     18|      curl_msnprintf(addr, MAX_IPADR_LEN, "%s", su->sun_path);
  ------------------
  |  |   41|     18|#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
  ------------------
  127|     18|    }
  128|  4.80k|    else
  129|  4.80k|      addr[0] = 0; /* socket with no name */
  130|  4.82k|    *port = 0;
  131|  4.82k|    return TRUE;
  ------------------
  |  | 1051|  4.82k|#define TRUE true
  ------------------
  132|      0|#endif
  133|      0|  default:
  ------------------
  |  Branch (133:3): [True: 0, False: 10.0k]
  ------------------
  134|      0|    break;
  135|  10.0k|  }
  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|  10.0k|}
Curl_socket_addr_from_ai:
  338|  5.09k|{
  339|       |  /*
  340|       |   * The Curl_sockaddr_ex structure is libcurl's external API
  341|       |   * curl_sockaddr structure with enough space available to directly hold
  342|       |   * any protocol-specific address structures. The variable declared here
  343|       |   * will be used to pass / receive data to/from the fopensocket callback
  344|       |   * if this has been set, before that, it is initialized from parameters.
  345|       |   */
  346|  5.09k|  addr->family = ai->ai_family;
  347|  5.09k|  addr->socktype = Curl_socktype_for_transport(transport);
  348|  5.09k|  addr->protocol = Curl_protocol_for_transport(transport);
  349|  5.09k|  addr->addrlen = (unsigned int)ai->ai_addrlen;
  350|       |
  351|  5.09k|  DEBUGASSERT(addr->addrlen <= sizeof(addr->curl_sa_addrbuf));
  ------------------
  |  | 1077|  5.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (351:3): [True: 0, False: 5.09k]
  |  Branch (351:3): [True: 5.09k, False: 0]
  ------------------
  352|  5.09k|  if(addr->addrlen > sizeof(addr->curl_sa_addrbuf))
  ------------------
  |  |   36|  5.09k|#define curl_sa_addrbuf addr.buf
  ------------------
  |  Branch (352:6): [True: 0, False: 5.09k]
  ------------------
  353|      0|    return CURLE_TOO_LARGE;
  354|       |
  355|  5.09k|  memcpy(&addr->curl_sa_addrbuf, ai->ai_addr, addr->addrlen);
  ------------------
  |  |   36|  5.09k|#define curl_sa_addrbuf addr.buf
  ------------------
  356|  5.09k|  return CURLE_OK;
  357|  5.09k|}
Curl_parse_interface:
  579|    253|{
  580|    253|  static const char if_prefix[] = "if!";
  581|    253|  static const char host_prefix[] = "host!";
  582|    253|  static const char if_host_prefix[] = "ifhost!";
  583|    253|  size_t len;
  584|       |
  585|    253|  DEBUGASSERT(dev);
  ------------------
  |  | 1077|    253|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (585:3): [True: 0, False: 253]
  |  Branch (585:3): [True: 253, False: 0]
  ------------------
  586|    253|  DEBUGASSERT(iface);
  ------------------
  |  | 1077|    253|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (586:3): [True: 0, False: 253]
  |  Branch (586:3): [True: 253, False: 0]
  ------------------
  587|    253|  DEBUGASSERT(host);
  ------------------
  |  | 1077|    253|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (587:3): [True: 0, False: 253]
  |  Branch (587:3): [True: 253, False: 0]
  ------------------
  588|       |
  589|    253|  len = strlen(input);
  590|    253|  if(len > 512)
  ------------------
  |  Branch (590:6): [True: 1, False: 252]
  ------------------
  591|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  592|       |
  593|    252|  if(!strncmp(if_prefix, input, strlen(if_prefix))) {
  ------------------
  |  Branch (593:6): [True: 9, False: 243]
  ------------------
  594|      9|    input += strlen(if_prefix);
  595|      9|    if(!*input)
  ------------------
  |  Branch (595:8): [True: 1, False: 8]
  ------------------
  596|      1|      return CURLE_BAD_FUNCTION_ARGUMENT;
  597|      8|    *iface = curlx_memdup0(input, len - strlen(if_prefix));
  598|      8|    return *iface ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (598:12): [True: 8, False: 0]
  ------------------
  599|      9|  }
  600|    243|  else if(!strncmp(host_prefix, input, strlen(host_prefix))) {
  ------------------
  |  Branch (600:11): [True: 8, False: 235]
  ------------------
  601|      8|    input += strlen(host_prefix);
  602|      8|    if(!*input)
  ------------------
  |  Branch (602:8): [True: 1, False: 7]
  ------------------
  603|      1|      return CURLE_BAD_FUNCTION_ARGUMENT;
  604|      7|    *host = curlx_memdup0(input, len - strlen(host_prefix));
  605|      7|    return *host ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (605:12): [True: 7, False: 0]
  ------------------
  606|      8|  }
  607|    235|  else if(!strncmp(if_host_prefix, input, strlen(if_host_prefix))) {
  ------------------
  |  Branch (607:11): [True: 8, False: 227]
  ------------------
  608|      8|    const char *host_part;
  609|      8|    input += strlen(if_host_prefix);
  610|      8|    len -= strlen(if_host_prefix);
  611|      8|    host_part = memchr(input, '!', len);
  612|      8|    if(!host_part || !*(host_part + 1))
  ------------------
  |  Branch (612:8): [True: 1, False: 7]
  |  Branch (612:22): [True: 1, False: 6]
  ------------------
  613|      2|      return CURLE_BAD_FUNCTION_ARGUMENT;
  614|      6|    *iface = curlx_memdup0(input, host_part - input);
  615|      6|    if(!*iface)
  ------------------
  |  Branch (615:8): [True: 0, False: 6]
  ------------------
  616|      0|      return CURLE_OUT_OF_MEMORY;
  617|      6|    ++host_part;
  618|      6|    *host = curlx_memdup0(host_part, len - (host_part - input));
  619|      6|    if(!*host) {
  ------------------
  |  Branch (619:8): [True: 0, False: 6]
  ------------------
  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|      6|    return CURLE_OK;
  624|      6|  }
  625|       |
  626|    227|  if(!*input)
  ------------------
  |  Branch (626:6): [True: 1, False: 226]
  ------------------
  627|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  628|    226|  *dev = curlx_memdup0(input, len);
  629|    226|  return *dev ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (629:10): [True: 226, False: 0]
  ------------------
  630|    227|}
Curl_cf_tcp_create:
 1806|  5.08k|{
 1807|  5.08k|  struct cf_socket_ctx *ctx = NULL;
 1808|  5.08k|  struct Curl_cfilter *cf = NULL;
 1809|  5.08k|  CURLcode result;
 1810|       |
 1811|  5.08k|  (void)data;
 1812|  5.08k|  (void)origin;
 1813|  5.08k|  (void)conn;
 1814|  5.08k|  (void)tunnel_peer;
 1815|  5.08k|  (void)tunnel_transport;
 1816|  5.08k|  DEBUGASSERT(transport_peer == TRNSPRT_TCP);
  ------------------
  |  | 1077|  5.08k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1816:3): [True: 0, False: 5.08k]
  |  Branch (1816:3): [True: 5.08k, False: 0]
  ------------------
 1817|  5.08k|  if(!addr) {
  ------------------
  |  Branch (1817:6): [True: 0, False: 5.08k]
  ------------------
 1818|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
 1819|      0|    goto out;
 1820|      0|  }
 1821|       |
 1822|  5.08k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1485|  5.08k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1823|  5.08k|  if(!ctx) {
  ------------------
  |  Branch (1823:6): [True: 0, False: 5.08k]
  ------------------
 1824|      0|    result = CURLE_OUT_OF_MEMORY;
 1825|      0|    goto out;
 1826|      0|  }
 1827|       |
 1828|  5.08k|  result = cf_socket_ctx_init(ctx, peer, addr, transport_peer);
 1829|  5.08k|  if(result)
  ------------------
  |  Branch (1829:6): [True: 0, False: 5.08k]
  ------------------
 1830|      0|    goto out;
 1831|       |
 1832|  5.08k|  result = Curl_cf_create(&cf, &Curl_cft_tcp, ctx);
 1833|       |
 1834|  5.08k|out:
 1835|  5.08k|  *pcf = (!result) ? cf : NULL;
  ------------------
  |  Branch (1835:10): [True: 5.08k, False: 0]
  ------------------
 1836|  5.08k|  if(result) {
  ------------------
  |  Branch (1836:6): [True: 0, False: 5.08k]
  ------------------
 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|  5.08k|  return result;
 1842|  5.08k|}
Curl_cf_unix_create:
 2039|     18|{
 2040|     18|  struct cf_socket_ctx *ctx = NULL;
 2041|     18|  struct Curl_cfilter *cf = NULL;
 2042|     18|  CURLcode result;
 2043|       |
 2044|     18|  (void)data;
 2045|     18|  (void)origin;
 2046|     18|  (void)conn;
 2047|     18|  (void)tunnel_peer;
 2048|     18|  (void)tunnel_transport;
 2049|     18|  DEBUGASSERT(transport_peer == TRNSPRT_UNIX);
  ------------------
  |  | 1077|     18|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2049:3): [True: 0, False: 18]
  |  Branch (2049:3): [True: 18, False: 0]
  ------------------
 2050|     18|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1485|     18|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 2051|     18|  if(!ctx) {
  ------------------
  |  Branch (2051:6): [True: 0, False: 18]
  ------------------
 2052|      0|    result = CURLE_OUT_OF_MEMORY;
 2053|      0|    goto out;
 2054|      0|  }
 2055|       |
 2056|     18|  result = cf_socket_ctx_init(ctx, peer, addr, transport_peer);
 2057|     18|  if(result)
  ------------------
  |  Branch (2057:6): [True: 0, False: 18]
  ------------------
 2058|      0|    goto out;
 2059|       |
 2060|     18|  result = Curl_cf_create(&cf, &Curl_cft_unix, ctx);
 2061|       |
 2062|     18|out:
 2063|     18|  *pcf = (!result) ? cf : NULL;
  ------------------
  |  Branch (2063:10): [True: 18, False: 0]
  ------------------
 2064|     18|  if(result) {
  ------------------
  |  Branch (2064:6): [True: 0, False: 18]
  ------------------
 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|     18|  return result;
 2070|     18|}
cf-socket.c:socket_open:
  414|  5.09k|{
  415|  5.09k|  char errbuf[STRERROR_LEN];
  416|       |
  417|  5.09k|#ifdef SOCK_CLOEXEC
  418|  5.09k|  addr->socktype |= SOCK_CLOEXEC;
  419|  5.09k|#endif
  420|       |
  421|  5.09k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  5.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (421:3): [True: 0, False: 5.09k]
  |  Branch (421:3): [True: 5.09k, False: 0]
  ------------------
  422|  5.09k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|  5.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (422:3): [True: 0, False: 5.09k]
  |  Branch (422:3): [True: 5.09k, False: 0]
  ------------------
  423|  5.09k|  if(data->set.fopensocket) {
  ------------------
  |  Branch (423:6): [True: 5.01k, False: 79]
  ------------------
  424|       |    /*
  425|       |     * If the opensocket callback is set, all the destination address
  426|       |     * information is passed to the callback. Depending on this information the
  427|       |     * callback may opt to abort the connection, this is indicated returning
  428|       |     * CURL_SOCKET_BAD; otherwise it will return a not-connected socket. When
  429|       |     * the callback returns a valid socket the destination address information
  430|       |     * might have been changed and this 'new' address will actually be used
  431|       |     * here to connect.
  432|       |     */
  433|  5.01k|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1051|  5.01k|#define TRUE true
  ------------------
  434|  5.01k|    *sockfd = data->set.fopensocket(data->set.opensocket_client,
  435|  5.01k|                                    CURLSOCKTYPE_IPCXN,
  436|  5.01k|                                    (struct curl_sockaddr *)addr);
  437|  5.01k|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1054|  5.01k|#define FALSE false
  ------------------
  438|  5.01k|  }
  439|     79|  else {
  440|       |    /* opensocket callback not set, so create the socket now */
  441|     79|#ifdef DEBUGBUILD
  442|     79|    if((addr->family == AF_INET6) && getenv("CURL_DBG_SOCK_FAIL_IPV6")) {
  ------------------
  |  Branch (442:8): [True: 40, False: 39]
  |  Branch (442:38): [True: 0, False: 40]
  ------------------
  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|     79|#endif
  447|     79|    *sockfd = CURL_SOCKET(addr->family, addr->socktype, addr->protocol);
  ------------------
  |  | 1441|     79|  curl_dbg_socket((int)(domain), type, protocol, __LINE__, __FILE__)
  ------------------
  448|     79|    if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
  ------------------
  |  |  145|     79|#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: 79]
  |  Branch (448:40): [True: 0, False: 0]
  ------------------
  449|      0|      return CURLE_OUT_OF_MEMORY;
  450|     79|  }
  451|       |
  452|  5.09k|  if(*sockfd == CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  5.09k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (452:6): [True: 0, False: 5.09k]
  ------------------
  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|  5.09k|#if defined(USE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
  480|  5.09k|  if(addr->family == AF_INET6) {
  ------------------
  |  Branch (480:6): [True: 126, False: 4.97k]
  ------------------
  481|    126|    struct sockaddr_in6 * const sa6 = (void *)&addr->curl_sa_addr;
  ------------------
  |  |   35|    126|#define curl_sa_addr    addr.sa
  ------------------
  482|    126|    sa6->sin6_scope_id = get_scope_id(data, sa6);
  483|    126|  }
  484|  5.09k|#endif
  485|  5.09k|  return CURLE_OK;
  486|  5.09k|}
cf-socket.c:get_scope_id:
  371|    126|{
  372|    126|  uint32_t scope_id = 0;
  373|    126|  if(data->conn->scope_id)
  ------------------
  |  Branch (373:6): [True: 39, False: 87]
  ------------------
  374|     39|    return data->conn->scope_id;
  375|       |  /* NOLINTNEXTLINE(clang-analyzer-core.uninitialized.Assign) */
  376|     87|  scope_id = sa6->sin6_scope_id;
  377|     87|  if(!scope_id && IN6_IS_ADDR_LINKLOCAL(&sa6->sin6_addr)) {
  ------------------
  |  Branch (377:6): [True: 87, False: 0]
  |  Branch (377:19): [True: 3, False: 84]
  ------------------
  378|       |    /* The resolver did not set scope_id for this link-local address.
  379|       |     * Try to determine it from the system's network interfaces.
  380|       |     * Without a scope_id, connect() to a link-local address fails
  381|       |     * with EINVAL on Linux.
  382|       |     * NOTE: On multi-homed hosts with several interfaces having
  383|       |     * link-local addresses, this picks the first one found, which
  384|       |     * may not be the correct outgoing interface. */
  385|      3|#if defined(HAVE_GETIFADDRS) && defined(HAVE_NET_IF_H)
  386|      3|    struct ifaddrs *ifa, *ifa_list;
  387|      3|    if(getifaddrs(&ifa_list) == 0) {
  ------------------
  |  Branch (387:8): [True: 3, False: 0]
  ------------------
  388|     15|      for(ifa = ifa_list; ifa; ifa = ifa->ifa_next) {
  ------------------
  |  Branch (388:27): [True: 12, False: 3]
  ------------------
  389|     12|        if(ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET6 &&
  ------------------
  |  Branch (389:12): [True: 12, False: 0]
  |  Branch (389:29): [True: 0, False: 12]
  ------------------
  390|      0|           (ifa->ifa_flags & IFF_UP) &&
  ------------------
  |  Branch (390:12): [True: 0, False: 0]
  ------------------
  391|      0|           !(ifa->ifa_flags & IFF_LOOPBACK)) {
  ------------------
  |  Branch (391:12): [True: 0, False: 0]
  ------------------
  392|      0|          struct sockaddr_in6 *s6 = (void *)ifa->ifa_addr;
  393|      0|          if(IN6_IS_ADDR_LINKLOCAL(&s6->sin6_addr) && s6->sin6_scope_id) {
  ------------------
  |  Branch (393:14): [True: 0, False: 0]
  |  Branch (393:55): [True: 0, False: 0]
  ------------------
  394|      0|            scope_id = s6->sin6_scope_id;
  395|      0|            infof(data,
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|     12|      }
  403|      3|      freeifaddrs(ifa_list);
  404|      3|    }
  405|      3|#endif /* HAVE_GETIFADDRS && HAVE_NET_IF_H */
  406|      3|  }
  407|     87|  return scope_id;
  408|    126|}
cf-socket.c:socket_close:
  519|  5.09k|{
  520|  5.09k|  if(sock == CURL_SOCKET_BAD)
  ------------------
  |  |  145|  5.09k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (520:6): [True: 0, False: 5.09k]
  ------------------
  521|      0|    return 0;
  522|       |
  523|  5.09k|  if(use_callback && conn && conn->fclosesocket) {
  ------------------
  |  Branch (523:6): [True: 5.09k, False: 0]
  |  Branch (523:22): [True: 5.09k, False: 0]
  |  Branch (523:30): [True: 0, False: 5.09k]
  ------------------
  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|  5.09k|  if(conn)
  ------------------
  |  Branch (532:6): [True: 5.09k, False: 0]
  ------------------
  533|       |    /* tell the multi-socket code about this */
  534|  5.09k|    Curl_multi_will_close(data, sock);
  535|       |
  536|  5.09k|  sclose(sock);
  ------------------
  |  | 1433|  5.09k|#define sclose(sockfd) curl_dbg_sclose(sockfd, __LINE__, __FILE__)
  ------------------
  537|       |
  538|  5.09k|  return 0;
  539|  5.09k|}
cf-socket.c:cf_socket_destroy:
 1058|  5.09k|{
 1059|  5.09k|  struct cf_socket_ctx *ctx = cf->ctx;
 1060|       |
 1061|  5.09k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  5.09k|  do {                                          \
  |  |  154|  5.09k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.09k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.09k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.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]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.09k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.09k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.09k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.09k]
  |  |  ------------------
  ------------------
 1062|  5.09k|  if(ctx) {
  ------------------
  |  Branch (1062:6): [True: 5.09k, False: 0]
  ------------------
 1063|  5.09k|    if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  5.09k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1063:8): [True: 4.83k, False: 262]
  ------------------
 1064|  4.83k|      CURL_TRC_CF(data, cf, "cf_socket_close, fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|  4.83k|  do {                                          \
  |  |  154|  4.83k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  4.83k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  9.67k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 4.83k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  9.67k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->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.83k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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.83k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  4.83k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4.83k]
  |  |  ------------------
  ------------------
 1065|  4.83k|      if(ctx->sock == cf->conn->sock[cf->sockindex])
  ------------------
  |  Branch (1065:10): [True: 0, False: 4.83k]
  ------------------
 1066|      0|        cf->conn->sock[cf->sockindex] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
 1067|  4.83k|      socket_close(data, cf->conn, !ctx->accepted, ctx->sock);
 1068|  4.83k|    }
 1069|  5.09k|    cf_socket_ctx_free(ctx);
 1070|  5.09k|  }
 1071|  5.09k|}
cf-socket.c:cf_tcp_connect:
 1355|  5.12k|{
 1356|  5.12k|  struct cf_socket_ctx *ctx = cf->ctx;
 1357|  5.12k|  CURLcode result = CURLE_COULDNT_CONNECT;
 1358|  5.12k|  int rc = 0;
 1359|       |
 1360|  5.12k|  if(cf->connected) {
  ------------------
  |  Branch (1360:6): [True: 0, False: 5.12k]
  ------------------
 1361|      0|    *done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 1362|      0|    return CURLE_OK;
 1363|      0|  }
 1364|       |
 1365|  5.12k|  *done = FALSE; /* a negative world view is best */
  ------------------
  |  | 1054|  5.12k|#define FALSE false
  ------------------
 1366|  5.12k|  if(ctx->sock == CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  5.12k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1366:6): [True: 5.09k, False: 30]
  ------------------
 1367|  5.09k|    int sockerr;
 1368|       |
 1369|  5.09k|    result = cf_socket_open(cf, data);
 1370|  5.09k|    if(result)
  ------------------
  |  Branch (1370:8): [True: 212, False: 4.88k]
  ------------------
 1371|    212|      goto out;
 1372|       |
 1373|  4.88k|    if(cf->connected) {
  ------------------
  |  Branch (1373:8): [True: 4.80k, False: 79]
  ------------------
 1374|  4.80k|      *done = TRUE;
  ------------------
  |  | 1051|  4.80k|#define TRUE true
  ------------------
 1375|  4.80k|      return CURLE_OK;
 1376|  4.80k|    }
 1377|       |
 1378|       |    /* Connect TCP socket */
 1379|     79|    rc = do_connect(cf, data, (bool)cf->conn->bits.tcp_fastopen);
 1380|     79|    sockerr = SOCKERRNO;
  ------------------
  |  | 1091|     79|#define SOCKERRNO         errno
  ------------------
 1381|     79|    set_local_ip(cf, data);
 1382|     79|    CURL_TRC_CF(data, cf, "local address %s port %d...",
  ------------------
  |  |  153|     79|  do {                                          \
  |  |  154|     79|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     79|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    158|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 79, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 79]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    158|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     79|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     79|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     79|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 79]
  |  |  ------------------
  ------------------
 1383|     79|                ctx->ip.local_ip, ctx->ip.local_port);
 1384|     79|    if(rc == -1) {
  ------------------
  |  Branch (1384:8): [True: 79, False: 0]
  ------------------
 1385|     79|      ctx->sockerr = sockerr;
 1386|     79|      result = socket_connect_result(data, ctx->ip.remote_ip, sockerr);
 1387|     79|      goto out;
 1388|     79|    }
 1389|     79|  }
 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|     30|  rc = SOCKET_WRITABLE(ctx->sock, 0);
  ------------------
  |  |   79|     30|  Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z)
  |  |  ------------------
  |  |  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  |  |  ------------------
  |  |                 Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z)
  |  |  ------------------
  |  |  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  |  |  ------------------
  ------------------
 1400|       |
 1401|     30|  if(rc == 0) { /* no connection yet */
  ------------------
  |  Branch (1401:6): [True: 20, False: 10]
  ------------------
 1402|     20|    CURL_TRC_CF(data, cf, "not connected yet on fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|     20|  do {                                          \
  |  |  154|     20|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     20|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     40|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 20, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 20]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     40|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     20|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     20|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     20|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 20]
  |  |  ------------------
  ------------------
 1403|     20|    return CURLE_OK;
 1404|     20|  }
 1405|     10|  else if(rc == CURL_CSELECT_OUT || cf->conn->bits.tcp_fastopen) {
  ------------------
  |  |  291|     20|#define CURL_CSELECT_OUT  0x02
  ------------------
  |  Branch (1405:11): [True: 0, False: 10]
  |  Branch (1405:37): [True: 0, False: 10]
  ------------------
 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|     10|  else if(rc & CURL_CSELECT_ERR) {
  ------------------
  |  |  292|     10|#define CURL_CSELECT_ERR  0x04
  ------------------
  |  Branch (1416:11): [True: 10, False: 0]
  ------------------
 1417|     10|    CURL_TRC_CF(data, cf, "poll/select error on fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|     10|  do {                                          \
  |  |  154|     10|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     10|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     20|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 10, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     20|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     10|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     10|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10]
  |  |  ------------------
  ------------------
 1418|     10|    (void)verifyconnect(ctx->sock, &ctx->sockerr);
 1419|     10|    result = CURLE_COULDNT_CONNECT;
 1420|     10|  }
 1421|       |
 1422|    301|out:
 1423|    301|  if(result) {
  ------------------
  |  Branch (1423:6): [True: 262, False: 39]
  ------------------
 1424|    262|    VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1623|    262|#define VERBOSE(x) x
  ------------------
 1425|    262|    set_local_ip(cf, data);
 1426|    262|    if(ctx->sockerr) {
  ------------------
  |  Branch (1426:8): [True: 50, False: 212]
  ------------------
 1427|     50|      data->state.os_errno = ctx->sockerr;
 1428|     50|      SET_SOCKERRNO(ctx->sockerr);
  ------------------
  |  | 1092|     50|#define SET_SOCKERRNO(x)  (errno = (x))
  ------------------
 1429|     50|      VERBOSE(curlx_strerror(ctx->sockerr, buffer, sizeof(buffer)));
  ------------------
  |  | 1623|     50|#define VERBOSE(x) x
  ------------------
 1430|     50|    }
 1431|    212|    else {
 1432|    212|      VERBOSE(curlx_strcopy(buffer, sizeof(buffer), STRCONST("peer closed")));
  ------------------
  |  | 1623|    212|#define VERBOSE(x) x
  ------------------
 1433|    212|    }
 1434|    262|    if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|    262|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1434:8): [True: 50, False: 212]
  ------------------
 1435|     50|      socket_close(data, cf->conn, TRUE, ctx->sock);
  ------------------
  |  | 1051|     50|#define TRUE true
  ------------------
 1436|     50|      ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|     50|#define CURL_SOCKET_BAD (-1)
  ------------------
 1437|     50|    }
 1438|    262|    infof(data, "connect to %s port %u from %s port %d failed: %s",
  ------------------
  |  |  143|    262|  do {                               \
  |  |  144|    262|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    262|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 262, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 262]
  |  |  |  |  ------------------
  |  |  |  |  320|    262|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    262|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    262|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 262]
  |  |  ------------------
  ------------------
 1439|    262|          ctx->ip.remote_ip, ctx->ip.remote_port,
 1440|    262|          ctx->ip.local_ip, ctx->ip.local_port,
 1441|    262|          curlx_strerror(ctx->sockerr, buffer, sizeof(buffer)));
 1442|       |    *done = FALSE;
  ------------------
  |  | 1054|    262|#define FALSE false
  ------------------
 1443|    262|  }
 1444|    301|  return result;
 1445|     30|}
cf-socket.c:cf_socket_open:
 1144|  5.09k|{
 1145|  5.09k|  struct cf_socket_ctx *ctx = cf->ctx;
 1146|  5.09k|  int error = 0;
 1147|  5.09k|  bool isconnected = FALSE;
  ------------------
  |  | 1054|  5.09k|#define FALSE false
  ------------------
 1148|  5.09k|  CURLcode result = CURLE_COULDNT_CONNECT;
 1149|  5.09k|  bool is_tcp;
 1150|       |
 1151|  5.09k|  DEBUGASSERT(ctx->sock == CURL_SOCKET_BAD);
  ------------------
  |  | 1077|  5.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1151:3): [True: 0, False: 5.09k]
  |  Branch (1151:3): [True: 5.09k, False: 0]
  ------------------
 1152|  5.09k|  ctx->started_at = *Curl_pgrs_now(data);
 1153|  5.09k|#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|  5.09k|  if(!data->set.fopensocket)
  ------------------
  |  Branch (1158:6): [True: 79, False: 5.01k]
  ------------------
 1159|     79|    ctx->addr.socktype |= SOCK_NONBLOCK;
 1160|  5.09k|#endif
 1161|  5.09k|  result = socket_open(data, &ctx->addr, &ctx->sock);
 1162|  5.09k|#ifdef SOCK_NONBLOCK
 1163|       |  /* Restore the socktype after the socket is created. */
 1164|  5.09k|  if(!data->set.fopensocket)
  ------------------
  |  Branch (1164:6): [True: 79, False: 5.01k]
  ------------------
 1165|     79|    ctx->addr.socktype &= ~SOCK_NONBLOCK;
 1166|  5.09k|#endif
 1167|  5.09k|  if(result)
  ------------------
  |  Branch (1167:6): [True: 0, False: 5.09k]
  ------------------
 1168|      0|    goto out;
 1169|       |
 1170|  5.09k|  result = set_remote_ip(cf, data);
 1171|  5.09k|  if(result)
  ------------------
  |  Branch (1171:6): [True: 0, False: 5.09k]
  ------------------
 1172|      0|    goto out;
 1173|       |
 1174|  5.09k|#ifdef USE_IPV6
 1175|  5.09k|  if(ctx->addr.family == AF_INET6) {
  ------------------
  |  Branch (1175:6): [True: 126, False: 4.97k]
  ------------------
 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|    126|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
 1189|    126|    {
 1190|    126|      struct sockaddr_in6 *sa6 = (void *)&ctx->addr.curl_sa_addr;
  ------------------
  |  |   35|    126|#define curl_sa_addr    addr.sa
  ------------------
 1191|    126|      if(sa6->sin6_scope_id)
  ------------------
  |  Branch (1191:10): [True: 39, False: 87]
  ------------------
 1192|     39|        infof(data, "  Trying [%s]:%d scope_id=%lu...",
  ------------------
  |  |  143|     39|  do {                               \
  |  |  144|     39|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     39|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 39, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 39]
  |  |  |  |  ------------------
  |  |  |  |  320|     39|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|     39|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     39|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 39]
  |  |  ------------------
  ------------------
 1193|    126|              ctx->ip.remote_ip, ctx->ip.remote_port,
 1194|    126|              (unsigned long)sa6->sin6_scope_id);
 1195|     87|      else
 1196|     87|#endif
 1197|     87|        infof(data, "  Trying [%s]:%d...",
  ------------------
  |  |  143|     87|  do {                               \
  |  |  144|     87|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     87|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 87, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 87]
  |  |  |  |  ------------------
  |  |  |  |  320|     87|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|     87|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     87|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 87]
  |  |  ------------------
  ------------------
 1198|    126|              ctx->ip.remote_ip, ctx->ip.remote_port);
 1199|    126|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
 1200|    126|    }
 1201|    126|#endif
 1202|    126|  }
 1203|  4.97k|  else
 1204|  4.97k|#endif
 1205|  4.97k|    infof(data, "  Trying %s:%d...", ctx->ip.remote_ip, ctx->ip.remote_port);
  ------------------
  |  |  143|  4.97k|  do {                               \
  |  |  144|  4.97k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  4.97k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 4.97k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.97k]
  |  |  |  |  ------------------
  |  |  |  |  320|  4.97k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  4.97k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  4.97k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 4.97k]
  |  |  ------------------
  ------------------
 1206|       |
 1207|  5.09k|#ifdef USE_IPV6
 1208|  5.09k|  is_tcp = (ctx->addr.family == AF_INET ||
  ------------------
  |  Branch (1208:13): [True: 4.95k, False: 144]
  ------------------
 1209|    144|            ctx->addr.family == AF_INET6) &&
  ------------------
  |  Branch (1209:13): [True: 126, False: 18]
  ------------------
 1210|  5.08k|    cf_socktype(ctx->addr.socktype) == SOCK_STREAM;
  ------------------
  |  Branch (1210:5): [True: 5.08k, False: 0]
  ------------------
 1211|       |#else
 1212|       |  is_tcp = (ctx->addr.family == AF_INET) &&
 1213|       |    cf_socktype(ctx->addr.socktype) == SOCK_STREAM;
 1214|       |#endif
 1215|  5.09k|  if(is_tcp && data->set.tcp_nodelay)
  ------------------
  |  Branch (1215:6): [True: 5.08k, False: 18]
  |  Branch (1215:16): [True: 5.07k, False: 3]
  ------------------
 1216|  5.07k|    tcpnodelay(cf, data, ctx->sock);
 1217|       |
 1218|  5.09k|  if(is_tcp && data->set.tcp_keepalive)
  ------------------
  |  Branch (1218:6): [True: 5.08k, False: 18]
  |  Branch (1218:16): [True: 45, False: 5.03k]
  ------------------
 1219|     45|    tcpkeepalive(cf, data, ctx->sock);
 1220|       |
 1221|  5.09k|  if(data->set.fsockopt) {
  ------------------
  |  Branch (1221:6): [True: 5.01k, False: 79]
  ------------------
 1222|       |    /* activate callback for setting socket options */
 1223|  5.01k|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1051|  5.01k|#define TRUE true
  ------------------
 1224|  5.01k|    error = data->set.fsockopt(data->set.sockopt_client,
 1225|  5.01k|                               ctx->sock,
 1226|  5.01k|                               CURLSOCKTYPE_IPCXN);
 1227|  5.01k|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1054|  5.01k|#define FALSE false
  ------------------
 1228|       |
 1229|  5.01k|    if(error == CURL_SOCKOPT_ALREADY_CONNECTED)
  ------------------
  |  |  421|  5.01k|#define CURL_SOCKOPT_ALREADY_CONNECTED 2
  ------------------
  |  Branch (1229:8): [True: 5.01k, False: 0]
  ------------------
 1230|  5.01k|      isconnected = TRUE;
  ------------------
  |  | 1051|  5.01k|#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|  5.01k|  }
 1236|       |
 1237|  5.09k|#ifndef CURL_DISABLE_BINDLOCAL
 1238|       |  /* possibly bind the local end to an IP, interface or port */
 1239|  5.09k|  if(ctx->addr.family == AF_INET
  ------------------
  |  Branch (1239:6): [True: 4.95k, False: 144]
  ------------------
 1240|    144|#ifdef USE_IPV6
 1241|    144|     || ctx->addr.family == AF_INET6
  ------------------
  |  Branch (1241:9): [True: 126, False: 18]
  ------------------
 1242|  5.09k|#endif
 1243|  5.09k|    ) {
 1244|  5.08k|    result = bindlocal(data, cf->conn, ctx->sock, ctx->addr.family,
 1245|  5.08k|                       Curl_ipv6_scope(&ctx->addr.curl_sa_addr),
  ------------------
  |  |   35|  5.08k|#define curl_sa_addr    addr.sa
  ------------------
 1246|  5.08k|                       ctx->transport);
 1247|  5.08k|    if(result) {
  ------------------
  |  Branch (1247:8): [True: 212, False: 4.86k]
  ------------------
 1248|    212|      if(result == CURLE_UNSUPPORTED_PROTOCOL) {
  ------------------
  |  Branch (1248:10): [True: 15, False: 197]
  ------------------
 1249|       |        /* The address family is not supported on this interface.
 1250|       |           We can continue trying addresses */
 1251|     15|        result = CURLE_COULDNT_CONNECT;
 1252|     15|      }
 1253|    212|      goto out;
 1254|    212|    }
 1255|  5.08k|  }
 1256|  4.88k|#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|  4.88k|  if(data->set.fopensocket) {
  ------------------
  |  Branch (1268:6): [True: 4.80k, False: 79]
  ------------------
 1269|       |    /* Set socket non-blocking, must be a non-blocking socket for
 1270|       |     * a non-blocking connect. */
 1271|  4.80k|    error = curlx_nonblock(ctx->sock, TRUE);
  ------------------
  |  | 1051|  4.80k|#define TRUE true
  ------------------
 1272|  4.80k|    if(error < 0) {
  ------------------
  |  Branch (1272:8): [True: 0, False: 4.80k]
  ------------------
 1273|      0|      result = CURLE_UNSUPPORTED_PROTOCOL;
 1274|      0|      ctx->sockerr = SOCKERRNO;
  ------------------
  |  | 1091|      0|#define SOCKERRNO         errno
  ------------------
 1275|      0|      goto out;
 1276|      0|    }
 1277|  4.80k|  }
 1278|  4.88k|#endif
 1279|  4.88k|  ctx->sock_connected = (cf_socktype(ctx->addr.socktype) != SOCK_DGRAM);
 1280|  5.09k|out:
 1281|  5.09k|  if(result) {
  ------------------
  |  Branch (1281:6): [True: 212, False: 4.88k]
  ------------------
 1282|    212|    if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|    212|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1282:8): [True: 212, False: 0]
  ------------------
 1283|    212|      socket_close(data, cf->conn, TRUE, ctx->sock);
  ------------------
  |  | 1051|    212|#define TRUE true
  ------------------
 1284|    212|      ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|    212|#define CURL_SOCKET_BAD (-1)
  ------------------
 1285|    212|    }
 1286|    212|  }
 1287|  4.88k|  else if(isconnected) {
  ------------------
  |  Branch (1287:11): [True: 4.80k, False: 79]
  ------------------
 1288|  4.80k|    set_local_ip(cf, data);
 1289|  4.80k|    ctx->connected_at = *Curl_pgrs_now(data);
 1290|  4.80k|    cf->connected = TRUE;
  ------------------
  |  | 1051|  4.80k|#define TRUE true
  ------------------
 1291|  4.80k|  }
 1292|  5.09k|  CURL_TRC_CF(data, cf, "cf_socket_open() -> %d, fd=%" FMT_SOCKET_T,
  ------------------
  |  |  153|  5.09k|  do {                                          \
  |  |  154|  5.09k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.09k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.09k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.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]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.09k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.09k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.09k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.09k]
  |  |  ------------------
  ------------------
 1293|  5.09k|              (int)result, ctx->sock);
 1294|  5.09k|  return result;
 1295|  4.88k|}
cf-socket.c:set_remote_ip:
 1107|  5.09k|{
 1108|  5.09k|  struct cf_socket_ctx *ctx = cf->ctx;
 1109|       |
 1110|       |  /* store remote address and port used in this connection attempt */
 1111|  5.09k|  ctx->ip.transport = ctx->transport;
 1112|  5.09k|  if(!sockaddr2string(&ctx->addr.curl_sa_addr,
  ------------------
  |  |   35|  5.09k|#define curl_sa_addr    addr.sa
  ------------------
  |  Branch (1112:6): [True: 0, False: 5.09k]
  ------------------
 1113|  5.09k|                      (curl_socklen_t)ctx->addr.addrlen,
 1114|  5.09k|                      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|  5.09k|  return CURLE_OK;
 1127|  5.09k|}
cf-socket.c:cf_socktype:
 1132|  9.96k|{
 1133|  9.96k|#ifdef SOCK_CLOEXEC
 1134|  9.96k|  x &= ~SOCK_CLOEXEC;
 1135|  9.96k|#endif
 1136|  9.96k|#ifdef SOCK_NONBLOCK
 1137|       |  x &= ~SOCK_NONBLOCK;
 1138|  9.96k|#endif
 1139|  9.96k|  return x;
 1140|  9.96k|}
cf-socket.c:tcpnodelay:
  146|  5.07k|{
  147|  5.07k|#if defined(TCP_NODELAY) && defined(CURL_TCP_NODELAY_SUPPORTED)
  148|  5.07k|  curl_socklen_t onoff = (curl_socklen_t)1;
  149|  5.07k|  int level = IPPROTO_TCP;
  150|  5.07k|  VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1623|  5.07k|#define VERBOSE(x) x
  ------------------
  151|       |
  152|  5.07k|  if(setsockopt(sockfd, level, TCP_NODELAY, (void *)&onoff, sizeof(onoff)) < 0)
  ------------------
  |  Branch (152:6): [True: 4.99k, False: 79]
  ------------------
  153|  4.99k|    CURL_TRC_CF(data, cf, "Could not set TCP_NODELAY: %s",
  ------------------
  |  |  153|  4.99k|  do {                                          \
  |  |  154|  4.99k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  4.99k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  9.99k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 4.99k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.99k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  9.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]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  4.99k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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.99k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  4.99k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4.99k]
  |  |  ------------------
  ------------------
  154|  5.07k|                curlx_strerror(SOCKERRNO, buffer, sizeof(buffer)));
  155|       |#else
  156|       |  (void)cf;
  157|       |  (void)data;
  158|       |  (void)sockfd;
  159|       |#endif
  160|  5.07k|}
cf-socket.c:tcpkeepalive:
  180|     45|{
  181|     45|  int optval = data->set.tcp_keepalive ? 1 : 0;
  ------------------
  |  Branch (181:16): [True: 45, False: 0]
  ------------------
  182|       |
  183|       |  /* only set IDLE and INTVL if setting KEEPALIVE is successful */
  184|     45|  if(setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE,
  ------------------
  |  Branch (184:6): [True: 0, False: 45]
  ------------------
  185|     45|                (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|     45|  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|     45|#ifdef TCP_KEEPIDLE
  257|     45|    optval = curlx_sltosi(data->set.tcp_keepidle);
  258|     45|    KEEPALIVE_FACTOR(optval);
  259|     45|    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE,
  ------------------
  |  Branch (259:8): [True: 45, False: 0]
  ------------------
  260|     45|                  (void *)&optval, sizeof(optval)) < 0) {
  261|     45|      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPIDLE on fd "
  ------------------
  |  |  153|     45|  do {                                          \
  |  |  154|     45|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     45|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     90|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 45, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 45]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     90|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     45|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     45|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     45|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 45]
  |  |  ------------------
  ------------------
  262|     45|                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  263|     45|    }
  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|     45|#ifdef TCP_KEEPINTVL
  284|     45|    optval = curlx_sltosi(data->set.tcp_keepintvl);
  285|     45|    KEEPALIVE_FACTOR(optval);
  286|     45|    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL,
  ------------------
  |  Branch (286:8): [True: 45, False: 0]
  ------------------
  287|     45|                  (void *)&optval, sizeof(optval)) < 0) {
  288|     45|      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPINTVL on fd "
  ------------------
  |  |  153|     45|  do {                                          \
  |  |  154|     45|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     45|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     90|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 45, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 45]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     90|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     45|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     45|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     45|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 45]
  |  |  ------------------
  ------------------
  289|     45|                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  290|     45|    }
  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|     45|#ifdef TCP_KEEPCNT
  320|     45|    optval = curlx_sltosi(data->set.tcp_keepcnt);
  321|     45|    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPCNT,
  ------------------
  |  Branch (321:8): [True: 45, False: 0]
  ------------------
  322|     45|                  (void *)&optval, sizeof(optval)) < 0) {
  323|     45|      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPCNT on fd "
  ------------------
  |  |  153|     45|  do {                                          \
  |  |  154|     45|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     45|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     90|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 45, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 45]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     90|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     45|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     45|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     45|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 45]
  |  |  ------------------
  ------------------
  324|     45|                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  325|     45|    }
  326|     45|#endif
  327|     45|#endif /* USE_WINSOCK */
  328|     45|  }
  329|     45|}
cf-socket.c:bindlocal:
  636|  5.08k|{
  637|  5.08k|  struct Curl_sockaddr_storage sa;
  638|  5.08k|  struct sockaddr *sock = (struct sockaddr *)&sa;  /* bind to this address */
  639|  5.08k|  curl_socklen_t sizeof_sa = 0; /* size of the data sock points to */
  640|  5.08k|  struct sockaddr_in *si4 = (struct sockaddr_in *)&sa;
  641|  5.08k|#ifdef USE_IPV6
  642|  5.08k|  struct sockaddr_in6 *si6 = (struct sockaddr_in6 *)&sa;
  643|  5.08k|#endif
  644|       |
  645|  5.08k|  struct Curl_dns_entry *h = NULL;
  646|  5.08k|  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|  5.08k|  int portnum = data->set.localportrange;
  650|  5.08k|  const char *dev = data->set.str[STRING_DEVICE];
  651|  5.08k|  const char *iface_input = data->set.str[STRING_INTERFACE];
  652|  5.08k|  const char *host_input = data->set.str[STRING_BINDHOST];
  653|  5.08k|  const char *iface = iface_input ? iface_input : dev;
  ------------------
  |  Branch (653:23): [True: 10, False: 5.07k]
  ------------------
  654|  5.08k|  const char *host = host_input ? host_input : dev;
  ------------------
  |  Branch (654:22): [True: 14, False: 5.06k]
  ------------------
  655|  5.08k|  int sockerr;
  656|  5.08k|#ifdef IP_BIND_ADDRESS_NO_PORT
  657|  5.08k|  int on = 1;
  658|  5.08k|#endif
  659|       |#ifndef USE_IPV6
  660|       |  (void)scope;
  661|       |#endif
  662|       |
  663|       |  /*************************************************************
  664|       |   * Select device to bind socket to
  665|       |   *************************************************************/
  666|  5.08k|  if(!iface && !host && !port)
  ------------------
  |  Branch (666:6): [True: 4.88k, False: 194]
  |  Branch (666:16): [True: 4.87k, False: 7]
  |  Branch (666:25): [True: 4.86k, False: 12]
  ------------------
  667|       |    /* no local kind of binding was requested */
  668|  4.86k|    return CURLE_OK;
  669|    213|  else if(iface && (strlen(iface) >= 255))
  ------------------
  |  Branch (669:11): [True: 194, False: 19]
  |  Branch (669:20): [True: 3, False: 191]
  ------------------
  670|      3|    return CURLE_BAD_FUNCTION_ARGUMENT;
  671|       |
  672|    210|  memset(&sa, 0, sizeof(struct Curl_sockaddr_storage));
  673|       |
  674|    210|  if(iface || host) {
  ------------------
  |  Branch (674:6): [True: 191, False: 19]
  |  Branch (674:15): [True: 7, False: 12]
  ------------------
  675|    198|    char myhost[256] = "";
  676|    198|    int done = 0; /* -1 for error, 1 for address found */
  677|    198|    if2ip_result_t if2ip_result = IF2IP_NOT_FOUND;
  678|       |
  679|    198|#ifdef SO_BINDTODEVICE
  680|    198|    if(iface) {
  ------------------
  |  Branch (680:8): [True: 191, False: 7]
  ------------------
  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|    191|      if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
  ------------------
  |  Branch (691:10): [True: 4, False: 187]
  ------------------
  692|    191|                    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|      4|        if(!host_input) {
  ------------------
  |  Branch (698:12): [True: 1, False: 3]
  ------------------
  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|      4|      }
  703|    191|    }
  704|    197|#endif
  705|    197|    if(!host_input) {
  ------------------
  |  Branch (705:8): [True: 183, False: 14]
  ------------------
  706|       |      /* Discover IP from input device, then bind to it */
  707|    183|      if2ip_result = Curl_if2ip(af,
  708|    183|#ifdef USE_IPV6
  709|    183|                                scope, conn->scope_id,
  710|    183|#endif
  711|    183|                                iface, myhost, sizeof(myhost));
  712|    183|    }
  713|    197|    switch(if2ip_result) {
  ------------------
  |  Branch (713:12): [True: 197, False: 0]
  ------------------
  714|    196|    case IF2IP_NOT_FOUND:
  ------------------
  |  Branch (714:5): [True: 196, False: 1]
  ------------------
  715|    196|      if(iface_input && !host_input) {
  ------------------
  |  Branch (715:10): [True: 10, False: 186]
  |  Branch (715:25): [True: 3, False: 7]
  ------------------
  716|       |        /* Do not fall back to treating it as a hostname */
  717|      3|        char buffer[STRERROR_LEN];
  718|      3|        data->state.os_errno = sockerr = SOCKERRNO;
  ------------------
  |  | 1091|      3|#define SOCKERRNO         errno
  ------------------
  719|      3|        failf(data, "Could not bind to interface '%s' with errno %d: %s",
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  720|      3|              iface, sockerr, curlx_strerror(sockerr, buffer, sizeof(buffer)));
  721|      3|        return CURLE_INTERFACE_FAILED;
  722|      3|      }
  723|    193|      break;
  724|    193|    case IF2IP_AF_NOT_SUPPORTED:
  ------------------
  |  Branch (724:5): [True: 0, False: 197]
  ------------------
  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: 196]
  ------------------
  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|    197|    }
  737|    194|    if(!iface_input || host_input) {
  ------------------
  |  Branch (737:8): [True: 187, False: 7]
  |  Branch (737:24): [True: 7, 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|    194|      uint8_t dns_queries = (af == AF_INET) ?
  ------------------
  |  Branch (746:29): [True: 140, False: 54]
  ------------------
  747|    140|                            CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|    140|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                                          CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|     54|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                                          CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|     54|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  748|    194|#ifdef USE_IPV6
  749|    194|      if(af == AF_INET6)
  ------------------
  |  Branch (749:10): [True: 54, False: 140]
  ------------------
  750|     54|        dns_queries = CURL_DNSQ_AAAA;
  ------------------
  |  |   52|     54|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  751|    194|#endif
  752|       |
  753|    194|      (void)Curl_resolv_blocking(data, dns_queries, host, 80, transport, &h);
  754|    194|      if(h) {
  ------------------
  |  Branch (754:10): [True: 37, False: 157]
  ------------------
  755|     37|        int h_af = h->addr->ai_family;
  756|       |        /* convert the resolved address, sizeof myhost >= INET_ADDRSTRLEN */
  757|     37|        Curl_printable_address(h->addr, myhost, sizeof(myhost));
  758|     37|        infof(data, "Name '%s' family %d resolved to '%s' family %d",
  ------------------
  |  |  143|     37|  do {                               \
  |  |  144|     37|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     37|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 37, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 37]
  |  |  |  |  ------------------
  |  |  |  |  320|     37|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|     37|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     37|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 37]
  |  |  ------------------
  ------------------
  759|     37|              host, af, myhost, h_af);
  760|     37|        Curl_dns_entry_unlink(data, &h); /* this will NULL, potential free h */
  761|     37|        if(af != h_af) {
  ------------------
  |  Branch (761:12): [True: 15, False: 22]
  ------------------
  762|       |          /* bad IP version combo, signal the caller to try another address
  763|       |             family if available */
  764|     15|          return CURLE_UNSUPPORTED_PROTOCOL;
  765|     15|        }
  766|     22|        done = 1;
  767|     22|      }
  768|    157|      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|    157|        done = -1;
  774|    157|      }
  775|    194|    }
  776|       |
  777|    179|    if(done > 0) {
  ------------------
  |  Branch (777:8): [True: 22, False: 157]
  ------------------
  778|     22|#ifdef USE_IPV6
  779|       |      /* IPv6 address */
  780|     22|      if(af == AF_INET6) {
  ------------------
  |  Branch (780:10): [True: 12, False: 10]
  ------------------
  781|     12|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  782|     12|        char *scope_ptr = strchr(myhost, '%');
  783|     12|        if(scope_ptr)
  ------------------
  |  Branch (783:12): [True: 0, False: 12]
  ------------------
  784|      0|          *(scope_ptr++) = '\0';
  785|     12|#endif
  786|     12|        if(curlx_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0) {
  ------------------
  |  Branch (786:12): [True: 12, False: 0]
  ------------------
  787|     12|          si6->sin6_family = AF_INET6;
  788|     12|          si6->sin6_port = htons(port);
  789|     12|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  790|     12|          if(scope_ptr) {
  ------------------
  |  Branch (790:14): [True: 0, False: 12]
  ------------------
  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|     12|#endif
  802|     12|        }
  803|     12|        sizeof_sa = sizeof(struct sockaddr_in6);
  804|     12|      }
  805|     10|      else
  806|     10|#endif
  807|       |      /* IPv4 address */
  808|     10|      if((af == AF_INET) &&
  ------------------
  |  Branch (808:10): [True: 10, False: 0]
  ------------------
  809|     10|         (curlx_inet_pton(AF_INET, myhost, &si4->sin_addr) > 0)) {
  ------------------
  |  Branch (809:10): [True: 10, False: 0]
  ------------------
  810|     10|        si4->sin_family = AF_INET;
  811|     10|        si4->sin_port = htons(port);
  812|     10|        sizeof_sa = sizeof(struct sockaddr_in);
  813|     10|      }
  814|     22|    }
  815|       |
  816|    179|    if(done < 1) {
  ------------------
  |  Branch (816:8): [True: 157, False: 22]
  ------------------
  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|    157|      char buffer[STRERROR_LEN];
  821|    157|      data->state.errorbuf = FALSE;
  ------------------
  |  | 1054|    157|#define FALSE false
  ------------------
  822|    157|      data->state.os_errno = sockerr = SOCKERRNO;
  ------------------
  |  | 1091|    157|#define SOCKERRNO         errno
  ------------------
  823|    157|      failf(data, "Could not bind to '%s' with errno %d: %s", host,
  ------------------
  |  |   62|    157|#define failf Curl_failf
  ------------------
  824|    157|            sockerr, curlx_strerror(sockerr, buffer, sizeof(buffer)));
  825|    157|      return CURLE_INTERFACE_FAILED;
  826|    157|    }
  827|    179|  }
  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|     34|#ifdef IP_BIND_ADDRESS_NO_PORT
  845|     34|  (void)setsockopt(sockfd, SOL_IP, IP_BIND_ADDRESS_NO_PORT, &on, sizeof(on));
  846|     34|#endif
  847|  26.7k|  for(;;) {
  848|  26.7k|    if(bind(sockfd, sock, sizeof_sa) >= 0) {
  ------------------
  |  Branch (848:8): [True: 0, False: 26.7k]
  ------------------
  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|  26.7k|    if(--portnum > 0) {
  ------------------
  |  Branch (855:8): [True: 26.7k, False: 29]
  ------------------
  856|  26.7k|      port++; /* try next port */
  857|  26.7k|      if(port == 0)
  ------------------
  |  Branch (857:10): [True: 5, False: 26.6k]
  ------------------
  858|      5|        break;
  859|  26.6k|      infof(data, "Bind to local port %d failed, trying next", port - 1);
  ------------------
  |  |  143|  26.6k|  do {                               \
  |  |  144|  26.6k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  26.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 26.6k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 26.6k]
  |  |  |  |  ------------------
  |  |  |  |  320|  26.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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  26.6k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  26.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 26.6k]
  |  |  ------------------
  ------------------
  860|       |      /* We reuse/clobber the port variable here below */
  861|  26.6k|      if(sock->sa_family == AF_INET)
  ------------------
  |  Branch (861:10): [True: 26.6k, False: 0]
  ------------------
  862|  26.6k|        si4->sin_port = htons(port);
  863|      0|#ifdef USE_IPV6
  864|      0|      else
  865|      0|        si6->sin6_port = htons(port);
  866|  26.6k|#endif
  867|  26.6k|    }
  868|     29|    else
  869|     29|      break;
  870|  26.7k|  }
  871|     34|  {
  872|     34|    char buffer[STRERROR_LEN];
  873|     34|    data->state.os_errno = sockerr = SOCKERRNO;
  ------------------
  |  | 1091|     34|#define SOCKERRNO         errno
  ------------------
  874|     34|    failf(data, "bind failed with errno %d: %s",
  ------------------
  |  |   62|     34|#define failf Curl_failf
  ------------------
  875|     34|          sockerr, curlx_strerror(sockerr, buffer, sizeof(buffer)));
  876|     34|  }
  877|       |
  878|     34|  return CURLE_INTERFACE_FAILED;
  879|     34|}
cf-socket.c:do_connect:
 1299|     79|{
 1300|     79|  struct cf_socket_ctx *ctx = cf->ctx;
 1301|     79|#ifdef TCP_FASTOPEN_CONNECT
 1302|     79|  int optval = 1;
 1303|     79|#endif
 1304|     79|  int rc = -1;
 1305|       |
 1306|     79|  (void)data;
 1307|     79|  if(is_tcp_fastopen) {
  ------------------
  |  Branch (1307:6): [True: 0, False: 79]
  ------------------
 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|     79|  else {
 1346|     79|    rc = connect(ctx->sock, &ctx->addr.curl_sa_addr,
  ------------------
  |  |   35|     79|#define curl_sa_addr    addr.sa
  ------------------
 1347|     79|                 (curl_socklen_t)ctx->addr.addrlen);
 1348|     79|  }
 1349|     79|  return rc;
 1350|     79|}
cf-socket.c:socket_connect_result:
  941|     79|{
  942|     79|  if(sockerr == SOCKEINPROGRESS || SOCK_EAGAIN(sockerr))
  ------------------
  |  | 1124|    158|#define SOCKEINPROGRESS   EINPROGRESS
  ------------------
                if(sockerr == SOCKEINPROGRESS || SOCK_EAGAIN(sockerr))
  ------------------
  |  | 1142|     40|#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)
  |  |  ------------------
  |  |  |  | 1133|     40|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  |  |  ------------------
  |  |  |  Branch (1142:24): [True: 0, False: 40]
  |  |  ------------------
  ------------------
  |  Branch (942:6): [True: 39, False: 40]
  ------------------
  943|     39|    return CURLE_OK;
  944|       |
  945|       |  /* unknown error, fallthrough and try another address! */
  946|     40|  {
  947|     40|    VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1623|     40|#define VERBOSE(x) x
  ------------------
  948|     40|    infof(data, "Immediate connect fail for %s: %s", ipaddress,
  ------------------
  |  |  143|     40|  do {                               \
  |  |  144|     40|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     40|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 40, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 40]
  |  |  |  |  ------------------
  |  |  |  |  320|     40|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|     40|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     40|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 40]
  |  |  ------------------
  ------------------
  949|     40|          curlx_strerror(sockerr, buffer, sizeof(buffer)));
  950|     40|    NOVERBOSE((void)ipaddress);
  ------------------
  |  | 1624|     40|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1185|     40|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1185:35): [Folded, False: 40]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  951|     40|  }
  952|     40|  data->state.os_errno = sockerr;
  953|       |  /* connect failed */
  954|     40|  return CURLE_COULDNT_CONNECT;
  955|     79|}
cf-socket.c:verifyconnect:
  886|     10|{
  887|     10|  bool rc = TRUE;
  ------------------
  |  | 1051|     10|#define TRUE true
  ------------------
  888|     10|#ifdef SO_ERROR
  889|     10|  int sockerr = 0;
  890|     10|  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|     10|  if(getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *)&sockerr, &errSize))
  ------------------
  |  Branch (911:6): [True: 0, False: 10]
  ------------------
  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|     10|  if((sockerr == 0) || (SOCKEISCONN == sockerr))
  ------------------
  |  | 1127|     10|#define SOCKEISCONN       EISCONN
  ------------------
  |  Branch (920:6): [True: 0, False: 10]
  |  Branch (920:24): [True: 0, False: 10]
  ------------------
  921|       |    /* we are connected, awesome! */
  922|      0|    rc = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  923|     10|  else
  924|       |    /* This was not a successful connect */
  925|     10|    rc = FALSE;
  ------------------
  |  | 1054|     10|#define FALSE false
  ------------------
  926|     10|  if(psockerr)
  ------------------
  |  Branch (926:6): [True: 10, False: 0]
  ------------------
  927|     10|    *psockerr = sockerr;
  928|       |#else
  929|       |  (void)sockfd;
  930|       |  if(psockerr)
  931|       |    *psockerr = SOCKERRNO;
  932|       |#endif
  933|     10|  return rc;
  934|     10|}
cf-socket.c:cf_socket_adjust_pollset:
 1450|    874|{
 1451|    874|  struct cf_socket_ctx *ctx = cf->ctx;
 1452|    874|  CURLcode result = CURLE_OK;
 1453|       |
 1454|    874|  if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|    874|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1454:6): [True: 874, 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|    874|    if(ctx->listening) {
  ------------------
  |  Branch (1459:8): [True: 0, False: 874]
  ------------------
 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|    874|    else if(!cf->connected) {
  ------------------
  |  Branch (1464:13): [True: 59, False: 815]
  ------------------
 1465|     59|      result = Curl_pollset_set_out_only(data, ps, ctx->sock);
  ------------------
  |  |  174|     59|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|     59|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|     59|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1466|     59|      CURL_TRC_CF(data, cf, "adjust_pollset, !connected, POLLOUT fd=%"
  ------------------
  |  |  153|     59|  do {                                          \
  |  |  154|     59|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     59|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    118|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 59, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 59]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    118|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     59|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     59|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     59|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 59]
  |  |  ------------------
  ------------------
 1467|     59|                  FMT_SOCKET_T, ctx->sock);
 1468|     59|    }
 1469|    815|    else if(!ctx->active) {
  ------------------
  |  Branch (1469:13): [True: 815, False: 0]
  ------------------
 1470|    815|      result = Curl_pollset_add_in(data, ps, ctx->sock);
  ------------------
  |  |  162|    815|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
  |  |  ------------------
  |  |  |  |  283|    815|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1471|    815|      CURL_TRC_CF(data, cf, "adjust_pollset, !active, POLLIN fd=%"
  ------------------
  |  |  153|    815|  do {                                          \
  |  |  154|    815|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    815|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.63k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 815, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 815]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.63k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    815|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    815|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    815|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 815]
  |  |  ------------------
  ------------------
 1472|    815|                  FMT_SOCKET_T, ctx->sock);
 1473|    815|    }
 1474|    874|  }
 1475|    874|  return result;
 1476|    874|}
cf-socket.c:cf_socket_send:
 1509|  5.97k|{
 1510|  5.97k|  struct cf_socket_ctx *ctx = cf->ctx;
 1511|  5.97k|  curl_socket_t fdsave;
 1512|  5.97k|  ssize_t rv;
 1513|  5.97k|  CURLcode result = CURLE_OK;
 1514|  5.97k|  VERBOSE(size_t orig_len = len);
  ------------------
  |  | 1623|  5.97k|#define VERBOSE(x) x
  ------------------
 1515|       |
 1516|  5.97k|  (void)eos;
 1517|  5.97k|  *pnwritten = 0;
 1518|  5.97k|  fdsave = cf->conn->sock[cf->sockindex];
 1519|  5.97k|  cf->conn->sock[cf->sockindex] = ctx->sock;
 1520|       |
 1521|  5.97k|#ifdef DEBUGBUILD
 1522|       |  /* simulate network blocking/partial writes */
 1523|  5.97k|  if(ctx->wblock_percent > 0) {
  ------------------
  |  Branch (1523:6): [True: 0, False: 5.97k]
  ------------------
 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|  5.97k|  if(cf->cft != &Curl_cft_udp && ctx->wpartial_percent > 0 && len > 8) {
  ------------------
  |  Branch (1532:6): [True: 5.97k, False: 0]
  |  Branch (1532:34): [True: 0, False: 5.97k]
  |  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|  5.97k|#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|  5.97k|    rv = swrite(ctx->sock, buf, len);
  ------------------
  |  |  972|  5.97k|#define swrite(x, y, z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
  |  |  973|  5.97k|                                      (const SEND_TYPE_ARG2)(y), \
  |  |  974|  5.97k|                                      (SEND_TYPE_ARG3)(z), \
  |  |  975|  5.97k|                                      (SEND_TYPE_ARG4)(SEND_4TH_ARG))
  |  |  ------------------
  |  |  |  |  915|  5.97k|#define SEND_4TH_ARG MSG_NOSIGNAL
  |  |  ------------------
  ------------------
 1550|       |
 1551|  5.97k|  if(!curlx_sztouz(rv, pnwritten)) {
  ------------------
  |  Branch (1551:6): [True: 0, False: 5.97k]
  ------------------
 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|  5.97k|  CURL_TRC_CF(data, cf, "send(len=%zu) -> %d, %zu",
  ------------------
  |  |  153|  5.97k|  do {                                          \
  |  |  154|  5.97k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.97k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  11.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.97k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.97k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  5.97k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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.97k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.97k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.97k]
  |  |  ------------------
  ------------------
 1575|  5.97k|              orig_len, (int)result, *pnwritten);
 1576|  5.97k|  cf->conn->sock[cf->sockindex] = fdsave;
 1577|  5.97k|  return result;
 1578|  5.97k|}
cf-socket.c:cf_socket_recv:
 1582|   129k|{
 1583|   129k|  struct cf_socket_ctx *ctx = cf->ctx;
 1584|   129k|  CURLcode result = CURLE_OK;
 1585|   129k|  ssize_t rv;
 1586|       |
 1587|   129k|  *pnread = 0;
 1588|   129k|#ifdef DEBUGBUILD
 1589|       |  /* simulate network blocking/partial reads */
 1590|   129k|  if(cf->cft != &Curl_cft_udp && ctx->rblock_percent > 0) {
  ------------------
  |  Branch (1590:6): [True: 129k, False: 0]
  |  Branch (1590:34): [True: 0, False: 129k]
  ------------------
 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|   129k|  if(cf->cft != &Curl_cft_udp && ctx->recv_max && ctx->recv_max < len) {
  ------------------
  |  Branch (1598:6): [True: 129k, False: 0]
  |  Branch (1598:34): [True: 0, False: 129k]
  |  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|   129k|#endif
 1604|       |
 1605|   129k|  rv = sread(ctx->sock, buf, len);
  ------------------
  |  |  950|   129k|#define sread(x, y, z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
  |  |  951|   129k|                                     (RECV_TYPE_ARG2)(y), \
  |  |  952|   129k|                                     (RECV_TYPE_ARG3)(z), \
  |  |  953|   129k|                                     (RECV_TYPE_ARG4)(0))
  ------------------
 1606|       |
 1607|   129k|  if(!curlx_sztouz(rv, pnread)) {
  ------------------
  |  Branch (1607:6): [True: 755, False: 128k]
  ------------------
 1608|    755|    int sockerr = SOCKERRNO;
  ------------------
  |  | 1091|    755|#define SOCKERRNO         errno
  ------------------
 1609|    755|    if(SOCK_EAGAIN(sockerr)
  ------------------
  |  | 1142|  1.51k|#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)
  |  |  ------------------
  |  |  |  | 1133|    755|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  |  |  ------------------
  |  |  |  Branch (1142:24): [True: 755, False: 0]
  |  |  ------------------
  ------------------
 1610|      0|#ifndef USE_WINSOCK
 1611|      0|       || (sockerr == SOCKEINTR)
  ------------------
  |  | 1125|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (1611:11): [True: 0, False: 0]
  ------------------
 1612|    755|#endif
 1613|    755|      ) {
 1614|    755|      result = CURLE_AGAIN;  /* EWOULDBLOCK */
 1615|    755|    }
 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|    755|  }
 1624|       |
 1625|   129k|  CURL_TRC_CF(data, cf, "recv(len=%zu) -> %d, %zu", len, (int)result, *pnread);
  ------------------
  |  |  153|   129k|  do {                                          \
  |  |  154|   129k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   129k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   259k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 129k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 129k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   259k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   129k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   129k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   129k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 129k]
  |  |  ------------------
  ------------------
 1626|   129k|  if(!result && !ctx->got_first_byte) {
  ------------------
  |  Branch (1626:6): [True: 128k, False: 755]
  |  Branch (1626:17): [True: 3.81k, False: 124k]
  ------------------
 1627|  3.81k|    ctx->first_byte_at = *Curl_pgrs_now(data);
 1628|       |    ctx->got_first_byte = TRUE;
  ------------------
  |  | 1051|  3.81k|#define TRUE true
  ------------------
 1629|  3.81k|  }
 1630|   129k|  return result;
 1631|   129k|}
cf-socket.c:cf_socket_cntrl:
 1660|     85|{
 1661|     85|  struct cf_socket_ctx *ctx = cf->ctx;
 1662|       |
 1663|     85|  (void)arg1;
 1664|     85|  (void)arg2;
 1665|     85|  switch(event) {
  ------------------
  |  Branch (1665:10): [True: 0, False: 85]
  ------------------
 1666|      0|  case CF_CTRL_CONN_INFO_UPDATE:
  ------------------
  |  |  121|      0|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  |  Branch (1666:3): [True: 0, False: 85]
  ------------------
 1667|      0|    cf_socket_active(cf, data);
 1668|      0|    cf_socket_update_data(cf, data);
 1669|      0|    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: 85]
  ------------------
 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: 85]
  ------------------
 1674|      0|    ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
 1675|      0|    break;
 1676|     85|  }
 1677|     85|  return CURLE_OK;
 1678|     85|}
cf-socket.c:cf_socket_query:
 1720|  9.51k|{
 1721|  9.51k|  struct cf_socket_ctx *ctx = cf->ctx;
 1722|       |
 1723|  9.51k|  switch(query) {
 1724|    827|  case CF_QUERY_SOCKET:
  ------------------
  |  |  163|    827|#define CF_QUERY_SOCKET             3  /* -          curl_socket_t */
  ------------------
  |  Branch (1724:3): [True: 827, False: 8.68k]
  ------------------
 1725|    827|    DEBUGASSERT(pres2);
  ------------------
  |  | 1077|    827|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1725:5): [True: 0, False: 827]
  |  Branch (1725:5): [True: 827, False: 0]
  ------------------
 1726|    827|    *((curl_socket_t *)pres2) = ctx->sock;
 1727|    827|    return CURLE_OK;
 1728|      0|  case CF_QUERY_TRANSPORT:
  ------------------
  |  |  176|      0|#define CF_QUERY_TRANSPORT         14  /* TRNSPRT_*  - * */
  ------------------
  |  Branch (1728:3): [True: 0, False: 9.51k]
  ------------------
 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: 9.51k]
  ------------------
 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: 9.51k]
  ------------------
 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|  4.75k|  case CF_QUERY_TIMER_CONNECT: {
  ------------------
  |  |  164|  4.75k|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  |  Branch (1746:3): [True: 4.75k, False: 4.75k]
  ------------------
 1747|  4.75k|    struct curltime *when = pres2;
 1748|  4.75k|    switch(ctx->transport) {
 1749|      0|    case TRNSPRT_UDP:
  ------------------
  |  |  250|      0|#define TRNSPRT_UDP  4
  ------------------
  |  Branch (1749:5): [True: 0, False: 4.75k]
  ------------------
 1750|      0|    case TRNSPRT_QUIC:
  ------------------
  |  |  251|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (1750:5): [True: 0, False: 4.75k]
  ------------------
 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|  4.75k|    default:
  ------------------
  |  Branch (1758:5): [True: 4.75k, False: 0]
  ------------------
 1759|  4.75k|      *when = ctx->connected_at;
 1760|  4.75k|      break;
 1761|  4.75k|    }
 1762|  4.75k|    return CURLE_OK;
 1763|  4.75k|  }
 1764|      5|  case CF_QUERY_IP_INFO:
  ------------------
  |  |  168|      5|#define CF_QUERY_IP_INFO            8  /* TRUE/FALSE struct ip_quadruple */
  ------------------
  |  Branch (1764:3): [True: 5, False: 9.50k]
  ------------------
 1765|      5|#ifdef USE_IPV6
 1766|      5|    *pres1 = (ctx->addr.family == AF_INET6);
 1767|       |#else
 1768|       |    *pres1 = FALSE;
 1769|       |#endif
 1770|      5|    *(struct ip_quadruple *)pres2 = ctx->ip;
 1771|      5|    return CURLE_OK;
 1772|  3.92k|  default:
  ------------------
  |  Branch (1772:3): [True: 3.92k, False: 5.58k]
  ------------------
 1773|  3.92k|    break;
 1774|  9.51k|  }
 1775|  3.92k|  return cf->next ?
  ------------------
  |  Branch (1775:10): [True: 0, False: 3.92k]
  ------------------
 1776|      0|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1777|  3.92k|    CURLE_UNKNOWN_OPTION;
 1778|  9.51k|}
cf-socket.c:cf_socket_ctx_init:
  988|  5.09k|{
  989|  5.09k|  memset(ctx, 0, sizeof(*ctx));
  990|  5.09k|  Curl_peer_link(&ctx->peer, peer);
  991|  5.09k|  ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  5.09k|#define CURL_SOCKET_BAD (-1)
  ------------------
  992|  5.09k|  ctx->transport = transport;
  993|  5.09k|  ctx->addr = *addr;
  994|       |
  995|  5.09k|#ifdef DEBUGBUILD
  996|  5.09k|  {
  997|  5.09k|    const char *p = getenv("CURL_DBG_SOCK_WBLOCK");
  998|  5.09k|    if(p) {
  ------------------
  |  Branch (998:8): [True: 0, False: 5.09k]
  ------------------
  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|  5.09k|    p = getenv("CURL_DBG_SOCK_WPARTIAL");
 1004|  5.09k|    if(p) {
  ------------------
  |  Branch (1004:8): [True: 0, False: 5.09k]
  ------------------
 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|  5.09k|    p = getenv("CURL_DBG_SOCK_RBLOCK");
 1010|  5.09k|    if(p) {
  ------------------
  |  Branch (1010:8): [True: 0, False: 5.09k]
  ------------------
 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|  5.09k|    p = getenv("CURL_DBG_SOCK_RMAX");
 1016|  5.09k|    if(p) {
  ------------------
  |  Branch (1016:8): [True: 0, False: 5.09k]
  ------------------
 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|  5.09k|  }
 1022|  5.09k|#endif
 1023|       |
 1024|  5.09k|  return CURLE_OK;
 1025|  5.09k|}
cf-socket.c:cf_socket_ctx_free:
 1028|  5.09k|{
 1029|  5.09k|  if(ctx) {
  ------------------
  |  Branch (1029:6): [True: 5.09k, False: 0]
  ------------------
 1030|  5.09k|    Curl_peer_unlink(&ctx->peer);
 1031|  5.09k|    curlx_free(ctx);
  ------------------
  |  | 1488|  5.09k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1032|  5.09k|  }
 1033|  5.09k|}
cf-socket.c:set_local_ip:
 1075|  5.14k|{
 1076|  5.14k|  struct cf_socket_ctx *ctx = cf->ctx;
 1077|  5.14k|  ctx->ip.local_ip[0] = 0;
 1078|  5.14k|  ctx->ip.local_port = 0;
 1079|       |
 1080|  5.14k|#ifdef HAVE_GETSOCKNAME
 1081|  5.14k|  if((ctx->sock != CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|  5.14k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1081:6): [True: 4.93k, False: 212]
  ------------------
 1082|  4.93k|     !(data->conn->scheme->protocol & CURLPROTO_TFTP)) {
  ------------------
  |  | 1089|  4.93k|#define CURLPROTO_TFTP    (1L << 11)
  ------------------
  |  Branch (1082:6): [True: 4.93k, False: 0]
  ------------------
 1083|       |    /* TFTP does not connect, so it cannot get the IP like this */
 1084|  4.93k|    struct Curl_sockaddr_storage ssloc;
 1085|  4.93k|    curl_socklen_t slen = sizeof(struct Curl_sockaddr_storage);
 1086|  4.93k|    VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1623|  4.93k|#define VERBOSE(x) x
  ------------------
 1087|       |
 1088|  4.93k|    memset(&ssloc, 0, sizeof(ssloc));
 1089|  4.93k|    if(getsockname(ctx->sock, (struct sockaddr *)&ssloc, &slen)) {
  ------------------
  |  Branch (1089:8): [True: 0, False: 4.93k]
  ------------------
 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|  4.93k|    else if(!sockaddr2string((struct sockaddr *)&ssloc, slen,
  ------------------
  |  Branch (1094:13): [True: 0, False: 4.93k]
  ------------------
 1095|  4.93k|                             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|  4.93k|  }
 1100|       |#else
 1101|       |  (void)data;
 1102|       |#endif
 1103|  5.14k|}

Curl_cf_def_adjust_pollset:
   69|     21|{
   70|       |  /* NOP */
   71|     21|  (void)cf;
   72|     21|  (void)data;
   73|     21|  (void)ps;
   74|     21|  return CURLE_OK;
   75|     21|}
Curl_cf_def_send:
   87|  6.08k|{
   88|  6.08k|  if(cf->next)
  ------------------
  |  Branch (88:6): [True: 6.08k, False: 0]
  ------------------
   89|  6.08k|    return cf->next->cft->do_send(cf->next, data, buf, len, eos, pnwritten);
   90|      0|  *pnwritten = 0;
   91|      0|  return CURLE_RECV_ERROR;
   92|  6.08k|}
Curl_cf_def_recv:
   96|   129k|{
   97|   129k|  if(cf->next)
  ------------------
  |  Branch (97:6): [True: 129k, False: 0]
  ------------------
   98|   129k|    return cf->next->cft->do_recv(cf->next, data, buf, len, pnread);
   99|      0|  *pnread = 0;
  100|      0|  return CURLE_SEND_ERROR;
  101|   129k|}
Curl_cf_def_query:
  123|  30.4k|{
  124|  30.4k|  return cf->next ?
  ------------------
  |  Branch (124:10): [True: 30.3k, False: 117]
  ------------------
  125|  30.3k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  126|  30.4k|    CURLE_UNKNOWN_OPTION;
  127|  30.4k|}
Curl_conn_trc_filters:
  132|  20.9k|{
  133|  20.9k|  if(CURL_TRC_M_is_verbose(data) && data->conn) {
  ------------------
  |  |  135|  20.9k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  ------------------
  |  |  |  |  326|  41.8k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  41.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 20.9k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 20.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  41.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|  41.8k|   (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|  20.9k|}
Curl_conn_cf_discard_chain:
  161|  29.8k|{
  162|  29.8k|  struct Curl_cfilter *cfn, *cf = *pcf;
  163|       |
  164|  29.8k|  if(cf) {
  ------------------
  |  Branch (164:6): [True: 10.9k, False: 18.8k]
  ------------------
  165|  10.9k|    *pcf = NULL;
  166|  44.3k|    while(cf) {
  ------------------
  |  Branch (166:11): [True: 33.4k, False: 10.9k]
  ------------------
  167|  33.4k|      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|  33.4k|      cf->next = NULL;
  172|  33.4k|      cf->cft->destroy(cf, data);
  173|  33.4k|      curlx_free(cf);
  ------------------
  |  | 1488|  33.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  174|  33.4k|      cf = cfn;
  175|  33.4k|    }
  176|  10.9k|  }
  177|  29.8k|}
Curl_conn_cf_discard_all:
  181|  24.5k|{
  182|  24.5k|  struct curltime *pt = &conn->shutdown.start[sockindex];
  183|  24.5k|  memset(pt, 0, sizeof(*pt));
  184|  24.5k|  Curl_conn_cf_discard_chain(&conn->cfilter[sockindex], data);
  185|  24.5k|}
Curl_cf_recv:
  244|   126k|{
  245|   126k|  struct Curl_cfilter *cf;
  246|       |
  247|   126k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|   126k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:3): [True: 0, False: 126k]
  |  Branch (247:3): [True: 126k, False: 0]
  ------------------
  248|   126k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|   126k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 126k]
  |  Branch (248:3): [True: 126k, False: 0]
  ------------------
  249|   126k|  cf = data->conn->cfilter[sockindex];
  250|   757k|  while(cf && !cf->connected)
  ------------------
  |  Branch (250:9): [True: 757k, False: 0]
  |  Branch (250:15): [True: 631k, False: 126k]
  ------------------
  251|   631k|    cf = cf->next;
  252|   126k|  if(cf)
  ------------------
  |  Branch (252:6): [True: 126k, False: 0]
  ------------------
  253|   126k|    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|    232|{
  299|    232|  struct cf_io_ctx io;
  300|       |
  301|    232|  if(!cf || !data) {
  ------------------
  |  Branch (301:6): [True: 0, False: 232]
  |  Branch (301:13): [True: 0, False: 232]
  ------------------
  302|      0|    *pnread = 0;
  303|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  304|      0|  }
  305|    232|  io.data = data;
  306|    232|  io.cf = cf;
  307|    232|  return Curl_bufq_sipn(bufq, maxlen, cf_bufq_reader, &io, pnread);
  308|    232|}
Curl_cf_send_bufq:
  323|    145|{
  324|    145|  struct cf_io_ctx io;
  325|       |
  326|    145|  if(!cf || !data) {
  ------------------
  |  Branch (326:6): [True: 0, False: 145]
  |  Branch (326:13): [True: 0, False: 145]
  ------------------
  327|      0|    *pnwritten = 0;
  328|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  329|      0|  }
  330|    145|  io.data = data;
  331|    145|  io.cf = cf;
  332|    145|  if(buf && blen)
  ------------------
  |  Branch (332:6): [True: 0, False: 145]
  |  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|    145|  else
  336|    145|    return Curl_bufq_pass(bufq, cf_bufq_writer, &io, pnwritten);
  337|    145|}
Curl_cf_create:
  342|  33.4k|{
  343|  33.4k|  struct Curl_cfilter *cf;
  344|  33.4k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  345|       |
  346|  33.4k|  DEBUGASSERT(cft);
  ------------------
  |  | 1077|  33.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (346:3): [True: 0, False: 33.4k]
  |  Branch (346:3): [True: 33.4k, False: 0]
  ------------------
  347|  33.4k|  cf = curlx_calloc(1, sizeof(*cf));
  ------------------
  |  | 1485|  33.4k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  348|  33.4k|  if(!cf)
  ------------------
  |  Branch (348:6): [True: 0, False: 33.4k]
  ------------------
  349|      0|    goto out;
  350|       |
  351|  33.4k|  cf->cft = cft;
  352|  33.4k|  cf->ctx = ctx;
  353|  33.4k|  result = CURLE_OK;
  354|  33.4k|out:
  355|  33.4k|  *pcf = cf;
  356|  33.4k|  return result;
  357|  33.4k|}
Curl_conn_cf_add:
  363|  11.3k|{
  364|  11.3k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  11.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (364:3): [True: 0, False: 11.3k]
  |  Branch (364:3): [True: 11.3k, False: 0]
  ------------------
  365|  11.3k|  DEBUGASSERT(!cf->conn);
  ------------------
  |  | 1077|  11.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (365:3): [True: 0, False: 11.3k]
  |  Branch (365:3): [True: 11.3k, False: 0]
  ------------------
  366|  11.3k|  DEBUGASSERT(!cf->next);
  ------------------
  |  | 1077|  11.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (366:3): [True: 0, False: 11.3k]
  |  Branch (366:3): [True: 11.3k, False: 0]
  ------------------
  367|       |
  368|  11.3k|  cf->next = conn->cfilter[sockindex];
  369|  11.3k|  cf->conn = conn;
  370|  11.3k|  cf->sockindex = sockindex;
  371|  11.3k|  conn->cfilter[sockindex] = cf;
  372|  11.3k|  CURL_TRC_CF(data, cf, "added");
  ------------------
  |  |  153|  11.3k|  do {                                          \
  |  |  154|  11.3k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  11.3k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  22.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 11.3k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 11.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  22.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|  11.3k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  11.3k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  373|  11.3k|}
Curl_conn_cf_insert_after:
  377|  17.0k|{
  378|  17.0k|  struct Curl_cfilter *tail, **pnext;
  379|       |
  380|  17.0k|  DEBUGASSERT(cf_at);
  ------------------
  |  | 1077|  17.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (380:3): [True: 0, False: 17.0k]
  |  Branch (380:3): [True: 17.0k, False: 0]
  ------------------
  381|  17.0k|  DEBUGASSERT(cf_new);
  ------------------
  |  | 1077|  17.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (381:3): [True: 0, False: 17.0k]
  |  Branch (381:3): [True: 17.0k, False: 0]
  ------------------
  382|  17.0k|  DEBUGASSERT(!cf_new->conn);
  ------------------
  |  | 1077|  17.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (382:3): [True: 0, False: 17.0k]
  |  Branch (382:3): [True: 17.0k, False: 0]
  ------------------
  383|       |
  384|  17.0k|  tail = cf_at->next;
  385|  17.0k|  cf_at->next = cf_new;
  386|  17.0k|  do {
  387|  17.0k|    cf_new->conn = cf_at->conn;
  388|  17.0k|    cf_new->sockindex = cf_at->sockindex;
  389|  17.0k|    pnext = &cf_new->next;
  390|  17.0k|    cf_new = cf_new->next;
  391|  17.0k|  } while(cf_new);
  ------------------
  |  Branch (391:11): [True: 0, False: 17.0k]
  ------------------
  392|  17.0k|  *pnext = tail;
  393|  17.0k|}
Curl_conn_cf_connect:
  422|  27.6k|{
  423|  27.6k|  if(cf)
  ------------------
  |  Branch (423:6): [True: 27.6k, False: 0]
  ------------------
  424|  27.6k|    return cf->cft->do_connect(cf, data, done);
  425|      0|  return CURLE_FAILED_INIT;
  426|  27.6k|}
Curl_conn_cf_send:
  431|  4.45k|{
  432|  4.45k|  if(cf)
  ------------------
  |  Branch (432:6): [True: 4.45k, False: 0]
  ------------------
  433|  4.45k|    return cf->cft->do_send(cf, data, buf, len, eos, pnwritten);
  434|      0|  *pnwritten = 0;
  435|      0|  return CURLE_SEND_ERROR;
  436|  4.45k|}
Curl_conn_cf_recv:
  440|  3.19k|{
  441|  3.19k|  if(cf)
  ------------------
  |  Branch (441:6): [True: 3.19k, False: 0]
  ------------------
  442|  3.19k|    return cf->cft->do_recv(cf, data, buf, len, pnread);
  443|      0|  *pnread = 0;
  444|      0|  return CURLE_RECV_ERROR;
  445|  3.19k|}
Curl_conn_is_connected:
  496|  9.54k|{
  497|  9.54k|  struct Curl_cfilter *cf;
  498|       |
  499|  9.54k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|  9.54k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 9.54k, False: 0]
  |  |  |  Branch (322:50): [True: 9.54k, False: 0]
  |  |  ------------------
  ------------------
  500|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  501|  9.54k|  cf = conn->cfilter[sockindex];
  502|  9.54k|  if(cf)
  ------------------
  |  Branch (502:6): [True: 9.54k, False: 0]
  ------------------
  503|  9.54k|    return (bool)cf->connected;
  504|      0|  else if(conn->scheme->flags & PROTOPT_NONETWORK)
  ------------------
  |  |  215|      0|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (504:11): [True: 0, False: 0]
  ------------------
  505|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  506|      0|  return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  507|  9.54k|}
Curl_conn_is_ssl:
  565|  3.13k|{
  566|  3.13k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|  3.13k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 3.13k, False: 0]
  |  |  |  Branch (322:50): [True: 3.13k, False: 0]
  |  |  ------------------
  ------------------
  567|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  568|  3.13k|  return conn ? cf_is_ssl(conn->cfilter[sockindex]) : FALSE;
  ------------------
  |  | 1054|  3.13k|#define FALSE false
  ------------------
  |  Branch (568:10): [True: 3.13k, False: 0]
  ------------------
  569|  3.13k|}
Curl_conn_is_multiplex:
  600|  11.2k|{
  601|  11.2k|  struct Curl_cfilter *cf;
  602|       |
  603|  11.2k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|  11.2k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 11.2k, False: 0]
  |  |  |  Branch (322:50): [True: 11.2k, False: 0]
  |  |  ------------------
  ------------------
  604|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  605|  11.2k|  cf = conn ? conn->cfilter[sockindex] : NULL;
  ------------------
  |  Branch (605:8): [True: 11.2k, False: 0]
  ------------------
  606|       |
  607|  33.9k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (607:9): [True: 22.7k, False: 11.1k]
  ------------------
  608|  22.7k|    if(cf->cft->flags & CF_TYPE_MULTIPLEX)
  ------------------
  |  |  204|  22.7k|#define CF_TYPE_MULTIPLEX   (1 << 2)
  ------------------
  |  Branch (608:8): [True: 0, False: 22.7k]
  ------------------
  609|      0|      return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  610|  22.7k|    if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  202|  22.7k|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
                  if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  203|  22.7k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
  |  Branch (610:8): [True: 111, False: 22.6k]
  ------------------
  611|    111|      return FALSE;
  ------------------
  |  | 1054|    111|#define FALSE false
  ------------------
  612|  22.7k|  }
  613|  11.1k|  return FALSE;
  ------------------
  |  | 1054|  11.1k|#define FALSE false
  ------------------
  614|  11.2k|}
Curl_socktype_for_transport:
  624|  5.74k|{
  625|  5.74k|  switch(transport) {
  626|  5.73k|  case TRNSPRT_TCP:
  ------------------
  |  |  249|  5.73k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (626:3): [True: 5.73k, False: 18]
  ------------------
  627|  5.73k|    return SOCK_STREAM;
  628|     18|  case TRNSPRT_UNIX:
  ------------------
  |  |  252|     18|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (628:3): [True: 18, False: 5.73k]
  ------------------
  629|     18|    return SOCK_STREAM;
  630|      0|  default: /* UDP and QUIC */
  ------------------
  |  Branch (630:3): [True: 0, False: 5.74k]
  ------------------
  631|       |    return SOCK_DGRAM;
  632|  5.74k|  }
  633|  5.74k|}
Curl_protocol_for_transport:
  636|  5.74k|{
  637|  5.74k|  switch(transport) {
  638|  5.73k|  case TRNSPRT_TCP:
  ------------------
  |  |  249|  5.73k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (638:3): [True: 5.73k, False: 18]
  ------------------
  639|  5.73k|    return IPPROTO_TCP;
  640|     18|  case TRNSPRT_UNIX:
  ------------------
  |  |  252|     18|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (640:3): [True: 18, False: 5.73k]
  ------------------
  641|     18|    return IPPROTO_IP;
  642|      0|  default: /* UDP and QUIC */
  ------------------
  |  Branch (642:3): [True: 0, False: 5.74k]
  ------------------
  643|       |    return IPPROTO_UDP;
  644|  5.74k|  }
  645|  5.74k|}
Curl_conn_cf_wants_httpsrr:
  649|  1.08k|{
  650|  1.08k|  (void)data;
  651|  2.33k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (651:9): [True: 2.23k, False: 93]
  ------------------
  652|  2.23k|    if(cf->cft->flags & CF_TYPE_HTTPSRR)
  ------------------
  |  |  208|  2.23k|#define CF_TYPE_HTTPSRR     (1 << 6)
  ------------------
  |  Branch (652:8): [True: 990, False: 1.24k]
  ------------------
  653|    990|      return TRUE;
  ------------------
  |  | 1051|    990|#define TRUE true
  ------------------
  654|  2.23k|  }
  655|     93|  return FALSE;
  ------------------
  |  | 1054|     93|#define FALSE false
  ------------------
  656|  1.08k|}
Curl_conn_cf_needs_flush:
  711|  7.74k|{
  712|  7.74k|  CURLcode result;
  713|  7.74k|  int pending = 0;
  714|  7.74k|  result = cf ? cf->cft->query(cf, data, CF_QUERY_NEED_FLUSH,
  ------------------
  |  |  167|  7.74k|#define CF_QUERY_NEED_FLUSH         7  /* TRUE/FALSE - */
  ------------------
  |  Branch (714:12): [True: 7.74k, False: 0]
  ------------------
  715|  7.74k|                               &pending, NULL) : CURLE_UNKNOWN_OPTION;
  716|  7.74k|  return (result || !pending) ? FALSE : TRUE;
  ------------------
  |  | 1054|  7.74k|#define FALSE false
  ------------------
                return (result || !pending) ? FALSE : TRUE;
  ------------------
  |  | 1051|  7.74k|#define TRUE true
  ------------------
  |  Branch (716:11): [True: 7.74k, False: 0]
  |  Branch (716:21): [True: 0, False: 0]
  ------------------
  717|  7.74k|}
Curl_conn_needs_flush:
  720|  7.01k|{
  721|  7.01k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|  7.01k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 7.01k, False: 0]
  |  |  |  Branch (322:50): [True: 7.01k, False: 0]
  |  |  ------------------
  ------------------
  722|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  723|  7.01k|  return Curl_conn_cf_needs_flush(data->conn->cfilter[sockindex], data);
  724|  7.01k|}
Curl_conn_cf_adjust_pollset:
  729|  4.66k|{
  730|  4.66k|  CURLcode result = CURLE_OK;
  731|       |  /* Get the lowest not-connected filter, if there are any */
  732|  8.19k|  while(cf && !cf->connected && cf->next && !cf->next->connected)
  ------------------
  |  Branch (732:9): [True: 6.31k, False: 1.88k]
  |  Branch (732:15): [True: 6.31k, False: 0]
  |  Branch (732:33): [True: 4.35k, False: 1.96k]
  |  Branch (732:45): [True: 3.53k, False: 815]
  ------------------
  733|  3.53k|    cf = cf->next;
  734|       |  /* Skip all filters that have already shut down */
  735|  4.66k|  while(cf && cf->shutdown)
  ------------------
  |  Branch (735:9): [True: 2.77k, False: 1.88k]
  |  Branch (735:15): [True: 0, False: 2.77k]
  ------------------
  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|  9.11k|  while(cf && !result) {
  ------------------
  |  Branch (739:9): [True: 4.45k, False: 4.66k]
  |  Branch (739:15): [True: 4.45k, False: 0]
  ------------------
  740|  4.45k|    result = cf->cft->adjust_pollset(cf, data, ps);
  741|  4.45k|    cf = cf->next;
  742|  4.45k|  }
  743|  4.66k|  return result;
  744|  4.66k|}
Curl_conn_adjust_pollset:
  749|  1.88k|{
  750|  1.88k|  CURLcode result = CURLE_OK;
  751|  1.88k|  int i;
  752|       |
  753|  1.88k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  1.88k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (753:3): [True: 0, False: 1.88k]
  |  Branch (753:3): [True: 1.88k, False: 0]
  ------------------
  754|  1.88k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  1.88k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (754:3): [True: 0, False: 1.88k]
  |  Branch (754:3): [True: 1.88k, 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|  1.88k|  if(ps->n || !Curl_conn_is_connected(conn, FIRSTSOCKET) ||
  ------------------
  |  |  245|  1.80k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (762:6): [True: 83, False: 1.80k]
  |  Branch (762:15): [True: 1.80k, False: 0]
  ------------------
  763|      0|     (conn->cfilter[SECONDARYSOCKET] &&
  ------------------
  |  |  246|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (763:7): [True: 0, False: 0]
  ------------------
  764|  1.88k|      !Curl_conn_is_connected(conn, SECONDARYSOCKET))) {
  ------------------
  |  |  246|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (764:7): [True: 0, False: 0]
  ------------------
  765|  5.65k|    for(i = 0; (i < 2) && !result && conn; ++i) {
  ------------------
  |  Branch (765:16): [True: 3.77k, False: 1.88k]
  |  Branch (765:27): [True: 3.77k, False: 0]
  |  Branch (765:38): [True: 3.77k, False: 0]
  ------------------
  766|  3.77k|      result = Curl_conn_cf_adjust_pollset(conn->cfilter[i], data, ps);
  767|  3.77k|    }
  768|  1.88k|  }
  769|  1.88k|  return result;
  770|  1.88k|}
Curl_conn_cf_cntrl:
  852|  22.7k|{
  853|  22.7k|  CURLcode result = CURLE_OK;
  854|       |
  855|  34.5k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (855:9): [True: 11.8k, False: 22.7k]
  ------------------
  856|  11.8k|    if(cf->cft->cntrl == Curl_cf_def_cntrl)
  ------------------
  |  Branch (856:8): [True: 443, False: 11.3k]
  ------------------
  857|    443|      continue;
  858|  11.3k|    result = cf->cft->cntrl(cf, data, event, arg1, arg2);
  859|  11.3k|    if(!ignore_result && result)
  ------------------
  |  Branch (859:8): [True: 47, False: 11.3k]
  |  Branch (859:26): [True: 0, False: 47]
  ------------------
  860|      0|      break;
  861|  11.3k|  }
  862|  22.7k|  return result;
  863|  22.7k|}
Curl_conn_cf_get_socket:
  867|  7.72k|{
  868|  7.72k|  curl_socket_t sock;
  869|  7.72k|  if(cf && !cf->cft->query(cf, data, CF_QUERY_SOCKET, NULL, &sock))
  ------------------
  |  |  163|  7.72k|#define CF_QUERY_SOCKET             3  /* -          curl_socket_t */
  ------------------
  |  Branch (869:6): [True: 7.72k, False: 0]
  |  Branch (869:12): [True: 827, False: 6.89k]
  ------------------
  870|    827|    return sock;
  871|  6.89k|  return CURL_SOCKET_BAD;
  ------------------
  |  |  145|  6.89k|#define CURL_SOCKET_BAD (-1)
  ------------------
  872|  7.72k|}
Curl_conn_cf_get_alpn_negotiated:
  885|  1.53k|{
  886|  1.53k|  const char *alpn = NULL;
  887|  1.53k|  CURL_TRC_CF(data, cf, "query ALPN");
  ------------------
  |  |  153|  1.53k|  do {                                          \
  |  |  154|  1.53k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.53k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.07k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.53k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.53k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.07k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.53k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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.53k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.53k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.53k]
  |  |  ------------------
  ------------------
  888|  1.53k|  if(cf && !cf->cft->query(cf, data, CF_QUERY_ALPN_NEGOTIATED, NULL,
  ------------------
  |  |  177|  1.53k|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (888:6): [True: 1.53k, False: 0]
  |  Branch (888:12): [True: 2, False: 1.53k]
  ------------------
  889|  1.53k|                           CURL_UNCONST(&alpn)))
  ------------------
  |  |  862|  1.53k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  890|      2|    return alpn;
  891|  1.53k|  return NULL;
  892|  1.53k|}
Curl_conn_cf_get_ip_info:
  908|      5|{
  909|      5|  CURLcode result = CURLE_UNKNOWN_OPTION;
  910|      5|  if(cf) {
  ------------------
  |  Branch (910:6): [True: 5, False: 0]
  ------------------
  911|      5|    int ipv6 = 0;
  912|      5|    result = cf->cft->query(cf, data, CF_QUERY_IP_INFO, &ipv6, ipquad);
  ------------------
  |  |  168|      5|#define CF_QUERY_IP_INFO            8  /* TRUE/FALSE struct ip_quadruple */
  ------------------
  913|      5|    *is_ipv6 = !!ipv6;
  914|      5|  }
  915|      5|  return result;
  916|      5|}
Curl_conn_get_first_socket:
  919|  1.88k|{
  920|  1.88k|  struct Curl_cfilter *cf;
  921|       |
  922|  1.88k|  if(!data->conn)
  ------------------
  |  Branch (922:6): [True: 0, False: 1.88k]
  ------------------
  923|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  924|       |
  925|  1.88k|  cf = data->conn->cfilter[FIRSTSOCKET];
  ------------------
  |  |  245|  1.88k|#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.88k|  if(cf && !cf->connected)
  ------------------
  |  Branch (928:6): [True: 1.88k, False: 0]
  |  Branch (928:12): [True: 1.88k, False: 0]
  ------------------
  929|  1.88k|    return Curl_conn_cf_get_socket(cf, data);
  930|      0|  return data->conn->sock[FIRSTSOCKET];
  ------------------
  |  |  245|      0|#define FIRSTSOCKET     0
  ------------------
  931|  1.88k|}
Curl_conn_ev_data_setup:
  943|  5.65k|{
  944|  5.65k|  return cf_cntrl_all(data->conn, data, FALSE, CF_CTRL_DATA_SETUP, 0, NULL);
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
                return cf_cntrl_all(data->conn, data, FALSE, CF_CTRL_DATA_SETUP, 0, NULL);
  ------------------
  |  |  115|  5.65k|#define CF_CTRL_DATA_SETUP              4  /* 0          NULL     first fail */
  ------------------
  945|  5.65k|}
Curl_conn_ev_data_done:
  969|  5.65k|{
  970|  5.65k|  cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE, premature, NULL);
  ------------------
  |  | 1051|  5.65k|#define TRUE true
  ------------------
                cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE, premature, NULL);
  ------------------
  |  |  118|  5.65k|#define CF_CTRL_DATA_DONE               7  /* premature  NULL     ignored */
  ------------------
  971|  5.65k|}
Curl_conn_recv:
 1046|   126k|{
 1047|   126k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|   126k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1047:3): [True: 0, False: 126k]
  |  Branch (1047:3): [True: 126k, False: 0]
  ------------------
 1048|   126k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|   126k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1048:3): [True: 0, False: 126k]
  |  Branch (1048:3): [True: 126k, False: 0]
  ------------------
 1049|   126k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|   126k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 126k, False: 0]
  |  |  |  Branch (322:50): [True: 126k, False: 0]
  |  |  ------------------
  ------------------
 1050|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1051|   126k|  if(data && data->conn && data->conn->recv[sockindex])
  ------------------
  |  Branch (1051:6): [True: 126k, False: 0]
  |  Branch (1051:14): [True: 126k, False: 0]
  |  Branch (1051:28): [True: 126k, False: 0]
  ------------------
 1052|   126k|    return data->conn->recv[sockindex](data, sockindex, buf, len, pnread);
 1053|      0|  *pnread = 0;
 1054|      0|  return CURLE_FAILED_INIT;
 1055|   126k|}
cfilters.c:cf_bufq_reader:
  288|    232|{
  289|    232|  struct cf_io_ctx *io = writer_ctx;
  290|    232|  return Curl_conn_cf_recv(io->cf, io->data, (char *)buf, blen, pnread);
  291|    232|}
cfilters.c:cf_bufq_writer:
  313|    145|{
  314|    145|  struct cf_io_ctx *io = writer_ctx;
  315|       |  return Curl_conn_cf_send(io->cf, io->data, buf, buflen, FALSE, pnwritten);
  ------------------
  |  | 1054|    145|#define FALSE false
  ------------------
  316|    145|}
cfilters.c:cf_cntrl_all:
  451|  11.3k|{
  452|  11.3k|  CURLcode result = CURLE_OK;
  453|  11.3k|  size_t i;
  454|       |
  455|  33.9k|  for(i = 0; i < CURL_ARRAYSIZE(conn->cfilter); ++i) {
  ------------------
  |  | 1299|  33.9k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (455:14): [True: 22.6k, False: 11.3k]
  ------------------
  456|  22.6k|    result = Curl_conn_cf_cntrl(conn->cfilter[i], data, ignore_result,
  457|  22.6k|                                event, arg1, arg2);
  458|  22.6k|    if(!ignore_result && result)
  ------------------
  |  Branch (458:8): [True: 11.3k, False: 11.3k]
  |  Branch (458:26): [True: 0, False: 11.3k]
  ------------------
  459|      0|      break;
  460|  22.6k|  }
  461|  11.3k|  return result;
  462|  11.3k|}
cfilters.c:cf_is_ssl:
  552|  3.13k|{
  553|  15.6k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (553:9): [True: 15.6k, False: 0]
  ------------------
  554|       |    /* A tunneling proxy does not offer end2end encryption, even if
  555|       |     * it does SSL itself (e.g. QUIC H3 proxy) */
  556|  15.6k|    if((cf->cft->flags & CF_TYPE_SSL) && !(cf->cft->flags & CF_TYPE_PROXY))
  ------------------
  |  |  203|  15.6k|#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: 15.6k]
  |  Branch (556:42): [True: 0, False: 0]
  ------------------
  557|      0|      return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  558|  15.6k|    if(cf->cft->flags & CF_TYPE_IP_CONNECT)
  ------------------
  |  |  202|  15.6k|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
  |  Branch (558:8): [True: 3.13k, False: 12.5k]
  ------------------
  559|  3.13k|      return FALSE;
  ------------------
  |  | 1054|  3.13k|#define FALSE false
  ------------------
  560|  15.6k|  }
  561|      0|  return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  562|  3.13k|}

Curl_cpool_init:
  117|  10.8k|{
  118|  10.8k|  Curl_hash_init(&cpool->dest2bundle, size, Curl_hash_str,
  119|  10.8k|                 curlx_str_key_compare, cpool_bundle_free_entry);
  120|       |
  121|  10.8k|  DEBUGASSERT(idata);
  ------------------
  |  | 1077|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (121:3): [True: 0, False: 10.8k]
  |  Branch (121:3): [True: 10.8k, False: 0]
  ------------------
  122|       |
  123|  10.8k|  cpool->idata = idata;
  124|  10.8k|  cpool->share = share;
  125|       |  cpool->initialized = TRUE;
  ------------------
  |  | 1051|  10.8k|#define TRUE true
  ------------------
  126|  10.8k|}
Curl_cpool_destroy:
  232|  10.8k|{
  233|  10.8k|  if(cpool && cpool->initialized && cpool->idata) {
  ------------------
  |  Branch (233:6): [True: 10.8k, False: 0]
  |  Branch (233:15): [True: 10.8k, False: 0]
  |  Branch (233:37): [True: 10.8k, False: 0]
  ------------------
  234|  10.8k|    struct connectdata *conn;
  235|  10.8k|    struct Curl_sigpipe_ctx pipe_ctx;
  236|       |
  237|  10.8k|    CURL_TRC_M(cpool->idata, "%s[CPOOL] destroy, %zu connections",
  ------------------
  |  |  148|  10.8k|  do {                                   \
  |  |  149|  10.8k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  10.8k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.8k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  21.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.8k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  21.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|  10.8k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  10.8k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  10.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
  238|  10.8k|               cpool->share ? "[SHARE] " : "", cpool->num_conn);
  239|       |    /* Move all connections to the shutdown list */
  240|  10.8k|    sigpipe_init(&pipe_ctx);
  241|  10.8k|    CPOOL_LOCK(cpool, cpool->idata);
  ------------------
  |  |   42|  10.8k|  do {                                                                  \
  |  |   43|  10.8k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 10.8k, False: 0]
  |  |  ------------------
  |  |   44|  10.8k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  10.8k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 10.8k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  10.8k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  10.8k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|  10.8k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  10.8k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|  10.8k|#define TRUE true
  |  |  ------------------
  |  |   49|  10.8k|    }                                                                   \
  |  |   50|  10.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
  |  Branch (241:5): [True: 0, False: 10.8k]
  |  Branch (241:5): [True: 10.8k, False: 0]
  ------------------
  242|  10.8k|    conn = cpool_get_first(cpool);
  243|  10.8k|    if(conn)
  ------------------
  |  Branch (243:8): [True: 0, False: 10.8k]
  ------------------
  244|      0|      sigpipe_apply(cpool->idata, &pipe_ctx);
  245|  10.8k|    while(conn) {
  ------------------
  |  Branch (245:11): [True: 0, False: 10.8k]
  ------------------
  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|  10.8k|    CPOOL_UNLOCK(cpool, cpool->idata);
  ------------------
  |  |   53|  10.8k|  do {                                                                  \
  |  |   54|  10.8k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 10.8k, False: 0]
  |  |  ------------------
  |  |   55|  10.8k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|  10.8k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  10.8k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|  10.8k|#define FALSE false
  |  |  ------------------
  |  |   57|  10.8k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  10.8k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 10.8k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  10.8k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  10.8k|    }                                                                   \
  |  |   60|  10.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
  |  Branch (250:5): [True: 0, False: 10.8k]
  |  Branch (250:5): [True: 10.8k, False: 0]
  ------------------
  251|  10.8k|    sigpipe_restore(&pipe_ctx);
  252|  10.8k|    Curl_hash_destroy(&cpool->dest2bundle);
  253|  10.8k|  }
  254|  10.8k|}
Curl_cpool_xfer_init:
  270|  11.4k|{
  271|  11.4k|  struct cpool *cpool = cpool_get_instance(data);
  272|       |
  273|  11.4k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1077|  11.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:3): [True: 0, False: 11.4k]
  |  Branch (273:3): [True: 11.4k, False: 0]
  ------------------
  274|  11.4k|  if(cpool) {
  ------------------
  |  Branch (274:6): [True: 11.4k, False: 0]
  ------------------
  275|  11.4k|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  11.4k|  do {                                                                  \
  |  |   43|  11.4k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 11.4k, False: 0]
  |  |  ------------------
  |  |   44|  11.4k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  11.4k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 11.4k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  11.4k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  11.4k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|  11.4k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  11.4k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|  11.4k|#define TRUE true
  |  |  ------------------
  |  |   49|  11.4k|    }                                                                   \
  |  |   50|  11.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
  |  Branch (275:5): [True: 0, False: 11.4k]
  |  Branch (275:5): [True: 11.4k, False: 0]
  ------------------
  276|       |    /* the identifier inside the connection cache */
  277|  11.4k|    data->id = cpool->next_easy_id++;
  278|  11.4k|    if(cpool->next_easy_id <= 0)
  ------------------
  |  Branch (278:8): [True: 0, False: 11.4k]
  ------------------
  279|      0|      cpool->next_easy_id = 0;
  280|  11.4k|    data->state.lastconnect_id = -1;
  281|       |
  282|  11.4k|    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  11.4k|  do {                                                                  \
  |  |   54|  11.4k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 11.4k, False: 0]
  |  |  ------------------
  |  |   55|  11.4k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|  11.4k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  11.4k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|  11.4k|#define FALSE false
  |  |  ------------------
  |  |   57|  11.4k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  11.4k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 11.4k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  11.4k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  11.4k|    }                                                                   \
  |  |   60|  11.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
  |  Branch (282:5): [True: 0, False: 11.4k]
  |  Branch (282:5): [True: 11.4k, False: 0]
  ------------------
  283|  11.4k|  }
  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|  11.4k|}
Curl_cpool_check_limits:
  388|  5.65k|{
  389|  5.65k|  struct cpool *cpool = cpool_get_instance(data);
  390|  5.65k|  struct cpool_bundle *bundle;
  391|  5.65k|  size_t dest_limit = 0;
  392|  5.65k|  size_t total_limit = 0;
  393|  5.65k|  size_t shutdowns;
  394|  5.65k|  int res = CPOOL_LIMIT_OK;
  ------------------
  |  |   90|  5.65k|#define CPOOL_LIMIT_OK     0
  ------------------
  395|       |
  396|  5.65k|  if(!cpool)
  ------------------
  |  Branch (396:6): [True: 0, False: 5.65k]
  ------------------
  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|  5.65k|  if(data->multi) {
  ------------------
  |  Branch (400:6): [True: 5.65k, False: 0]
  ------------------
  401|  5.65k|    dest_limit = data->multi->max_host_connections;
  402|  5.65k|    total_limit = data->multi->max_total_connections;
  403|  5.65k|  }
  404|       |
  405|  5.65k|  if(!dest_limit && !total_limit)
  ------------------
  |  Branch (405:6): [True: 5.65k, False: 0]
  |  Branch (405:21): [True: 5.65k, False: 0]
  ------------------
  406|  5.65k|    return CPOOL_LIMIT_OK;
  ------------------
  |  |   90|  5.65k|#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|  5.65k|{
  486|  5.65k|  CURLcode result = CURLE_OK;
  487|  5.65k|  struct cpool_bundle *bundle = NULL;
  488|  5.65k|  struct cpool *cpool = cpool_get_instance(data);
  489|  5.65k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (489:3): [True: 0, False: 5.65k]
  |  Branch (489:3): [True: 5.65k, False: 0]
  ------------------
  490|       |
  491|  5.65k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (491:3): [True: 0, False: 5.65k]
  |  Branch (491:3): [True: 5.65k, False: 0]
  ------------------
  492|  5.65k|  if(!cpool)
  ------------------
  |  Branch (492:6): [True: 0, False: 5.65k]
  ------------------
  493|      0|    return CURLE_FAILED_INIT;
  494|       |
  495|  5.65k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  5.65k|  do {                                                                  \
  |  |   43|  5.65k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 5.65k, False: 0]
  |  |  ------------------
  |  |   44|  5.65k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  5.65k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 5.65k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  5.65k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  5.65k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  5.65k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|  5.65k|#define TRUE true
  |  |  ------------------
  |  |   49|  5.65k|    }                                                                   \
  |  |   50|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
  |  Branch (495:3): [True: 0, False: 5.65k]
  |  Branch (495:3): [True: 5.65k, False: 0]
  ------------------
  496|  5.65k|  bundle = cpool_find_bundle(cpool, conn);
  497|  5.65k|  if(!bundle) {
  ------------------
  |  Branch (497:6): [True: 5.65k, False: 0]
  ------------------
  498|  5.65k|    bundle = cpool_add_bundle(cpool, conn);
  499|  5.65k|    if(!bundle) {
  ------------------
  |  Branch (499:8): [True: 0, False: 5.65k]
  ------------------
  500|      0|      result = CURLE_OUT_OF_MEMORY;
  501|      0|      goto out;
  502|      0|    }
  503|  5.65k|  }
  504|       |
  505|  5.65k|  cpool_bundle_add(bundle, conn);
  506|  5.65k|  conn->connection_id = cpool->next_connection_id++;
  507|  5.65k|  cpool->num_conn++;
  508|  5.65k|  CURL_TRC_M(data, "[CPOOL] added connection %" FMT_OFF_T ". "
  ------------------
  |  |  148|  5.65k|  do {                                   \
  |  |  149|  5.65k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.65k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.65k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  11.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.65k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.65k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  11.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  5.65k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.65k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
  509|  5.65k|             "The cache now contains %zu members",
  510|  5.65k|             conn->connection_id, cpool->num_conn);
  511|  5.65k|out:
  512|  5.65k|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  5.65k|  do {                                                                  \
  |  |   54|  5.65k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 5.65k, False: 0]
  |  |  ------------------
  |  |   55|  5.65k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  5.65k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|  5.65k|#define FALSE false
  |  |  ------------------
  |  |   57|  5.65k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  5.65k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 5.65k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  5.65k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  5.65k|    }                                                                   \
  |  |   60|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
  |  Branch (512:3): [True: 0, False: 5.65k]
  |  Branch (512:3): [True: 5.65k, False: 0]
  ------------------
  513|       |
  514|  5.65k|  return result;
  515|  5.65k|}
Curl_cpool_find:
  617|  5.85k|{
  618|  5.85k|  struct cpool *cpool = cpool_get_instance(data);
  619|  5.85k|  struct cpool_bundle *bundle;
  620|  5.85k|  bool found = FALSE;
  ------------------
  |  | 1054|  5.85k|#define FALSE false
  ------------------
  621|       |
  622|  5.85k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1077|  5.85k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (622:3): [True: 0, False: 5.85k]
  |  Branch (622:3): [True: 5.85k, False: 0]
  ------------------
  623|  5.85k|  DEBUGASSERT(conn_cb);
  ------------------
  |  | 1077|  5.85k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (623:3): [True: 0, False: 5.85k]
  |  Branch (623:3): [True: 5.85k, False: 0]
  ------------------
  624|  5.85k|  if(!cpool)
  ------------------
  |  Branch (624:6): [True: 0, False: 5.85k]
  ------------------
  625|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  626|       |
  627|  5.85k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  5.85k|  do {                                                                  \
  |  |   43|  5.85k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 5.85k, False: 0]
  |  |  ------------------
  |  |   44|  5.85k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  5.85k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 5.85k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  5.85k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  5.85k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|  5.85k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  5.85k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|  5.85k|#define TRUE true
  |  |  ------------------
  |  |   49|  5.85k|    }                                                                   \
  |  |   50|  5.85k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  |  Branch (627:3): [True: 0, False: 5.85k]
  |  Branch (627:3): [True: 5.85k, False: 0]
  ------------------
  628|  5.85k|  bundle = Curl_hash_pick(&cpool->dest2bundle,
  629|  5.85k|                          CURL_UNCONST(destination),
  ------------------
  |  |  862|  5.85k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  630|  5.85k|                          strlen(destination) + 1);
  631|  5.85k|  if(bundle) {
  ------------------
  |  Branch (631:6): [True: 202, False: 5.64k]
  ------------------
  632|    202|    struct Curl_llist_node *curr = Curl_llist_head(&bundle->conns);
  633|    404|    while(curr) {
  ------------------
  |  Branch (633:11): [True: 202, False: 202]
  ------------------
  634|    202|      struct connectdata *conn = Curl_node_elem(curr);
  635|       |      /* Get next node now. callback might discard current */
  636|    202|      curr = Curl_node_next(curr);
  637|       |
  638|    202|      if(conn_cb(conn, userdata)) {
  ------------------
  |  Branch (638:10): [True: 0, False: 202]
  ------------------
  639|      0|        found = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  640|      0|        break;
  641|      0|      }
  642|    202|    }
  643|    202|  }
  644|       |
  645|  5.85k|  if(done_cb) {
  ------------------
  |  Branch (645:6): [True: 5.85k, False: 0]
  ------------------
  646|  5.85k|    found = done_cb(userdata);
  647|  5.85k|  }
  648|  5.85k|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  5.85k|  do {                                                                  \
  |  |   54|  5.85k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 5.85k, False: 0]
  |  |  ------------------
  |  |   55|  5.85k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|  5.85k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  5.85k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|  5.85k|#define FALSE false
  |  |  ------------------
  |  |   57|  5.85k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  5.85k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 5.85k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  5.85k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  5.85k|    }                                                                   \
  |  |   60|  5.85k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  |  Branch (648:3): [True: 0, False: 5.85k]
  |  Branch (648:3): [True: 5.85k, False: 0]
  ------------------
  649|  5.85k|  return found;
  650|  5.85k|}
Curl_conn_terminate:
  655|  5.65k|{
  656|  5.65k|  struct cpool *cpool = cpool_get_instance(data);
  657|  5.65k|  bool do_lock;
  658|       |
  659|  5.65k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (659:3): [True: 0, False: 5.65k]
  |  Branch (659:3): [True: 5.65k, False: 0]
  ------------------
  660|  5.65k|  DEBUGASSERT(data && !data->conn);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (660:3): [True: 0, False: 5.65k]
  |  Branch (660:3): [True: 0, False: 0]
  |  Branch (660:3): [True: 5.65k, False: 0]
  |  Branch (660:3): [True: 5.65k, False: 0]
  ------------------
  661|  5.65k|  if(!cpool)
  ------------------
  |  Branch (661:6): [True: 0, False: 5.65k]
  ------------------
  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|  5.65k|  if(CONN_INUSE(conn) && !aborted) {
  ------------------
  |  |  284|  11.3k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (284:23): [True: 0, False: 5.65k]
  |  |  ------------------
  ------------------
  |  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|  5.65k|  do_lock = !CPOOL_IS_LOCKED(cpool);
  ------------------
  |  |   39|  5.65k|#define CPOOL_IS_LOCKED(c)    ((c) && (c)->locked)
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 5.65k, False: 0]
  |  |  |  Branch (39:39): [True: 5.65k, False: 0]
  |  |  ------------------
  ------------------
  675|  5.65k|  if(do_lock)
  ------------------
  |  Branch (675:6): [True: 0, False: 5.65k]
  ------------------
  676|      0|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|      0|  do {                                                                  \
  |  |   43|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   44|      0|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      0|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|      0|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|      0|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 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 (676:5): [True: 0, False: 0]
  |  Branch (676:5): [True: 0, False: 0]
  ------------------
  677|       |
  678|  5.65k|  if(conn->bits.in_cpool) {
  ------------------
  |  Branch (678:6): [True: 5.65k, False: 0]
  ------------------
  679|  5.65k|    cpool_remove_conn(cpool, conn);
  680|  5.65k|    DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (680:5): [True: 0, False: 5.65k]
  |  Branch (680:5): [True: 5.65k, False: 0]
  ------------------
  681|  5.65k|  }
  682|       |
  683|       |  /* treat the connection as aborted in CONNECT_ONLY situations,
  684|       |   * so no graceful shutdown is attempted. */
  685|  5.65k|  if(conn->bits.connect_only)
  ------------------
  |  Branch (685:6): [True: 1, False: 5.65k]
  ------------------
  686|      1|    aborted = TRUE;
  ------------------
  |  | 1051|      1|#define TRUE true
  ------------------
  687|       |
  688|  5.65k|  if(data->multi) {
  ------------------
  |  Branch (688:6): [True: 5.65k, False: 0]
  ------------------
  689|       |    /* Add it to the multi's cpool for shutdown handling */
  690|  5.65k|    infof(data, "%s connection #%" FMT_OFF_T,
  ------------------
  |  |  143|  5.65k|  do {                               \
  |  |  144|  5.65k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  5.65k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 5.65k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.65k]
  |  |  |  |  ------------------
  |  |  |  |  320|  5.65k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  5.65k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
  691|  5.65k|          aborted ? "closing" : "shutting down", conn->connection_id);
  692|  5.65k|    cpool_discard_conn(&data->multi->cpool, data, conn, aborted);
  693|  5.65k|  }
  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|  5.65k|  if(do_lock)
  ------------------
  |  Branch (700:6): [True: 0, False: 5.65k]
  ------------------
  701|       |    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 (701:5): [True: 0, False: 0]
  |  Branch (701:5): [True: 0, False: 0]
  ------------------
  702|  5.65k|}
Curl_cpool_prune_dead:
  737|  5.85k|{
  738|  5.85k|  struct cpool *cpool = cpool_get_instance(data);
  739|  5.85k|  timediff_t elapsed;
  740|       |
  741|  5.85k|  if(!cpool)
  ------------------
  |  Branch (741:6): [True: 0, False: 5.85k]
  ------------------
  742|      0|    return;
  743|       |
  744|  5.85k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  5.85k|  do {                                                                  \
  |  |   43|  5.85k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 5.85k, False: 0]
  |  |  ------------------
  |  |   44|  5.85k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  5.85k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 5.85k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  5.85k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  5.85k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|  5.85k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  5.85k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|  5.85k|#define TRUE true
  |  |  ------------------
  |  |   49|  5.85k|    }                                                                   \
  |  |   50|  5.85k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  |  Branch (744:3): [True: 0, False: 5.85k]
  |  Branch (744:3): [True: 5.85k, False: 0]
  ------------------
  745|  5.85k|  elapsed = curlx_ptimediff_ms(Curl_pgrs_now(data), &cpool->last_cleanup);
  746|       |
  747|  5.85k|  if(elapsed >= 1000L) {
  ------------------
  |  Branch (747:6): [True: 5.37k, False: 481]
  ------------------
  748|  5.37k|    struct cpool_reaper_ctx reaper;
  749|       |
  750|  5.37k|    memset(&reaper, 0, sizeof(reaper));
  751|  5.37k|    reaper.now = *Curl_pgrs_now(data);
  752|  5.37k|    while(cpool_foreach(data, cpool, &reaper, cpool_reap_dead_cb))
  ------------------
  |  Branch (752:11): [True: 0, False: 5.37k]
  ------------------
  753|      0|      ;
  754|  5.37k|    cpool->last_cleanup = *Curl_pgrs_now(data);
  755|  5.37k|  }
  756|       |  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  5.85k|  do {                                                                  \
  |  |   54|  5.85k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 5.85k, False: 0]
  |  |  ------------------
  |  |   55|  5.85k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|  5.85k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  5.85k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|  5.85k|#define FALSE false
  |  |  ------------------
  |  |   57|  5.85k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  5.85k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 5.85k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  5.85k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  5.85k|    }                                                                   \
  |  |   60|  5.85k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  |  Branch (756:3): [True: 0, False: 5.85k]
  |  Branch (756:3): [True: 5.85k, False: 0]
  ------------------
  757|  5.85k|}
Curl_cpool_do_locked:
  851|  5.65k|{
  852|  5.65k|  struct cpool *cpool = cpool_get_instance(data);
  853|  5.65k|  if(cpool) {
  ------------------
  |  Branch (853:6): [True: 5.65k, False: 0]
  ------------------
  854|  5.65k|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  5.65k|  do {                                                                  \
  |  |   43|  5.65k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 5.65k, False: 0]
  |  |  ------------------
  |  |   44|  5.65k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  5.65k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 5.65k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  5.65k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  5.65k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  5.65k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1051|  5.65k|#define TRUE true
  |  |  ------------------
  |  |   49|  5.65k|    }                                                                   \
  |  |   50|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
  |  Branch (854:5): [True: 0, False: 5.65k]
  |  Branch (854:5): [True: 5.65k, False: 0]
  ------------------
  855|  5.65k|    cb(conn, data, cbdata);
  856|  5.65k|    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  5.65k|  do {                                                                  \
  |  |   54|  5.65k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 5.65k, False: 0]
  |  |  ------------------
  |  |   55|  5.65k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  5.65k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1054|  5.65k|#define FALSE false
  |  |  ------------------
  |  |   57|  5.65k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  5.65k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 5.65k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  5.65k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  5.65k|    }                                                                   \
  |  |   60|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
  |  Branch (856:5): [True: 0, False: 5.65k]
  |  Branch (856:5): [True: 5.65k, False: 0]
  ------------------
  857|  5.65k|  }
  858|      0|  else
  859|      0|    cb(conn, data, cbdata);
  860|  5.65k|}
conncache.c:cpool_bundle_free_entry:
  109|  5.65k|{
  110|  5.65k|  cpool_bundle_destroy((struct cpool_bundle *)freethis);
  111|  5.65k|}
conncache.c:cpool_bundle_destroy:
   84|  5.65k|{
   85|  5.65k|  DEBUGASSERT(!Curl_llist_count(&bundle->conns));
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (85:3): [True: 0, False: 5.65k]
  |  Branch (85:3): [True: 5.65k, False: 0]
  ------------------
   86|  5.65k|  curlx_free(bundle);
  ------------------
  |  | 1488|  5.65k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   87|  5.65k|}
conncache.c:cpool_get_first:
  130|  10.8k|{
  131|  10.8k|  struct Curl_hash_iterator iter;
  132|  10.8k|  struct Curl_hash_element *he;
  133|  10.8k|  struct cpool_bundle *bundle;
  134|  10.8k|  struct Curl_llist_node *conn_node;
  135|       |
  136|  10.8k|  Curl_hash_start_iterate(&cpool->dest2bundle, &iter);
  137|  10.8k|  for(he = Curl_hash_next_element(&iter); he;
  ------------------
  |  Branch (137:43): [True: 0, False: 10.8k]
  ------------------
  138|  10.8k|      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|  10.8k|  return NULL;
  145|  10.8k|}
conncache.c:cpool_remove_conn:
  164|  5.65k|{
  165|  5.65k|  struct Curl_llist *list = Curl_node_llist(&conn->cpool_node);
  166|  5.65k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 5.65k]
  |  Branch (166:3): [True: 5.65k, False: 0]
  ------------------
  167|  5.65k|  if(list) {
  ------------------
  |  Branch (167:6): [True: 5.65k, False: 0]
  ------------------
  168|       |    /* The connection is certainly in the pool, but where? */
  169|  5.65k|    struct cpool_bundle *bundle = cpool_find_bundle(cpool, conn);
  170|  5.65k|    if(bundle && (list == &bundle->conns)) {
  ------------------
  |  Branch (170:8): [True: 5.65k, False: 0]
  |  Branch (170:18): [True: 5.65k, False: 0]
  ------------------
  171|  5.65k|      cpool_bundle_remove(bundle, conn);
  172|  5.65k|      if(!Curl_llist_count(&bundle->conns))
  ------------------
  |  Branch (172:10): [True: 5.65k, False: 0]
  ------------------
  173|  5.65k|        cpool_remove_bundle(cpool, bundle);
  174|  5.65k|      conn->bits.in_cpool = FALSE;
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
  175|  5.65k|      cpool->num_conn--;
  176|  5.65k|    }
  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|  5.65k|  }
  182|  5.65k|}
conncache.c:cpool_bundle_remove:
  101|  5.65k|{
  102|  5.65k|  (void)bundle;
  103|  5.65k|  DEBUGASSERT(Curl_node_llist(&conn->cpool_node) == &bundle->conns);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (103:3): [True: 0, False: 5.65k]
  |  Branch (103:3): [True: 5.65k, False: 0]
  ------------------
  104|  5.65k|  Curl_node_remove(&conn->cpool_node);
  105|       |  conn->bits.in_cpool = FALSE;
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
  106|  5.65k|}
conncache.c:cpool_remove_bundle:
  156|  5.65k|{
  157|  5.65k|  if(!cpool)
  ------------------
  |  Branch (157:6): [True: 0, False: 5.65k]
  ------------------
  158|      0|    return;
  159|  5.65k|  Curl_hash_delete(&cpool->dest2bundle, bundle->dest, bundle->dest_len);
  160|  5.65k|}
conncache.c:cpool_discard_conn:
  188|  5.65k|{
  189|  5.65k|  bool done = FALSE;
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
  190|       |
  191|  5.65k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (191:3): [True: 0, False: 5.65k]
  |  Branch (191:3): [True: 5.65k, False: 0]
  ------------------
  192|  5.65k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (192:3): [True: 0, False: 5.65k]
  |  Branch (192:3): [True: 5.65k, False: 0]
  ------------------
  193|  5.65k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (193:3): [True: 0, False: 5.65k]
  |  Branch (193:3): [True: 5.65k, False: 0]
  ------------------
  194|  5.65k|  DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (194:3): [True: 0, False: 5.65k]
  |  Branch (194:3): [True: 5.65k, 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|  5.65k|  if(CONN_INUSE(conn) && !aborted) {
  ------------------
  |  |  284|  11.3k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (284:23): [True: 0, False: 5.65k]
  |  |  ------------------
  ------------------
  |  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|  5.65k|  if(conn->bits.connect_only)
  ------------------
  |  Branch (209:6): [True: 1, False: 5.65k]
  ------------------
  210|      1|    aborted = TRUE;
  ------------------
  |  | 1051|      1|#define TRUE true
  ------------------
  211|  5.65k|  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|  5.65k|  if(aborted)
  ------------------
  |  Branch (218:6): [True: 5.65k, False: 0]
  ------------------
  219|  5.65k|    done = TRUE;
  ------------------
  |  | 1051|  5.65k|#define TRUE true
  ------------------
  220|  5.65k|  if(!done) {
  ------------------
  |  Branch (220:6): [True: 0, False: 5.65k]
  ------------------
  221|       |    /* Attempt to shutdown the connection right away. */
  222|      0|    Curl_cshutdn_run_once(cpool->idata, conn, &done);
  223|      0|  }
  224|       |
  225|  5.65k|  if(done || !data->multi)
  ------------------
  |  Branch (225:6): [True: 5.65k, False: 0]
  |  Branch (225:14): [True: 0, False: 0]
  ------------------
  226|  5.65k|    Curl_cshutdn_terminate(cpool->idata, conn, FALSE);
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
  227|      0|  else
  228|      0|    Curl_cshutdn_add(&data->multi->cshutdn, conn, cpool->num_conn);
  229|  5.65k|}
conncache.c:cpool_get_instance:
  257|  45.7k|{
  258|  45.7k|  if(data) {
  ------------------
  |  Branch (258:6): [True: 45.7k, False: 0]
  ------------------
  259|  45.7k|    if(CURL_SHARE_KEEP_CONNECT(data->share))
  ------------------
  |  |   41|  45.7k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  ------------------
  |  |  |  Branch (41:4): [True: 0, False: 45.7k]
  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  260|      0|      return &data->share->cpool;
  261|  45.7k|    else if(data->multi_easy)
  ------------------
  |  Branch (261:13): [True: 0, False: 45.7k]
  ------------------
  262|      0|      return &data->multi_easy->cpool;
  263|  45.7k|    else if(data->multi)
  ------------------
  |  Branch (263:13): [True: 45.7k, False: 0]
  ------------------
  264|  45.7k|      return &data->multi->cpool;
  265|  45.7k|  }
  266|      0|  return NULL;
  267|  45.7k|}
conncache.c:cpool_find_bundle:
  149|  11.3k|{
  150|  11.3k|  return Curl_hash_pick(&cpool->dest2bundle,
  151|  11.3k|                        conn->destination, strlen(conn->destination) + 1);
  152|  11.3k|}
conncache.c:cpool_add_bundle:
  293|  5.65k|{
  294|  5.65k|  struct cpool_bundle *bundle;
  295|       |
  296|  5.65k|  bundle = cpool_bundle_create(conn->destination);
  297|  5.65k|  if(!bundle)
  ------------------
  |  Branch (297:6): [True: 0, False: 5.65k]
  ------------------
  298|      0|    return NULL;
  299|       |
  300|  5.65k|  if(!Curl_hash_add(&cpool->dest2bundle,
  ------------------
  |  Branch (300:6): [True: 0, False: 5.65k]
  ------------------
  301|  5.65k|                    bundle->dest, bundle->dest_len, bundle)) {
  302|      0|    cpool_bundle_destroy(bundle);
  303|      0|    return NULL;
  304|      0|  }
  305|  5.65k|  return bundle;
  306|  5.65k|}
conncache.c:cpool_bundle_create:
   70|  5.65k|{
   71|  5.65k|  struct cpool_bundle *bundle;
   72|  5.65k|  size_t dest_len = strlen(dest) + 1;
   73|       |
   74|  5.65k|  bundle = curlx_calloc(1, sizeof(*bundle) + dest_len - 1);
  ------------------
  |  | 1485|  5.65k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   75|  5.65k|  if(!bundle)
  ------------------
  |  Branch (75:6): [True: 0, False: 5.65k]
  ------------------
   76|      0|    return NULL;
   77|  5.65k|  Curl_llist_init(&bundle->conns, NULL);
   78|  5.65k|  bundle->dest_len = dest_len;
   79|  5.65k|  memcpy(bundle->dest, dest, bundle->dest_len);
   80|  5.65k|  return bundle;
   81|  5.65k|}
conncache.c:cpool_bundle_add:
   92|  5.65k|{
   93|  5.65k|  DEBUGASSERT(!Curl_node_llist(&conn->cpool_node));
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (93:3): [True: 0, False: 5.65k]
  |  Branch (93:3): [True: 5.65k, False: 0]
  ------------------
   94|  5.65k|  Curl_llist_append(&bundle->conns, conn, &conn->cpool_node);
   95|       |  conn->bits.in_cpool = TRUE;
  ------------------
  |  | 1051|  5.65k|#define TRUE true
  ------------------
   96|  5.65k|}
conncache.c:cpool_foreach:
  534|  5.37k|{
  535|  5.37k|  struct Curl_hash_iterator iter;
  536|  5.37k|  struct Curl_hash_element *he;
  537|       |
  538|  5.37k|  if(!cpool)
  ------------------
  |  Branch (538:6): [True: 0, False: 5.37k]
  ------------------
  539|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  540|       |
  541|  5.37k|  Curl_hash_start_iterate(&cpool->dest2bundle, &iter);
  542|       |
  543|  5.37k|  he = Curl_hash_next_element(&iter);
  544|  5.37k|  while(he) {
  ------------------
  |  Branch (544:9): [True: 0, False: 5.37k]
  ------------------
  545|      0|    struct Curl_llist_node *curr;
  546|      0|    struct cpool_bundle *bundle = he->ptr;
  547|      0|    he = Curl_hash_next_element(&iter);
  548|       |
  549|      0|    curr = Curl_llist_head(&bundle->conns);
  550|      0|    while(curr) {
  ------------------
  |  Branch (550:11): [True: 0, False: 0]
  ------------------
  551|       |      /* Yes, we need to update curr before calling func(), because func()
  552|       |         might decide to remove the connection */
  553|      0|      struct connectdata *conn = Curl_node_elem(curr);
  554|      0|      curr = Curl_node_next(curr);
  555|       |
  556|      0|      if(func(data, conn, param) == 1) {
  ------------------
  |  Branch (556:10): [True: 0, False: 0]
  ------------------
  557|      0|        return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  558|      0|      }
  559|      0|    }
  560|      0|  }
  561|  5.37k|  return FALSE;
  ------------------
  |  | 1054|  5.37k|#define FALSE false
  ------------------
  562|  5.37k|}

timeleft_now_ms:
   74|  31.5k|{
   75|  31.5k|  timediff_t timeleft_ms = 0;
   76|  31.5k|  timediff_t ctimeleft_ms = 0;
   77|       |
   78|  31.5k|  if(Curl_shutdown_started(data, FIRSTSOCKET))
  ------------------
  |  |  245|  31.5k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (78:6): [True: 0, False: 31.5k]
  ------------------
   79|      0|    return Curl_shutdown_timeleft(data, data->conn, FIRSTSOCKET);
  ------------------
  |  |  245|      0|#define FIRSTSOCKET     0
  ------------------
   80|  31.5k|  else if(Curl_is_connecting(data)) {
  ------------------
  |  Branch (80:11): [True: 31.5k, False: 0]
  ------------------
   81|  31.5k|    timediff_t ctimeout_ms = (data->set.connecttimeout > 0) ?
  ------------------
  |  Branch (81:30): [True: 499, False: 31.0k]
  ------------------
   82|  31.0k|      data->set.connecttimeout : DEFAULT_CONNECT_TIMEOUT;
  ------------------
  |  |   40|  31.0k|#define DEFAULT_CONNECT_TIMEOUT 300000 /* milliseconds == five minutes */
  ------------------
   83|  31.5k|    ctimeleft_ms = ctimeout_ms -
   84|  31.5k|      curlx_ptimediff_ms(pnow, &data->progress.t_startsingle);
   85|  31.5k|    if(!ctimeleft_ms)
  ------------------
  |  Branch (85:8): [True: 3, False: 31.5k]
  ------------------
   86|      3|      ctimeleft_ms = -1; /* 0 is "no limit", fake 1 ms expiry */
   87|  31.5k|  }
   88|      0|  else if(!data->set.timeout || data->set.connect_only) {
  ------------------
  |  Branch (88:11): [True: 0, False: 0]
  |  Branch (88:33): [True: 0, False: 0]
  ------------------
   89|      0|    return 0; /* no timeout in place or checked, return "no limit" */
   90|      0|  }
   91|       |
   92|  31.5k|  if(data->set.timeout) {
  ------------------
  |  Branch (92:6): [True: 31.5k, False: 0]
  ------------------
   93|  31.5k|    timeleft_ms = data->set.timeout -
   94|  31.5k|      curlx_ptimediff_ms(pnow, &data->progress.t_startop);
   95|  31.5k|    if(!timeleft_ms)
  ------------------
  |  Branch (95:8): [True: 0, False: 31.5k]
  ------------------
   96|      0|      timeleft_ms = -1; /* 0 is "no limit", fake 1 ms expiry */
   97|  31.5k|  }
   98|       |
   99|  31.5k|  if(!ctimeleft_ms)
  ------------------
  |  Branch (99:6): [True: 0, False: 31.5k]
  ------------------
  100|      0|    return timeleft_ms;
  101|  31.5k|  else if(!timeleft_ms)
  ------------------
  |  Branch (101:11): [True: 0, False: 31.5k]
  ------------------
  102|      0|    return ctimeleft_ms;
  103|  31.5k|  return CURLMIN(ctimeleft_ms, timeleft_ms);
  ------------------
  |  | 1292|  31.5k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1292:24): [True: 156, False: 31.3k]
  |  |  ------------------
  ------------------
  104|  31.5k|}
Curl_timeleft_ms:
  107|  31.5k|{
  108|  31.5k|  return timeleft_now_ms(data, Curl_pgrs_now(data));
  109|  31.5k|}
Curl_shutdown_started:
  168|  31.5k|{
  169|  31.5k|  if(data->conn) {
  ------------------
  |  Branch (169:6): [True: 22.3k, False: 9.22k]
  ------------------
  170|  22.3k|    struct curltime *pt = &data->conn->shutdown.start[sockindex];
  171|  22.3k|    return (pt->tv_sec > 0) || (pt->tv_usec > 0);
  ------------------
  |  Branch (171:12): [True: 0, False: 22.3k]
  |  Branch (171:32): [True: 0, False: 22.3k]
  ------------------
  172|  22.3k|  }
  173|  9.22k|  return FALSE;
  ------------------
  |  | 1054|  9.22k|#define FALSE false
  ------------------
  174|  31.5k|}
Curl_getconnectinfo:
  184|      2|{
  185|      2|  DEBUGASSERT(data);
  ------------------
  |  | 1077|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (185:3): [True: 0, False: 2]
  |  Branch (185:3): [True: 2, 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|      2|  if(data->state.lastconnect_id != -1) {
  ------------------
  |  Branch (192:6): [True: 0, False: 2]
  ------------------
  193|      0|    struct connectdata *conn;
  194|       |
  195|      0|    conn = Curl_cpool_get_conn(data, data->state.lastconnect_id);
  196|      0|    if(!conn) {
  ------------------
  |  Branch (196:8): [True: 0, False: 0]
  ------------------
  197|      0|      data->state.lastconnect_id = -1;
  198|      0|      return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  199|      0|    }
  200|       |
  201|      0|    if(connp)
  ------------------
  |  Branch (201:8): [True: 0, False: 0]
  ------------------
  202|       |      /* only store this if the caller cares for it */
  203|      0|      *connp = conn;
  204|      0|    return conn->sock[FIRSTSOCKET];
  ------------------
  |  |  245|      0|#define FIRSTSOCKET     0
  ------------------
  205|      0|  }
  206|      2|  return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      2|#define CURL_SOCKET_BAD (-1)
  ------------------
  207|      2|}
Curl_conncontrol:
  218|  5.65k|{
  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|  5.65k|  bool closeit, is_multiplex;
  223|  5.65k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (223:3): [True: 0, False: 5.65k]
  |  Branch (223:3): [True: 5.65k, False: 0]
  ------------------
  224|  5.65k|#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
  225|  5.65k|  (void)reason; /* useful for debugging */
  226|  5.65k|#endif
  227|  5.65k|  is_multiplex = Curl_conn_is_multiplex(conn, FIRSTSOCKET);
  ------------------
  |  |  245|  5.65k|#define FIRSTSOCKET     0
  ------------------
  228|  5.65k|  closeit = (ctrl == CONNCTRL_CONNECTION) ||
  ------------------
  |  |   85|  5.65k|#define CONNCTRL_CONNECTION 1
  ------------------
  |  Branch (228:13): [True: 5.65k, False: 0]
  ------------------
  229|      0|            ((ctrl == CONNCTRL_STREAM) && !is_multiplex);
  ------------------
  |  |   86|      0|#define CONNCTRL_STREAM     2
  ------------------
  |  Branch (229:14): [True: 0, False: 0]
  |  Branch (229:43): [True: 0, False: 0]
  ------------------
  230|  5.65k|  if((ctrl == CONNCTRL_STREAM) && is_multiplex)
  ------------------
  |  |   86|  5.65k|#define CONNCTRL_STREAM     2
  ------------------
  |  Branch (230:6): [True: 0, False: 5.65k]
  |  Branch (230:35): [True: 0, False: 0]
  ------------------
  231|      0|    ;  /* stream signal on multiplex conn never affects close state */
  232|  5.65k|  else if((curl_bit)closeit != conn->bits.close) {
  ------------------
  |  Branch (232:11): [True: 5.65k, False: 0]
  ------------------
  233|  5.65k|    conn->bits.close = closeit; /* the only place in the source code that
  234|       |                                   should assign this bit */
  235|  5.65k|  }
  236|  5.65k|}
Curl_conn_setup:
  242|  5.65k|{
  243|  5.65k|  CURLcode result = CURLE_OK;
  244|  5.65k|  struct Curl_peer *peer = Curl_conn_get_first_peer(conn, sockindex);
  245|  5.65k|  uint8_t dns_queries;
  246|       |
  247|  5.65k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:3): [True: 0, False: 5.65k]
  |  Branch (247:3): [True: 5.65k, False: 0]
  ------------------
  248|  5.65k|  DEBUGASSERT(conn->scheme);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 5.65k]
  |  Branch (248:3): [True: 5.65k, False: 0]
  ------------------
  249|  5.65k|  DEBUGASSERT(!conn->cfilter[sockindex]);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (249:3): [True: 0, False: 5.65k]
  |  Branch (249:3): [True: 5.65k, False: 0]
  ------------------
  250|       |
  251|  5.65k|  if(!peer)
  ------------------
  |  Branch (251:6): [True: 0, False: 5.65k]
  ------------------
  252|      0|    return CURLE_FAILED_INIT;
  253|       |
  254|  5.65k|#ifndef CURL_DISABLE_HTTP
  255|  5.65k|  if(!conn->cfilter[sockindex] &&
  ------------------
  |  Branch (255:6): [True: 5.65k, False: 0]
  ------------------
  256|  5.65k|     conn->scheme->protocol == CURLPROTO_HTTPS) {
  ------------------
  |  | 1079|  5.65k|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (256:6): [True: 5.63k, False: 16]
  ------------------
  257|  5.63k|    DEBUGASSERT(ssl_mode != CURL_CF_SSL_DISABLE);
  ------------------
  |  | 1077|  5.63k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (257:5): [True: 0, False: 5.63k]
  |  Branch (257:5): [True: 5.63k, False: 0]
  ------------------
  258|  5.63k|    result = Curl_cf_https_setup(data, conn, sockindex);
  259|  5.63k|    if(result)
  ------------------
  |  Branch (259:8): [True: 0, False: 5.63k]
  ------------------
  260|      0|      goto out;
  261|  5.63k|  }
  262|  5.65k|#endif /* !CURL_DISABLE_HTTP */
  263|       |
  264|       |  /* Still no cfilter set, apply default. */
  265|  5.65k|  if(!conn->cfilter[sockindex]) {
  ------------------
  |  Branch (265:6): [True: 76, False: 5.57k]
  ------------------
  266|     76|    result = Curl_cf_setup_add(data, conn, sockindex,
  267|     76|                               conn->transport_wanted, ssl_mode);
  268|     76|    if(result)
  ------------------
  |  Branch (268:8): [True: 0, False: 76]
  ------------------
  269|      0|      goto out;
  270|     76|  }
  271|       |
  272|  5.65k|  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|  5.65k|  result = Curl_cf_dns_add(data, conn, sockindex, peer, dns_queries,
  278|  5.65k|                           conn->transport_wanted);
  279|  5.65k|  DEBUGASSERT(conn->cfilter[sockindex]);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (279:3): [True: 0, False: 5.65k]
  |  Branch (279:3): [True: 5.65k, False: 0]
  ------------------
  280|  5.65k|out:
  281|  5.65k|  return result;
  282|  5.65k|}
Curl_conn_connect:
  333|  7.01k|{
  334|  7.01k|#define CF_CONN_NUM_POLLS_ON_STACK 5
  335|  7.01k|  struct pollfd a_few_on_stack[CF_CONN_NUM_POLLS_ON_STACK];
  336|  7.01k|  struct easy_pollset ps;
  337|  7.01k|  struct curl_pollfds cpfds;
  338|  7.01k|  struct Curl_cfilter *cf;
  339|  7.01k|  CURLcode result = CURLE_OK;
  340|       |
  341|  7.01k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  7.01k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (341:3): [True: 0, False: 7.01k]
  |  Branch (341:3): [True: 7.01k, False: 0]
  ------------------
  342|  7.01k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|  7.01k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (342:3): [True: 0, False: 7.01k]
  |  Branch (342:3): [True: 7.01k, False: 0]
  ------------------
  343|  7.01k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  322|  7.01k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (322:36): [True: 7.01k, False: 0]
  |  |  |  Branch (322:50): [True: 7.01k, False: 0]
  |  |  ------------------
  ------------------
  344|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  345|       |
  346|  7.01k|  if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|  7.01k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (346:6): [True: 0, False: 7.01k]
  ------------------
  347|      0|    *done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  348|      0|    return CURLE_OK;
  349|      0|  }
  350|       |
  351|  7.01k|  cf = data->conn->cfilter[sockindex];
  352|  7.01k|  if(!cf) {
  ------------------
  |  Branch (352:6): [True: 0, False: 7.01k]
  ------------------
  353|      0|    *done = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  354|      0|    return CURLE_FAILED_INIT;
  355|      0|  }
  356|       |
  357|  7.01k|  *done = (bool)cf->connected;
  358|  7.01k|  if(*done)
  ------------------
  |  Branch (358:6): [True: 0, False: 7.01k]
  ------------------
  359|      0|    return CURLE_OK;
  360|       |
  361|  7.01k|  Curl_pollset_init(&ps);
  362|  7.01k|  Curl_pollfds_init(&cpfds, a_few_on_stack, CF_CONN_NUM_POLLS_ON_STACK);
  ------------------
  |  |  334|  7.01k|#define CF_CONN_NUM_POLLS_ON_STACK 5
  ------------------
  363|  7.01k|  while(!*done) {
  ------------------
  |  Branch (363:9): [True: 7.01k, False: 0]
  ------------------
  364|  7.01k|    if(Curl_conn_needs_flush(data, sockindex)) {
  ------------------
  |  Branch (364:8): [True: 0, False: 7.01k]
  ------------------
  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|  7.01k|    result = cf->cft->do_connect(cf, data, done);
  372|  7.01k|    CURL_TRC_CF(data, cf, "Curl_conn_connect(block=%d) -> %d, done=%d",
  ------------------
  |  |  153|  7.01k|  do {                                          \
  |  |  154|  7.01k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  7.01k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  14.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 7.01k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 7.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  14.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.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|  7.01k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  7.01k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 7.01k]
  |  |  ------------------
  ------------------
  373|  7.01k|                blocking, (int)result, *done);
  374|  7.01k|    if(!result && *done) {
  ------------------
  |  Branch (374:8): [True: 1.88k, False: 5.13k]
  |  Branch (374:19): [True: 0, False: 1.88k]
  ------------------
  375|       |      /* A final sanity check on connection security */
  376|      0|      if((data->state.origin->scheme->flags & PROTOPT_SSL) &&
  ------------------
  |  |  207|      0|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (376:10): [True: 0, False: 0]
  ------------------
  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|      0|      Curl_conn_cntrl_update_info(data, data->conn);
  388|      0|      conn_report_connect_stats(cf, data);
  389|      0|      data->conn->keepalive = *Curl_pgrs_now(data);
  390|      0|      VERBOSE(result = conn_connect_trace(data, cf));
  ------------------
  |  | 1623|      0|#define VERBOSE(x) x
  ------------------
  391|      0|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "connected"));
  ------------------
  |  | 1623|      0|#define VERBOSE(x) x
  ------------------
  392|      0|      Curl_conn_remove_setup_filters(data, sockindex);
  393|      0|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "reduced to"));
  ------------------
  |  | 1623|      0|#define VERBOSE(x) x
  ------------------
  394|      0|      goto out;
  395|      0|    }
  396|  7.01k|    else if(result) {
  ------------------
  |  Branch (396:13): [True: 5.13k, False: 1.88k]
  ------------------
  397|  5.13k|      CURL_TRC_CF(data, cf, "Curl_conn_connect(), filter returned %d",
  ------------------
  |  |  153|  5.13k|  do {                                          \
  |  |  154|  5.13k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  5.13k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  10.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.13k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.13k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  10.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|  5.13k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  5.13k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  5.13k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 5.13k]
  |  |  ------------------
  ------------------
  398|  5.13k|                  (int)result);
  399|  5.13k|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "failed to connect"));
  ------------------
  |  | 1623|  5.13k|#define VERBOSE(x) x
  ------------------
  400|  5.13k|      conn_report_connect_stats(cf, data);
  401|  5.13k|      goto out;
  402|  5.13k|    }
  403|       |
  404|  1.88k|    if(!blocking)
  ------------------
  |  Branch (404:8): [True: 1.88k, False: 0]
  ------------------
  405|  1.88k|      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.88k|  }
  444|       |
  445|  7.01k|out:
  446|  7.01k|  Curl_pollset_cleanup(&ps);
  447|  7.01k|  Curl_pollfds_cleanup(&cpfds);
  448|  7.01k|  return result;
  449|  7.01k|}
Curl_conn_get_origin:
  463|  2.72k|{
  464|  2.72k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  246|  2.72k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (464:10): [True: 0, False: 2.72k]
  ------------------
  465|  2.72k|    conn->origin2 : conn->origin;
  466|  2.72k|}
Curl_conn_get_destination:
  470|  12.6k|{
  471|  12.6k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  246|  12.6k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (471:10): [True: 0, False: 12.6k]
  ------------------
  472|      0|    (conn->via_peer2 ? conn->via_peer2 : conn->origin2) :
  ------------------
  |  Branch (472:6): [True: 0, False: 0]
  ------------------
  473|  12.6k|    (conn->via_peer ? conn->via_peer : conn->origin);
  ------------------
  |  Branch (473:6): [True: 12.1k, False: 481]
  ------------------
  474|  12.6k|}
Curl_conn_get_first_peer:
  478|  16.8k|{
  479|  16.8k|#ifndef CURL_DISABLE_PROXY
  480|  16.8k|  if(conn->socks_proxy.peer)
  ------------------
  |  Branch (480:6): [True: 1.12k, False: 15.6k]
  ------------------
  481|  1.12k|    return conn->socks_proxy.peer;
  482|  15.6k|  if(conn->http_proxy.peer)
  ------------------
  |  Branch (482:6): [True: 6.21k, False: 9.46k]
  ------------------
  483|  6.21k|    return conn->http_proxy.peer;
  484|  9.46k|#endif
  485|  9.46k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  246|  9.46k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (485:10): [True: 0, False: 9.46k]
  ------------------
  486|      0|    (conn->via_peer2 ? conn->via_peer2 : conn->origin2) :
  ------------------
  |  Branch (486:6): [True: 0, False: 0]
  ------------------
  487|  9.46k|    (conn->via_peer ? conn->via_peer : conn->origin);
  ------------------
  |  Branch (487:6): [True: 8.54k, False: 922]
  ------------------
  488|  15.6k|}
connect.c:conn_report_connect_stats:
  312|  5.13k|{
  313|  5.13k|  if(cf) {
  ------------------
  |  Branch (313:6): [True: 5.13k, False: 0]
  ------------------
  314|  5.13k|    struct curltime connected;
  315|  5.13k|    struct curltime appconnected;
  316|       |
  317|  5.13k|    memset(&connected, 0, sizeof(connected));
  318|  5.13k|    cf->cft->query(cf, data, CF_QUERY_TIMER_CONNECT, NULL, &connected);
  ------------------
  |  |  164|  5.13k|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  319|  5.13k|    if(connected.tv_sec || connected.tv_usec)
  ------------------
  |  Branch (319:8): [True: 4.75k, False: 377]
  |  Branch (319:28): [True: 0, False: 377]
  ------------------
  320|  4.75k|      Curl_pgrsTimeWas(data, TIMER_CONNECT, connected);
  321|       |
  322|  5.13k|    memset(&appconnected, 0, sizeof(appconnected));
  323|  5.13k|    cf->cft->query(cf, data, CF_QUERY_TIMER_APPCONNECT, NULL, &appconnected);
  ------------------
  |  |  165|  5.13k|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  324|  5.13k|    if(appconnected.tv_sec || appconnected.tv_usec)
  ------------------
  |  Branch (324:8): [True: 0, False: 5.13k]
  |  Branch (324:31): [True: 0, False: 5.13k]
  ------------------
  325|      0|      Curl_pgrsTimeWas(data, TIMER_APPCONNECT, appconnected);
  326|  5.13k|  }
  327|  5.13k|}

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

Curl_cookie_add:
  984|  8.65k|{
  985|  8.65k|  struct Cookie comem;
  986|  8.65k|  struct Cookie *co;
  987|  8.65k|  size_t myhash;
  988|  8.65k|  CURLcode result;
  989|  8.65k|  bool replaces = FALSE;
  ------------------
  |  | 1054|  8.65k|#define FALSE false
  ------------------
  990|  8.65k|  bool okay;
  991|       |
  992|  8.65k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  8.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (992:3): [True: 0, False: 8.65k]
  |  Branch (992:3): [True: 8.65k, False: 0]
  ------------------
  993|  8.65k|  DEBUGASSERT(MAX_SET_COOKIE_AMOUNT <= 255); /* counter is an unsigned char */
  ------------------
  |  | 1077|  8.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (993:3): [True: 0, Folded]
  |  Branch (993:3): [True: 8.65k, Folded]
  ------------------
  994|  8.65k|  if(data->req.setcookies >= MAX_SET_COOKIE_AMOUNT)
  ------------------
  |  |   90|  8.65k|#define MAX_SET_COOKIE_AMOUNT 50
  ------------------
  |  Branch (994:6): [True: 0, False: 8.65k]
  ------------------
  995|      0|    return CURLE_OK; /* silently ignore */
  996|       |
  997|  8.65k|  co = &comem;
  998|  8.65k|  memset(co, 0, sizeof(comem));
  999|       |
 1000|  8.65k|  if(httpheader)
  ------------------
  |  Branch (1000:6): [True: 1.08k, False: 7.56k]
  ------------------
 1001|  1.08k|    result = parse_cookie_header(data, co, ci, &okay,
 1002|  1.08k|                                 lineptr, domain, path, secure);
 1003|  7.56k|  else
 1004|  7.56k|    result = parse_netscape(co, ci, &okay, lineptr, secure);
 1005|       |
 1006|  8.65k|  if(result || !okay)
  ------------------
  |  Branch (1006:6): [True: 0, False: 8.65k]
  |  Branch (1006:16): [True: 7.24k, False: 1.41k]
  ------------------
 1007|  7.24k|    goto fail;
 1008|       |
 1009|  1.41k|  if(co->prefix_secure && !co->secure)
  ------------------
  |  Branch (1009:6): [True: 5, False: 1.40k]
  |  Branch (1009:27): [True: 4, False: 1]
  ------------------
 1010|       |    /* The __Secure- prefix only requires that the cookie be set secure */
 1011|      4|    goto fail;
 1012|       |
 1013|  1.40k|  if(co->prefix_host) {
  ------------------
  |  Branch (1013:6): [True: 7, False: 1.40k]
  ------------------
 1014|       |    /*
 1015|       |     * The __Host- prefix requires the cookie to be secure, have a "/" path
 1016|       |     * and not have a domain set.
 1017|       |     */
 1018|      7|    if(co->secure && co->path && !strcmp(co->path, "/") && !co->tailmatch)
  ------------------
  |  Branch (1018:8): [True: 4, False: 3]
  |  Branch (1018:22): [True: 3, False: 1]
  |  Branch (1018:34): [True: 2, False: 1]
  |  Branch (1018:60): [True: 1, False: 1]
  ------------------
 1019|      1|      ;
 1020|      6|    else
 1021|      6|      goto fail;
 1022|      7|  }
 1023|       |
 1024|  1.40k|  if(!ci->running &&    /* read from a file */
  ------------------
  |  Branch (1024:6): [True: 1.40k, False: 0]
  ------------------
 1025|  1.40k|     ci->newsession &&  /* clean session cookies */
  ------------------
  |  Branch (1025:6): [True: 0, False: 1.40k]
  ------------------
 1026|      0|     !co->expires)      /* this is a session cookie */
  ------------------
  |  Branch (1026:6): [True: 0, False: 0]
  ------------------
 1027|      0|    goto fail;
 1028|       |
 1029|  1.40k|  co->livecookie = ci->running;
 1030|  1.40k|  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.40k|  if(!noexpire)
  ------------------
  |  Branch (1039:6): [True: 1.40k, False: 0]
  ------------------
 1040|  1.40k|    remove_expired(ci);
 1041|       |
 1042|  1.40k|  if(is_public_suffix(data, co, domain))
  ------------------
  |  Branch (1042:6): [True: 0, False: 1.40k]
  ------------------
 1043|      0|    goto fail;
 1044|       |
 1045|  1.40k|  if(!replace_existing(data, co, ci, secure, &replaces))
  ------------------
  |  Branch (1045:6): [True: 0, False: 1.40k]
  ------------------
 1046|      0|    goto fail;
 1047|       |
 1048|       |  /* clone the stack struct into heap */
 1049|  1.40k|  co = curlx_memdup(&comem, sizeof(comem));
 1050|  1.40k|  if(!co) {
  ------------------
  |  Branch (1050:6): [True: 0, False: 1.40k]
  ------------------
 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.40k|  myhash = cookiehash(co->domain);
 1058|  1.40k|  Curl_llist_append(&ci->cookielist[myhash], co, &co->node);
 1059|       |
 1060|  1.40k|  if(ci->running)
  ------------------
  |  Branch (1060:6): [True: 0, False: 1.40k]
  ------------------
 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.40k|          "expire %" FMT_OFF_T,
 1064|  1.40k|          replaces ? "Replaced" : "Added", co->name, co->value,
 1065|  1.40k|          co->domain, co->path, co->expires);
 1066|       |
 1067|  1.40k|  if(!replaces)
  ------------------
  |  Branch (1067:6): [True: 1.40k, False: 0]
  ------------------
 1068|  1.40k|    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.40k|  if(co->expires && (co->expires < ci->next_expiration))
  ------------------
  |  Branch (1074:6): [True: 577, False: 824]
  |  Branch (1074:21): [True: 575, False: 2]
  ------------------
 1075|    575|    ci->next_expiration = co->expires;
 1076|       |
 1077|  1.40k|  if(httpheader)
  ------------------
  |  Branch (1077:6): [True: 994, False: 407]
  ------------------
 1078|    994|    data->req.setcookies++;
 1079|       |
 1080|  1.40k|  return result;
 1081|  7.25k|fail:
 1082|       |  freecookie(co, FALSE);
  ------------------
  |  | 1054|  7.25k|#define FALSE false
  ------------------
 1083|  7.25k|  return result;
 1084|  1.40k|}
Curl_cookie_init:
 1101|  10.8k|{
 1102|  10.8k|  int i;
 1103|  10.8k|  struct CookieInfo *ci = curlx_calloc(1, sizeof(struct CookieInfo));
  ------------------
  |  | 1485|  10.8k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1104|  10.8k|  if(!ci)
  ------------------
  |  Branch (1104:6): [True: 0, False: 10.8k]
  ------------------
 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|   695k|  for(i = 0; i < COOKIE_HASH_SIZE; i++)
  ------------------
  |  |   54|   695k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1109:14): [True: 684k, False: 10.8k]
  ------------------
 1110|   684k|    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|  10.8k|  ci->next_expiration = CURL_OFF_T_MAX;
  ------------------
  |  |  590|  10.8k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
 1116|       |
 1117|  10.8k|  return ci;
 1118|  10.8k|}
Curl_cookie_loadfiles:
 1206|  7.51k|{
 1207|  7.51k|  CURLcode result = CURLE_OK;
 1208|  7.51k|  struct curl_slist *list = data->state.cookielist;
 1209|  7.51k|  if(list) {
  ------------------
  |  Branch (1209:6): [True: 6.84k, False: 677]
  ------------------
 1210|  6.84k|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1211|  6.84k|    if(!data->cookies)
  ------------------
  |  Branch (1211:8): [True: 0, False: 6.84k]
  ------------------
 1212|      0|      data->cookies = Curl_cookie_init();
 1213|  6.84k|    if(!data->cookies)
  ------------------
  |  Branch (1213:8): [True: 0, False: 6.84k]
  ------------------
 1214|      0|      result = CURLE_OUT_OF_MEMORY;
 1215|  6.84k|    else {
 1216|  6.84k|      data->state.cookie_engine = TRUE;
  ------------------
  |  | 1051|  6.84k|#define TRUE true
  ------------------
 1217|  13.6k|      while(list) {
  ------------------
  |  Branch (1217:13): [True: 6.84k, False: 6.84k]
  ------------------
 1218|  6.84k|        result = cookie_load(data, list->data, data->cookies,
 1219|  6.84k|                             (bool)data->set.cookiesession);
 1220|  6.84k|        if(result)
  ------------------
  |  Branch (1220:12): [True: 0, False: 6.84k]
  ------------------
 1221|      0|          break;
 1222|  6.84k|        list = list->next;
 1223|  6.84k|      }
 1224|  6.84k|    }
 1225|  6.84k|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1226|  6.84k|  }
 1227|  7.51k|  return result;
 1228|  7.51k|}
Curl_cookie_clearall:
 1408|  10.8k|{
 1409|  10.8k|  if(ci) {
  ------------------
  |  Branch (1409:6): [True: 10.8k, False: 1]
  ------------------
 1410|  10.8k|    unsigned int i;
 1411|   695k|    for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|   695k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1411:16): [True: 684k, False: 10.8k]
  ------------------
 1412|   684k|      struct Curl_llist_node *n;
 1413|   685k|      for(n = Curl_llist_head(&ci->cookielist[i]); n;) {
  ------------------
  |  Branch (1413:52): [True: 1.32k, False: 684k]
  ------------------
 1414|  1.32k|        struct Cookie *c = Curl_node_elem(n);
 1415|  1.32k|        struct Curl_llist_node *e = Curl_node_next(n);
 1416|  1.32k|        Curl_node_remove(n);
 1417|       |        freecookie(c, TRUE);
  ------------------
  |  | 1051|  1.32k|#define TRUE true
  ------------------
 1418|  1.32k|        n = e;
 1419|  1.32k|      }
 1420|   684k|    }
 1421|  10.8k|    ci->numcookies = 0;
 1422|  10.8k|  }
 1423|  10.8k|}
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|  10.8k|{
 1460|  10.8k|  if(ci) {
  ------------------
  |  Branch (1460:6): [True: 10.8k, False: 0]
  ------------------
 1461|  10.8k|    Curl_cookie_clearall(ci);
 1462|  10.8k|    curlx_free(ci); /* free the base struct as well */
  ------------------
  |  | 1488|  10.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1463|  10.8k|  }
 1464|  10.8k|}
Curl_flush_cookies:
 1652|  23.9k|{
 1653|  23.9k|  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|  23.9k|  if(data->cookies) {
  ------------------
  |  Branch (1658:6): [True: 10.8k, False: 13.1k]
  ------------------
 1659|  10.8k|    if(data->set.str[STRING_COOKIEJAR] && data->cookies->running) {
  ------------------
  |  Branch (1659:8): [True: 10.8k, False: 52]
  |  Branch (1659:43): [True: 6.84k, False: 3.96k]
  ------------------
 1660|       |      /* if we have a destination file for all the cookies to get dumped to */
 1661|  6.84k|      CURLcode result = cookie_output(data, data->cookies,
 1662|  6.84k|                                      data->set.str[STRING_COOKIEJAR]);
 1663|  6.84k|      if(result)
  ------------------
  |  Branch (1663:10): [True: 0, False: 6.84k]
  ------------------
 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|  6.84k|              data->set.str[STRING_COOKIEJAR], curl_easy_strerror(result));
 1666|  6.84k|    }
 1667|       |
 1668|  10.8k|    if(cleanup && (!data->share || (data->cookies != data->share->cookies))) {
  ------------------
  |  Branch (1668:8): [True: 10.8k, False: 0]
  |  Branch (1668:20): [True: 10.8k, False: 0]
  |  Branch (1668:36): [True: 0, False: 0]
  ------------------
 1669|  10.8k|      Curl_cookie_cleanup(data->cookies);
 1670|       |      data->cookies = NULL;
 1671|  10.8k|    }
 1672|  10.8k|  }
 1673|  23.9k|  Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1674|  23.9k|}
Curl_cookie_run:
 1677|  7.51k|{
 1678|  7.51k|  Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1679|  7.51k|  if(data->cookies)
  ------------------
  |  Branch (1679:6): [True: 6.84k, False: 675]
  ------------------
 1680|  6.84k|    data->cookies->running = TRUE;
  ------------------
  |  | 1051|  6.84k|#define TRUE true
  ------------------
 1681|  7.51k|  Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1682|  7.51k|}
cookie.c:parse_cookie_header:
  600|  1.08k|{
  601|       |  /* This line was read off an HTTP-header */
  602|  1.08k|  time_t now = 0;
  603|  1.08k|  size_t linelength = strlen(ptr);
  604|  1.08k|  CURLcode result = CURLE_OK;
  605|  1.08k|  struct Curl_str cookie[COOKIE_PIECES];
  606|  1.08k|  *okay = FALSE;
  ------------------
  |  | 1054|  1.08k|#define FALSE false
  ------------------
  607|  1.08k|  if(linelength > MAX_COOKIE_LINE)
  ------------------
  |  |   81|  1.08k|#define MAX_COOKIE_LINE 5000
  ------------------
  |  Branch (607:6): [True: 1, False: 1.08k]
  ------------------
  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.08k|  memset(cookie, 0, sizeof(cookie));
  613|  22.0k|  do {
  614|  22.0k|    struct Curl_str name;
  615|       |
  616|       |    /* we have a <name>=<value> pair or a stand-alone word here */
  617|  22.0k|    if(!curlx_str_cspn(&ptr, &name, ";\t\r\n=")) {
  ------------------
  |  Branch (617:8): [True: 20.3k, False: 1.63k]
  ------------------
  618|  20.3k|      struct Curl_str val;
  619|  20.3k|      bool sep = FALSE;
  ------------------
  |  | 1054|  20.3k|#define FALSE false
  ------------------
  620|  20.3k|      curlx_str_trimblanks(&name);
  621|       |
  622|  20.3k|      if(invalid_octets(curlx_str(&name), curlx_strlen(&name))) {
  ------------------
  |  |   49|  20.3k|#define curlx_str(x)    ((x)->str)
  ------------------
                    if(invalid_octets(curlx_str(&name), curlx_strlen(&name))) {
  ------------------
  |  |   50|  20.3k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (622:10): [True: 30, False: 20.3k]
  ------------------
  623|     30|        infof(data, "invalid octets in name, cookie dropped");
  ------------------
  |  |  143|     30|  do {                               \
  |  |  144|     30|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     30|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 30, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 30]
  |  |  |  |  ------------------
  |  |  |  |  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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     30|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     30|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 30]
  |  |  ------------------
  ------------------
  624|     30|        return CURLE_OK;
  625|     30|      }
  626|       |
  627|  20.3k|      if(!curlx_str_single(&ptr, '=')) {
  ------------------
  |  Branch (627:10): [True: 15.8k, False: 4.54k]
  ------------------
  628|  15.8k|        sep = TRUE; /* a '=' was used */
  ------------------
  |  | 1051|  15.8k|#define TRUE true
  ------------------
  629|  15.8k|        if(!curlx_str_cspn(&ptr, &val, ";\r\n"))
  ------------------
  |  Branch (629:12): [True: 13.8k, False: 1.93k]
  ------------------
  630|  13.8k|          curlx_str_trimblanks(&val);
  631|       |
  632|  15.8k|        if(invalid_octets(curlx_str(&val), curlx_strlen(&val))) {
  ------------------
  |  |   49|  15.8k|#define curlx_str(x)    ((x)->str)
  ------------------
                      if(invalid_octets(curlx_str(&val), curlx_strlen(&val))) {
  ------------------
  |  |   50|  15.8k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (632:12): [True: 27, False: 15.7k]
  ------------------
  633|     27|          infof(data, "invalid octets in value, 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]
  |  |  ------------------
  ------------------
  634|     27|          return CURLE_OK;
  635|     27|        }
  636|  15.8k|      }
  637|  4.54k|      else
  638|  4.54k|        curlx_str_init(&val);
  639|       |
  640|  20.3k|      if(!curlx_strlen(&cookie[COOKIE_NAME])) {
  ------------------
  |  |   50|  20.3k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (640:10): [True: 1.06k, False: 19.2k]
  ------------------
  641|  1.06k|        if(!parse_first_pair(data, co, cookie, &name, &val, sep))
  ------------------
  |  Branch (641:12): [True: 22, False: 1.04k]
  ------------------
  642|     22|          return CURLE_OK;
  643|  1.06k|      }
  644|  19.2k|      else if(!sep) {
  ------------------
  |  Branch (644:15): [True: 4.52k, False: 14.7k]
  ------------------
  645|  4.52k|        if(!parse_flag(data, co, ci, &name, secure_origin))
  ------------------
  |  Branch (645:12): [True: 0, False: 4.52k]
  ------------------
  646|      0|          return CURLE_OK;
  647|  4.52k|      }
  648|  14.7k|      else if(curlx_str_casecompare(&name, "path"))
  ------------------
  |  Branch (648:15): [True: 330, False: 14.4k]
  ------------------
  649|    330|        cookie[COOKIE_PATH] = val;
  ------------------
  |  |  369|    330|#define COOKIE_PATH   3
  ------------------
  650|  14.4k|      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: 14.4k]
  ------------------
  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|  14.4k|      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: 14.4k]
  ------------------
  655|      0|        parse_maxage(co, &val, &now);
  656|  14.4k|      else if(curlx_str_casecompare(&name, "expires") && curlx_strlen(&val))
  ------------------
  |  |   50|  11.2k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 11.0k, False: 229]
  |  |  ------------------
  ------------------
  |  Branch (656:15): [True: 11.2k, False: 3.11k]
  ------------------
  657|  11.0k|        parse_expires(co, &val, &now);
  658|  20.3k|    }
  659|  22.0k|  } while(!curlx_str_single(&ptr, ';'));
  ------------------
  |  Branch (659:11): [True: 20.9k, False: 1.00k]
  ------------------
  660|       |
  661|  1.00k|  if(curlx_strlen(&cookie[COOKIE_NAME])) {
  ------------------
  |  |   50|  1.00k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 1.00k, False: 8]
  |  |  ------------------
  ------------------
  662|       |    /* the header was fine, now store the data */
  663|  1.00k|    result = storecookie(co, &cookie[0], path, domain);
  664|  1.00k|    if(!result)
  ------------------
  |  Branch (664:8): [True: 1.00k, False: 0]
  ------------------
  665|  1.00k|      *okay = TRUE;
  ------------------
  |  | 1051|  1.00k|#define TRUE true
  ------------------
  666|  1.00k|  }
  667|  1.00k|  return result;
  668|  1.08k|}
cookie.c:invalid_octets:
  348|  37.0k|{
  349|  37.0k|  const unsigned char *p = (const unsigned char *)ptr;
  350|       |  /* Reject all bytes \x01 - \x1f + \x7f */
  351|   613k|  while(len && *p) {
  ------------------
  |  Branch (351:9): [True: 576k, False: 36.9k]
  |  Branch (351:16): [True: 576k, False: 0]
  ------------------
  352|   576k|    if((*p < 0x20) || (*p == 0x7f))
  ------------------
  |  Branch (352:8): [True: 85, False: 576k]
  |  Branch (352:23): [True: 2, False: 576k]
  ------------------
  353|     87|      return TRUE;
  ------------------
  |  | 1051|     87|#define TRUE true
  ------------------
  354|   576k|    p++;
  355|   576k|    len--;
  356|   576k|  }
  357|  36.9k|  return FALSE;
  ------------------
  |  | 1054|  36.9k|#define FALSE false
  ------------------
  358|  37.0k|}
cookie.c:parse_first_pair:
  426|  1.06k|{
  427|       |  /* The first name/value pair is the actual cookie name */
  428|  1.06k|  if(!sep || !curlx_strlen(name)) {
  ------------------
  |  |   50|  1.04k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (428:6): [True: 18, False: 1.04k]
  |  Branch (428:14): [True: 2, False: 1.04k]
  ------------------
  429|     20|    infof(data, "invalid cookie, dropped");
  ------------------
  |  |  143|     20|  do {                               \
  |  |  144|     20|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     20|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 20, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 20]
  |  |  |  |  ------------------
  |  |  |  |  320|     20|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     20|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     20|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 20]
  |  |  ------------------
  ------------------
  430|     20|    return FALSE;
  ------------------
  |  | 1054|     20|#define FALSE false
  ------------------
  431|     20|  }
  432|       |
  433|       |  /*
  434|       |   * Check for too long individual name or contents. Chrome and Firefox
  435|       |   * support 4095 or 4096 bytes combo
  436|       |   */
  437|  1.04k|  if((curlx_strlen(name) + curlx_strlen(val)) > MAX_NAME) {
  ------------------
  |  |   50|  1.04k|#define curlx_strlen(x) ((x)->len)
  ------------------
                if((curlx_strlen(name) + curlx_strlen(val)) > MAX_NAME) {
  ------------------
  |  |   50|  1.04k|#define curlx_strlen(x) ((x)->len)
  ------------------
                if((curlx_strlen(name) + curlx_strlen(val)) > MAX_NAME) {
  ------------------
  |  |   85|  1.04k|#define MAX_NAME 4096
  ------------------
  |  Branch (437:6): [True: 2, False: 1.04k]
  ------------------
  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|  1.04k|  if(!strncmp("__Secure-", curlx_str(name), 9))
  ------------------
  |  |   49|  1.04k|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (444:6): [True: 3, False: 1.04k]
  ------------------
  445|      3|    co->prefix_secure = TRUE;
  ------------------
  |  | 1051|      3|#define TRUE true
  ------------------
  446|  1.04k|  else if(!strncmp("__Host-", curlx_str(name), 7))
  ------------------
  |  |   49|  1.04k|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (446:11): [True: 4, False: 1.03k]
  ------------------
  447|      4|    co->prefix_host = TRUE;
  ------------------
  |  | 1051|      4|#define TRUE true
  ------------------
  448|       |
  449|  1.04k|  cookie[COOKIE_NAME] = *name;
  ------------------
  |  |  366|  1.04k|#define COOKIE_NAME   0
  ------------------
  450|  1.04k|  cookie[COOKIE_VALUE] = *val;
  ------------------
  |  |  367|  1.04k|#define COOKIE_VALUE  1
  ------------------
  451|       |  return TRUE;
  ------------------
  |  | 1051|  1.04k|#define TRUE true
  ------------------
  452|  1.04k|}
cookie.c:parse_flag:
  457|  4.52k|{
  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|  4.52k|  if(curlx_str_casecompare(name, "secure")) {
  ------------------
  |  Branch (463:6): [True: 201, False: 4.32k]
  ------------------
  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|  4.32k|  else if(curlx_str_casecompare(name, "httponly"))
  ------------------
  |  Branch (471:11): [True: 205, False: 4.11k]
  ------------------
  472|    205|    co->httponly = TRUE;
  ------------------
  |  | 1051|    205|#define TRUE true
  ------------------
  473|       |
  474|  4.52k|  return TRUE;
  ------------------
  |  | 1051|  4.52k|#define TRUE true
  ------------------
  475|  4.52k|}
cookie.c:cap_expires:
   54|  10.6k|{
   55|  10.6k|  if(co->expires && (TIME_T_MAX - COOKIES_MAXAGE - 30) > now) {
  ------------------
  |  |  610|    229|#  define TIME_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
                if(co->expires && (TIME_T_MAX - COOKIES_MAXAGE - 30) > now) {
  ------------------
  |  |   45|    229|#define COOKIES_MAXAGE (400 * 24 * 3600)
  ------------------
  |  Branch (55:6): [True: 229, False: 10.4k]
  |  Branch (55:21): [True: 229, False: 0]
  ------------------
   56|    229|    timediff_t cap = now + COOKIES_MAXAGE;
  ------------------
  |  |   45|    229|#define COOKIES_MAXAGE (400 * 24 * 3600)
  ------------------
   57|    229|    if(co->expires > cap) {
  ------------------
  |  Branch (57:8): [True: 71, False: 158]
  ------------------
   58|     71|      cap += 30;
   59|     71|      co->expires = (cap / 60) * 60;
   60|     71|    }
   61|    229|  }
   62|  10.6k|}
cookie.c:parse_expires:
  564|  11.0k|{
  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|  11.0k|  if(!co->expires && (curlx_strlen(val) < MAX_DATE_LENGTH)) {
  ------------------
  |  |   50|  10.6k|#define curlx_strlen(x) ((x)->len)
  ------------------
                if(!co->expires && (curlx_strlen(val) < MAX_DATE_LENGTH)) {
  ------------------
  |  |  364|  10.6k|#define MAX_DATE_LENGTH 80
  ------------------
  |  Branch (571:6): [True: 10.6k, False: 377]
  |  Branch (571:22): [True: 10.6k, False: 47]
  ------------------
  572|  10.6k|    char dbuf[MAX_DATE_LENGTH + 1];
  573|  10.6k|    time_t date = 0;
  574|  10.6k|    memcpy(dbuf, curlx_str(val), curlx_strlen(val));
  ------------------
  |  |   49|  10.6k|#define curlx_str(x)    ((x)->str)
  ------------------
                  memcpy(dbuf, curlx_str(val), curlx_strlen(val));
  ------------------
  |  |   50|  10.6k|#define curlx_strlen(x) ((x)->len)
  ------------------
  575|  10.6k|    dbuf[curlx_strlen(val)] = 0;
  ------------------
  |  |   50|  10.6k|#define curlx_strlen(x) ((x)->len)
  ------------------
  576|  10.6k|    if(!Curl_getdate_capped(dbuf, &date)) {
  ------------------
  |  Branch (576:8): [True: 229, False: 10.4k]
  ------------------
  577|    229|      if(!date)
  ------------------
  |  Branch (577:10): [True: 1, False: 228]
  ------------------
  578|      1|        date++;
  579|    229|      co->expires = (curl_off_t)date;
  580|    229|    }
  581|  10.4k|    else
  582|  10.4k|      co->expires = 0;
  583|  10.6k|    if(!*nowp)
  ------------------
  |  Branch (583:8): [True: 831, False: 9.80k]
  ------------------
  584|    831|      *nowp = time(NULL);
  585|  10.6k|    cap_expires(*nowp, co);
  586|  10.6k|  }
  587|  11.0k|}
cookie.c:storecookie:
  375|  1.00k|{
  376|  1.00k|  CURLcode result;
  377|  1.00k|  result = strstore(&co->name, curlx_str(&cp[COOKIE_NAME]),
  ------------------
  |  |   49|  1.00k|#define curlx_str(x)    ((x)->str)
  ------------------
  378|  1.00k|                    curlx_strlen(&cp[COOKIE_NAME]));
  ------------------
  |  |   50|  1.00k|#define curlx_strlen(x) ((x)->len)
  ------------------
  379|  1.00k|  if(!result)
  ------------------
  |  Branch (379:6): [True: 1.00k, False: 0]
  ------------------
  380|  1.00k|    result = strstore(&co->value, curlx_str(&cp[COOKIE_VALUE]),
  ------------------
  |  |   49|  1.00k|#define curlx_str(x)    ((x)->str)
  ------------------
  381|  1.00k|                      curlx_strlen(&cp[COOKIE_VALUE]));
  ------------------
  |  |   50|  1.00k|#define curlx_strlen(x) ((x)->len)
  ------------------
  382|  1.00k|  if(!result) {
  ------------------
  |  Branch (382:6): [True: 1.00k, False: 0]
  ------------------
  383|  1.00k|    size_t plen = 0;
  384|  1.00k|    if(curlx_strlen(&cp[COOKIE_PATH])) {
  ------------------
  |  |   50|  1.00k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 27, False: 973]
  |  |  ------------------
  ------------------
  385|     27|      path = curlx_str(&cp[COOKIE_PATH]);
  ------------------
  |  |   49|     27|#define curlx_str(x)    ((x)->str)
  ------------------
  386|     27|      plen = curlx_strlen(&cp[COOKIE_PATH]);
  ------------------
  |  |   50|     27|#define curlx_strlen(x) ((x)->len)
  ------------------
  387|     27|    }
  388|    973|    else if(path) {
  ------------------
  |  Branch (388:13): [True: 0, False: 973]
  ------------------
  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|  1.00k|    if(path) {
  ------------------
  |  Branch (397:8): [True: 27, False: 973]
  ------------------
  398|     27|      co->path = sanitize_cookie_path(path, plen);
  399|     27|      if(!co->path)
  ------------------
  |  Branch (399:10): [True: 0, False: 27]
  ------------------
  400|      0|        result = CURLE_OUT_OF_MEMORY;
  401|     27|    }
  402|  1.00k|  }
  403|  1.00k|  if(!result) {
  ------------------
  |  Branch (403:6): [True: 1.00k, False: 0]
  ------------------
  404|  1.00k|    if(curlx_strlen(&cp[COOKIE_DOMAIN]))
  ------------------
  |  |   50|  1.00k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 0, False: 1.00k]
  |  |  ------------------
  ------------------
  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|  1.00k|    else if(domain) {
  ------------------
  |  Branch (407:13): [True: 0, False: 1.00k]
  ------------------
  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|  1.00k|  }
  414|  1.00k|  return result;
  415|  1.00k|}
cookie.c:strstore:
  257|  2.00k|{
  258|  2.00k|  DEBUGASSERT(str);
  ------------------
  |  | 1077|  2.00k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (258:3): [True: 0, False: 2.00k]
  |  Branch (258:3): [True: 2.00k, False: 0]
  ------------------
  259|  2.00k|  *str = curlx_memdup0(newstr, len);
  260|  2.00k|  if(!*str)
  ------------------
  |  Branch (260:6): [True: 0, False: 2.00k]
  ------------------
  261|      0|    return CURLE_OUT_OF_MEMORY;
  262|  2.00k|  return CURLE_OK;
  263|  2.00k|}
cookie.c:sanitize_cookie_path:
  228|    122|{
  229|       |  /* some sites send path attribute within '"'. */
  230|    122|  if(len && (cookie_path[0] == '\"')) {
  ------------------
  |  Branch (230:6): [True: 122, False: 0]
  |  Branch (230:13): [True: 30, False: 92]
  ------------------
  231|     30|    cookie_path++;
  232|     30|    len--;
  233|       |
  234|     30|    if(len && (cookie_path[len - 1] == '\"'))
  ------------------
  |  Branch (234:8): [True: 26, False: 4]
  |  Branch (234:15): [True: 2, False: 24]
  ------------------
  235|      2|      len--;
  236|     30|  }
  237|       |
  238|       |  /* RFC6265 5.2.4 The Path Attribute */
  239|    122|  if(!len || (cookie_path[0] != '/'))
  ------------------
  |  Branch (239:6): [True: 6, False: 116]
  |  Branch (239:14): [True: 91, False: 25]
  ------------------
  240|       |    /* Let cookie-path be the default-path. */
  241|     97|    return curlx_strdup("/");
  ------------------
  |  | 1482|     97|#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|     25|  if(len > 1 && cookie_path[len - 1] == '/')
  ------------------
  |  Branch (245:6): [True: 22, False: 3]
  |  Branch (245:17): [True: 2, False: 20]
  ------------------
  246|      2|    len--;
  247|       |
  248|     25|  return curlx_memdup0(cookie_path, len);
  249|    122|}
cookie.c:parse_netscape:
  675|  7.56k|{
  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|  7.56k|  const char *ptr, *next;
  681|  7.56k|  int fields;
  682|  7.56k|  size_t len;
  683|  7.56k|  *okay = FALSE;
  ------------------
  |  | 1054|  7.56k|#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|  7.56k|  if(!strncmp(lineptr, "#HttpOnly_", 10)) {
  ------------------
  |  Branch (691:6): [True: 3, False: 7.56k]
  ------------------
  692|      3|    lineptr += 10;
  693|      3|    co->httponly = TRUE;
  ------------------
  |  | 1051|      3|#define TRUE true
  ------------------
  694|      3|  }
  695|       |
  696|  7.56k|  if(lineptr[0] == '#')
  ------------------
  |  Branch (696:6): [True: 70, False: 7.49k]
  ------------------
  697|       |    /* do not even try the comments */
  698|     70|    return CURLE_OK;
  699|       |
  700|       |  /*
  701|       |   * Now loop through the fields and init the struct we already have
  702|       |   * allocated
  703|       |   */
  704|  7.49k|  fields = 0;
  705|  17.3k|  for(next = lineptr; next; fields++) {
  ------------------
  |  Branch (705:23): [True: 9.91k, False: 7.45k]
  ------------------
  706|  9.91k|    ptr = next;
  707|  9.91k|    len = strcspn(ptr, "\t\r\n");
  708|  9.91k|    next = (ptr[len] == '\t' ? &ptr[len + 1] : NULL);
  ------------------
  |  Branch (708:13): [True: 2.42k, False: 7.49k]
  ------------------
  709|  9.91k|    switch(fields) {
  ------------------
  |  Branch (709:12): [True: 9.71k, False: 196]
  ------------------
  710|  7.49k|    case 0:
  ------------------
  |  Branch (710:5): [True: 7.49k, False: 2.41k]
  ------------------
  711|  7.49k|      if(ptr[0] == '.') { /* skip preceding dots */
  ------------------
  |  Branch (711:10): [True: 2, False: 7.49k]
  ------------------
  712|      2|        ptr++;
  713|      2|        len--;
  714|      2|      }
  715|  7.49k|      co->domain = curlx_memdup0(ptr, len);
  716|  7.49k|      if(!co->domain)
  ------------------
  |  Branch (716:10): [True: 0, False: 7.49k]
  ------------------
  717|      0|        return CURLE_OUT_OF_MEMORY;
  718|  7.49k|      break;
  719|  7.49k|    case 1:
  ------------------
  |  Branch (719:5): [True: 604, False: 9.30k]
  ------------------
  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|    604|      co->tailmatch = !!curl_strnequal(ptr, "TRUE", len);
  726|    604|      break;
  727|    599|    case 2:
  ------------------
  |  Branch (727:5): [True: 599, False: 9.31k]
  ------------------
  728|       |      /* The file format allows the path field to remain not filled in */
  729|    599|      if(strncmp("TRUE", ptr, len) && strncmp("FALSE", ptr, len)) {
  ------------------
  |  Branch (729:10): [True: 96, False: 503]
  |  Branch (729:39): [True: 95, False: 1]
  ------------------
  730|       |        /* only if the path does not look like a boolean option! */
  731|     95|        co->path = sanitize_cookie_path(ptr, len);
  732|     95|        if(!co->path)
  ------------------
  |  Branch (732:12): [True: 0, False: 95]
  ------------------
  733|      0|          return CURLE_OUT_OF_MEMORY;
  734|     95|        break;
  735|     95|      }
  736|    504|      else {
  737|       |        /* this does not look like a path, make one up! */
  738|    504|        co->path = curlx_strdup("/");
  ------------------
  |  | 1482|    504|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  739|    504|        if(!co->path)
  ------------------
  |  Branch (739:12): [True: 0, False: 504]
  ------------------
  740|      0|          return CURLE_OUT_OF_MEMORY;
  741|    504|      }
  742|    504|      fields++; /* add a field and fall down to secure */
  743|    504|      FALLTHROUGH();
  ------------------
  |  |  817|    504|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  744|    524|    case 3:
  ------------------
  |  Branch (744:5): [True: 20, False: 9.89k]
  ------------------
  745|    524|      co->secure = FALSE;
  ------------------
  |  | 1054|    524|#define FALSE false
  ------------------
  746|    524|      if(curl_strnequal(ptr, "TRUE", len)) {
  ------------------
  |  Branch (746:10): [True: 514, False: 10]
  ------------------
  747|    514|        if(secure_origin || ci->running)
  ------------------
  |  Branch (747:12): [True: 514, False: 0]
  |  Branch (747:29): [True: 0, False: 0]
  ------------------
  748|    514|          co->secure = TRUE;
  ------------------
  |  | 1051|    514|#define TRUE true
  ------------------
  749|      0|        else
  750|      0|          return CURLE_OK;
  751|    514|      }
  752|    524|      break;
  753|    524|    case 4:
  ------------------
  |  Branch (753:5): [True: 512, False: 9.40k]
  ------------------
  754|    512|      if(curlx_str_number(&ptr, &co->expires, CURL_OFF_T_MAX))
  ------------------
  |  |  590|    512|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (754:10): [True: 41, False: 471]
  ------------------
  755|     41|        return CURLE_OK;
  756|    471|      break;
  757|    471|    case 5:
  ------------------
  |  Branch (757:5): [True: 450, False: 9.46k]
  ------------------
  758|    450|      co->name = curlx_memdup0(ptr, len);
  759|    450|      if(!co->name)
  ------------------
  |  Branch (759:10): [True: 0, False: 450]
  ------------------
  760|      0|        return CURLE_OUT_OF_MEMORY;
  761|    450|      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|    450|        if(!strncmp("__Secure-", co->name, 9))
  ------------------
  |  Branch (765:12): [True: 2, False: 448]
  ------------------
  766|      2|          co->prefix_secure = TRUE;
  ------------------
  |  | 1051|      2|#define TRUE true
  ------------------
  767|    448|        else if(!strncmp("__Host-", co->name, 7))
  ------------------
  |  Branch (767:17): [True: 5, False: 443]
  ------------------
  768|      5|          co->prefix_host = TRUE;
  ------------------
  |  | 1051|      5|#define TRUE true
  ------------------
  769|    450|      }
  770|    450|      break;
  771|    450|    case 6:
  ------------------
  |  Branch (771:5): [True: 34, False: 9.87k]
  ------------------
  772|     34|      co->value = curlx_memdup0(ptr, len);
  773|     34|      if(!co->value)
  ------------------
  |  Branch (773:10): [True: 0, False: 34]
  ------------------
  774|      0|        return CURLE_OUT_OF_MEMORY;
  775|     34|      break;
  776|  9.91k|    }
  777|  9.91k|  }
  778|  7.45k|  if(fields == 6) {
  ------------------
  |  Branch (778:6): [True: 416, False: 7.04k]
  ------------------
  779|       |    /* we got a cookie with blank contents, fix it */
  780|    416|    co->value = curlx_strdup("");
  ------------------
  |  | 1482|    416|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  781|    416|    if(!co->value)
  ------------------
  |  Branch (781:8): [True: 0, False: 416]
  ------------------
  782|      0|      return CURLE_OUT_OF_MEMORY;
  783|    416|    else
  784|    416|      fields++;
  785|    416|  }
  786|       |
  787|  7.45k|  if(fields != 7)
  ------------------
  |  Branch (787:6): [True: 7.01k, False: 441]
  ------------------
  788|       |    /* we did not find the sufficient number of fields */
  789|  7.01k|    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|    441|  if(invalid_octets(co->name, strlen(co->name)) ||
  ------------------
  |  Branch (795:6): [True: 23, False: 418]
  ------------------
  796|    418|     invalid_octets(co->value, strlen(co->value)))
  ------------------
  |  Branch (796:6): [True: 7, False: 411]
  ------------------
  797|     30|    return CURLE_OK;
  798|       |
  799|    411|  *okay = TRUE;
  ------------------
  |  | 1051|    411|#define TRUE true
  ------------------
  800|    411|  return CURLE_OK;
  801|    441|}
cookie.c:remove_expired:
  275|  15.0k|{
  276|  15.0k|  struct Cookie *co;
  277|  15.0k|  curl_off_t now = (curl_off_t)time(NULL);
  278|  15.0k|  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|  15.0k|  if(now < ci->next_expiration &&
  ------------------
  |  Branch (288:6): [True: 15.0k, False: 74]
  ------------------
  289|  15.0k|     ci->next_expiration != CURL_OFF_T_MAX)
  ------------------
  |  |  590|  15.0k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (289:6): [True: 222, False: 14.7k]
  ------------------
  290|    222|    return;
  291|  14.8k|  else
  292|  14.8k|    ci->next_expiration = CURL_OFF_T_MAX;
  ------------------
  |  |  590|  14.8k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  293|       |
  294|   951k|  for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|   951k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (294:14): [True: 936k, False: 14.8k]
  ------------------
  295|   936k|    struct Curl_llist_node *n;
  296|   936k|    struct Curl_llist_node *e = NULL;
  297|       |
  298|   936k|    for(n = Curl_llist_head(&ci->cookielist[i]); n; n = e) {
  ------------------
  |  Branch (298:50): [True: 110, False: 936k]
  ------------------
  299|    110|      co = Curl_node_elem(n);
  300|    110|      e = Curl_node_next(n);
  301|    110|      if(co->expires) {
  ------------------
  |  Branch (301:10): [True: 76, False: 34]
  ------------------
  302|     76|        if(co->expires < now) {
  ------------------
  |  Branch (302:12): [True: 74, False: 2]
  ------------------
  303|     74|          Curl_node_remove(n);
  304|     74|          freecookie(co, TRUE);
  ------------------
  |  | 1051|     74|#define TRUE true
  ------------------
  305|     74|          ci->numcookies--;
  306|     74|        }
  307|      2|        else if(co->expires < ci->next_expiration)
  ------------------
  |  Branch (307:17): [True: 0, False: 2]
  ------------------
  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|     76|      }
  314|    110|    }
  315|   936k|  }
  316|  14.8k|}
cookie.c:is_public_suffix:
  806|  1.40k|{
  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.40k|  (void)data;
  851|  1.40k|  (void)co;
  852|  1.40k|  (void)domain;
  853|  1.40k|  DEBUGF(infof(data, "NO PSL to check set-cookie '%s' for domain=%s in %s",
  ------------------
  |  | 1063|  9.80k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1063:19): [True: 1.40k, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 1.40k]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [True: 0, False: 0]
  |  |  |  Branch (1063:19): [Folded, False: 1.40k]
  |  |  ------------------
  ------------------
  854|  1.40k|               co->name, co->domain, domain));
  855|  1.40k|#endif
  856|       |  return FALSE;
  ------------------
  |  | 1054|  1.40k|#define FALSE false
  ------------------
  857|  1.40k|}
cookie.c:replace_existing:
  865|  1.40k|{
  866|  1.40k|  bool replace_old = FALSE;
  ------------------
  |  | 1054|  1.40k|#define FALSE false
  ------------------
  867|  1.40k|  struct Curl_llist_node *replace_n = NULL;
  868|  1.40k|  struct Curl_llist_node *n;
  869|  1.40k|  size_t myhash = cookiehash(co->domain);
  870|  1.40k|  for(n = Curl_llist_head(&ci->cookielist[myhash]); n; n = Curl_node_next(n)) {
  ------------------
  |  Branch (870:53): [True: 0, False: 1.40k]
  ------------------
  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.40k|  if(replace_n) {
  ------------------
  |  Branch (950:6): [True: 0, False: 1.40k]
  ------------------
  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.40k|  *replacep = replace_old;
  963|       |  return TRUE;
  ------------------
  |  | 1051|  1.40k|#define TRUE true
  ------------------
  964|  1.40k|}
cookie.c:cookiehash:
  213|  2.80k|{
  214|  2.80k|  const char *top;
  215|  2.80k|  size_t len;
  216|       |
  217|  2.80k|  if(!domain || Curl_host_is_ipnum(domain))
  ------------------
  |  Branch (217:6): [True: 1.98k, False: 814]
  |  Branch (217:17): [True: 12, False: 802]
  ------------------
  218|  2.00k|    return 0;
  219|       |
  220|    802|  top = get_top_domain(domain, &len);
  221|    802|  return cookie_hash_domain(top, len);
  222|  2.80k|}
cookie.c:get_top_domain:
  163|    802|{
  164|    802|  size_t len = 0;
  165|    802|  const char *first = NULL, *last;
  166|       |
  167|    802|  if(domain) {
  ------------------
  |  Branch (167:6): [True: 802, False: 0]
  ------------------
  168|    802|    len = strlen(domain);
  169|    802|    last = memrchr(domain, '.', len);
  170|    802|    if(last) {
  ------------------
  |  Branch (170:8): [True: 78, False: 724]
  ------------------
  171|     78|      first = memrchr(domain, '.', (last - domain));
  172|     78|      if(first)
  ------------------
  |  Branch (172:10): [True: 24, False: 54]
  ------------------
  173|     24|        len -= (++first - domain);
  174|     78|    }
  175|    802|  }
  176|       |
  177|    802|  if(outlen)
  ------------------
  |  Branch (177:6): [True: 802, False: 0]
  ------------------
  178|    802|    *outlen = len;
  179|       |
  180|    802|  return first ? first : domain;
  ------------------
  |  Branch (180:10): [True: 24, False: 778]
  ------------------
  181|    802|}
cookie.c:cookie_hash_domain:
  192|    802|{
  193|    802|  const char *end = domain + len;
  194|    802|  size_t h = 5381;
  195|       |
  196|   272k|  while(domain < end) {
  ------------------
  |  Branch (196:9): [True: 271k, False: 802]
  ------------------
  197|   271k|    size_t j = (size_t)Curl_raw_toupper(*domain++);
  198|   271k|    h += h << 5;
  199|   271k|    h ^= j;
  200|   271k|  }
  201|       |
  202|    802|  return (h % COOKIE_HASH_SIZE);
  ------------------
  |  |   54|    802|#define COOKIE_HASH_SIZE 63
  ------------------
  203|    802|}
cookie.c:freecookie:
   65|  8.65k|{
   66|  8.65k|  curlx_free(co->domain);
  ------------------
  |  | 1488|  8.65k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   67|  8.65k|  curlx_free(co->path);
  ------------------
  |  | 1488|  8.65k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   68|  8.65k|  curlx_free(co->name);
  ------------------
  |  | 1488|  8.65k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   69|  8.65k|  curlx_free(co->value);
  ------------------
  |  | 1488|  8.65k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   70|  8.65k|  if(maintoo)
  ------------------
  |  Branch (70:6): [True: 1.40k, False: 7.25k]
  ------------------
   71|  1.40k|    curlx_free(co);
  ------------------
  |  | 1488|  1.40k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   72|  8.65k|}
cookie.c:cookie_load:
 1131|  6.84k|{
 1132|  6.84k|  FILE *handle = NULL;
 1133|  6.84k|  CURLcode result = CURLE_OK;
 1134|  6.84k|  FILE *fp = NULL;
 1135|  6.84k|  DEBUGASSERT(ci);
  ------------------
  |  | 1077|  6.84k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1135:3): [True: 0, False: 6.84k]
  |  Branch (1135:3): [True: 6.84k, False: 0]
  ------------------
 1136|  6.84k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  6.84k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1136:3): [True: 0, False: 6.84k]
  |  Branch (1136:3): [True: 6.84k, False: 0]
  ------------------
 1137|  6.84k|  DEBUGASSERT(file);
  ------------------
  |  | 1077|  6.84k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1137:3): [True: 0, False: 6.84k]
  |  Branch (1137:3): [True: 6.84k, False: 0]
  ------------------
 1138|       |
 1139|  6.84k|  ci->newsession = newsession; /* new session? */
 1140|  6.84k|  ci->running = FALSE; /* this is not running, this is init */
  ------------------
  |  | 1054|  6.84k|#define FALSE false
  ------------------
 1141|       |
 1142|  6.84k|  if(file && *file) {
  ------------------
  |  Branch (1142:6): [True: 6.84k, False: 0]
  |  Branch (1142:14): [True: 6.84k, False: 0]
  ------------------
 1143|  6.84k|    if(!strcmp(file, "-"))
  ------------------
  |  Branch (1143:8): [True: 0, False: 6.84k]
  ------------------
 1144|      0|      fp = stdin;
 1145|  6.84k|    else {
 1146|  6.84k|      fp = curlx_fopen(file, "rb");
  ------------------
  |  |   74|  6.84k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
 1147|  6.84k|      if(!fp)
  ------------------
  |  Branch (1147:10): [True: 0, False: 6.84k]
  ------------------
 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|  6.84k|      else {
 1150|  6.84k|        curlx_struct_stat stat;
  ------------------
  |  |   63|  6.84k|#define curlx_struct_stat       struct stat
  ------------------
 1151|  6.84k|        if((curlx_fstat(fileno(fp), &stat) != -1) && S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|  6.84k|#define curlx_fstat             fstat
  ------------------
  |  Branch (1151:12): [True: 6.84k, False: 0]
  |  Branch (1151:54): [True: 0, False: 6.84k]
  ------------------
 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|  6.84k|        else
 1158|  6.84k|          handle = fp;
 1159|  6.84k|      }
 1160|  6.84k|    }
 1161|  6.84k|  }
 1162|       |
 1163|  6.84k|  if(fp) {
  ------------------
  |  Branch (1163:6): [True: 6.84k, False: 0]
  ------------------
 1164|  6.84k|    struct dynbuf buf;
 1165|  6.84k|    bool eof = FALSE;
  ------------------
  |  | 1054|  6.84k|#define FALSE false
  ------------------
 1166|  6.84k|    curlx_dyn_init(&buf, MAX_COOKIE_LINE);
  ------------------
  |  |   81|  6.84k|#define MAX_COOKIE_LINE 5000
  ------------------
 1167|  6.84k|    do {
 1168|  6.84k|      result = Curl_get_line(&buf, fp, &eof);
 1169|  6.84k|      if(!result) {
  ------------------
  |  Branch (1169:10): [True: 6.84k, False: 0]
  ------------------
 1170|  6.84k|        const char *lineptr = curlx_dyn_ptr(&buf);
 1171|  6.84k|        bool headerline = FALSE;
  ------------------
  |  | 1054|  6.84k|#define FALSE false
  ------------------
 1172|  6.84k|        if(checkprefix("Set-Cookie:", lineptr)) {
  ------------------
  |  |   33|  6.84k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  6.84k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 6.84k]
  |  |  ------------------
  ------------------
 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|  6.84k|        result = Curl_cookie_add(data, ci, headerline, TRUE, lineptr, NULL,
  ------------------
  |  | 1051|  6.84k|#define TRUE true
  ------------------
 1180|  6.84k|                                 NULL, TRUE);
  ------------------
  |  | 1051|  6.84k|#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|  6.84k|      }
 1184|  6.84k|    } while(!result && !eof);
  ------------------
  |  Branch (1184:13): [True: 6.84k, False: 0]
  |  Branch (1184:24): [True: 0, False: 6.84k]
  ------------------
 1185|  6.84k|    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|  6.84k|    remove_expired(ci);
 1192|       |
 1193|  6.84k|    if(handle)
  ------------------
  |  Branch (1193:8): [True: 6.84k, False: 0]
  ------------------
 1194|  6.84k|      curlx_fclose(handle);
  ------------------
  |  |   79|  6.84k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1195|  6.84k|  }
 1196|  6.84k|  data->state.cookie_engine = TRUE;
  ------------------
  |  | 1051|  6.84k|#define TRUE true
  ------------------
 1197|  6.84k|  ci->running = TRUE; /* now, we are running */
  ------------------
  |  | 1051|  6.84k|#define TRUE true
  ------------------
 1198|       |
 1199|  6.84k|  return result;
 1200|  6.84k|}
cookie.c:get_netscape_format:
 1474|    112|{
 1475|    112|  return curl_maprintf(
 1476|    112|    "%s"               /* httponly preamble */
 1477|    112|    "%s%s\t"           /* domain */
 1478|    112|    "%s\t"             /* tailmatch */
 1479|    112|    "%s\t"             /* path */
 1480|    112|    "%s\t"             /* secure */
 1481|    112|    "%" FMT_OFF_T "\t" /* expires */
 1482|    112|    "%s\t"             /* name */
 1483|    112|    "%s",              /* value */
 1484|    112|    co->httponly ? "#HttpOnly_" : "",
  ------------------
  |  Branch (1484:5): [True: 0, False: 112]
  ------------------
 1485|       |    /*
 1486|       |     * Make sure all domains are prefixed with a dot if they allow
 1487|       |     * tailmatching. This is Mozilla-style.
 1488|       |     */
 1489|    112|    (co->tailmatch && co->domain && co->domain[0] != '.') ? "." : "",
  ------------------
  |  Branch (1489:6): [True: 109, False: 3]
  |  Branch (1489:23): [True: 109, False: 0]
  |  Branch (1489:37): [True: 109, False: 0]
  ------------------
 1490|    112|    co->domain ? co->domain : "unknown",
  ------------------
  |  Branch (1490:5): [True: 112, False: 0]
  ------------------
 1491|    112|    co->tailmatch ? "TRUE" : "FALSE",
  ------------------
  |  Branch (1491:5): [True: 109, False: 3]
  ------------------
 1492|    112|    co->path ? co->path : "/",
  ------------------
  |  Branch (1492:5): [True: 112, False: 0]
  ------------------
 1493|    112|    co->secure ? "TRUE" : "FALSE",
  ------------------
  |  Branch (1493:5): [True: 112, False: 0]
  ------------------
 1494|    112|    co->expires,
 1495|    112|    co->name,
 1496|    112|    co->value ? co->value : "");
  ------------------
  |  Branch (1496:5): [True: 112, False: 0]
  ------------------
 1497|    112|}
cookie.c:cookie_output:
 1510|  6.84k|{
 1511|  6.84k|  FILE *out = NULL;
 1512|  6.84k|  bool use_stdout = FALSE;
  ------------------
  |  | 1054|  6.84k|#define FALSE false
  ------------------
 1513|  6.84k|  char *tempstore = NULL;
 1514|  6.84k|  CURLcode result = CURLE_OK;
 1515|       |
 1516|  6.84k|  if(!ci)
  ------------------
  |  Branch (1516:6): [True: 0, False: 6.84k]
  ------------------
 1517|       |    /* no cookie engine alive */
 1518|      0|    return CURLE_OK;
 1519|       |
 1520|       |  /* at first, remove expired cookies */
 1521|  6.84k|  remove_expired(ci);
 1522|       |
 1523|  6.84k|  if(!strcmp("-", filename)) {
  ------------------
  |  Branch (1523:6): [True: 0, False: 6.84k]
  ------------------
 1524|       |    /* use stdout */
 1525|      0|    out = stdout;
 1526|      0|    use_stdout = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 1527|      0|  }
 1528|  6.84k|  else {
 1529|  6.84k|    result = Curl_fopen(data, filename, &out, &tempstore);
 1530|  6.84k|    if(result)
  ------------------
  |  Branch (1530:8): [True: 0, False: 6.84k]
  ------------------
 1531|      0|      goto error;
 1532|  6.84k|  }
 1533|       |
 1534|  6.84k|  fputs("# Netscape HTTP Cookie File\n"
 1535|  6.84k|        "# https://curl.se/docs/http-cookies.html\n"
 1536|  6.84k|        "# This file was generated by libcurl! Edit at your own risk.\n\n",
 1537|  6.84k|        out);
 1538|       |
 1539|  6.84k|  if(ci->numcookies) {
  ------------------
  |  Branch (1539:6): [True: 129, False: 6.71k]
  ------------------
 1540|    129|    unsigned int i;
 1541|    129|    size_t nvalid = 0;
 1542|    129|    struct Cookie **array;
 1543|    129|    struct Curl_llist_node *n;
 1544|       |
 1545|    129|    array = curlx_calloc(1, sizeof(struct Cookie *) * ci->numcookies);
  ------------------
  |  | 1485|    129|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1546|    129|    if(!array) {
  ------------------
  |  Branch (1546:8): [True: 0, False: 129]
  ------------------
 1547|      0|      result = CURLE_OUT_OF_MEMORY;
 1548|      0|      goto error;
 1549|      0|    }
 1550|       |
 1551|       |    /* only sort the cookies with a domain property */
 1552|  8.25k|    for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|  8.25k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1552:16): [True: 8.12k, False: 129]
  ------------------
 1553|  8.25k|      for(n = Curl_llist_head(&ci->cookielist[i]); n; n = Curl_node_next(n)) {
  ------------------
  |  Branch (1553:52): [True: 129, False: 8.12k]
  ------------------
 1554|    129|        struct Cookie *co = Curl_node_elem(n);
 1555|    129|        if(!co->domain)
  ------------------
  |  Branch (1555:12): [True: 17, False: 112]
  ------------------
 1556|     17|          continue;
 1557|    112|        array[nvalid++] = co;
 1558|    112|      }
 1559|  8.12k|    }
 1560|       |
 1561|    129|    qsort(array, nvalid, sizeof(struct Cookie *), cookie_sort_ct);
 1562|       |
 1563|    241|    for(i = 0; i < nvalid; i++) {
  ------------------
  |  Branch (1563:16): [True: 112, False: 129]
  ------------------
 1564|    112|      char *format_ptr = get_netscape_format(array[i]);
 1565|    112|      if(!format_ptr) {
  ------------------
  |  Branch (1565:10): [True: 0, False: 112]
  ------------------
 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|    112|      curl_mfprintf(out, "%s\n", format_ptr);
 1571|    112|      curlx_free(format_ptr);
  ------------------
  |  | 1488|    112|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1572|    112|    }
 1573|       |
 1574|    129|    curlx_free(array);
  ------------------
  |  | 1488|    129|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1575|    129|  }
 1576|       |
 1577|  6.84k|  if(!use_stdout) {
  ------------------
  |  Branch (1577:6): [True: 6.84k, False: 0]
  ------------------
 1578|  6.84k|    curlx_fclose(out);
  ------------------
  |  |   79|  6.84k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1579|  6.84k|    out = NULL;
 1580|  6.84k|    if(tempstore && curlx_rename(tempstore, filename)) {
  ------------------
  |  |   70|      0|#define curlx_rename            rename
  ------------------
  |  Branch (1580:8): [True: 0, False: 6.84k]
  |  Branch (1580:21): [True: 0, False: 0]
  ------------------
 1581|      0|      result = CURLE_WRITE_ERROR;
 1582|      0|      goto error;
 1583|      0|    }
 1584|  6.84k|  }
 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|  6.84k|  curlx_free(tempstore);
  ------------------
  |  | 1488|  6.84k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1592|  6.84k|  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|  6.84k|}

Curl_creds_create:
   41|  8.15k|{
   42|  8.15k|  struct Curl_creds *creds = NULL;
   43|  8.15k|  size_t ulen = user ? strlen(user) : 0;
  ------------------
  |  Branch (43:17): [True: 1.82k, False: 6.33k]
  ------------------
   44|  8.15k|  size_t plen = passwd ? strlen(passwd) : 0;
  ------------------
  |  Branch (44:17): [True: 687, False: 7.46k]
  ------------------
   45|  8.15k|  size_t olen = oauth_bearer ? strlen(oauth_bearer) : 0;
  ------------------
  |  Branch (45:17): [True: 119, False: 8.03k]
  ------------------
   46|  8.15k|  size_t salen = sasl_authzid ? strlen(sasl_authzid) : 0;
  ------------------
  |  Branch (46:18): [True: 122, False: 8.03k]
  ------------------
   47|  8.15k|  size_t sslen = sasl_service ? strlen(sasl_service) : 0;
  ------------------
  |  Branch (47:18): [True: 124, False: 8.03k]
  ------------------
   48|  8.15k|  char *s, *buf;
   49|  8.15k|  CURLcode result = CURLE_OK;
   50|       |
   51|  8.15k|  Curl_creds_unlink(pcreds);
   52|       |
   53|       |  /* Everything empty/NULL, this is the NULL credential */
   54|  8.15k|  if(!user && !passwd && !olen && !salen && !sslen)
  ------------------
  |  Branch (54:6): [True: 6.33k, False: 1.82k]
  |  Branch (54:15): [True: 6.25k, False: 83]
  |  Branch (54:26): [True: 6.24k, False: 10]
  |  Branch (54:35): [True: 6.22k, False: 12]
  |  Branch (54:45): [True: 6.22k, False: 4]
  ------------------
   55|  6.22k|    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.55k, False: 377]
  ------------------
   80|  1.55k|    memcpy(s, user, ulen + 1);
   81|  1.93k|  creds->passwd = s = buf + ulen + 1;
   82|  1.93k|  if(plen)
  ------------------
  |  Branch (82:6): [True: 561, False: 1.36k]
  ------------------
   83|    561|    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: 21, False: 1.90k]
  ------------------
   86|     21|    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: 25, False: 1.90k]
  ------------------
   89|     25|    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: 22, False: 1.90k]
  ------------------
   92|     22|    memcpy(s, sasl_service, sslen + 1);
   93|       |
   94|  8.15k|out:
   95|  8.15k|  if(!result)
  ------------------
  |  Branch (95:6): [True: 8.15k, False: 0]
  ------------------
   96|  8.15k|    *pcreds = creds;
   97|      0|  else
   98|      0|    Curl_creds_unlink(&creds);
   99|  8.15k|  return result;
  100|  1.93k|}
Curl_creds_merge:
  107|  6.54k|{
  108|  6.54k|  struct Curl_creds *creds_out = NULL;
  109|  6.54k|  CURLcode result;
  110|       |
  111|  6.54k|  if(!creds_in) {
  ------------------
  |  Branch (111:6): [True: 6.43k, False: 106]
  ------------------
  112|  6.43k|    result = Curl_creds_create(user, passwd, NULL, NULL, NULL,
  113|  6.43k|                               source, &creds_out);
  114|  6.43k|  }
  115|    106|  else {
  116|    106|    result = Curl_creds_create(user ? user : Curl_creds_user(creds_in),
  ------------------
  |  |   80|    103|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (80:43): [True: 103, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (116:32): [True: 3, False: 103]
  ------------------
  117|    106|                               passwd ? passwd : Curl_creds_passwd(creds_in),
  ------------------
  |  |   81|    103|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 103, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (117:32): [True: 3, False: 103]
  ------------------
  118|    106|                               Curl_creds_oauth_bearer(creds_in),
  ------------------
  |  |   82|    106|#define Curl_creds_oauth_bearer(c)       ((c) ? (c)->oauth_bearer : "")
  |  |  ------------------
  |  |  |  Branch (82:43): [True: 106, False: 0]
  |  |  ------------------
  ------------------
  119|    106|                               Curl_creds_sasl_authzid(creds_in),
  ------------------
  |  |   83|    106|#define Curl_creds_sasl_authzid(c)       ((c) ? (c)->sasl_authzid : "")
  |  |  ------------------
  |  |  |  Branch (83:43): [True: 106, False: 0]
  |  |  ------------------
  ------------------
  120|    106|                               Curl_creds_sasl_service(creds_in),
  ------------------
  |  |   84|    106|#define Curl_creds_sasl_service(c)       ((c) ? (c)->sasl_service : "")
  |  |  ------------------
  |  |  |  Branch (84:43): [True: 106, False: 0]
  |  |  ------------------
  ------------------
  121|    106|                               source, &creds_out);
  122|    106|  }
  123|  6.54k|  Curl_creds_link(pcreds_out, creds_out);
  124|  6.54k|  Curl_creds_unlink(&creds_out);
  125|  6.54k|  return result;
  126|  6.54k|}
Curl_creds_link:
  129|  7.07k|{
  130|  7.07k|  if(*pdest != src) {
  ------------------
  |  Branch (130:6): [True: 752, False: 6.32k]
  ------------------
  131|    752|    Curl_creds_unlink(pdest);
  132|    752|    *pdest = src;
  133|    752|    if(src) {
  ------------------
  |  Branch (133:8): [True: 752, False: 0]
  ------------------
  134|    752|      DEBUGASSERT(src->refcount < UINT32_MAX);
  ------------------
  |  | 1077|    752|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (134:7): [True: 0, False: 752]
  |  Branch (134:7): [True: 752, False: 0]
  ------------------
  135|    752|      src->refcount++;
  136|    752|    }
  137|    752|  }
  138|  7.07k|}
Curl_creds_unlink:
  141|   126k|{
  142|   126k|  if(*pcreds) {
  ------------------
  |  Branch (142:6): [True: 2.68k, False: 123k]
  ------------------
  143|  2.68k|    struct Curl_creds *creds = *pcreds;
  144|       |
  145|  2.68k|    DEBUGASSERT(creds->refcount);
  ------------------
  |  | 1077|  2.68k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (145:5): [True: 0, False: 2.68k]
  |  Branch (145:5): [True: 2.68k, False: 0]
  ------------------
  146|  2.68k|    *pcreds = NULL;
  147|  2.68k|    if(creds->refcount)
  ------------------
  |  Branch (147:8): [True: 2.68k, False: 0]
  ------------------
  148|  2.68k|      creds->refcount--;
  149|  2.68k|    if(!creds->refcount) {
  ------------------
  |  Branch (149:8): [True: 1.93k, False: 752]
  ------------------
  150|  1.93k|      curlx_free(creds);
  ------------------
  |  | 1488|  1.93k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  151|  1.93k|    }
  152|  2.68k|  }
  153|   126k|}
Curl_creds_same:
  156|  6.61k|{
  157|  6.61k|  return (c1 == c2) ||
  ------------------
  |  Branch (157:10): [True: 6.21k, False: 393]
  ------------------
  158|    393|         (c1 && c2 &&
  ------------------
  |  Branch (158:11): [True: 4, False: 389]
  |  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|  6.61k|}
Curl_creds_equal:
  167|  6.61k|{
  168|  6.61k|  return Curl_creds_same(c1, c2) &&
  ------------------
  |  Branch (168:10): [True: 6.22k, False: 389]
  ------------------
  169|  6.22k|         ((c1 == c2) || (c1 && c2 && (c1->source == c2->source)));
  ------------------
  |  Branch (169:11): [True: 6.21k, False: 4]
  |  Branch (169:26): [True: 4, False: 0]
  |  Branch (169:32): [True: 4, False: 0]
  |  Branch (169:38): [True: 4, False: 0]
  ------------------
  170|  6.61k|}
Curl_creds_trace:
  175|  6.60k|{
  176|  6.60k|  if(creds) {
  ------------------
  |  Branch (176:6): [True: 4, False: 6.60k]
  ------------------
  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|  6.60k|  else
  187|  6.60k|    CURL_TRC_M(data, "%s: -", msg);
  ------------------
  |  |  148|  6.60k|  do {                                   \
  |  |  149|  6.60k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  6.60k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  6.60k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  13.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 6.60k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6.60k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  13.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|  6.60k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  6.60k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  6.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 6.60k]
  |  |  ------------------
  ------------------
  188|  6.60k|}

Curl_cshutdn_terminate:
  124|  5.65k|{
  125|  5.65k|  struct Curl_easy *admin = data;
  126|  5.65k|  bool done;
  127|       |
  128|       |  /* there must be a connection to close */
  129|  5.65k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (129:3): [True: 0, False: 5.65k]
  |  Branch (129:3): [True: 5.65k, False: 0]
  ------------------
  130|       |  /* it must be removed from the connection pool */
  131|  5.65k|  DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (131:3): [True: 0, False: 5.65k]
  |  Branch (131:3): [True: 5.65k, False: 0]
  ------------------
  132|       |  /* the transfer must be detached from the connection */
  133|  5.65k|  DEBUGASSERT(data && !data->conn);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (133:3): [True: 0, False: 5.65k]
  |  Branch (133:3): [True: 0, False: 0]
  |  Branch (133:3): [True: 5.65k, False: 0]
  |  Branch (133:3): [True: 5.65k, 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|  5.65k|  if(data->multi && data->multi->admin)
  ------------------
  |  Branch (139:6): [True: 5.65k, False: 0]
  |  Branch (139:21): [True: 5.65k, False: 0]
  ------------------
  140|  5.65k|    admin = data->multi->admin;
  141|       |
  142|  5.65k|  Curl_attach_connection(admin, conn);
  143|       |
  144|  5.65k|  cshutdn_run_conn_handler(admin, conn);
  145|  5.65k|  if(do_shutdown) {
  ------------------
  |  Branch (145:6): [True: 0, False: 5.65k]
  ------------------
  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|  5.65k|  CURL_TRC_M(admin, "[SHUTDOWN] %sclosing connection #%" FMT_OFF_T,
  ------------------
  |  |  148|  5.65k|  do {                                   \
  |  |  149|  5.65k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.65k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.65k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  11.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.65k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.65k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  11.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  5.65k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.65k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
  151|  5.65k|             conn->bits.shutdown_filters ? "" : "force ",
  152|  5.65k|             conn->connection_id);
  153|  5.65k|  Curl_conn_cf_discard_all(admin, conn, SECONDARYSOCKET);
  ------------------
  |  |  246|  5.65k|#define SECONDARYSOCKET 1
  ------------------
  154|  5.65k|  Curl_conn_cf_discard_all(admin, conn, FIRSTSOCKET);
  ------------------
  |  |  245|  5.65k|#define FIRSTSOCKET     0
  ------------------
  155|  5.65k|  Curl_detach_connection(admin);
  156|       |
  157|  5.65k|  if(data->multi)
  ------------------
  |  Branch (157:6): [True: 5.65k, False: 0]
  ------------------
  158|  5.65k|    Curl_multi_ev_conn_done(data->multi, data, conn);
  159|  5.65k|  Curl_conn_free(admin, conn);
  160|       |
  161|  5.65k|  if(data->multi) {
  ------------------
  |  Branch (161:6): [True: 5.65k, False: 0]
  ------------------
  162|  5.65k|    CURL_TRC_M(data, "[SHUTDOWN] trigger multi connchanged");
  ------------------
  |  |  148|  5.65k|  do {                                   \
  |  |  149|  5.65k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.65k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.65k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  11.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.65k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.65k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  11.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  5.65k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.65k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
  163|  5.65k|    Curl_multi_connchanged(data->multi);
  164|  5.65k|  }
  165|  5.65k|}
Curl_cshutdn_init:
  321|  10.8k|{
  322|  10.8k|  DEBUGASSERT(multi);
  ------------------
  |  | 1077|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (322:3): [True: 0, False: 10.8k]
  |  Branch (322:3): [True: 10.8k, False: 0]
  ------------------
  323|  10.8k|  cshutdn->multi = multi;
  324|  10.8k|  Curl_llist_init(&cshutdn->list, NULL);
  325|       |  cshutdn->initialized = TRUE;
  ------------------
  |  | 1051|  10.8k|#define TRUE true
  ------------------
  326|  10.8k|  return 0; /* good */
  327|  10.8k|}
Curl_cshutdn_destroy:
  331|  10.8k|{
  332|  10.8k|  if(cshutdn->initialized && data) {
  ------------------
  |  Branch (332:6): [True: 10.8k, False: 0]
  |  Branch (332:30): [True: 10.8k, False: 0]
  ------------------
  333|  10.8k|    int timeout_ms = 0;
  334|       |    /* for testing, run graceful shutdown */
  335|  10.8k|#ifdef DEBUGBUILD
  336|  10.8k|    {
  337|  10.8k|      const char *p = getenv("CURL_GRACEFUL_SHUTDOWN");
  338|  10.8k|      if(p) {
  ------------------
  |  Branch (338:10): [True: 0, False: 10.8k]
  ------------------
  339|      0|        curl_off_t l;
  340|      0|        if(!curlx_str_number(&p, &l, INT_MAX))
  ------------------
  |  Branch (340:12): [True: 0, False: 0]
  ------------------
  341|      0|          timeout_ms = (int)l;
  342|      0|      }
  343|  10.8k|    }
  344|  10.8k|#endif
  345|       |
  346|  10.8k|    CURL_TRC_M(data, "[SHUTDOWN] destroy, %zu connections, timeout=%dms",
  ------------------
  |  |  148|  10.8k|  do {                                   \
  |  |  149|  10.8k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  10.8k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.8k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  21.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.8k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  21.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|  10.8k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  10.8k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  10.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
  347|  10.8k|               Curl_llist_count(&cshutdn->list), timeout_ms);
  348|  10.8k|    cshutdn_terminate_all(cshutdn, data, timeout_ms);
  349|  10.8k|  }
  350|       |  cshutdn->multi = NULL;
  351|  10.8k|}
Curl_cshutdn_perform:
  429|  11.9k|{
  430|  11.9k|  cshutdn_perform(cshutdn, data, sigpipe_ctx);
  431|  11.9k|}
Curl_cshutdn_setfds:
  438|  1.47k|{
  439|  1.47k|  if(Curl_llist_head(&cshutdn->list)) {
  ------------------
  |  Branch (439:6): [True: 0, False: 1.47k]
  ------------------
  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|  1.47k|}
cshutdn.c:cshutdn_run_conn_handler:
   43|  5.65k|{
   44|  5.65k|  if(!conn->bits.shutdown_handler) {
  ------------------
  |  Branch (44:6): [True: 5.65k, False: 0]
  ------------------
   45|       |
   46|  5.65k|    if(conn->scheme && conn->scheme->run->disconnect) {
  ------------------
  |  Branch (46:8): [True: 5.65k, False: 0]
  |  Branch (46:24): [True: 0, False: 5.65k]
  ------------------
   47|       |      /* Some disconnect handlers do a blocking wait on server responses.
   48|       |       * FTP/IMAP/SMTP and SFTP are among them. When using the internal
   49|       |       * handle, set an overall short timeout so we do not hang for the
   50|       |       * default 120 seconds. */
   51|      0|      if(data->state.internal) {
  ------------------
  |  Branch (51:10): [True: 0, False: 0]
  ------------------
   52|      0|        data->set.timeout = DEFAULT_SHUTDOWN_TIMEOUT_MS;
  ------------------
  |  |   42|      0|#define DEFAULT_SHUTDOWN_TIMEOUT_MS   (2 * 1000)
  ------------------
   53|      0|        Curl_pgrsTime(data, TIMER_STARTOP);
   54|      0|      }
   55|       |
   56|       |      /* This is set if protocol-specific cleanups should be made */
   57|      0|      DEBUGF(infof(data, "connection #%" FMT_OFF_T
  ------------------
  |  | 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]
  |  |  ------------------
  ------------------
   58|      0|                   ", shutdown protocol handler (aborted=%d)",
   59|      0|                   conn->connection_id, conn->bits.aborted));
   60|       |      /* There are protocol handlers that block on retrieving
   61|       |       * server responses here (FTP). Set a short timeout. */
   62|      0|      conn->scheme->run->disconnect(data, conn, (bool)conn->bits.aborted);
   63|      0|    }
   64|       |
   65|       |    conn->bits.shutdown_handler = TRUE;
  ------------------
  |  | 1051|  5.65k|#define TRUE true
  ------------------
   66|  5.65k|  }
   67|  5.65k|}
cshutdn.c:cshutdn_terminate_all:
  269|  10.8k|{
  270|  10.8k|  struct curltime started = *Curl_pgrs_now(data);
  271|  10.8k|  struct Curl_llist_node *e;
  272|  10.8k|  struct Curl_sigpipe_ctx sigpipe_ctx;
  273|       |
  274|  10.8k|  DEBUGASSERT(cshutdn);
  ------------------
  |  | 1077|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (274:3): [True: 0, False: 10.8k]
  |  Branch (274:3): [True: 10.8k, False: 0]
  ------------------
  275|  10.8k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (275:3): [True: 0, False: 10.8k]
  |  Branch (275:3): [True: 10.8k, False: 0]
  ------------------
  276|       |
  277|  10.8k|  CURL_TRC_M(data, "[SHUTDOWN] shutdown all");
  ------------------
  |  |  148|  10.8k|  do {                                   \
  |  |  149|  10.8k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  10.8k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.8k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  21.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.8k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  21.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|  10.8k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  10.8k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  10.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
  278|  10.8k|  sigpipe_init(&sigpipe_ctx);
  279|       |
  280|  10.8k|  while(Curl_llist_head(&cshutdn->list)) {
  ------------------
  |  Branch (280:9): [True: 0, False: 10.8k]
  ------------------
  281|      0|    timediff_t spent_ms;
  282|      0|    int remain_ms;
  283|       |
  284|      0|    cshutdn_perform(cshutdn, data, &sigpipe_ctx);
  285|       |
  286|      0|    if(!Curl_llist_head(&cshutdn->list)) {
  ------------------
  |  Branch (286:8): [True: 0, False: 0]
  ------------------
  287|      0|      CURL_TRC_M(data, "[SHUTDOWN] shutdown finished cleanly");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  288|      0|      break;
  289|      0|    }
  290|       |
  291|       |    /* wait for activity, timeout or "nothing" */
  292|      0|    spent_ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &started);
  293|      0|    if(spent_ms >= (timediff_t)timeout_ms) {
  ------------------
  |  Branch (293:8): [True: 0, False: 0]
  ------------------
  294|      0|      CURL_TRC_M(data, "[SHUTDOWN] shutdown finished, %s",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  295|      0|                 (timeout_ms > 0) ? "timeout" : "best effort done");
  296|      0|      break;
  297|      0|    }
  298|       |
  299|      0|    remain_ms = timeout_ms - (int)spent_ms;
  300|      0|    if(cshutdn_wait(cshutdn, data, remain_ms)) {
  ------------------
  |  Branch (300:8): [True: 0, False: 0]
  ------------------
  301|      0|      CURL_TRC_M(data, "[SHUTDOWN] shutdown finished, aborted");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  302|      0|      break;
  303|      0|    }
  304|      0|  }
  305|       |
  306|       |  /* Terminate any remaining. */
  307|  10.8k|  e = Curl_llist_head(&cshutdn->list);
  308|  10.8k|  while(e) {
  ------------------
  |  Branch (308:9): [True: 0, False: 10.8k]
  ------------------
  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|  10.8k|  DEBUGASSERT(!Curl_llist_count(&cshutdn->list));
  ------------------
  |  | 1077|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (314:3): [True: 0, False: 10.8k]
  |  Branch (314:3): [True: 10.8k, False: 0]
  ------------------
  315|       |
  316|  10.8k|  sigpipe_restore(&sigpipe_ctx);
  317|  10.8k|}
cshutdn.c:cshutdn_perform:
  231|  11.9k|{
  232|  11.9k|  struct Curl_llist_node *e = Curl_llist_head(&cshutdn->list);
  233|  11.9k|  struct Curl_llist_node *enext;
  234|  11.9k|  struct connectdata *conn;
  235|  11.9k|  timediff_t next_expire_ms = 0, ms;
  236|  11.9k|  bool done;
  237|       |
  238|  11.9k|  if(!e)
  ------------------
  |  Branch (238:6): [True: 11.9k, False: 0]
  ------------------
  239|  11.9k|    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|  5.28k|{
   73|  5.28k|  struct Curl_addrinfo *vqualifier canext;
   74|  5.28k|  struct Curl_addrinfo *ca;
   75|       |
   76|  10.5k|  for(ca = cahead; ca; ca = canext) {
  ------------------
  |  Branch (76:20): [True: 5.22k, False: 5.28k]
  ------------------
   77|  5.22k|    canext = ca->ai_next;
   78|  5.22k|    curlx_free(ca);
  ------------------
  |  | 1488|  5.22k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   79|  5.22k|  }
   80|  5.28k|}
Curl_getaddrinfo_ex:
  100|    650|{
  101|    650|  const struct addrinfo *ai;
  102|    650|  struct addrinfo *aihead;
  103|    650|  struct Curl_addrinfo *cafirst = NULL;
  104|    650|  struct Curl_addrinfo *calast = NULL;
  105|    650|  struct Curl_addrinfo *ca;
  106|    650|  size_t ss_size;
  107|    650|  int error;
  108|       |
  109|    650|  *result = NULL; /* assume failure */
  110|       |
  111|    650|  error = CURL_GETADDRINFO(nodename, servname, hints, &aihead);
  ------------------
  |  | 1437|    650|  curl_dbg_getaddrinfo(host, serv, hint, res, __LINE__, __FILE__)
  ------------------
  112|    650|  if(error)
  ------------------
  |  Branch (112:6): [True: 641, False: 9]
  ------------------
  113|    641|    return error;
  114|       |
  115|       |  /* traverse the addrinfo list */
  116|       |
  117|     19|  for(ai = aihead; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (117:20): [True: 10, False: 9]
  ------------------
  118|     10|    size_t namelen = ai->ai_canonname ? strlen(ai->ai_canonname) + 1 : 0;
  ------------------
  |  Branch (118:22): [True: 0, False: 10]
  ------------------
  119|       |    /* ignore elements with unsupported address family,
  120|       |       settle family-specific sockaddr structure size. */
  121|     10|    if(ai->ai_family == AF_INET)
  ------------------
  |  Branch (121:8): [True: 8, False: 2]
  ------------------
  122|      8|      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|     10|    if(!ai->ai_addr || !(ai->ai_addrlen > 0))
  ------------------
  |  Branch (131:8): [True: 0, False: 10]
  |  Branch (131:24): [True: 0, False: 10]
  ------------------
  132|      0|      continue;
  133|       |
  134|       |    /* ignore elements with bogus address size */
  135|     10|    if((size_t)ai->ai_addrlen < ss_size)
  ------------------
  |  Branch (135:8): [True: 0, False: 10]
  ------------------
  136|      0|      continue;
  137|       |
  138|     10|    ca = curlx_malloc(sizeof(struct Curl_addrinfo) + ss_size + namelen);
  ------------------
  |  | 1483|     10|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  139|     10|    if(!ca) {
  ------------------
  |  Branch (139:8): [True: 0, False: 10]
  ------------------
  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|     10|    ca->ai_flags     = ai->ai_flags;
  148|     10|    ca->ai_family    = ai->ai_family;
  149|     10|    ca->ai_socktype  = ai->ai_socktype;
  150|     10|    ca->ai_protocol  = ai->ai_protocol;
  151|     10|    ca->ai_addrlen   = (curl_socklen_t)ss_size;
  152|     10|    ca->ai_addr      = NULL;
  153|     10|    ca->ai_canonname = NULL;
  154|     10|    ca->ai_next      = NULL;
  155|       |
  156|     10|    ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  157|     10|    memcpy(ca->ai_addr, ai->ai_addr, ss_size);
  158|       |
  159|     10|    if(namelen) {
  ------------------
  |  Branch (159:8): [True: 0, False: 10]
  ------------------
  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|     10|    if(!cafirst)
  ------------------
  |  Branch (165:8): [True: 9, False: 1]
  ------------------
  166|      9|      cafirst = ca;
  167|       |
  168|       |    /* add this element last in the return list */
  169|     10|    if(calast)
  ------------------
  |  Branch (169:8): [True: 1, False: 9]
  ------------------
  170|      1|      calast->ai_next = ca;
  171|     10|    calast = ca;
  172|     10|  }
  173|       |
  174|       |  /* destroy the addrinfo list */
  175|      9|  if(aihead)
  ------------------
  |  Branch (175:6): [True: 9, False: 0]
  ------------------
  176|      9|    CURL_FREEADDRINFO(aihead);
  ------------------
  |  | 1439|      9|  curl_dbg_freeaddrinfo(data, __LINE__, __FILE__)
  ------------------
  177|       |
  178|       |  /* if we failed, also destroy the Curl_addrinfo list */
  179|      9|  if(error) {
  ------------------
  |  Branch (179:6): [True: 0, False: 9]
  ------------------
  180|      0|    Curl_freeaddrinfo(cafirst);
  181|      0|    cafirst = NULL;
  182|      0|  }
  183|      9|  else if(!cafirst) {
  ------------------
  |  Branch (183:11): [True: 0, False: 9]
  ------------------
  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|      9|  *result = cafirst;
  197|       |
  198|       |  /* This is not a CURLcode */
  199|      9|  return error;
  200|    650|}
Curl_str2addr:
  410|  5.02k|{
  411|  5.02k|  struct in_addr in;
  412|  5.02k|  if(curlx_inet_pton(AF_INET, dotted, &in) > 0)
  ------------------
  |  Branch (412:6): [True: 4.97k, False: 51]
  ------------------
  413|       |    /* This is a dotted IP address 123.123.123.123-style */
  414|  4.97k|    return ip2addr(addrp, AF_INET, &in, dotted, port);
  415|     51|#ifdef USE_IPV6
  416|     51|  {
  417|     51|    struct in6_addr in6;
  418|     51|    if(curlx_inet_pton(AF_INET6, dotted, &in6) > 0)
  ------------------
  |  Branch (418:8): [True: 51, False: 0]
  ------------------
  419|       |      /* This is a dotted IPv6 address ::1-style */
  420|     51|      return ip2addr(addrp, AF_INET6, &in6, dotted, port);
  421|     51|  }
  422|      0|#endif
  423|      0|  return CURLE_BAD_FUNCTION_ARGUMENT; /* bad input format */
  424|     51|}
Curl_is_ipv4addr:
  427|  13.2k|{
  428|  13.2k|  struct in_addr in;
  429|       |  return (curlx_inet_pton(AF_INET, address, &in) > 0);
  430|  13.2k|}
Curl_is_ipaddr:
  433|  7.48k|{
  434|  7.48k|  if(Curl_is_ipv4addr(address))
  ------------------
  |  Branch (434:6): [True: 4.97k, False: 2.51k]
  ------------------
  435|  4.97k|    return TRUE;
  ------------------
  |  | 1051|  4.97k|#define TRUE true
  ------------------
  436|  2.51k|#ifdef USE_IPV6
  437|  2.51k|  {
  438|  2.51k|    struct in6_addr in6;
  439|  2.51k|    if(curlx_inet_pton(AF_INET6, address, &in6) > 0)
  ------------------
  |  Branch (439:8): [True: 51, False: 2.46k]
  ------------------
  440|       |      /* This is a dotted IPv6 address ::1-style */
  441|     51|      return TRUE;
  ------------------
  |  | 1051|     51|#define TRUE true
  ------------------
  442|  2.51k|  }
  443|  2.46k|#endif
  444|  2.46k|  return FALSE;
  ------------------
  |  | 1054|  2.46k|#define FALSE false
  ------------------
  445|  2.51k|}
Curl_looks_like_ipv6:
  449|    178|{
  450|    178|  const char *zonep = NULL;
  451|    178|  size_t i = 0, hlen = 0, zlen = 0;
  452|       |
  453|    178|  if(host)
  ------------------
  |  Branch (453:6): [True: 178, False: 0]
  ------------------
  454|    178|    memset(host, 0, sizeof(*host));
  455|    178|  if(zone)
  ------------------
  |  Branch (455:6): [True: 178, False: 0]
  ------------------
  456|    178|    memset(zone, 0, sizeof(*zone));
  457|       |
  458|  1.22k|  for(i = 0; i < len; ++i, ++hlen) {
  ------------------
  |  Branch (458:14): [True: 1.04k, False: 178]
  ------------------
  459|  1.04k|    if(!s[i] || !(ISXDIGIT(s[i]) || (s[i] == ':') || (s[i] == '.')))
  ------------------
  |  |   39|  2.08k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  2.08k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 1.04k, False: 3]
  |  |  |  |  |  Branch (44:38): [True: 246, False: 795]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  1.84k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 290, False: 508]
  |  |  |  |  |  Branch (27:43): [True: 290, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|    508|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 31, False: 477]
  |  |  |  |  |  Branch (28:43): [True: 31, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (459:8): [True: 0, False: 1.04k]
  |  Branch (459:37): [True: 474, False: 3]
  |  Branch (459:54): [True: 3, False: 0]
  ------------------
  460|      0|      break;
  461|  1.04k|  }
  462|       |
  463|    178|  if((i < len) && (s[i] == '%')) { /* address followed by a zone? */
  ------------------
  |  Branch (463:6): [True: 0, False: 178]
  |  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|    178|  if(i != len)
  ------------------
  |  Branch (476:6): [True: 0, False: 178]
  ------------------
  477|      0|    return FALSE; /* invalid chars in zone */
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  478|    178|  if(host && hlen) {
  ------------------
  |  Branch (478:6): [True: 178, False: 0]
  |  Branch (478:14): [True: 178, False: 0]
  ------------------
  479|    178|    host->str = s;
  480|    178|    host->len = hlen;
  481|    178|  }
  482|    178|  if(zone && zlen) {
  ------------------
  |  Branch (482:6): [True: 178, False: 0]
  |  Branch (482:14): [True: 0, False: 178]
  ------------------
  483|      0|    zone->str = zonep;
  484|      0|    zone->len = zlen;
  485|      0|  }
  486|       |  return TRUE;
  ------------------
  |  | 1051|    178|#define TRUE true
  ------------------
  487|    178|}
Curl_unix2addr:
  497|     23|{
  498|     23|  struct Curl_addrinfo *ai;
  499|     23|  struct sockaddr_un *sa_un;
  500|     23|  size_t path_len;
  501|       |
  502|     23|  *paddr = NULL;
  503|       |
  504|       |  /* sun_path must be able to store the null-terminated path */
  505|     23|  path_len = strlen(path) + 1;
  506|     23|  if(path_len > sizeof(sa_un->sun_path))
  ------------------
  |  Branch (506:6): [True: 4, False: 19]
  ------------------
  507|      4|    return CURLE_TOO_LARGE;
  508|       |
  509|     19|  ai = curlx_calloc(1,
  ------------------
  |  | 1485|     19|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  510|     19|                    sizeof(struct Curl_addrinfo) + sizeof(struct sockaddr_un));
  511|     19|  if(!ai)
  ------------------
  |  Branch (511:6): [True: 0, False: 19]
  ------------------
  512|      0|    return CURLE_OUT_OF_MEMORY;
  513|       |
  514|     19|  ai->ai_addr = (void *)((char *)ai + sizeof(struct Curl_addrinfo));
  515|     19|  sa_un = (void *)ai->ai_addr;
  516|     19|  sa_un->sun_family = AF_UNIX;
  517|       |
  518|     19|  ai->ai_family = AF_UNIX;
  519|     19|  ai->ai_socktype = SOCK_STREAM; /* assume reliable transport for HTTP */
  520|     19|  ai->ai_addrlen = (curl_socklen_t)
  521|     19|    ((offsetof(struct sockaddr_un, sun_path) + path_len) & 0x7FFFFFFF);
  522|       |
  523|       |  /* Abstract Unix domain socket have NULL prefix instead of suffix */
  524|     19|  if(abstract)
  ------------------
  |  Branch (524:6): [True: 7, False: 12]
  ------------------
  525|      7|    memcpy(sa_un->sun_path + 1, path, path_len - 1);
  526|     12|  else
  527|     12|    memcpy(sa_un->sun_path, path, path_len); /* copy NUL byte */
  528|       |
  529|     19|  *paddr = ai;
  530|     19|  return CURLE_OK;
  531|     19|}
curl_dbg_freeaddrinfo:
  545|      9|{
  546|      9|  curl_dbg_log("ADDR %s:%d freeaddrinfo(%p)\n",
  547|      9|               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|      9|  freeaddrinfo(freethis);
  562|      9|#endif
  563|      9|}
curl_dbg_getaddrinfo:
  579|    650|{
  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|    650|  int res = getaddrinfo(hostname, service, hints, result);
  593|    650|#endif
  594|    650|  if(res == 0)
  ------------------
  |  Branch (594:6): [True: 9, False: 641]
  ------------------
  595|       |    /* success */
  596|      9|    curl_dbg_log("ADDR %s:%d getaddrinfo() = %p\n", source, line,
  597|      9|                 (void *)*result);
  598|    641|  else
  599|    641|    curl_dbg_log("ADDR %s:%d getaddrinfo() failed\n", source, line);
  600|    650|  return res;
  601|    650|}
curl_addrinfo.c:ip2addr:
  344|  5.02k|{
  345|  5.02k|  struct Curl_addrinfo *ai;
  346|  5.02k|  size_t addrsize;
  347|  5.02k|  size_t namelen;
  348|  5.02k|  struct sockaddr_in *addr;
  349|  5.02k|#ifdef USE_IPV6
  350|  5.02k|  struct sockaddr_in6 *addr6;
  351|  5.02k|#endif
  352|       |
  353|  5.02k|  DEBUGASSERT(inaddr && hostname);
  ------------------
  |  | 1077|  5.02k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (353:3): [True: 0, False: 5.02k]
  |  Branch (353:3): [True: 0, False: 0]
  |  Branch (353:3): [True: 5.02k, False: 0]
  |  Branch (353:3): [True: 5.02k, False: 0]
  ------------------
  354|       |
  355|  5.02k|  namelen = strlen(hostname) + 1;
  356|  5.02k|  *addrp = NULL;
  357|       |
  358|  5.02k|  if(af == AF_INET)
  ------------------
  |  Branch (358:6): [True: 4.97k, False: 51]
  ------------------
  359|  4.97k|    addrsize = sizeof(struct sockaddr_in);
  360|     51|#ifdef USE_IPV6
  361|     51|  else if(af == AF_INET6)
  ------------------
  |  Branch (361:11): [True: 51, False: 0]
  ------------------
  362|     51|    addrsize = sizeof(struct sockaddr_in6);
  363|      0|#endif
  364|      0|  else
  365|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  366|       |
  367|       |  /* allocate memory to hold the struct, the address and the name */
  368|  5.02k|  ai = curlx_calloc(1, sizeof(struct Curl_addrinfo) + addrsize + namelen);
  ------------------
  |  | 1485|  5.02k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  369|  5.02k|  if(!ai)
  ------------------
  |  Branch (369:6): [True: 0, False: 5.02k]
  ------------------
  370|      0|    return CURLE_OUT_OF_MEMORY;
  371|       |  /* put the address after the struct */
  372|  5.02k|  ai->ai_addr = (void *)((char *)ai + sizeof(struct Curl_addrinfo));
  373|       |  /* then put the name after the address */
  374|  5.02k|  ai->ai_canonname = (char *)ai->ai_addr + addrsize;
  375|  5.02k|  memcpy(ai->ai_canonname, hostname, namelen);
  376|  5.02k|  ai->ai_family = af;
  377|  5.02k|  ai->ai_socktype = SOCK_STREAM;
  378|  5.02k|  ai->ai_addrlen = (curl_socklen_t)addrsize;
  379|       |  /* leave the rest of the struct filled with zero */
  380|       |
  381|  5.02k|  switch(af) {
  ------------------
  |  Branch (381:10): [True: 5.02k, False: 0]
  ------------------
  382|  4.97k|  case AF_INET:
  ------------------
  |  Branch (382:3): [True: 4.97k, False: 51]
  ------------------
  383|  4.97k|    addr = (void *)ai->ai_addr; /* storage area for this info */
  384|       |
  385|  4.97k|    memcpy(&addr->sin_addr, inaddr, sizeof(struct in_addr));
  386|  4.97k|    addr->sin_family = (CURL_SA_FAMILY_T)af;
  387|  4.97k|    addr->sin_port = htons((unsigned short)port);
  388|  4.97k|    break;
  389|       |
  390|      0|#ifdef USE_IPV6
  391|     51|  case AF_INET6:
  ------------------
  |  Branch (391:3): [True: 51, False: 4.97k]
  ------------------
  392|     51|    addr6 = (void *)ai->ai_addr; /* storage area for this info */
  393|       |
  394|     51|    memcpy(&addr6->sin6_addr, inaddr, sizeof(struct in6_addr));
  395|     51|    addr6->sin6_family = (CURL_SA_FAMILY_T)af;
  396|     51|    addr6->sin6_port = htons((unsigned short)port);
  397|     51|    break;
  398|  5.02k|#endif
  399|  5.02k|  }
  400|  5.02k|  *addrp = ai;
  401|  5.02k|  return CURLE_OK;
  402|  5.02k|}

Curl_fopen:
   87|  28.4k|{
   88|  28.4k|  CURLcode result = CURLE_WRITE_ERROR;
   89|  28.4k|  unsigned char randbuf[41];
   90|  28.4k|  char *tempstore = NULL;
   91|  28.4k|#ifndef _WIN32
   92|  28.4k|  curlx_struct_stat sb;
  ------------------
  |  |   63|  28.4k|#define curlx_struct_stat       struct stat
  ------------------
   93|  28.4k|#endif
   94|  28.4k|  int fd = -1;
   95|  28.4k|  char *dir = NULL;
   96|  28.4k|  *tempname = NULL;
   97|       |
   98|  28.4k|#ifndef _WIN32
   99|  28.4k|  *fh = curlx_fopen(filename, FOPEN_WRITETEXT);
  ------------------
  |  |   74|  28.4k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  100|  28.4k|  if(!*fh)
  ------------------
  |  Branch (100:6): [True: 0, False: 28.4k]
  ------------------
  101|      0|    goto fail;
  102|  28.4k|  if(curlx_fstat(fileno(*fh), &sb) == -1 || !S_ISREG(sb.st_mode)) {
  ------------------
  |  |   62|  28.4k|#define curlx_fstat             fstat
  ------------------
  |  Branch (102:6): [True: 0, False: 28.4k]
  |  Branch (102:45): [True: 28.4k, False: 0]
  ------------------
  103|  28.4k|    return CURLE_OK;
  104|  28.4k|  }
  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|  24.4k|{
   37|  24.4k|  CURLcode result;
   38|  24.4k|  char buffer[128];
   39|  24.4k|  curlx_dyn_reset(buf);
   40|  24.4k|  while(1) {
  ------------------
  |  Branch (40:9): [True: 24.4k, Folded]
  ------------------
   41|  24.4k|    size_t rlen;
   42|  24.4k|    const char *b = fgets(buffer, sizeof(buffer), input);
   43|  24.4k|    if(!b && ferror(input))
  ------------------
  |  Branch (43:8): [True: 24.4k, False: 0]
  |  Branch (43:14): [True: 0, False: 24.4k]
  ------------------
   44|      0|      return CURLE_READ_ERROR;
   45|       |
   46|  24.4k|    *eof = feof(input);
   47|       |
   48|  24.4k|    rlen = b ? strlen(b) : 0;
  ------------------
  |  Branch (48:12): [True: 0, False: 24.4k]
  ------------------
   49|  24.4k|    if(rlen) {
  ------------------
  |  Branch (49:8): [True: 0, False: 24.4k]
  ------------------
   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|  24.4k|    rlen = curlx_dyn_len(buf);
   57|  24.4k|    b = curlx_dyn_ptr(buf);
   58|  24.4k|    if(rlen && (b[rlen - 1] == '\n'))
  ------------------
  |  Branch (58:8): [True: 0, False: 24.4k]
  |  Branch (58:16): [True: 0, False: 0]
  ------------------
   59|       |      /* LF at end of the line */
   60|      0|      return CURLE_OK; /* all good */
   61|  24.4k|    if(*eof)
  ------------------
  |  Branch (61:8): [True: 24.4k, False: 0]
  ------------------
   62|       |      /* append a newline */
   63|  24.4k|      return curlx_dyn_addn(buf, "\n", 1);
   64|       |    /* otherwise get next line to append */
   65|  24.4k|  }
   66|       |  /* UNREACHABLE */
   67|  24.4k|}

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

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

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

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

curlx_inet_ntop:
  209|  5.51k|{
  210|  5.51k|  switch(af) {
  211|  5.09k|  case AF_INET:
  ------------------
  |  Branch (211:3): [True: 5.09k, False: 418]
  ------------------
  212|  5.09k|    return inet_ntop4((const unsigned char *)src, buf, size);
  213|    418|  case AF_INET6:
  ------------------
  |  Branch (213:3): [True: 418, False: 5.09k]
  ------------------
  214|    418|    return inet_ntop6((const unsigned char *)src, buf, size);
  215|      0|  default:
  ------------------
  |  Branch (215:3): [True: 0, False: 5.51k]
  ------------------
  216|      0|    errno = SOCKEAFNOSUPPORT;
  ------------------
  |  | 1120|      0|#define SOCKEAFNOSUPPORT  EAFNOSUPPORT
  ------------------
  217|       |    return NULL;
  218|  5.51k|  }
  219|  5.51k|}
inet_ntop.c:inet_ntop4:
   57|  5.11k|{
   58|  5.11k|  char tmp[sizeof("255.255.255.255")];
   59|  5.11k|  size_t len;
   60|       |
   61|  5.11k|  DEBUGASSERT(size >= 16);
  ------------------
  |  | 1077|  5.11k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (61:3): [True: 0, False: 5.11k]
  |  Branch (61:3): [True: 5.11k, False: 0]
  ------------------
   62|       |
   63|       |  /* this snprintf() does not overflow the buffer. */
   64|  5.11k|  SNPRINTF(tmp, sizeof(tmp), "%d.%d.%d.%d",
  ------------------
  |  |   43|  5.11k|#define SNPRINTF curl_msnprintf
  ------------------
   65|  5.11k|           ((int)((unsigned char)src[0])) & 0xff,
   66|  5.11k|           ((int)((unsigned char)src[1])) & 0xff,
   67|  5.11k|           ((int)((unsigned char)src[2])) & 0xff,
   68|  5.11k|           ((int)((unsigned char)src[3])) & 0xff);
   69|       |
   70|  5.11k|  len = strlen(tmp);
   71|  5.11k|  if(len == 0 || len >= size) {
  ------------------
  |  Branch (71:6): [True: 0, False: 5.11k]
  |  Branch (71:18): [True: 0, False: 5.11k]
  ------------------
   72|       |#ifdef USE_WINSOCK
   73|       |    errno = WSAEINVAL;
   74|       |#else
   75|      0|    errno = ENOSPC;
   76|      0|#endif
   77|      0|    return NULL;
   78|      0|  }
   79|  5.11k|  curlx_strcopy(dst, size, tmp, len);
   80|  5.11k|  return dst;
   81|  5.11k|}
inet_ntop.c:inet_ntop6:
   87|    418|{
   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|    418|  char tmp[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
   96|    418|  char *tp;
   97|    418|  struct {
   98|    418|    int base;
   99|    418|    int len;
  100|    418|  } best, cur;
  101|    418|  unsigned int words[IN6ADDRSZ / INT16SZ];
  102|    418|  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|    418|  memset(words, '\0', sizeof(words));
  109|  7.10k|  for(i = 0; i < IN6ADDRSZ; i++)
  ------------------
  |  |   35|  7.10k|#define IN6ADDRSZ       16
  ------------------
  |  Branch (109:14): [True: 6.68k, False: 418]
  ------------------
  110|  6.68k|    words[i / 2] |= ((unsigned int)src[i] << ((1 - (i % 2)) << 3));
  111|       |
  112|    418|  best.base = -1;
  113|    418|  cur.base = -1;
  114|    418|  best.len = 0;
  115|    418|  cur.len = 0;
  116|       |
  117|  3.76k|  for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
  ------------------
  |  |   35|  3.76k|#define IN6ADDRSZ       16
  ------------------
                for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
  ------------------
  |  |   37|  3.76k|#define INT16SZ          2
  ------------------
  |  Branch (117:14): [True: 3.34k, False: 418]
  ------------------
  118|  3.34k|    if(words[i] == 0) {
  ------------------
  |  Branch (118:8): [True: 2.85k, False: 485]
  ------------------
  119|  2.85k|      if(cur.base == -1) {
  ------------------
  |  Branch (119:10): [True: 462, False: 2.39k]
  ------------------
  120|    462|        cur.base = i;
  121|    462|        cur.len = 1;
  122|    462|      }
  123|  2.39k|      else
  124|  2.39k|        cur.len++;
  125|  2.85k|    }
  126|    485|    else if(cur.base != -1) {
  ------------------
  |  Branch (126:13): [True: 270, False: 215]
  ------------------
  127|    270|      if(best.base == -1 || cur.len > best.len)
  ------------------
  |  Branch (127:10): [True: 239, False: 31]
  |  Branch (127:29): [True: 7, False: 24]
  ------------------
  128|    246|        best = cur;
  129|    270|      cur.base = -1;
  130|    270|    }
  131|  3.34k|  }
  132|    418|  if((cur.base != -1) && (best.base == -1 || cur.len > best.len))
  ------------------
  |  Branch (132:6): [True: 192, False: 226]
  |  Branch (132:27): [True: 176, False: 16]
  |  Branch (132:46): [True: 8, False: 8]
  ------------------
  133|    184|    best = cur;
  134|    418|  if(best.base != -1 && best.len < 2)
  ------------------
  |  Branch (134:6): [True: 415, False: 3]
  |  Branch (134:25): [True: 7, False: 408]
  ------------------
  135|      7|    best.base = -1;
  136|       |  /* Format the result. */
  137|    418|  tp = tmp;
  138|  3.73k|  for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
  ------------------
  |  |   35|  3.73k|#define IN6ADDRSZ       16
  ------------------
                for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
  ------------------
  |  |   37|  3.73k|#define INT16SZ          2
  ------------------
  |  Branch (138:14): [True: 3.32k, False: 402]
  ------------------
  139|       |    /* Are we inside the best run of 0x00's? */
  140|  3.32k|    if(best.base != -1 && i >= best.base && i < (best.base + best.len)) {
  ------------------
  |  Branch (140:8): [True: 3.24k, False: 80]
  |  Branch (140:27): [True: 3.09k, False: 155]
  |  Branch (140:45): [True: 2.80k, False: 290]
  ------------------
  141|  2.80k|      if(i == best.base)
  ------------------
  |  Branch (141:10): [True: 408, False: 2.39k]
  ------------------
  142|    408|        *tp++ = ':';
  143|  2.80k|      continue;
  144|  2.80k|    }
  145|       |
  146|       |    /* Are we following an initial run of 0x00s or any real hex?
  147|       |     */
  148|    525|    if(i)
  ------------------
  |  Branch (148:8): [True: 408, False: 117]
  ------------------
  149|    408|      *tp++ = ':';
  150|       |
  151|       |    /* Is this address an encapsulated IPv4?
  152|       |     */
  153|    525|    if(i == 6 && best.base == 0 &&
  ------------------
  |  Branch (153:8): [True: 56, False: 469]
  |  Branch (153:18): [True: 32, False: 24]
  ------------------
  154|     32|       (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
  ------------------
  |  Branch (154:9): [True: 15, False: 17]
  |  Branch (154:27): [True: 12, False: 5]
  |  Branch (154:44): [True: 1, False: 11]
  ------------------
  155|     16|      if(!inet_ntop4(src + 12, tp, sizeof(tmp) - (tp - tmp))) {
  ------------------
  |  Branch (155:10): [True: 0, False: 16]
  ------------------
  156|      0|        return NULL;
  157|      0|      }
  158|     16|      tp += strlen(tp);
  159|     16|      break;
  160|     16|    }
  161|    509|    else {
  162|       |      /* Lower-case digits. Cannot use the set from mprintf.c since this
  163|       |         needs to work as a curlx function */
  164|    509|      static const unsigned char ldigits[] = "0123456789abcdef";
  165|       |
  166|    509|      unsigned int w = words[i];
  167|       |      /* output lowercase 16-bit hex number but ignore leading zeroes */
  168|    509|      if(w & 0xf000)
  ------------------
  |  Branch (168:10): [True: 74, False: 435]
  ------------------
  169|     74|        *tp++ = ldigits[(w & 0xf000) >> 12];
  170|    509|      if(w & 0xff00)
  ------------------
  |  Branch (170:10): [True: 140, False: 369]
  ------------------
  171|    140|        *tp++ = ldigits[(w & 0x0f00) >> 8];
  172|    509|      if(w & 0xfff0)
  ------------------
  |  Branch (172:10): [True: 188, False: 321]
  ------------------
  173|    188|        *tp++ = ldigits[(w & 0x00f0) >> 4];
  174|    509|      *tp++ = ldigits[(w & 0x000f)];
  175|    509|    }
  176|    525|  }
  177|       |
  178|       |  /* Was it a trailing run of 0x00's?
  179|       |   */
  180|    418|  if(best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
  ------------------
  |  |   35|    408|#define IN6ADDRSZ       16
  ------------------
                if(best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
  ------------------
  |  |   37|    408|#define INT16SZ          2
  ------------------
  |  Branch (180:6): [True: 408, False: 10]
  |  Branch (180:25): [True: 184, False: 224]
  ------------------
  181|    184|    *tp++ = ':';
  182|       |
  183|       |  /* Check for overflow, copy, and we are done. */
  184|    418|  if((size_t)(tp - tmp) >= size) {
  ------------------
  |  Branch (184:6): [True: 15, False: 403]
  ------------------
  185|       |#ifdef USE_WINSOCK
  186|       |    errno = WSAEINVAL;
  187|       |#else
  188|     15|    errno = ENOSPC;
  189|     15|#endif
  190|     15|    return NULL;
  191|     15|  }
  192|       |
  193|    403|  curlx_strcopy(dst, size, tmp, tp - tmp);
  194|    403|  return dst;
  195|    418|}

curlx_inet_pton:
  207|  30.2k|{
  208|  30.2k|  switch(af) {
  209|  24.1k|  case AF_INET:
  ------------------
  |  Branch (209:3): [True: 24.1k, False: 6.03k]
  ------------------
  210|  24.1k|    return inet_pton4(src, (unsigned char *)dst);
  211|  6.03k|  case AF_INET6:
  ------------------
  |  Branch (211:3): [True: 6.03k, False: 24.1k]
  ------------------
  212|  6.03k|    return inet_pton6(src, (unsigned char *)dst);
  213|      0|  default:
  ------------------
  |  Branch (213:3): [True: 0, False: 30.2k]
  ------------------
  214|      0|    errno = SOCKEAFNOSUPPORT;
  ------------------
  |  | 1120|      0|#define SOCKEAFNOSUPPORT  EAFNOSUPPORT
  ------------------
  215|      0|    return -1;
  216|  30.2k|  }
  217|       |  /* NOTREACHED */
  218|  30.2k|}
inet_pton.c:inet_pton4:
   63|  24.7k|{
   64|  24.7k|  int saw_digit, octets, ch;
   65|  24.7k|  unsigned char tmp[INADDRSZ], *tp;
   66|       |
   67|  24.7k|  saw_digit = 0;
   68|  24.7k|  octets = 0;
   69|  24.7k|  tp = tmp;
   70|  24.7k|  *tp = 0;
   71|   186k|  while((ch = (unsigned char)*src++) != '\0') {
  ------------------
  |  Branch (71:9): [True: 168k, False: 18.3k]
  ------------------
   72|   168k|    if(ISDIGIT(ch)) {
  ------------------
  |  |   44|   168k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 113k, False: 54.8k]
  |  |  |  Branch (44:38): [True: 108k, False: 4.72k]
  |  |  ------------------
  ------------------
   73|   108k|      unsigned int val = (*tp * 10) + (ch - '0');
   74|       |
   75|   108k|      if(saw_digit && *tp == 0)
  ------------------
  |  Branch (75:10): [True: 36.5k, False: 72.1k]
  |  Branch (75:23): [True: 48, False: 36.5k]
  ------------------
   76|     48|        return 0;
   77|   108k|      if(val > 255)
  ------------------
  |  Branch (77:10): [True: 430, False: 108k]
  ------------------
   78|    430|        return 0;
   79|   108k|      *tp = (unsigned char)val;
   80|   108k|      if(!saw_digit) {
  ------------------
  |  Branch (80:10): [True: 72.1k, False: 36.0k]
  ------------------
   81|  72.1k|        if(++octets > 4)
  ------------------
  |  Branch (81:12): [True: 0, False: 72.1k]
  ------------------
   82|      0|          return 0;
   83|  72.1k|        saw_digit = 1;
   84|  72.1k|      }
   85|   108k|    }
   86|  59.6k|    else if(ch == '.' && saw_digit) {
  ------------------
  |  Branch (86:13): [True: 54.4k, False: 5.17k]
  |  Branch (86:26): [True: 53.6k, False: 778]
  ------------------
   87|  53.6k|      if(octets == 4)
  ------------------
  |  Branch (87:10): [True: 51, False: 53.6k]
  ------------------
   88|     51|        return 0;
   89|  53.6k|      *++tp = 0;
   90|  53.6k|      saw_digit = 0;
   91|  53.6k|    }
   92|  5.95k|    else
   93|  5.95k|      return 0;
   94|   168k|  }
   95|  18.3k|  if(octets < 4)
  ------------------
  |  Branch (95:6): [True: 688, False: 17.6k]
  ------------------
   96|    688|    return 0;
   97|  17.6k|  memcpy(dst, tmp, INADDRSZ);
  ------------------
  |  |   36|  17.6k|#define INADDRSZ         4
  ------------------
   98|  17.6k|  return 1;
   99|  18.3k|}
inet_pton.c:inet_pton6:
  114|  6.03k|{
  115|  6.03k|  unsigned char tmp[IN6ADDRSZ], *tp, *endp, *colonp;
  116|  6.03k|  const char *curtok;
  117|  6.03k|  int ch, saw_xdigit;
  118|  6.03k|  size_t val;
  119|       |
  120|  6.03k|  memset((tp = tmp), 0, IN6ADDRSZ);
  ------------------
  |  |   35|  6.03k|#define IN6ADDRSZ       16
  ------------------
  121|  6.03k|  endp = tp + IN6ADDRSZ;
  ------------------
  |  |   35|  6.03k|#define IN6ADDRSZ       16
  ------------------
  122|  6.03k|  colonp = NULL;
  123|       |  /* Leading :: requires some special handling. */
  124|  6.03k|  if(*src == ':')
  ------------------
  |  Branch (124:6): [True: 734, False: 5.30k]
  ------------------
  125|    734|    if(*++src != ':')
  ------------------
  |  Branch (125:8): [True: 39, False: 695]
  ------------------
  126|     39|      return 0;
  127|  5.99k|  curtok = src;
  128|  5.99k|  saw_xdigit = 0;
  129|  5.99k|  val = 0;
  130|  12.0k|  while((ch = (unsigned char)*src++) != '\0') {
  ------------------
  |  Branch (130:9): [True: 9.87k, False: 2.19k]
  ------------------
  131|  9.87k|    if(ISXDIGIT(ch)) {
  ------------------
  |  |   39|  9.87k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  19.7k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 8.92k, False: 956]
  |  |  |  |  |  Branch (44:38): [True: 2.13k, False: 6.78k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  17.6k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 2.72k, False: 5.01k]
  |  |  |  |  |  Branch (27:43): [True: 1.13k, False: 1.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  6.60k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 3.88k, False: 2.72k]
  |  |  |  |  |  Branch (28:43): [True: 1.15k, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  132|  4.42k|      val <<= 4;
  133|  4.42k|      val |= curlx_hexval(ch);
  ------------------
  |  |  112|  4.42k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  134|  4.42k|      if(++saw_xdigit > 4)
  ------------------
  |  Branch (134:10): [True: 77, False: 4.34k]
  ------------------
  135|     77|        return 0;
  136|  4.34k|      continue;
  137|  4.42k|    }
  138|  5.45k|    if(ch == ':') {
  ------------------
  |  Branch (138:8): [True: 1.74k, False: 3.70k]
  ------------------
  139|  1.74k|      curtok = src;
  140|  1.74k|      if(!saw_xdigit) {
  ------------------
  |  Branch (140:10): [True: 964, False: 781]
  ------------------
  141|    964|        if(colonp)
  ------------------
  |  Branch (141:12): [True: 12, False: 952]
  ------------------
  142|     12|          return 0;
  143|    952|        colonp = tp;
  144|    952|        continue;
  145|    964|      }
  146|    781|      if(tp + INT16SZ > endp)
  ------------------
  |  |   37|    781|#define INT16SZ          2
  ------------------
  |  Branch (146:10): [True: 3, False: 778]
  ------------------
  147|      3|        return 0;
  148|    778|      *tp++ = (unsigned char)((val >> 8) & 0xff);
  149|    778|      *tp++ = (unsigned char)(val & 0xff);
  150|    778|      saw_xdigit = 0;
  151|    778|      val = 0;
  152|    778|      continue;
  153|    781|    }
  154|  3.70k|    if(ch == '.' && ((tp + INADDRSZ) <= endp) &&
  ------------------
  |  |   36|    620|#define INADDRSZ         4
  ------------------
  |  Branch (154:8): [True: 620, False: 3.08k]
  |  Branch (154:21): [True: 617, False: 3]
  ------------------
  155|    617|       inet_pton4(curtok, tp) > 0) {
  ------------------
  |  Branch (155:8): [True: 3, False: 614]
  ------------------
  156|      3|      tp += INADDRSZ;
  ------------------
  |  |   36|      3|#define INADDRSZ         4
  ------------------
  157|      3|      saw_xdigit = 0;
  158|      3|      break;    /* '\0' was seen by inet_pton4(). */
  159|      3|    }
  160|  3.70k|    return 0;
  161|  3.70k|  }
  162|  2.20k|  if(saw_xdigit) {
  ------------------
  |  Branch (162:6): [True: 1.29k, False: 903]
  ------------------
  163|  1.29k|    if(tp + INT16SZ > endp)
  ------------------
  |  |   37|  1.29k|#define INT16SZ          2
  ------------------
  |  Branch (163:8): [True: 5, False: 1.29k]
  ------------------
  164|      5|      return 0;
  165|  1.29k|    *tp++ = (unsigned char)((val >> 8) & 0xff);
  166|  1.29k|    *tp++ = (unsigned char)(val & 0xff);
  167|  1.29k|  }
  168|  2.19k|  if(colonp) {
  ------------------
  |  Branch (168:6): [True: 892, False: 1.30k]
  ------------------
  169|       |    /*
  170|       |     * Since some memmove()'s erroneously fail to handle
  171|       |     * overlapping regions, we do the shift by hand.
  172|       |     */
  173|    892|    const ssize_t n = tp - colonp;
  174|    892|    ssize_t i;
  175|       |
  176|    892|    if(tp == endp)
  ------------------
  |  Branch (176:8): [True: 3, False: 889]
  ------------------
  177|      3|      return 0;
  178|  2.50k|    for(i = 1; i <= n; i++) {
  ------------------
  |  Branch (178:16): [True: 1.61k, False: 889]
  ------------------
  179|  1.61k|      *(endp - i) = *(colonp + n - i);
  180|  1.61k|      *(colonp + n - i) = 0;
  181|  1.61k|    }
  182|    889|    tp = endp;
  183|    889|  }
  184|  2.19k|  if(tp != endp)
  ------------------
  |  Branch (184:6): [True: 1.29k, False: 896]
  ------------------
  185|  1.29k|    return 0;
  186|    896|  memcpy(dst, tmp, IN6ADDRSZ);
  ------------------
  |  |   35|    896|#define IN6ADDRSZ       16
  ------------------
  187|    896|  return 1;
  188|  2.19k|}

curlx_nonblock:
   47|  4.80k|{
   48|  4.80k|#ifdef HAVE_FCNTL_O_NONBLOCK
   49|       |  /* most recent Unix versions */
   50|  4.80k|  int flags;
   51|  4.80k|  flags = sfcntl(sockfd, F_GETFL, 0);
  ------------------
  |  | 1004|  4.80k|#  define sfcntl  fcntl
  ------------------
   52|  4.80k|  if(flags < 0)
  ------------------
  |  Branch (52:6): [True: 0, False: 4.80k]
  ------------------
   53|      0|    return -1;
   54|       |  /* Check if the current file status flags have already satisfied
   55|       |   * the request, if so, it is no need to call fcntl() to replicate it.
   56|       |   */
   57|  4.80k|  if(!!(flags & O_NONBLOCK) == !!nonblock)
  ------------------
  |  Branch (57:6): [True: 4.80k, False: 0]
  ------------------
   58|  4.80k|    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|  4.80k|}

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

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

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

curlx_str_init:
   27|  25.1k|{
   28|       |  out->str = NULL;
   29|  25.1k|  out->len = 0;
   30|  25.1k|}
curlx_str_assign:
   33|  1.03k|{
   34|  1.03k|  out->str = str;
   35|  1.03k|  out->len = len;
   36|  1.03k|}
curlx_str_until:
   51|  16.1k|{
   52|  16.1k|  const char *s;
   53|  16.1k|  size_t len = 0;
   54|  16.1k|  DEBUGASSERT(linep);
  ------------------
  |  | 1077|  16.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (54:3): [True: 0, False: 16.1k]
  |  Branch (54:3): [True: 16.1k, False: 0]
  ------------------
   55|  16.1k|  DEBUGASSERT(*linep);
  ------------------
  |  | 1077|  16.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (55:3): [True: 0, False: 16.1k]
  |  Branch (55:3): [True: 16.1k, False: 0]
  ------------------
   56|  16.1k|  DEBUGASSERT(out);
  ------------------
  |  | 1077|  16.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (56:3): [True: 0, False: 16.1k]
  |  Branch (56:3): [True: 16.1k, False: 0]
  ------------------
   57|  16.1k|  DEBUGASSERT(delim);
  ------------------
  |  | 1077|  16.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (57:3): [True: 0, False: 16.1k]
  |  Branch (57:3): [True: 16.1k, False: 0]
  ------------------
   58|  16.1k|  s = *linep;
   59|       |
   60|  16.1k|  curlx_str_init(out);
   61|  41.9k|  while(*s && (*s != delim)) {
  ------------------
  |  Branch (61:9): [True: 29.9k, False: 12.0k]
  |  Branch (61:15): [True: 25.8k, False: 4.06k]
  ------------------
   62|  25.8k|    s++;
   63|  25.8k|    if(++len > max) {
  ------------------
  |  Branch (63:8): [True: 1, False: 25.8k]
  ------------------
   64|      1|      return STRE_BIG;
  ------------------
  |  |   29|      1|#define STRE_BIG      1
  ------------------
   65|      1|    }
   66|  25.8k|  }
   67|  16.1k|  if(!len)
  ------------------
  |  Branch (67:6): [True: 17, False: 16.0k]
  ------------------
   68|     17|    return STRE_SHORT;
  ------------------
  |  |   30|     17|#define STRE_SHORT    2
  ------------------
   69|  16.0k|  out->str = *linep;
   70|  16.0k|  out->len = len;
   71|  16.0k|  *linep = s; /* point to the first byte after the word */
   72|  16.0k|  return STRE_OK;
  ------------------
  |  |   28|  16.0k|#define STRE_OK       0
  ------------------
   73|  16.1k|}
curlx_str_word:
   78|  10.8k|{
   79|  10.8k|  return curlx_str_until(linep, out, max, ' ');
   80|  10.8k|}
curlx_str_untilnl:
   86|    117|{
   87|    117|  const char *s = *linep;
   88|    117|  size_t len = 0;
   89|    117|  DEBUGASSERT(linep && *linep && out && max);
  ------------------
  |  | 1077|    117|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (89:3): [True: 0, False: 117]
  |  Branch (89:3): [True: 0, False: 0]
  |  Branch (89:3): [True: 0, False: 0]
  |  Branch (89:3): [True: 0, False: 0]
  |  Branch (89:3): [True: 117, False: 0]
  |  Branch (89:3): [True: 117, False: 0]
  |  Branch (89:3): [True: 117, False: 0]
  |  Branch (89:3): [True: 117, False: 0]
  ------------------
   90|       |
   91|    117|  curlx_str_init(out);
   92|  3.04k|  while(*s && !ISNEWLINE(*s)) {
  ------------------
  |  |   50|  3.04k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 55, False: 2.98k]
  |  |  |  Branch (50:43): [True: 62, False: 2.92k]
  |  |  ------------------
  ------------------
  |  Branch (92:9): [True: 3.04k, False: 0]
  ------------------
   93|  2.92k|    s++;
   94|  2.92k|    if(++len > max)
  ------------------
  |  Branch (94:8): [True: 0, False: 2.92k]
  ------------------
   95|      0|      return STRE_BIG;
  ------------------
  |  |   29|      0|#define STRE_BIG      1
  ------------------
   96|  2.92k|  }
   97|    117|  if(!len)
  ------------------
  |  Branch (97:6): [True: 10, False: 107]
  ------------------
   98|     10|    return STRE_SHORT;
  ------------------
  |  |   30|     10|#define STRE_SHORT    2
  ------------------
   99|    107|  out->str = *linep;
  100|    107|  out->len = len;
  101|    107|  *linep = s; /* point to the first byte after the word */
  102|    107|  return STRE_OK;
  ------------------
  |  |   28|    107|#define STRE_OK       0
  ------------------
  103|    117|}
curlx_str_single:
  139|   118k|{
  140|   118k|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1077|   118k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (140:3): [True: 0, False: 118k]
  |  Branch (140:3): [True: 0, False: 0]
  |  Branch (140:3): [True: 118k, False: 0]
  |  Branch (140:3): [True: 118k, False: 0]
  ------------------
  141|   118k|  if(**linep != byte)
  ------------------
  |  Branch (141:6): [True: 43.9k, False: 74.7k]
  ------------------
  142|  43.9k|    return STRE_BYTE;
  ------------------
  |  |   33|  43.9k|#define STRE_BYTE     5
  ------------------
  143|  74.7k|  (*linep)++; /* move over it */
  144|  74.7k|  return STRE_OK;
  ------------------
  |  |   28|  74.7k|#define STRE_OK       0
  ------------------
  145|   118k|}
curlx_str_singlespace:
  150|  10.8k|{
  151|  10.8k|  return curlx_str_single(linep, ' ');
  152|  10.8k|}
curlx_str_number:
  209|   169k|{
  210|   169k|  return str_num_base(linep, nump, max, 10);
  211|   169k|}
curlx_str_hex:
  216|     39|{
  217|     39|  return str_num_base(linep, nump, max, 16);
  218|     39|}
curlx_str_octal:
  223|  2.33k|{
  224|  2.33k|  return str_num_base(linep, nump, max, 8);
  225|  2.33k|}
curlx_str_casecompare:
  253|   157k|{
  254|   157k|  size_t clen = check ? strlen(check) : 0;
  ------------------
  |  Branch (254:17): [True: 157k, False: 0]
  ------------------
  255|   157k|  return ((str->len == clen) && curl_strnequal(str->str, check, clen));
  ------------------
  |  Branch (255:11): [True: 26.1k, False: 131k]
  |  Branch (255:33): [True: 13.0k, False: 13.0k]
  ------------------
  256|   157k|}
curlx_str_cmp:
  261|  3.08k|{
  262|  3.08k|  if(check) {
  ------------------
  |  Branch (262:6): [True: 3.08k, False: 0]
  ------------------
  263|  3.08k|    size_t clen = strlen(check);
  264|  3.08k|    return ((str->len == clen) && !strncmp(str->str, check, clen));
  ------------------
  |  Branch (264:13): [True: 9, False: 3.07k]
  |  Branch (264:35): [True: 4, False: 5]
  ------------------
  265|  3.08k|  }
  266|      0|  return !!(str->len);
  267|  3.08k|}
curlx_str_nudge:
  272|  3.55k|{
  273|  3.55k|  if(num <= str->len) {
  ------------------
  |  Branch (273:6): [True: 3.55k, False: 0]
  ------------------
  274|  3.55k|    str->str += num;
  275|  3.55k|    str->len -= num;
  276|  3.55k|    return STRE_OK;
  ------------------
  |  |   28|  3.55k|#define STRE_OK       0
  ------------------
  277|  3.55k|  }
  278|      0|  return STRE_OVERFLOW;
  ------------------
  |  |   35|      0|#define STRE_OVERFLOW 7
  ------------------
  279|  3.55k|}
curlx_str_cspn:
  285|  73.1k|{
  286|  73.1k|  const char *s = *linep;
  287|  73.1k|  size_t len;
  288|  73.1k|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1077|  73.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (288:3): [True: 0, False: 73.1k]
  |  Branch (288:3): [True: 0, False: 0]
  |  Branch (288:3): [True: 73.1k, False: 0]
  |  Branch (288:3): [True: 73.1k, False: 0]
  ------------------
  289|       |
  290|  73.1k|  len = strcspn(s, reject);
  291|  73.1k|  if(len) {
  ------------------
  |  Branch (291:6): [True: 68.7k, False: 4.35k]
  ------------------
  292|  68.7k|    out->str = s;
  293|  68.7k|    out->len = len;
  294|  68.7k|    *linep = &s[len];
  295|  68.7k|    return STRE_OK;
  ------------------
  |  |   28|  68.7k|#define STRE_OK       0
  ------------------
  296|  68.7k|  }
  297|  4.35k|  curlx_str_init(out);
  298|  4.35k|  return STRE_SHORT;
  ------------------
  |  |   30|  4.35k|#define STRE_SHORT    2
  ------------------
  299|  73.1k|}
curlx_str_trimblanks:
  303|  66.6k|{
  304|  70.2k|  while(out->len && ISBLANK(*out->str))
  ------------------
  |  |   45|  69.6k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 3.07k, False: 66.5k]
  |  |  |  Branch (45:38): [True: 484, False: 66.0k]
  |  |  ------------------
  ------------------
  |  Branch (304:9): [True: 69.6k, False: 599]
  ------------------
  305|  3.55k|    curlx_str_nudge(out, 1);
  306|       |
  307|       |  /* trim trailing spaces and tabs */
  308|  67.5k|  while(out->len && ISBLANK(out->str[out->len - 1]))
  ------------------
  |  |   45|  66.9k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 639, False: 66.2k]
  |  |  |  Branch (45:38): [True: 210, False: 66.0k]
  |  |  ------------------
  ------------------
  |  Branch (308:9): [True: 66.9k, False: 599]
  ------------------
  309|    849|    out->len--;
  310|  66.6k|}
curlx_str_passblanks:
  314|  94.9k|{
  315|  96.0k|  while(ISBLANK(**linep))
  ------------------
  |  |   45|  96.0k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 857, False: 95.1k]
  |  |  |  Branch (45:38): [True: 243, False: 94.9k]
  |  |  ------------------
  ------------------
  316|  1.10k|    (*linep)++; /* move over it */
  317|  94.9k|}
strparse.c:str_num_base:
  172|   172k|{
  173|   172k|  curl_off_t num = 0;
  174|   172k|  const char *p;
  175|   172k|  int m = (base == 10) ? '9' :   /* the largest digit possible */
  ------------------
  |  Branch (175:11): [True: 169k, False: 2.37k]
  ------------------
  176|   172k|    (base == 16) ? 'f' : '7';
  ------------------
  |  Branch (176:5): [True: 39, False: 2.33k]
  ------------------
  177|   172k|  DEBUGASSERT(linep && *linep && nump);
  ------------------
  |  | 1077|   172k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (177:3): [True: 0, False: 172k]
  |  Branch (177:3): [True: 0, False: 0]
  |  Branch (177:3): [True: 0, False: 0]
  |  Branch (177:3): [True: 172k, False: 18.4E]
  |  Branch (177:3): [True: 172k, False: 0]
  |  Branch (177:3): [True: 172k, False: 0]
  ------------------
  178|   172k|  DEBUGASSERT((base == 8) || (base == 10) || (base == 16));
  ------------------
  |  | 1077|   172k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 172k, False: 0]
  |  Branch (178:3): [True: 0, False: 0]
  |  Branch (178:3): [True: 0, False: 0]
  |  Branch (178:3): [True: 2.33k, False: 169k]
  |  Branch (178:3): [True: 169k, False: 39]
  |  Branch (178:3): [True: 39, False: 0]
  ------------------
  179|   172k|  DEBUGASSERT(max >= 0); /* mostly to catch SIZE_MAX, which is too large */
  ------------------
  |  | 1077|   172k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 172k]
  |  Branch (179:3): [True: 172k, False: 0]
  ------------------
  180|   172k|  *nump = 0;
  181|   172k|  p = *linep;
  182|   172k|  if(!valid_digit(*p, m))
  ------------------
  |  |  156|   172k|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 127k, False: 44.6k]
  |  |  |  Branch (156:20): [True: 44.4k, False: 82.9k]
  |  |  |  Branch (156:36): [True: 44.4k, False: 7]
  |  |  ------------------
  ------------------
  183|   127k|    return STRE_NO_NUM;
  ------------------
  |  |   36|   127k|#define STRE_NO_NUM   8
  ------------------
  184|  44.4k|  if(max < base) {
  ------------------
  |  Branch (184:6): [True: 0, False: 44.4k]
  ------------------
  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|  44.4k|  else {
  194|  92.5k|    do {
  195|  92.5k|      int n = curlx_hexval(*p++);
  ------------------
  |  |  112|  92.5k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  196|  92.5k|      if(num > ((max - n) / base))
  ------------------
  |  Branch (196:10): [True: 213, False: 92.2k]
  ------------------
  197|    213|        return STRE_OVERFLOW;
  ------------------
  |  |   35|    213|#define STRE_OVERFLOW 7
  ------------------
  198|  92.2k|      num = (num * base) + n;
  199|  92.2k|    } while(valid_digit(*p, m));
  ------------------
  |  |  156|  92.2k|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 79.4k, False: 12.8k]
  |  |  |  Branch (156:20): [True: 48.0k, False: 31.3k]
  |  |  |  Branch (156:36): [True: 48.0k, False: 2]
  |  |  ------------------
  ------------------
  200|  44.4k|  }
  201|  44.2k|  *nump = num;
  202|  44.2k|  *linep = p;
  203|  44.2k|  return STRE_OK;
  ------------------
  |  |   28|  44.2k|#define STRE_OK       0
  ------------------
  204|  44.4k|}

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

curlx_pnow:
   54|  1.04M|{
   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.04M|  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.04M|#ifdef HAVE_CLOCK_GETTIME_MONOTONIC_RAW
   77|  1.04M|  if(
   78|       |#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
   79|       |  (HAVE_BUILTIN_AVAILABLE == 1)
   80|       |    have_clock_gettime &&
   81|       |#endif
   82|  1.04M|    (clock_gettime(CLOCK_MONOTONIC_RAW, &tsnow) == 0)) {
  ------------------
  |  Branch (82:5): [True: 1.04M, False: 18.4E]
  ------------------
   83|  1.04M|    pnow->tv_sec = tsnow.tv_sec;
   84|  1.04M|    pnow->tv_usec = (int)(tsnow.tv_nsec / 1000);
   85|  1.04M|  }
   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.04M|}
curlx_now:
  176|  2.28k|{
  177|  2.28k|  struct curltime now;
  178|  2.28k|  curlx_pnow(&now);
  179|  2.28k|  return now;
  180|  2.28k|}
curlx_ptimediff_ms:
  190|   892k|{
  191|   892k|  timediff_t diff = (timediff_t)newer->tv_sec - older->tv_sec;
  192|   892k|  if(diff >= (TIMEDIFF_T_MAX / 1000))
  ------------------
  |  |   33|   892k|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  590|   892k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  |  Branch (192:6): [True: 0, False: 892k]
  ------------------
  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|   892k|  else if(diff <= (TIMEDIFF_T_MIN / 1000))
  ------------------
  |  |   34|   892k|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  592|   892k|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  590|   892k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (194:11): [True: 0, False: 892k]
  ------------------
  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|   892k|  return (diff * 1000) + ((newer->tv_usec - older->tv_usec) / 1000);
  197|   892k|}
curlx_ptimediff_us:
  225|   216k|{
  226|   216k|  timediff_t diff = (timediff_t)newer->tv_sec - older->tv_sec;
  227|   216k|  if(diff >= (TIMEDIFF_T_MAX / 1000000))
  ------------------
  |  |   33|   216k|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  590|   216k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  |  Branch (227:6): [True: 0, False: 216k]
  ------------------
  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|   216k|  else if(diff <= (TIMEDIFF_T_MIN / 1000000))
  ------------------
  |  |   34|   216k|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  592|   216k|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  590|   216k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (229:11): [True: 0, False: 216k]
  ------------------
  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|   216k|  return (diff * 1000000) + newer->tv_usec - older->tv_usec;
  232|   216k|}
curlx_gmtime:
  253|  1.03k|{
  254|       |#ifdef _WIN32
  255|       |  if(gmtime_s(store, &intime)) /* thread-safe */
  256|       |    return CURLE_BAD_FUNCTION_ARGUMENT;
  257|       |#elif defined(HAVE_GMTIME_R)
  258|       |  const struct tm *tm;
  259|  1.03k|  tm = gmtime_r(&intime, store); /* thread-safe */
  260|  1.03k|  if(!tm)
  ------------------
  |  Branch (260:6): [True: 0, False: 1.03k]
  ------------------
  261|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  262|       |#else
  263|       |  const struct tm *tm;
  264|       |  /* !checksrc! disable BANNEDFUNC 1 */
  265|       |  tm = gmtime(&intime); /* not thread-safe */
  266|       |  if(tm)
  267|       |    *store = *tm; /* copy the pointed struct to the local copy */
  268|       |  else
  269|       |    return CURLE_BAD_FUNCTION_ARGUMENT;
  270|       |#endif
  271|       |
  272|  1.03k|  return CURLE_OK;
  273|  1.03k|}

curlx_wait_ms:
   59|   689k|{
   60|   689k|  int r = 0;
   61|       |
   62|   689k|  if(!timeout_ms)
  ------------------
  |  Branch (62:6): [True: 689k, False: 78]
  ------------------
   63|   689k|    return 0;
   64|     78|  if(timeout_ms < 0) {
  ------------------
  |  Branch (64:6): [True: 0, False: 78]
  ------------------
   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|     78|  {
   82|     78|    struct timeval pending_tv;
   83|     78|    r = select(0, NULL, NULL, NULL, curlx_mstotv(&pending_tv, timeout_ms));
   84|     78|  }
   85|     78|#endif /* _WIN32 */
   86|     78|  if(r) {
  ------------------
  |  Branch (86:6): [True: 0, False: 78]
  ------------------
   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|     78|  return r;
   94|     78|}

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

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

cw-pause.c:cw_pause_init:
   75|  5.65k|{
   76|  5.65k|  struct cw_pause_ctx *ctx = writer->ctx;
   77|  5.65k|  (void)data;
   78|       |  ctx->buf = NULL;
   79|  5.65k|  return CURLE_OK;
   80|  5.65k|}
cw-pause.c:cw_pause_write:
  150|  1.22k|{
  151|  1.22k|  struct cw_pause_ctx *ctx = writer->ctx;
  152|  1.22k|  CURLcode result = CURLE_OK;
  153|  1.22k|  size_t wlen = 0;
  154|  1.22k|  bool decoding = Curl_cwriter_is_content_decoding(data);
  155|       |
  156|  1.22k|  if(ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (156:6): [True: 0, False: 1.22k]
  |  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|  1.22k|  while(!ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (162:9): [True: 1.22k, False: 0]
  |  Branch (162:22): [True: 1.22k, False: 0]
  ------------------
  163|  1.22k|    int wtype = type;
  164|  1.22k|    DEBUGASSERT(!ctx->buf);
  ------------------
  |  | 1077|  1.22k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (164:5): [True: 0, False: 1.22k]
  |  Branch (164:5): [True: 1.22k, False: 0]
  ------------------
  165|       |    /* content decoding might blow up size considerably, write smaller
  166|       |     * chunks to make pausing need buffer less. */
  167|  1.22k|    wlen = (decoding && (type & CLIENTWRITE_BODY)) ?
  ------------------
  |  |   42|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (167:13): [True: 0, False: 1.22k]
  |  Branch (167:25): [True: 0, False: 0]
  ------------------
  168|  1.22k|           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|  1.22k|    if(wlen < blen)
  ------------------
  |  Branch (169:8): [True: 0, False: 1.22k]
  ------------------
  170|      0|      wtype &= ~CLIENTWRITE_EOS;
  ------------------
  |  |   49|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  171|  1.22k|    result = Curl_cwriter_write(data, writer->next, wtype, buf, wlen);
  172|  1.22k|    if(result)
  ------------------
  |  Branch (172:8): [True: 1, False: 1.22k]
  ------------------
  173|      1|      return result;
  174|  1.22k|    buf += wlen;
  175|  1.22k|    blen -= wlen;
  176|  1.22k|    if(!blen)
  ------------------
  |  Branch (176:8): [True: 1.22k, False: 0]
  ------------------
  177|  1.22k|      return result;
  178|  1.22k|  }
  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|  5.64k|{
  102|  5.64k|  struct cw_pause_ctx *ctx = (struct cw_pause_ctx *)cw_pause;
  103|  5.64k|  bool decoding = Curl_cwriter_is_content_decoding(data);
  104|  5.64k|  CURLcode result = CURLE_OK;
  105|       |
  106|       |  /* write the end of the chain until it blocks or gets empty */
  107|  5.64k|  while(ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (107:9): [True: 0, False: 5.64k]
  |  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|  5.64k|  if(!result)
  ------------------
  |  Branch (142:6): [True: 5.64k, False: 0]
  ------------------
  143|  5.64k|    result = Curl_cwriter_flush(data, cw_pause->next);
  144|  5.64k|  return result;
  145|  5.64k|}
cw-pause.c:cw_pause_close:
   92|  5.65k|{
   93|  5.65k|  struct cw_pause_ctx *ctx = writer->ctx;
   94|       |
   95|  5.65k|  (void)data;
   96|  5.65k|  cw_pause_bufs_free(ctx);
   97|  5.65k|}
cw-pause.c:cw_pause_bufs_free:
   83|  5.65k|{
   84|  5.65k|  while(ctx->buf) {
  ------------------
  |  Branch (84:9): [True: 0, False: 5.65k]
  ------------------
   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|  5.65k|}

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

doh_req_encode:
   86|    683|{
   87|    683|  const size_t hostlen = strlen(host);
   88|    683|  unsigned char *orig = dnsp;
   89|    683|  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|    683|  size_t expected_len;
  114|    683|  DEBUGASSERT(hostlen);
  ------------------
  |  | 1077|    683|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (114:3): [True: 0, False: 683]
  |  Branch (114:3): [True: 683, False: 0]
  ------------------
  115|    683|  expected_len = 12 + 1 + hostlen + 4;
  116|    683|  if(host[hostlen - 1] != '.')
  ------------------
  |  Branch (116:6): [True: 645, False: 38]
  ------------------
  117|    645|    expected_len++;
  118|       |
  119|    683|  if(expected_len > DOH_MAX_DNSREQ_SIZE)
  ------------------
  |  |   88|    683|#define DOH_MAX_DNSREQ_SIZE (256 + 16)
  ------------------
  |  Branch (119:6): [True: 0, False: 683]
  ------------------
  120|      0|    return DOH_DNS_NAME_TOO_LONG;
  121|       |
  122|    683|  if(len < expected_len)
  ------------------
  |  Branch (122:6): [True: 0, False: 683]
  ------------------
  123|      0|    return DOH_TOO_SMALL_BUFFER;
  124|       |
  125|    683|  *dnsp++ = 0; /* 16-bit id */
  126|    683|  *dnsp++ = 0;
  127|    683|  *dnsp++ = 0x01; /* |QR|   Opcode  |AA|TC|RD| Set the RD bit */
  128|    683|  *dnsp++ = '\0'; /* |RA|   Z    |   RCODE   |                */
  129|    683|  *dnsp++ = '\0';
  130|    683|  *dnsp++ = 1;    /* QDCOUNT (number of entries in the question section) */
  131|    683|  *dnsp++ = '\0';
  132|    683|  *dnsp++ = '\0'; /* ANCOUNT */
  133|    683|  *dnsp++ = '\0';
  134|    683|  *dnsp++ = '\0'; /* NSCOUNT */
  135|    683|  *dnsp++ = '\0';
  136|    683|  *dnsp++ = '\0'; /* ARCOUNT */
  137|       |
  138|       |  /* encode each label and store it in the QNAME */
  139|  1.48k|  while(*hostp) {
  ------------------
  |  Branch (139:9): [True: 810, False: 675]
  ------------------
  140|    810|    size_t labellen;
  141|    810|    const char *dot = strchr(hostp, '.');
  142|    810|    if(dot)
  ------------------
  |  Branch (142:8): [True: 171, False: 639]
  ------------------
  143|    171|      labellen = dot - hostp;
  144|    639|    else
  145|    639|      labellen = strlen(hostp);
  146|    810|    if((labellen > 63) || (!labellen)) {
  ------------------
  |  Branch (146:8): [True: 1, False: 809]
  |  Branch (146:27): [True: 7, False: 802]
  ------------------
  147|       |      /* label is too long or too short, error out */
  148|      8|      *olen = 0;
  149|      8|      return DOH_DNS_BAD_LABEL;
  150|      8|    }
  151|       |    /* label is non-empty, process it */
  152|    802|    *dnsp++ = (unsigned char)labellen;
  153|    802|    memcpy(dnsp, hostp, labellen);
  154|    802|    dnsp += labellen;
  155|    802|    hostp += labellen;
  156|       |    /* advance past dot, but only if there is one */
  157|    802|    if(dot)
  ------------------
  |  Branch (157:8): [True: 164, False: 638]
  ------------------
  158|    164|      hostp++;
  159|    802|  } /* next label */
  160|       |
  161|    675|  *dnsp++ = 0; /* append zero-length label for root */
  162|       |
  163|       |  /* There are assigned TYPE codes beyond 255: use range [1..65535] */
  164|    675|  *dnsp++ = (unsigned char)(255 & (dnstype >> 8)); /* upper 8-bit TYPE */
  165|    675|  *dnsp++ = (unsigned char)(255 & dnstype);        /* lower 8-bit TYPE */
  166|       |
  167|    675|  *dnsp++ = '\0'; /* upper 8-bit CLASS */
  168|    675|  *dnsp++ = DNS_CLASS_IN; /* IN - "the Internet" */
  ------------------
  |  |   41|    675|#define DNS_CLASS_IN 0x01
  ------------------
  169|       |
  170|    675|  *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|    675|  DEBUGASSERT(*olen == expected_len);
  ------------------
  |  | 1077|    675|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (174:3): [True: 0, False: 675]
  |  Branch (174:3): [True: 675, False: 0]
  ------------------
  175|    675|  return DOH_OK;
  176|    675|}
Curl_doh:
  458|    354|{
  459|    354|  CURLcode result = CURLE_OK;
  460|    354|  struct doh_probes *dohp = NULL;
  461|    354|  size_t i;
  462|       |
  463|    354|  DEBUGASSERT(!async->doh);
  ------------------
  |  | 1077|    354|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (463:3): [True: 0, False: 354]
  |  Branch (463:3): [True: 354, False: 0]
  ------------------
  464|    354|  DEBUGASSERT(async->hostname[0]);
  ------------------
  |  | 1077|    354|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (464:3): [True: 0, False: 354]
  |  Branch (464:3): [True: 354, False: 0]
  ------------------
  465|    354|  if(async->doh) {
  ------------------
  |  Branch (465:6): [True: 0, False: 354]
  ------------------
  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|    354|  async->doh = dohp = curlx_calloc(1, sizeof(struct doh_probes));
  ------------------
  |  | 1485|    354|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  472|    354|  if(!dohp)
  ------------------
  |  Branch (472:6): [True: 0, False: 354]
  ------------------
  473|      0|    return CURLE_OUT_OF_MEMORY;
  474|       |
  475|  1.06k|  for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (475:14): [True: 708, False: 354]
  ------------------
  476|    708|    dohp->probe_resp[i].probe_mid = UINT32_MAX;
  477|    708|    curlx_dyn_init(&dohp->probe_resp[i].body, DYN_DOH_RESPONSE);
  ------------------
  |  |   65|    708|#define DYN_DOH_RESPONSE    3000
  ------------------
  478|    708|  }
  479|       |
  480|    354|  dohp->host = async->hostname;
  481|    354|  dohp->port = async->port;
  482|       |  /* We are making sub easy handles and want to be called back when
  483|       |   * one is done. */
  484|    354|  data->sub_xfer_done = doh_probe_done;
  485|       |
  486|       |  /* create IPv4 DoH request */
  487|    354|  if(async->dns_queries & CURL_DNSQ_A) {
  ------------------
  |  |   51|    354|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (487:6): [True: 352, False: 2]
  ------------------
  488|    352|    result = doh_probe_run(data, CURL_DNS_TYPE_A,
  489|    352|                           async->hostname, data->set.str[STRING_DOH],
  490|    352|                           data->multi, async->id,
  491|    352|                           &dohp->probe_resp[DOH_SLOT_IPV4].probe_mid);
  492|    352|    if(result)
  ------------------
  |  Branch (492:8): [True: 7, False: 345]
  ------------------
  493|      7|      goto error;
  494|    345|    dohp->pending++;
  495|    345|  }
  496|       |
  497|    347|#ifdef USE_IPV6
  498|    347|  if(async->dns_queries & CURL_DNSQ_AAAA) {
  ------------------
  |  |   52|    347|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (498:6): [True: 331, False: 16]
  ------------------
  499|       |    /* create IPv6 DoH request */
  500|    331|    result = doh_probe_run(data, CURL_DNS_TYPE_AAAA,
  501|    331|                           async->hostname, data->set.str[STRING_DOH],
  502|    331|                           data->multi, async->id,
  503|    331|                           &dohp->probe_resp[DOH_SLOT_IPV6].probe_mid);
  504|    331|    if(result)
  ------------------
  |  Branch (504:8): [True: 1, False: 330]
  ------------------
  505|      1|      goto error;
  506|    330|    dohp->pending++;
  507|    330|  }
  508|    346|#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|    346|  return CURLE_OK;
  530|       |
  531|      8|error:
  532|      8|  Curl_doh_cleanup(data, async);
  533|      8|  return result;
  534|    347|}
de_init:
  720|    127|{
  721|    127|  int i;
  722|    127|  memset(de, 0, sizeof(*de));
  723|    127|  de->ttl = INT_MAX;
  724|    635|  for(i = 0; i < DOH_MAX_CNAME; i++)
  ------------------
  |  |  129|    635|#define DOH_MAX_CNAME 4
  ------------------
  |  Branch (724:14): [True: 508, False: 127]
  ------------------
  725|    508|    curlx_dyn_init(&de->cname[i], DYN_DOH_CNAME);
  ------------------
  |  |   66|    508|#define DYN_DOH_CNAME       256
  ------------------
  726|    127|}
de_cleanup:
 1059|    127|{
 1060|    127|  int i = 0;
 1061|    127|  for(i = 0; i < d->numcname; i++) {
  ------------------
  |  Branch (1061:14): [True: 0, False: 127]
  ------------------
 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|    127|}
Curl_doh_take_result:
 1237|    688|{
 1238|    688|  struct doh_probes *dohp = async->doh;
 1239|    688|  CURLcode result = CURLE_OK;
 1240|    688|  struct dohentry de;
 1241|       |
 1242|    688|  *pdns = NULL; /* defaults to no response */
 1243|    688|  if(!dohp)
  ------------------
  |  Branch (1243:6): [True: 0, False: 688]
  ------------------
 1244|      0|    return CURLE_OUT_OF_MEMORY;
 1245|       |
 1246|    688|  if(dohp->probe_resp[DOH_SLOT_IPV4].probe_mid == UINT32_MAX &&
  ------------------
  |  Branch (1246:6): [True: 2, False: 686]
  ------------------
 1247|      2|     dohp->probe_resp[DOH_SLOT_IPV6].probe_mid == UINT32_MAX) {
  ------------------
  |  Branch (1247:6): [True: 0, False: 2]
  ------------------
 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|    688|  else if(!dohp->pending) {
  ------------------
  |  Branch (1252:11): [True: 127, False: 561]
  ------------------
 1253|    127|    DOHcode rc[DOH_SLOT_COUNT];
 1254|    127|    bool negative = TRUE;
  ------------------
  |  | 1051|    127|#define TRUE true
  ------------------
 1255|    127|    int slot;
 1256|       |
 1257|    127|    memset(rc, 0, sizeof(rc));
 1258|       |    /* remove DoH handles from multi handle and close them */
 1259|    127|    doh_close(data, async);
 1260|       |    /* parse the responses, create the struct and return it! */
 1261|    127|    de_init(&de);
 1262|    381|    for(slot = 0; slot < DOH_SLOT_COUNT; slot++) {
  ------------------
  |  Branch (1262:19): [True: 254, False: 127]
  ------------------
 1263|    254|      struct doh_response *p = &dohp->probe_resp[slot];
 1264|    254|      if(!p->dnstype)
  ------------------
  |  Branch (1264:10): [True: 254, False: 0]
  ------------------
 1265|    254|        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|    127|    if(!rc[DOH_SLOT_IPV4] || !rc[DOH_SLOT_IPV6]) {
  ------------------
  |  Branch (1280:8): [True: 127, False: 0]
  |  Branch (1280:30): [True: 0, False: 0]
  ------------------
 1281|       |      /* we have an address, of one kind or other */
 1282|    127|      struct Curl_dns_entry *dns;
 1283|    127|      struct Curl_addrinfo *ai;
 1284|       |
 1285|    127|      if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)) {
  ------------------
  |  |  326|    127|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  319|    254|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 127, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 127]
  |  |  |  |  ------------------
  |  |  |  |  320|    254|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    127|   (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|    127|      result = doh2ai(&de, dohp->host, dohp->port, &ai);
 1291|    127|      if(result) {
  ------------------
  |  Branch (1291:10): [True: 127, False: 0]
  ------------------
 1292|       |        /* a decoded response without any usable address, e.g. only
 1293|       |           CNAME records, is an authoritative "no data" answer */
 1294|    127|        if((result == CURLE_COULDNT_RESOLVE_HOST) && negative)
  ------------------
  |  Branch (1294:12): [True: 127, False: 0]
  |  Branch (1294:54): [True: 127, False: 0]
  ------------------
 1295|    127|          async->negative_answer = TRUE;
  ------------------
  |  | 1051|    127|#define TRUE true
  ------------------
 1296|    127|        goto error;
 1297|    127|      }
 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|    127|  } /* !dohp->pending */
 1339|    561|  else
 1340|       |    /* wait for pending DoH transactions to complete */
 1341|    561|    return CURLE_AGAIN;
 1342|       |
 1343|    127|error:
 1344|    127|  de_cleanup(&de);
 1345|    127|  Curl_doh_cleanup(data, async);
 1346|    127|  return result;
 1347|    688|}
Curl_doh_cleanup:
 1380|  1.54k|{
 1381|  1.54k|  struct doh_probes *dohp = async->doh;
 1382|  1.54k|  if(dohp) {
  ------------------
  |  Branch (1382:6): [True: 354, False: 1.19k]
  ------------------
 1383|    354|    int i;
 1384|    354|    doh_close(data, async);
 1385|  1.06k|    for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (1385:16): [True: 708, False: 354]
  ------------------
 1386|    708|      curlx_dyn_free(&dohp->probe_resp[i].body);
 1387|    708|    }
 1388|       |    curlx_safefree(async->doh);
  ------------------
  |  | 1332|    354|  do {                      \
  |  | 1333|    354|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|    354|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|    354|    (ptr) = NULL;           \
  |  | 1335|    354|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 354]
  |  |  ------------------
  ------------------
 1389|    354|  }
 1390|  1.54k|}
doh.c:doh_probe_done:
  222|    296|{
  223|    296|  struct Curl_resolv_async *async = NULL;
  224|    296|  struct doh_probes *dohp = NULL;
  225|    296|  struct doh_request *doh_req = NULL;
  226|    296|  int i;
  227|       |
  228|    296|  doh_req = Curl_meta_get(doh, CURL_EZM_DOH_PROBE);
  ------------------
  |  |   85|    296|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  229|    296|  if(!doh_req) {
  ------------------
  |  Branch (229:6): [True: 0, False: 296]
  ------------------
  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|    296|  async = Curl_async_get(data, doh_req->resolv_id);
  235|    296|  if(!async) {
  ------------------
  |  Branch (235:6): [True: 0, False: 296]
  ------------------
  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|    296|  dohp = async->doh;
  241|       |
  242|    439|  for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (242:14): [True: 439, False: 0]
  ------------------
  243|    439|    if(dohp->probe_resp[i].probe_mid == doh->mid)
  ------------------
  |  Branch (243:8): [True: 296, False: 143]
  ------------------
  244|    296|      break;
  245|    439|  }
  246|       |  /* We really should have found the slot where to store the response */
  247|    296|  if(i >= DOH_SLOT_COUNT) {
  ------------------
  |  Branch (247:6): [True: 0, False: 296]
  ------------------
  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|    296|  dohp->pending--;
  254|    296|  infof(doh, "a DoH request is completed, %u to go", dohp->pending);
  ------------------
  |  |  143|    296|  do {                               \
  |  |  144|    296|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    296|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 296, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 296]
  |  |  |  |  ------------------
  |  |  |  |  320|    296|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    296|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    296|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 296]
  |  |  ------------------
  ------------------
  255|    296|  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|    296|  if(!result) {
  ------------------
  |  Branch (258:6): [True: 0, False: 296]
  ------------------
  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|    296|  Curl_meta_remove(doh, CURL_EZM_DOH_PROBE);
  ------------------
  |  |   85|    296|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  265|       |
  266|    296|  if(result)
  ------------------
  |  Branch (266:6): [True: 296, False: 0]
  ------------------
  267|    296|    infof(doh, "DoH request %s", curl_easy_strerror(result));
  ------------------
  |  |  143|    296|  do {                               \
  |  |  144|    296|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    296|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 296, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 296]
  |  |  |  |  ------------------
  |  |  |  |  320|    296|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    296|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    296|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 296]
  |  |  ------------------
  ------------------
  268|       |
  269|    296|  if(!dohp->pending) {
  ------------------
  |  Branch (269:6): [True: 145, False: 151]
  ------------------
  270|       |    /* DoH completed, run the transfer picking up the results */
  271|    145|    Curl_multi_mark_dirty(data);
  272|    145|  }
  273|    296|}
doh.c:doh_probe_run:
  302|    683|{
  303|    683|  struct Curl_easy *doh = NULL;
  304|    683|  CURLcode result = CURLE_OK;
  305|    683|  timediff_t timeout_ms;
  306|    683|  struct doh_request *doh_req;
  307|    683|  DOHcode d;
  308|       |
  309|    683|  *pmid = UINT32_MAX;
  310|       |
  311|    683|  doh_req = curlx_calloc(1, sizeof(*doh_req));
  ------------------
  |  | 1485|    683|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  312|    683|  if(!doh_req)
  ------------------
  |  Branch (312:6): [True: 0, False: 683]
  ------------------
  313|      0|    return CURLE_OUT_OF_MEMORY;
  314|    683|  doh_req->resolv_id = resolv_id;
  315|    683|  doh_req->dnstype = dnstype;
  316|    683|  curlx_dyn_init(&doh_req->resp_body, DYN_DOH_RESPONSE);
  ------------------
  |  |   65|    683|#define DYN_DOH_RESPONSE    3000
  ------------------
  317|       |
  318|    683|  d = doh_req_encode(host, dnstype, doh_req->req_body,
  319|    683|                     sizeof(doh_req->req_body),
  320|    683|                     &doh_req->req_body_len);
  321|    683|  if(d) {
  ------------------
  |  Branch (321:6): [True: 8, False: 675]
  ------------------
  322|      8|    failf(data, "Failed to encode DoH packet [%d]", (int)d);
  ------------------
  |  |   62|      8|#define failf Curl_failf
  ------------------
  323|      8|    result = CURLE_OUT_OF_MEMORY;
  324|      8|    goto error;
  325|      8|  }
  326|       |
  327|    675|  timeout_ms = Curl_timeleft_ms(data);
  328|    675|  if(timeout_ms < 0) {
  ------------------
  |  Branch (328:6): [True: 0, False: 675]
  ------------------
  329|      0|    result = CURLE_OPERATION_TIMEDOUT;
  330|      0|    goto error;
  331|      0|  }
  332|       |
  333|    675|  doh_req->req_hds =
  334|    675|    curl_slist_append(NULL, "Content-Type: application/dns-message");
  335|    675|  if(!doh_req->req_hds) {
  ------------------
  |  Branch (335:6): [True: 0, False: 675]
  ------------------
  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|    675|  result = Curl_open(&doh);
  342|    675|  if(result)
  ------------------
  |  Branch (342:6): [True: 0, False: 675]
  ------------------
  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|    675|  VERBOSE(doh->state.feat = &Curl_trc_feat_dns);
  ------------------
  |  | 1623|    675|#define VERBOSE(x) x
  ------------------
  348|    675|  ERROR_CHECK_SETOPT(CURLOPT_URL, url);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   119k|#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: 675]
  |  |  |  |  |  |  |  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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  349|    675|  ERROR_CHECK_SETOPT(CURLOPT_DEFAULT_PROTOCOL, "https");
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   119k|#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: 675]
  |  |  |  |  |  |  |  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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  350|    675|  ERROR_CHECK_SETOPT(CURLOPT_WRITEFUNCTION, doh_probe_write_cb);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   126k|#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: 675]
  |  |  |  |  |  |  |  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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  351|    675|  ERROR_CHECK_SETOPT(CURLOPT_WRITEDATA, doh);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   116k|#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: 675]
  |  |  |  |  |  |  |  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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  352|    675|  ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDS, doh_req->req_body);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   118k|#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: 675]
  |  |  |  |  |  |  |  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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [True: 675, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  353|    675|  ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDSIZE, (long)doh_req->req_body_len);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   117k|#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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  354|    675|  ERROR_CHECK_SETOPT(CURLOPT_HTTPHEADER, doh_req->req_hds);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   118k|#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: 675]
  |  |  |  |  |  |  |  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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  355|    675|#ifdef USE_HTTP2
  356|    675|  ERROR_CHECK_SETOPT(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   117k|#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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  357|    675|  ERROR_CHECK_SETOPT(CURLOPT_PIPEWAIT, 1L);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   117k|#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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  358|    675|#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|    675|  ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   117k|#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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  365|    675|#endif
  366|    675|  ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   117k|#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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  367|    675|  ERROR_CHECK_SETOPT(CURLOPT_SHARE, (CURLSH *)data->share);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   117k|#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: 675]
  |  |  |  |  |  |  |  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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [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: 675, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 675, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  368|    675|  if(data->set.err && data->set.err != stderr)
  ------------------
  |  Branch (368:6): [True: 675, False: 0]
  |  Branch (368:23): [True: 0, False: 675]
  ------------------
  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|    675|  if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns))
  ------------------
  |  |  326|    675|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  319|  1.35k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 675, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 675]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.35k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    675|   (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|    675|  if(data->set.no_signal)
  ------------------
  |  Branch (372:6): [True: 5, False: 670]
  ------------------
  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|    675|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYHOST,
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   117k|#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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|  1.35k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 675, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  376|    675|                     data->set.doh_verifyhost ? 2L : 0L);
  377|    675|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYPEER,
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   117k|#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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|  1.35k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 675, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  378|    675|                     data->set.doh_verifypeer ? 1L : 0L);
  379|    675|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYSTATUS,
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   117k|#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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|  1.35k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 2, False: 673]
  |  |  |  |  ------------------
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  380|    675|                     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|    675|  doh->set.ssl.custom_cafile = data->set.ssl.custom_cafile;
  391|    675|  doh->set.ssl.custom_capath = data->set.ssl.custom_capath;
  392|    675|  doh->set.ssl.custom_cablob = data->set.ssl.custom_cablob;
  393|    675|  if(data->set.str[STRING_SSL_CAFILE]) {
  ------------------
  |  Branch (393:6): [True: 675, False: 0]
  ------------------
  394|    675|    ERROR_CHECK_SETOPT(CURLOPT_CAINFO, data->set.str[STRING_SSL_CAFILE]);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   119k|#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: 675]
  |  |  |  |  |  |  |  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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  395|    675|  }
  396|    675|  if(data->set.blobs[BLOB_CAINFO]) {
  ------------------
  |  Branch (396:6): [True: 0, False: 675]
  ------------------
  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|    675|  if(data->set.str[STRING_SSL_CAPATH]) {
  ------------------
  |  Branch (399:6): [True: 675, False: 0]
  ------------------
  400|    675|    ERROR_CHECK_SETOPT(CURLOPT_CAPATH, data->set.str[STRING_SSL_CAPATH]);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   119k|#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: 675]
  |  |  |  |  |  |  |  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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  401|    675|  }
  402|    675|  if(data->set.str[STRING_SSL_CRLFILE]) {
  ------------------
  |  Branch (402:6): [True: 675, False: 0]
  ------------------
  403|    675|    ERROR_CHECK_SETOPT(CURLOPT_CRLFILE, data->set.str[STRING_SSL_CRLFILE]);
  ------------------
  |  |  288|    675|  do {                                                  \
  |  |  289|    675|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    675|  __extension__({                                                       \
  |  |  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   119k|#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: 675]
  |  |  |  |  |  |  |  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: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    675|      )                                                                 \
  |  |  |  |  158|    675|    }                                                                   \
  |  |  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    675|  })
  |  |  ------------------
  |  |  290|    675|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 675]
  |  |  ------------------
  |  |  291|    675|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    675|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    675|      goto error;                                       \
  |  |  294|    675|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 675]
  |  |  ------------------
  ------------------
  404|    675|  }
  405|    675|  if(data->set.ssl.certinfo)
  ------------------
  |  Branch (405:6): [True: 3, False: 672]
  ------------------
  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|    675|  if(data->set.ssl.fsslctx)
  ------------------
  |  Branch (407:6): [True: 0, False: 675]
  ------------------
  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|    675|  if(data->set.ssl.fsslctxp)
  ------------------
  |  Branch (409:6): [True: 0, False: 675]
  ------------------
  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|    675|  if(data->set.fdebug)
  ------------------
  |  Branch (411:6): [True: 0, False: 675]
  ------------------
  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|    675|  if(data->set.debugdata)
  ------------------
  |  Branch (413:6): [True: 0, False: 675]
  ------------------
  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|    675|  if(data->set.str[STRING_SSL_EC_CURVES]) {
  ------------------
  |  Branch (415:6): [True: 9, False: 666]
  ------------------
  416|      9|    ERROR_CHECK_SETOPT(CURLOPT_SSL_EC_CURVES,
  ------------------
  |  |  288|      9|  do {                                                  \
  |  |  289|      9|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      9|  __extension__({                                                       \
  |  |  |  |   46|      9|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 9, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      9|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  1.59k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      9|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      9|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      9|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      9|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      9|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      9|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      9|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      9|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      9|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      9|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      9|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      9|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      9|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      9|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      9|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      9|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      9|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      9|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      9|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      9|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      9|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      9|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      9|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      9|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      9|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      9|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      9|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      9|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      9|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      9|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      9|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      9|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      9|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      9|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      9|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      9|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      9|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      9|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      9|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      9|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      9|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      9|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      9|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      9|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      9|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      9|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      9|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      9|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      9|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      9|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      9|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      9|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      9|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      9|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      9|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      9|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      9|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      9|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      9|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      9|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      9|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      9|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      9|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      9|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      9|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      9|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      9|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      9|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      9|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      9|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      9|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      9|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      9|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      9|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      9|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      9|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      9|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      9|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      9|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      9|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      9|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      9|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      9|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      9|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      9|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      9|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      9|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      9|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      9|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      9|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      9|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      9|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      9|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      9|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      9|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      9|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      9|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      9|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      9|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      9|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      9|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      9|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      9|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      9|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      9|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      9|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      9|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      9|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      9|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      9|      )                                                                 \
  |  |  |  |  158|      9|    }                                                                   \
  |  |  |  |  159|      9|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      9|  })
  |  |  ------------------
  |  |  290|      9|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 9]
  |  |  ------------------
  |  |  291|      9|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      9|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      9|      goto error;                                       \
  |  |  294|      9|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 9]
  |  |  ------------------
  ------------------
  417|      9|                       data->set.str[STRING_SSL_EC_CURVES]);
  418|      9|  }
  419|       |
  420|    675|  (void)curl_easy_setopt(doh, CURLOPT_SSL_OPTIONS,
  ------------------
  |  |   45|    675|  __extension__({                                                       \
  |  |   46|    675|    if(__builtin_constant_p(option)) {                                  \
  |  |  ------------------
  |  |  |  Branch (46:8): [True: 675, Folded]
  |  |  ------------------
  |  |   47|    675|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  ------------------
  |  |  |  |   59|   117k|#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: 675]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 675]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   48|    675|        if(curlcheck_long_option(option))                               \
  |  |   49|    675|          if(!curlcheck_long(value))                                    \
  |  |   50|    675|            Wcurl_easy_setopt_err_long();                               \
  |  |   51|    675|        if(curlcheck_off_t_option(option))                              \
  |  |   52|    675|          if(!curlcheck_off_t(value))                                   \
  |  |   53|    675|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |   54|    675|        if(curlcheck_string_option(option))                             \
  |  |   55|    675|          if(!curlcheck_string(value))                                  \
  |  |   56|    675|            Wcurl_easy_setopt_err_string();                             \
  |  |   57|    675|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |   58|    675|        if(curlcheck_write_cb_option(option))                           \
  |  |   59|    675|          if(!curlcheck_write_cb(value))                                \
  |  |   60|    675|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |   61|    675|        if(curlcheck_curl_option(option))                               \
  |  |   62|    675|          if(!curlcheck_curl(value))                                    \
  |  |   63|    675|            Wcurl_easy_setopt_err_curl();                               \
  |  |   64|    675|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |   65|    675|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |   66|    675|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |   67|    675|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |   68|    675|          if(!curlcheck_read_cb(value))                                 \
  |  |   69|    675|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |   70|    675|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |   71|    675|          if(!curlcheck_ioctl_cb(value))                                \
  |  |   72|    675|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |   73|    675|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |   74|    675|          if(!curlcheck_sockopt_cb(value))                              \
  |  |   75|    675|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |   76|    675|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |   77|    675|          if(!curlcheck_opensocket_cb(value))                           \
  |  |   78|    675|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |   79|    675|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |   80|    675|          if(!curlcheck_progress_cb(value))                             \
  |  |   81|    675|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |   82|    675|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |   83|    675|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |   84|    675|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |   85|    675|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |   86|    675|          if(!curlcheck_debug_cb(value))                                \
  |  |   87|    675|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |   88|    675|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |   89|    675|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |   90|    675|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |   91|    675|        if(curlcheck_conv_cb_option(option))                            \
  |  |   92|    675|          if(!curlcheck_conv_cb(value))                                 \
  |  |   93|    675|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |   94|    675|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |   95|    675|          if(!curlcheck_seek_cb(value))                                 \
  |  |   96|    675|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |   97|    675|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |   98|    675|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |   99|    675|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  100|    675|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  101|    675|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  102|    675|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  103|    675|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  104|    675|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  105|    675|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  106|    675|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  107|    675|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  108|    675|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  109|    675|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  110|    675|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  111|    675|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  112|    675|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  113|    675|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  114|    675|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  115|    675|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  116|    675|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  117|    675|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  118|    675|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  119|    675|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  120|    675|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  121|    675|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  122|    675|          if(!curlcheck_interleave_cb(value))                           \
  |  |  123|    675|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  124|    675|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  125|    675|          if(!curlcheck_prereq_cb(value))                               \
  |  |  126|    675|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  127|    675|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  128|    675|          if(!curlcheck_trailer_cb(value))                              \
  |  |  129|    675|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  130|    675|        if(curlcheck_cb_data_option(option))                            \
  |  |  131|    675|          if(!curlcheck_cb_data(value))                                 \
  |  |  132|    675|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  133|    675|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  134|    675|          if(!curlcheck_error_buffer(value))                            \
  |  |  135|    675|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  136|    675|        if((option) == CURLOPT_CURLU)                                   \
  |  |  137|    675|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  138|    675|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  139|    675|        if((option) == CURLOPT_STDERR)                                  \
  |  |  140|    675|          if(!curlcheck_FILE(value))                                    \
  |  |  141|    675|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  142|    675|        if(curlcheck_postfields_option(option))                         \
  |  |  143|    675|          if(!curlcheck_postfields(value))                              \
  |  |  144|    675|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  145|    675|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  146|    675|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  147|    675|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  148|    675|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  149|    675|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  150|    675|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  151|    675|        if(curlcheck_slist_option(option))                              \
  |  |  152|    675|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  153|    675|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  154|    675|        if((option) == CURLOPT_SHARE)                                   \
  |  |  155|    675|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  156|    675|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  157|    675|      )                                                                 \
  |  |  158|    675|    }                                                                   \
  |  |  159|    675|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  160|    675|  })
  ------------------
  421|    675|                         ((long)data->set.ssl.primary.ssl_options &
  422|    675|                          ~CURLSSLOPT_AUTO_CLIENT_CERT));
  423|       |
  424|    675|  doh->state.internal = TRUE;
  ------------------
  |  | 1051|    675|#define TRUE true
  ------------------
  425|    675|  doh->master_mid = data->mid; /* master transfer of this one */
  426|       |
  427|    675|  result = Curl_meta_set(doh, CURL_EZM_DOH_PROBE, doh_req, doh_probe_dtor);
  ------------------
  |  |   85|    675|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  428|    675|  doh_req = NULL; /* call took ownership */
  429|    675|  if(result)
  ------------------
  |  Branch (429:6): [True: 0, False: 675]
  ------------------
  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|    675|  DEBUGASSERT(!doh->set.private_data);
  ------------------
  |  | 1077|    675|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (436:3): [True: 0, False: 675]
  |  Branch (436:3): [True: 675, False: 0]
  ------------------
  437|       |
  438|    675|  if(curl_multi_add_handle(multi, doh))
  ------------------
  |  Branch (438:6): [True: 0, False: 675]
  ------------------
  439|      0|    goto error;
  440|       |
  441|    675|  *pmid = doh->mid;
  442|    675|  return CURLE_OK;
  443|       |
  444|      8|error:
  445|      8|  Curl_close(&doh);
  446|      8|  if(doh_req)
  ------------------
  |  Branch (446:6): [True: 8, False: 0]
  ------------------
  447|      8|    doh_probe_dtor(NULL, 0, doh_req);
  448|      8|  return result;
  449|    675|}
doh.c:doh_probe_dtor:
  276|    683|{
  277|    683|  (void)key;
  278|    683|  (void)klen;
  279|    683|  if(e) {
  ------------------
  |  Branch (279:6): [True: 683, False: 0]
  ------------------
  280|    683|    struct doh_request *doh_req = e;
  281|    683|    curl_slist_free_all(doh_req->req_hds);
  282|    683|    curlx_dyn_free(&doh_req->resp_body);
  283|    683|    curlx_free(e);
  ------------------
  |  | 1488|    683|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  284|    683|  }
  285|    683|}
doh.c:doh2ai:
  945|    127|{
  946|    127|  struct Curl_addrinfo *ai;
  947|    127|  struct Curl_addrinfo *prevai = NULL;
  948|    127|  struct Curl_addrinfo *firstai = NULL;
  949|    127|  struct sockaddr_in *addr;
  950|    127|#ifdef USE_IPV6
  951|    127|  struct sockaddr_in6 *addr6;
  952|    127|#endif
  953|    127|  CURLcode result = CURLE_OK;
  954|    127|  int i;
  955|    127|  size_t hostlen = strlen(hostname) + 1; /* include null-terminator */
  956|       |
  957|    127|  DEBUGASSERT(de);
  ------------------
  |  | 1077|    127|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (957:3): [True: 0, False: 127]
  |  Branch (957:3): [True: 127, False: 0]
  ------------------
  958|       |
  959|    127|  if(!de->numaddr)
  ------------------
  |  Branch (959:6): [True: 127, False: 0]
  ------------------
  960|    127|    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|    481|{
 1352|    481|  struct doh_probes *doh = async ? async->doh : NULL;
  ------------------
  |  Branch (1352:28): [True: 481, False: 0]
  ------------------
 1353|    481|  if(doh && data->multi) {
  ------------------
  |  Branch (1353:6): [True: 481, False: 0]
  |  Branch (1353:13): [True: 481, False: 0]
  ------------------
 1354|    481|    struct Curl_easy *probe_data;
 1355|    481|    uint32_t mid;
 1356|    481|    size_t slot;
 1357|  1.44k|    for(slot = 0; slot < DOH_SLOT_COUNT; slot++) {
  ------------------
  |  Branch (1357:19): [True: 962, False: 481]
  ------------------
 1358|    962|      mid = doh->probe_resp[slot].probe_mid;
 1359|    962|      if(mid == UINT32_MAX)
  ------------------
  |  Branch (1359:10): [True: 287, False: 675]
  ------------------
 1360|    287|        continue;
 1361|    675|      doh->probe_resp[slot].probe_mid = UINT32_MAX;
 1362|       |      /* should have been called before data is removed from multi handle */
 1363|    675|      DEBUGASSERT(data->multi);
  ------------------
  |  | 1077|    675|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1363:7): [True: 0, False: 675]
  |  Branch (1363:7): [True: 675, False: 0]
  ------------------
 1364|    675|      probe_data = data->multi ? Curl_multi_get_easy(data->multi, mid) : NULL;
  ------------------
  |  Branch (1364:20): [True: 675, False: 0]
  ------------------
 1365|    675|      if(!probe_data) {
  ------------------
  |  Branch (1365:10): [True: 0, False: 675]
  ------------------
 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|    675|      curl_multi_remove_handle(data->multi, probe_data);
 1372|    675|      Curl_close(&probe_data);
 1373|    675|    }
 1374|    481|    data->sub_xfer_done = NULL;
 1375|    481|  }
 1376|    481|}

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

curl_easy_init:
  331|  23.3k|{
  332|  23.3k|  CURLcode result;
  333|  23.3k|  struct Curl_easy *data;
  334|       |
  335|       |  /* Make sure we inited the global SSL stuff */
  336|  23.3k|  global_init_lock();
  ------------------
  |  |   87|  23.3k|#define global_init_lock()   curl_simple_lock_lock(&s_lock)
  ------------------
  337|       |
  338|  23.3k|  if(!initialized) {
  ------------------
  |  Branch (338:6): [True: 1, False: 23.3k]
  ------------------
  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|  23.3k|  global_init_unlock();
  ------------------
  |  |   88|  23.3k|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  348|       |
  349|       |  /* We use Curl_open() with undefined URL so far */
  350|  23.3k|  result = Curl_open(&data);
  351|  23.3k|  if(result) {
  ------------------
  |  Branch (351:6): [True: 0, False: 23.3k]
  ------------------
  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|  23.3k|  return data;
  357|  23.3k|}
curl_easy_cleanup:
  839|  12.5k|{
  840|  12.5k|  struct Curl_easy *data = curl;
  841|  12.5k|  if(GOOD_EASY_HANDLE(data)) {
  ------------------
  |  |  141|  12.5k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  135|  12.5k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  12.5k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (141:3): [True: 12.5k, False: 0]
  |  |  |  Branch (141:5): [True: 12.5k, False: 0]
  |  |  |  Branch (141:12): [True: 12.5k, False: 0]
  |  |  ------------------
  |  |  142|  12.5k|   (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|  12.5k|    struct Curl_sigpipe_ctx sigpipe_ctx;
  843|  12.5k|    sigpipe_ignore(data, &sigpipe_ctx);
  844|  12.5k|    Curl_close(&data);
  845|  12.5k|    sigpipe_restore(&sigpipe_ctx);
  846|  12.5k|  }
  847|  12.5k|}
Curl_meta_set:
 1384|    675|{
 1385|    675|  DEBUGASSERT(meta_data); /* never set to NULL */
  ------------------
  |  | 1077|    675|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1385:3): [True: 0, False: 675]
  |  Branch (1385:3): [True: 675, False: 0]
  ------------------
 1386|    675|  if(!Curl_hash_add2(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1,
  ------------------
  |  |  862|    675|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (1386:6): [True: 0, False: 675]
  ------------------
 1387|    675|                     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|    675|  return CURLE_OK;
 1392|    675|}
Curl_meta_remove:
 1395|  11.7k|{
 1396|  11.7k|  Curl_hash_delete(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  862|  11.7k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1397|  11.7k|}
Curl_meta_get:
 1400|    296|{
 1401|    296|  return Curl_hash_pick(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  862|    296|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1402|    296|}
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|  23.3k|{
   65|  23.3k|  for(;;) {
   66|  23.3k|    if(!atomic_exchange_explicit(lock, true, memory_order_acquire))
  ------------------
  |  Branch (66:8): [True: 23.3k, False: 0]
  ------------------
   67|  23.3k|      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|  23.3k|}
easy.c:curl_simple_lock_unlock:
   83|  23.3k|{
   84|  23.3k|  atomic_store_explicit(lock, false, memory_order_release);
   85|  23.3k|}

curl_escape:
   37|  1.03k|{
   38|       |  return curl_easy_escape(NULL, string, length);
   39|  1.03k|}
curl_easy_escape:
   51|  1.03k|{
   52|  1.03k|  size_t len;
   53|  1.03k|  struct dynbuf d;
   54|  1.03k|  (void)curl;
   55|       |
   56|  1.03k|  if(!string || (length < 0))
  ------------------
  |  Branch (56:6): [True: 0, False: 1.03k]
  |  Branch (56:17): [True: 0, False: 1.03k]
  ------------------
   57|      0|    return NULL;
   58|       |
   59|  1.03k|  len = (length ? (size_t)length : strlen(string));
  ------------------
  |  Branch (59:10): [True: 0, False: 1.03k]
  ------------------
   60|  1.03k|  if(!len)
  ------------------
  |  Branch (60:6): [True: 933, False: 99]
  ------------------
   61|    933|    return curlx_strdup("");
  ------------------
  |  | 1482|    933|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
   62|       |
   63|     99|  if(len > SIZE_MAX / 16)
  ------------------
  |  Branch (63:6): [True: 0, False: 99]
  ------------------
   64|      0|    return NULL;
   65|       |
   66|     99|  curlx_dyn_init(&d, (len * 3) + 1);
   67|       |
   68|   348k|  while(len--) {
  ------------------
  |  Branch (68:9): [True: 348k, False: 99]
  ------------------
   69|       |    /* treat the characters unsigned */
   70|   348k|    unsigned char in = (unsigned char)*string++;
   71|       |
   72|   348k|    if(ISUNRESERVED(in)) {
  ------------------
  |  |   49|   348k|#define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   41|   696k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   44|   696k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (44:22): [True: 243k, False: 104k]
  |  |  |  |  |  |  |  Branch (44:38): [True: 5.15k, False: 238k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   43|   690k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (43:22): [True: 160k, False: 182k]
  |  |  |  |  |  |  |  Branch (43:38): [True: 14.3k, False: 146k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|   328k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (42:22): [True: 223k, False: 105k]
  |  |  |  |  |  |  |  Branch (42:38): [True: 73.2k, False: 150k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   48|   255k|  (((x) == '-') || ((x) == '.') || ((x) == '_') || ((x) == '~'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:4): [True: 471, False: 254k]
  |  |  |  |  |  Branch (48:20): [True: 334, False: 254k]
  |  |  |  |  |  Branch (48:36): [True: 268, False: 254k]
  |  |  |  |  |  Branch (48:52): [True: 249, False: 253k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   73|       |      /* append this */
   74|  94.0k|      if(curlx_dyn_addn(&d, &in, 1))
  ------------------
  |  Branch (74:10): [True: 0, False: 94.0k]
  ------------------
   75|      0|        return NULL;
   76|  94.0k|    }
   77|   253k|    else {
   78|       |      /* encode it */
   79|   253k|      unsigned char out[3] = { '%' };
   80|   253k|      Curl_hexbyte(&out[1], in);
   81|   253k|      if(curlx_dyn_addn(&d, out, 3))
  ------------------
  |  Branch (81:10): [True: 0, False: 253k]
  ------------------
   82|      0|        return NULL;
   83|   253k|    }
   84|   348k|  }
   85|       |
   86|     99|  return curlx_dyn_ptr(&d);
   87|     99|}
Curl_urldecode:
  108|  5.10k|{
  109|  5.10k|  size_t alloc;
  110|  5.10k|  char *ns;
  111|       |
  112|  5.10k|  DEBUGASSERT(string);
  ------------------
  |  | 1077|  5.10k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (112:3): [True: 0, False: 5.10k]
  |  Branch (112:3): [True: 5.10k, False: 0]
  ------------------
  113|  5.10k|  DEBUGASSERT(ctrl >= REJECT_NADA); /* crash on TRUE/FALSE */
  ------------------
  |  | 1077|  5.10k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (113:3): [True: 0, False: 5.10k]
  |  Branch (113:3): [True: 5.10k, False: 0]
  ------------------
  114|       |
  115|  5.10k|  alloc = (length ? length : strlen(string));
  ------------------
  |  Branch (115:12): [True: 4.34k, False: 763]
  ------------------
  116|  5.10k|  ns = curlx_malloc(alloc + 1);
  ------------------
  |  | 1483|  5.10k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  117|       |
  118|  5.10k|  if(!ns)
  ------------------
  |  Branch (118:6): [True: 0, False: 5.10k]
  ------------------
  119|      0|    return CURLE_OUT_OF_MEMORY;
  120|       |
  121|       |  /* store output string */
  122|  5.10k|  *ostring = ns;
  123|       |
  124|  9.88M|  while(alloc) {
  ------------------
  |  Branch (124:9): [True: 9.87M, False: 5.08k]
  ------------------
  125|  9.87M|    unsigned char in = (unsigned char)*string;
  126|  9.87M|    if(('%' == in) && (alloc > 2) &&
  ------------------
  |  Branch (126:8): [True: 5.67M, False: 4.19M]
  |  Branch (126:23): [True: 5.67M, False: 179]
  ------------------
  127|  5.67M|       ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   39|  15.5M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  11.3M|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 53.3k, False: 5.62M]
  |  |  |  |  |  Branch (44:38): [True: 9.07k, False: 44.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  11.3M|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 21.4k, False: 5.64M]
  |  |  |  |  |  Branch (27:43): [True: 13.9k, False: 7.56k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  5.65M|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 28.0k, False: 5.62M]
  |  |  |  |  |  Branch (28:43): [True: 14.1k, False: 13.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                     ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   39|  37.1k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  74.3k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 18.6k, False: 18.5k]
  |  |  |  |  |  Branch (44:38): [True: 2.52k, False: 16.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  71.8k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 9.49k, False: 25.1k]
  |  |  |  |  |  Branch (27:43): [True: 5.89k, False: 3.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  28.7k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 10.0k, False: 18.6k]
  |  |  |  |  |  Branch (28:43): [True: 4.81k, False: 5.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|       |      /* this is two hexadecimal digits following a '%' */
  129|  13.2k|      in = (unsigned char)((curlx_hexval(string[1]) << 4) |
  ------------------
  |  |  112|  13.2k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  130|  13.2k|                           curlx_hexval(string[2]));
  ------------------
  |  |  112|  13.2k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  131|  13.2k|      string += 3;
  132|  13.2k|      alloc -= 3;
  133|  13.2k|    }
  134|  9.86M|    else {
  135|  9.86M|      string++;
  136|  9.86M|      alloc--;
  137|  9.86M|    }
  138|       |
  139|  9.87M|    if(((ctrl == REJECT_CTRL) && (in < 0x20)) ||
  ------------------
  |  Branch (139:9): [True: 6.32M, False: 3.54M]
  |  Branch (139:34): [True: 9, False: 6.32M]
  ------------------
  140|  9.87M|       ((ctrl == REJECT_ZERO) && (in == 0))) {
  ------------------
  |  Branch (140:9): [True: 3.54M, False: 6.32M]
  |  Branch (140:34): [True: 5, False: 3.54M]
  ------------------
  141|     14|      curlx_safefree(*ostring);
  ------------------
  |  | 1332|     14|  do {                      \
  |  | 1333|     14|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|     14|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|     14|    (ptr) = NULL;           \
  |  | 1335|     14|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 14]
  |  |  ------------------
  ------------------
  142|     14|      return CURLE_URL_MALFORMAT;
  143|     14|    }
  144|       |
  145|  9.87M|    *ns++ = (char)in;
  146|  9.87M|  }
  147|  5.08k|  *ns = 0; /* terminate it */
  148|       |
  149|  5.08k|  if(olen)
  ------------------
  |  Branch (149:6): [True: 4.63k, False: 452]
  ------------------
  150|       |    /* store output size */
  151|  4.63k|    *olen = ns - *ostring;
  152|       |
  153|  5.08k|  return CURLE_OK;
  154|  5.10k|}
curl_free:
  191|  7.42k|{
  192|  7.42k|  curlx_free(p);
  ------------------
  |  | 1488|  7.42k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  193|  7.42k|}
Curl_hexencode:
  203|  3.09k|{
  204|  3.09k|  DEBUGASSERT(src && len && (olen >= 3));
  ------------------
  |  | 1077|  3.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (204:3): [True: 0, False: 3.09k]
  |  Branch (204:3): [True: 0, False: 0]
  |  Branch (204:3): [True: 0, False: 0]
  |  Branch (204:3): [True: 3.09k, False: 0]
  |  Branch (204:3): [True: 3.09k, False: 0]
  |  Branch (204:3): [True: 3.09k, False: 0]
  ------------------
  205|  3.09k|  if(src && len && (olen >= 3)) {
  ------------------
  |  Branch (205:6): [True: 3.09k, False: 0]
  |  Branch (205:13): [True: 3.09k, False: 0]
  |  Branch (205:20): [True: 3.09k, False: 0]
  ------------------
  206|   102k|    while(len-- && (olen >= 3)) {
  ------------------
  |  Branch (206:11): [True: 99.0k, False: 3.09k]
  |  Branch (206:20): [True: 99.0k, False: 0]
  ------------------
  207|  99.0k|      out[0] = Curl_ldigits[*src >> 4];
  208|  99.0k|      out[1] = Curl_ldigits[*src & 0x0F];
  209|  99.0k|      ++src;
  210|  99.0k|      out += 2;
  211|  99.0k|      olen -= 2;
  212|  99.0k|    }
  213|  3.09k|    *out = 0;
  214|  3.09k|  }
  215|      0|  else if(olen)
  ------------------
  |  Branch (215:11): [True: 0, False: 0]
  ------------------
  216|      0|    *out = 0;
  217|  3.09k|}
Curl_hexbyte:
  225|  2.62M|{
  226|  2.62M|  dest[0] = Curl_udigits[val >> 4];
  227|  2.62M|  dest[1] = Curl_udigits[val & 0x0F];
  228|  2.62M|}

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

Curl_wildcard_init:
  183|      4|{
  184|      4|  Curl_llist_init(&wc->filelist, fileinfo_dtor);
  185|      4|  wc->state = CURLWC_INIT;
  186|      4|}
Curl_wildcard_dtor:
  189|  35.4k|{
  190|  35.4k|  struct WildcardData *wc = *wcp;
  191|  35.4k|  if(!wc)
  ------------------
  |  Branch (191:6): [True: 35.4k, False: 4]
  ------------------
  192|  35.4k|    return;
  193|       |
  194|      4|  if(wc->dtor) {
  ------------------
  |  Branch (194:6): [True: 0, False: 4]
  ------------------
  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|      4|  DEBUGASSERT(!wc->ftpwc);
  ------------------
  |  | 1077|      4|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (199:3): [True: 0, False: 4]
  |  Branch (199:3): [True: 4, False: 0]
  ------------------
  200|       |
  201|      4|  Curl_llist_destroy(&wc->filelist, NULL);
  202|      4|  curlx_safefree(wc->path);
  ------------------
  |  | 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]
  |  |  ------------------
  ------------------
  203|      4|  curlx_safefree(wc->pattern);
  ------------------
  |  | 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]
  |  |  ------------------
  ------------------
  204|      4|  wc->state = CURLWC_INIT;
  205|      4|  curlx_free(wc);
  ------------------
  |  | 1488|      4|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  206|       |  *wcp = NULL;
  207|      4|}

curl_getenv:
   27|  24.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|  24.2k|  char *env = getenv(variable);
   67|  24.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: 24.2k]
  |  Branch (67:18): [True: 0, False: 0]
  ------------------
   68|  24.2k|#endif
   69|  24.2k|}

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

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

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

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

Curl_resolv_dns_queries:
  126|  5.77k|{
  127|  5.77k|  (void)data;
  128|  5.77k|  switch(ip_version) {
  129|      2|  case CURL_IPRESOLVE_V6:
  ------------------
  |  | 2312|      2|#define CURL_IPRESOLVE_V6       2L /* uses only IPv6 addresses/connections */
  ------------------
  |  Branch (129:3): [True: 2, False: 5.77k]
  ------------------
  130|      2|    return CURL_DNSQ_AAAA;
  ------------------
  |  |   52|      2|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  131|    112|  case CURL_IPRESOLVE_V4:
  ------------------
  |  | 2311|    112|#define CURL_IPRESOLVE_V4       1L /* uses only IPv4 addresses/connections */
  ------------------
  |  Branch (131:3): [True: 112, False: 5.66k]
  ------------------
  132|    112|    return CURL_DNSQ_A;
  ------------------
  |  |   51|    112|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  133|  5.65k|  default:
  ------------------
  |  Branch (133:3): [True: 5.65k, False: 114]
  ------------------
  134|  5.65k|    if(ipv6works(data))
  ------------------
  |  Branch (134:8): [True: 5.65k, False: 0]
  ------------------
  135|  5.65k|      return (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|  5.65k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                    return (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|  5.65k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  136|      0|    else
  137|      0|      return CURL_DNSQ_A;
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  138|  5.77k|  }
  139|  5.77k|}
Curl_resolv_query_str:
  143|    689|{
  144|    689|  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: 689]
  ------------------
  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: 689]
  ------------------
  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: 689]
  ------------------
  150|      0|    return "AAAA+HTTPS";
  151|    292|  case (CURL_DNSQ_AAAA):
  ------------------
  |  |   52|    292|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (151:3): [True: 292, False: 397]
  ------------------
  152|    292|    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: 689]
  ------------------
  154|      0|    return "A+HTTPS";
  155|    397|  case (CURL_DNSQ_A):
  ------------------
  |  |   51|    397|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (155:3): [True: 397, False: 292]
  ------------------
  156|    397|    return "A";
  157|      0|  case (CURL_DNSQ_HTTPS):
  ------------------
  |  |   53|      0|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  |  Branch (157:3): [True: 0, False: 689]
  ------------------
  158|      0|    return "HTTPS";
  159|      0|  case 0:
  ------------------
  |  Branch (159:3): [True: 0, False: 689]
  ------------------
  160|      0|    return "-";
  161|      0|  default:
  ------------------
  |  Branch (161:3): [True: 0, False: 689]
  ------------------
  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|    689|  }
  165|    689|}
Curl_printable_address:
  177|    119|{
  178|    119|  DEBUGASSERT(bufsize);
  ------------------
  |  | 1077|    119|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 119]
  |  Branch (178:3): [True: 119, False: 0]
  ------------------
  179|    119|  buf[0] = 0;
  180|       |
  181|    119|  switch(ai->ai_family) {
  182|     93|  case AF_INET: {
  ------------------
  |  Branch (182:3): [True: 93, False: 26]
  ------------------
  183|     93|    const struct sockaddr_in *sa4 = (const void *)ai->ai_addr;
  184|     93|    const struct in_addr *ipaddr4 = &sa4->sin_addr;
  185|     93|    (void)curlx_inet_ntop(ai->ai_family, (const void *)ipaddr4, buf, bufsize);
  186|     93|    break;
  187|      0|  }
  188|      0|#ifdef USE_IPV6
  189|     26|  case AF_INET6: {
  ------------------
  |  Branch (189:3): [True: 26, False: 93]
  ------------------
  190|     26|    const struct sockaddr_in6 *sa6 = (const void *)ai->ai_addr;
  191|     26|    const struct in6_addr *ipaddr6 = &sa6->sin6_addr;
  192|     26|    (void)curlx_inet_ntop(ai->ai_family, (const void *)ipaddr6, buf, bufsize);
  193|     26|    break;
  194|      0|  }
  195|      0|#endif
  196|      0|  default:
  ------------------
  |  Branch (196:3): [True: 0, False: 119]
  ------------------
  197|      0|    break;
  198|    119|  }
  199|    119|}
Curl_probeipv6:
  290|  10.8k|{
  291|       |  /* probe to see if we have a working IPv6 stack */
  292|  10.8k|  curl_socket_t s = CURL_SOCKET(PF_INET6, SOCK_DGRAM, 0);
  ------------------
  |  | 1441|  10.8k|  curl_dbg_socket((int)(domain), type, protocol, __LINE__, __FILE__)
  ------------------
  293|  10.8k|  multi->ipv6_works = FALSE;
  ------------------
  |  | 1054|  10.8k|#define FALSE false
  ------------------
  294|  10.8k|  if(s == CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  10.8k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (294:6): [True: 0, False: 10.8k]
  ------------------
  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|  10.8k|  else {
  299|  10.8k|    multi->ipv6_works = TRUE;
  ------------------
  |  | 1051|  10.8k|#define TRUE true
  ------------------
  300|  10.8k|    sclose(s);
  ------------------
  |  | 1433|  10.8k|#define sclose(sockfd) curl_dbg_sclose(sockfd, __LINE__, __FILE__)
  ------------------
  301|  10.8k|  }
  302|  10.8k|  return CURLE_OK;
  303|  10.8k|}
Curl_host_is_ipnum:
  321|    814|{
  322|    814|  struct in_addr in;
  323|    814|#ifdef USE_IPV6
  324|    814|  struct in6_addr in6;
  325|    814|#endif
  326|    814|  if(curlx_inet_pton(AF_INET, hostname, &in) > 0
  ------------------
  |  Branch (326:6): [True: 2, False: 812]
  ------------------
  327|    812|#ifdef USE_IPV6
  328|    812|     || curlx_inet_pton(AF_INET6, hostname, &in6) > 0
  ------------------
  |  Branch (328:9): [True: 10, False: 802]
  ------------------
  329|    814|#endif
  330|    814|    )
  331|     12|    return TRUE;
  ------------------
  |  | 1051|     12|#define TRUE true
  ------------------
  332|    802|  return FALSE;
  ------------------
  |  | 1054|    802|#define FALSE false
  ------------------
  333|    814|}
Curl_resolv_announce_start:
  364|  5.90k|{
  365|  5.90k|  if(data->set.resolver_start) {
  ------------------
  |  Branch (365:6): [True: 0, False: 5.90k]
  ------------------
  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|  5.90k|  return CURLE_OK;
  379|  5.90k|}
Curl_resolv_elapsed_ms:
  475|    957|{
  476|    957|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  477|    957|  if(!async)
  ------------------
  |  Branch (477:6): [True: 0, False: 957]
  ------------------
  478|      0|    return CURL_TIMEOUT_RESOLVE_MS;
  ------------------
  |  |   38|      0|#define CURL_TIMEOUT_RESOLVE_MS (300 * 1000)
  ------------------
  479|    957|  return curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  480|    957|}
Curl_resolv_has_answers:
  484|  1.08k|{
  485|  1.08k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  486|  1.08k|  uint8_t check_queries;
  487|       |  /* a no longer existing/running resolve has all answers. */
  488|  1.08k|  if(!async || async->done)
  ------------------
  |  Branch (488:6): [True: 0, False: 1.08k]
  |  Branch (488:16): [True: 0, False: 1.08k]
  ------------------
  489|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  490|       |  /* Relevant are only queries undertaken. Others are considered answered. */
  491|  1.08k|  check_queries = (dns_queries & async->dns_queries);
  492|  1.08k|  if((check_queries & async->dns_responses) != check_queries) {
  ------------------
  |  Branch (492:6): [True: 957, False: 126]
  ------------------
  493|    957|    return FALSE;
  ------------------
  |  | 1054|    957|#define FALSE false
  ------------------
  494|    957|  }
  495|    126|  return TRUE;
  ------------------
  |  | 1051|    126|#define TRUE true
  ------------------
  496|  1.08k|}
Curl_resolv_get_ai:
  502|    220|{
  503|    220|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  504|    220|  (void)index;
  505|    220|  if(!async)
  ------------------
  |  Branch (505:6): [True: 0, False: 220]
  ------------------
  506|      0|    return NULL;
  507|    220|  if((ai_family == AF_INET) && !(async->dns_queries & CURL_DNSQ_A))
  ------------------
  |  |   51|    110|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (507:6): [True: 110, False: 110]
  |  Branch (507:32): [True: 0, False: 110]
  ------------------
  508|      0|    return NULL;
  509|    220|#ifdef USE_IPV6
  510|    220|  if((ai_family == AF_INET6) && !(async->dns_queries & CURL_DNSQ_AAAA))
  ------------------
  |  |   52|    110|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (510:6): [True: 110, False: 110]
  |  Branch (510:33): [True: 18, False: 92]
  ------------------
  511|     18|    return NULL;
  512|    202|#endif
  513|    202|  return Curl_async_get_ai(data, async, ai_family, index);
  514|    220|}
Curl_resolv_blocking:
  774|    194|{
  775|    194|  CURLcode result;
  776|    194|  uint32_t resolv_id;
  777|    194|  DEBUGASSERT(hostname && *hostname);
  ------------------
  |  | 1077|    194|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (777:3): [True: 0, False: 194]
  |  Branch (777:3): [True: 0, False: 0]
  |  Branch (777:3): [True: 194, False: 0]
  |  Branch (777:3): [True: 194, False: 0]
  ------------------
  778|    194|  *pdns = NULL;
  779|       |  /* We cannot do a blocking resolve using DoH currently */
  780|    194|  result = hostip_resolv(data, dns_queries,
  781|    194|                         hostname, port, transport, FALSE, 0, FALSE,
  ------------------
  |  | 1054|    194|#define FALSE false
  ------------------
                                       hostname, port, transport, FALSE, 0, FALSE,
  ------------------
  |  | 1054|    194|#define FALSE false
  ------------------
  782|    194|                         &resolv_id, pdns);
  783|    194|  switch(result) {
  784|     28|  case CURLE_OK:
  ------------------
  |  Branch (784:3): [True: 28, False: 166]
  ------------------
  785|     28|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1077|     28|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (785:5): [True: 0, False: 28]
  |  Branch (785:5): [True: 28, False: 0]
  ------------------
  786|     28|    break;
  787|     28|#ifdef USE_CURL_ASYNC
  788|    166|  case CURLE_AGAIN:
  ------------------
  |  Branch (788:3): [True: 166, False: 28]
  ------------------
  789|    166|    DEBUGASSERT(!*pdns);
  ------------------
  |  | 1077|    166|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (789:5): [True: 0, False: 166]
  |  Branch (789:5): [True: 166, False: 0]
  ------------------
  790|    166|    result = Curl_async_await(data, resolv_id, pdns);
  791|    166|    Curl_resolv_destroy(data, resolv_id);
  792|    166|    break;
  793|      0|#endif
  794|      0|  default:
  ------------------
  |  Branch (794:3): [True: 0, False: 194]
  ------------------
  795|      0|    break;
  796|    194|  }
  797|    194|  return result;
  798|    194|}
Curl_resolv:
 1003|  5.77k|{
 1004|  5.77k|  *presolv_id = 0;
 1005|  5.77k|  *pdns = NULL;
 1006|       |
 1007|  5.77k|  if(timeout_ms < 0)
  ------------------
  |  Branch (1007:6): [True: 0, False: 5.77k]
  ------------------
 1008|       |    /* got an already expired timeout */
 1009|      0|    return CURLE_OPERATION_TIMEDOUT;
 1010|  5.77k|  else if(!timeout_ms)
  ------------------
  |  Branch (1010:11): [True: 0, False: 5.77k]
  ------------------
 1011|      0|    timeout_ms = CURL_TIMEOUT_RESOLVE_MS;
  ------------------
  |  |   38|      0|#define CURL_TIMEOUT_RESOLVE_MS (300 * 1000)
  ------------------
 1012|       |
 1013|  5.77k|#ifdef USE_UNIX_SOCKETS
 1014|  5.77k|  if(peer->unix_socket)
  ------------------
  |  Branch (1014:6): [True: 23, False: 5.75k]
  ------------------
 1015|     23|    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|  5.75k|  return hostip_resolv(data, dns_queries, peer->hostname, peer->port,
 1039|       |                       transport, for_proxy, timeout_ms, TRUE, presolv_id,
  ------------------
  |  | 1051|  5.75k|#define TRUE true
  ------------------
 1040|  5.75k|                       pdns);
 1041|  5.77k|}
Curl_async_get:
 1047|  4.27k|{
 1048|  4.27k|  struct Curl_resolv_async *async = data->state.async;
 1049|  4.27k|  for(; async; async = async->next) {
  ------------------
  |  Branch (1049:9): [True: 4.27k, False: 0]
  ------------------
 1050|  4.27k|    if(async->id == resolv_id)
  ------------------
  |  Branch (1050:8): [True: 4.27k, False: 0]
  ------------------
 1051|  4.27k|      return async;
 1052|  4.27k|  }
 1053|      0|  return NULL;
 1054|  4.27k|}
Curl_resolv_take_result:
 1058|  1.23k|{
 1059|  1.23k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
 1060|  1.23k|  CURLcode result;
 1061|       |
 1062|       |  /* If async resolving is ongoing, this must be set */
 1063|  1.23k|  if(!async)
  ------------------
  |  Branch (1063:6): [True: 0, False: 1.23k]
  ------------------
 1064|      0|    return CURLE_FAILED_INIT;
 1065|       |
 1066|       |  /* check if we have the name resolved by now (from someone else) */
 1067|  1.23k|  result = Curl_dnscache_get(data, async->dns_queries,
 1068|  1.23k|                             async->hostname, async->port, pdns);
 1069|  1.23k|  if(*pdns) {
  ------------------
  |  Branch (1069:6): [True: 0, False: 1.23k]
  ------------------
 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.23k|  else if(result) {
  ------------------
  |  Branch (1075:11): [True: 0, False: 1.23k]
  ------------------
 1076|      0|    Curl_async_shutdown(data, async);
 1077|      0|    return Curl_async_failed(data, async, NULL);
 1078|      0|  }
 1079|       |
 1080|  1.23k|  result = hostip_resolv_take_result(data, async, pdns);
 1081|       |
 1082|  1.23k|  if(*pdns) {
  ------------------
  |  Branch (1082:6): [True: 0, False: 1.23k]
  ------------------
 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.23k|  else if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|  1.23k|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 16, False: 1.21k]
  |  |  ------------------
  |  |   78|  1.23k|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 131, False: 1.08k]
  |  |  ------------------
  ------------------
 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|    147|    if(async->negative_answer)
  ------------------
  |  Branch (1094:8): [True: 147, False: 0]
  ------------------
 1095|    147|      Curl_dnscache_add_negative(data, async->dns_queries,
 1096|    147|                                 async->hostname, async->port);
 1097|    147|    failf(data, "Could not resolve: %s:%u", async->hostname, async->port);
  ------------------
  |  |   62|    147|#define failf Curl_failf
  ------------------
 1098|    147|  }
 1099|  1.08k|  else if(result) {
  ------------------
  |  Branch (1099:11): [True: 0, False: 1.08k]
  ------------------
 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.23k|  return result;
 1104|  1.23k|}
Curl_resolv_pollset:
 1108|  1.08k|{
 1109|  1.08k|  struct Curl_resolv_async *async = data->state.async;
 1110|  1.08k|  CURLcode result = CURLE_OK;
 1111|       |
 1112|  1.08k|  (void)ps;
 1113|  2.16k|  for(; async && !result; async = async->next) {
  ------------------
  |  Branch (1113:9): [True: 1.08k, False: 1.08k]
  |  Branch (1113:18): [True: 1.08k, False: 0]
  ------------------
 1114|  1.08k|#ifndef CURL_DISABLE_DOH
 1115|  1.08k|    if(async->doh) /* DoH has nothing for the pollset */
  ------------------
  |  Branch (1115:8): [True: 561, False: 522]
  ------------------
 1116|    561|      continue;
 1117|    522|#endif
 1118|    522|    result = Curl_async_pollset(data, async, ps);
 1119|    522|  }
 1120|  1.08k|  return result;
 1121|  1.08k|}
Curl_resolv_destroy:
 1124|    251|{
 1125|    251|  struct Curl_resolv_async **panchor = &data->state.async;
 1126|       |
 1127|    251|  for(; *panchor; panchor = &(*panchor)->next) {
  ------------------
  |  Branch (1127:9): [True: 166, False: 85]
  ------------------
 1128|    166|    struct Curl_resolv_async *async = *panchor;
 1129|    166|    if(async->id == resolv_id) {
  ------------------
  |  Branch (1129:8): [True: 166, False: 0]
  ------------------
 1130|    166|      *panchor = async->next;
 1131|    166|      Curl_async_destroy(data, async);
 1132|    166|      break;
 1133|    166|    }
 1134|    166|  }
 1135|    251|}
Curl_resolv_shutdown_all:
 1138|  5.65k|{
 1139|  5.65k|  struct Curl_resolv_async *async = data->state.async;
 1140|  6.27k|  for(; async; async = async->next) {
  ------------------
  |  Branch (1140:9): [True: 620, False: 5.65k]
  ------------------
 1141|    620|    Curl_async_shutdown(data, async);
 1142|    620|  }
 1143|  5.65k|}
Curl_resolv_destroy_all:
 1146|  31.5k|{
 1147|  32.1k|  while(data->state.async) {
  ------------------
  |  Branch (1147:9): [True: 620, False: 31.5k]
  ------------------
 1148|    620|    struct Curl_resolv_async *async = data->state.async;
 1149|    620|    data->state.async = async->next;
 1150|    620|    Curl_async_destroy(data, async);
 1151|    620|  }
 1152|  31.5k|}
hostip.c:ipv6works:
  309|  5.70k|{
  310|  5.70k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  5.70k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (310:3): [True: 0, False: 5.70k]
  |  Branch (310:3): [True: 5.70k, False: 0]
  ------------------
  311|  5.70k|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1077|  5.70k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (311:3): [True: 0, False: 5.70k]
  |  Branch (311:3): [True: 5.70k, False: 0]
  ------------------
  312|  5.70k|  return data ? data->multi->ipv6_works : FALSE;
  ------------------
  |  | 1054|  5.70k|#define FALSE false
  ------------------
  |  Branch (312:10): [True: 5.70k, False: 0]
  ------------------
  313|  5.70k|}
hostip.c:hostip_resolv:
  695|  5.94k|{
  696|  5.94k|  size_t hostname_len;
  697|  5.94k|  CURLcode result = RESOLV_FAIL(for_proxy);
  ------------------
  |  |   74|  5.94k|  ((for_proxy) ? CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST)
  |  |  ------------------
  |  |  |  Branch (74:4): [True: 2.55k, False: 3.38k]
  |  |  ------------------
  ------------------
  698|  5.94k|  bool cache_dns = FALSE;
  ------------------
  |  | 1054|  5.94k|#define FALSE false
  ------------------
  699|  5.94k|  bool negative = FALSE;
  ------------------
  |  | 1054|  5.94k|#define FALSE false
  ------------------
  700|       |
  701|  5.94k|  (void)timeout_ms; /* not used in all ifdefs */
  702|  5.94k|  *presolv_id = 0;
  703|  5.94k|  *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|  5.94k|  hostname_len = strlen(hostname);
  711|  5.94k|  DEBUGASSERT(hostname_len);
  ------------------
  |  | 1077|  5.94k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (711:3): [True: 0, False: 5.94k]
  |  Branch (711:3): [True: 5.94k, False: 0]
  ------------------
  712|  5.94k|  if(hostname_len >= 7 &&
  ------------------
  |  Branch (712:6): [True: 5.25k, False: 687]
  ------------------
  713|  5.25k|     (curl_strequal(&hostname[hostname_len - 6], ".onion") ||
  ------------------
  |  Branch (713:7): [True: 0, False: 5.25k]
  ------------------
  714|  5.25k|      curl_strequal(&hostname[hostname_len - 7], ".onion."))) {
  ------------------
  |  Branch (714:7): [True: 0, False: 5.25k]
  ------------------
  715|      0|    failf(data, "Not resolving .onion address (RFC 7686)");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  716|      0|    goto out;
  717|      0|  }
  718|       |
  719|  5.94k|#ifdef DEBUGBUILD
  720|  5.94k|  CURL_TRC_DNS(data, "hostip_resolv(%s:%u, queries=%s)",
  ------------------
  |  |  168|  5.94k|  do {                                 \
  |  |  169|  5.94k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  5.94k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.94k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  11.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.94k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.94k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  11.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  5.94k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  5.94k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  5.94k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 5.94k]
  |  |  ------------------
  ------------------
  721|  5.94k|               hostname, port, Curl_resolv_query_str(dns_queries));
  722|  5.94k|  if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) &&
  ------------------
  |  |   56|  5.94k|#define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   51|  5.94k|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   52|  5.94k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
                if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|  5.94k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (722:6): [True: 56, False: 5.88k]
  ------------------
  723|     56|     getenv("CURL_DBG_RESOLV_FAIL_IPV6")) {
  ------------------
  |  Branch (723:6): [True: 0, False: 56]
  ------------------
  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|  5.94k|#endif
  729|       |  /* Let's check our DNS cache first */
  730|  5.94k|  result = Curl_dnscache_get(data, dns_queries, hostname, port, pdns);
  731|  5.94k|  if(*pdns) {
  ------------------
  |  Branch (731:6): [True: 29, False: 5.91k]
  ------------------
  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|  5.91k|  else if(result) {
  ------------------
  |  Branch (735:11): [True: 15, False: 5.90k]
  ------------------
  736|     15|    infof(data, "Negative DNS entry");
  ------------------
  |  |  143|     15|  do {                               \
  |  |  144|     15|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     15|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 15, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  320|     15|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     15|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  737|     15|    result = hostip_resolv_failed(data, hostname, for_proxy);
  738|     15|  }
  739|  5.90k|  else {
  740|       |    /* No luck, we need to start resolving. */
  741|  5.90k|    cache_dns = TRUE;
  ------------------
  |  | 1051|  5.90k|#define TRUE true
  ------------------
  742|  5.90k|    result = hostip_resolv_start(data, dns_queries, hostname, port,
  743|  5.90k|                                 transport, for_proxy, timeout_ms, allowDOH,
  744|  5.90k|                                 presolv_id, pdns, &negative);
  745|  5.90k|  }
  746|       |
  747|  5.94k|out:
  748|  5.94k|  if(result && (result != CURLE_AGAIN)) {
  ------------------
  |  Branch (748:6): [True: 809, False: 5.13k]
  |  Branch (748:16): [True: 23, False: 786]
  ------------------
  749|     23|    Curl_dns_entry_unlink(data, pdns);
  750|     23|    if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|     23|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 15, False: 8]
  |  |  ------------------
  |  |   78|     23|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 0, False: 8]
  |  |  ------------------
  ------------------
  751|     15|      if(cache_dns && negative)
  ------------------
  |  Branch (751:10): [True: 0, False: 15]
  |  Branch (751:23): [True: 0, False: 0]
  ------------------
  752|      0|        Curl_dnscache_add_negative(data, dns_queries, hostname, port);
  753|     15|      failf(data, "Could not resolve: %s:%u", hostname, port);
  ------------------
  |  |   62|     15|#define failf Curl_failf
  ------------------
  754|     15|    }
  755|      8|    else {
  756|      8|      failf(data, "Error %d resolving %s:%u", (int)result, hostname, port);
  ------------------
  |  |   62|      8|#define failf Curl_failf
  ------------------
  757|      8|    }
  758|     23|  }
  759|  5.92k|  else if(cache_dns && *pdns) {
  ------------------
  |  Branch (759:11): [True: 5.89k, False: 29]
  |  Branch (759:24): [True: 5.10k, False: 786]
  ------------------
  760|  5.10k|    result = Curl_dnscache_add(data, *pdns);
  761|  5.10k|    if(result)
  ------------------
  |  Branch (761:8): [True: 0, False: 5.10k]
  ------------------
  762|      0|      Curl_dns_entry_unlink(data, pdns);
  763|  5.10k|  }
  764|       |
  765|  5.94k|  return result;
  766|  5.94k|}
hostip.c:hostip_resolv_failed:
  347|     15|{
  348|     15|  failf(data, "Could not resolve %s: %s",
  ------------------
  |  |   62|     15|#define failf Curl_failf
  ------------------
  349|     15|        for_proxy ? "proxy" : "host", hostname);
  ------------------
  |  Branch (349:9): [True: 0, False: 15]
  ------------------
  350|     15|  return RESOLV_FAIL(for_proxy);
  ------------------
  |  |   74|     15|  ((for_proxy) ? CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST)
  |  |  ------------------
  |  |  |  Branch (74:4): [True: 0, False: 15]
  |  |  ------------------
  ------------------
  351|     15|}
hostip.c:hostip_resolv_start:
  552|  5.90k|{
  553|  5.90k|#ifdef USE_CURL_ASYNC
  554|  5.90k|  struct Curl_resolv_async *async = NULL;
  555|  5.90k|#endif
  556|  5.90k|  struct Curl_addrinfo *addr = NULL;
  557|  5.90k|  size_t hostname_len;
  558|  5.90k|  CURLcode result = CURLE_OK;
  559|       |
  560|  5.90k|  *pnegative = FALSE;
  ------------------
  |  | 1054|  5.90k|#define FALSE false
  ------------------
  561|       |
  562|  5.90k|  (void)timeout_ms; /* not in all ifdefs */
  563|  5.90k|  *presolv_id = 0;
  564|  5.90k|  *pdns = NULL;
  565|       |
  566|       |  /* Check for "known" things to resolve ourselves. */
  567|  5.90k|#ifndef USE_RESOLVE_ON_IPS
  568|  5.90k|  if(Curl_is_ipaddr(hostname)) {
  ------------------
  |  Branch (568:6): [True: 5.02k, False: 879]
  ------------------
  569|       |    /* test655 verifies that the announce is done, even though there
  570|       |     * is no real resolving. So, keep doing this. */
  571|  5.02k|    result = Curl_resolv_announce_start(data, NULL);
  572|  5.02k|    if(result)
  ------------------
  |  Branch (572:8): [True: 0, False: 5.02k]
  ------------------
  573|      0|      goto out;
  574|       |    /* shortcut literal IP addresses, if we are not told to resolve them. */
  575|  5.02k|    result = Curl_str2addr(hostname, port, &addr);
  576|  5.02k|    goto out;
  577|  5.02k|  }
  578|    879|#endif
  579|       |
  580|    879|  hostname_len = strlen(hostname);
  581|    879|  if(curl_strequal(hostname, "localhost") ||
  ------------------
  |  Branch (581:6): [True: 45, False: 834]
  ------------------
  582|    834|     curl_strequal(hostname, "localhost.") ||
  ------------------
  |  Branch (582:6): [True: 26, False: 808]
  ------------------
  583|    808|     tailmatch(hostname, hostname_len, STRCONST(".localhost")) ||
  ------------------
  |  | 1297|    808|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (583:6): [True: 5, False: 803]
  ------------------
  584|    803|     tailmatch(hostname, hostname_len, STRCONST(".localhost."))) {
  ------------------
  |  | 1297|    803|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (584:6): [True: 9, False: 794]
  ------------------
  585|     85|    result = Curl_resolv_announce_start(data, NULL);
  586|     85|    if(result)
  ------------------
  |  Branch (586:8): [True: 0, False: 85]
  ------------------
  587|      0|      goto out;
  588|     85|    addr = get_localhost(port, hostname);
  589|     85|    if(!addr)
  ------------------
  |  Branch (589:8): [True: 0, False: 85]
  ------------------
  590|      0|      result = CURLE_OUT_OF_MEMORY;
  591|     85|    goto out;
  592|     85|  }
  593|       |
  594|    794|#ifndef CURL_DISABLE_DOH
  595|    794|  if(!Curl_is_ipaddr(hostname) && allowDOH && data->set.doh) {
  ------------------
  |  Branch (595:6): [True: 794, False: 0]
  |  Branch (595:35): [True: 628, False: 166]
  |  Branch (595:47): [True: 354, False: 274]
  ------------------
  596|    354|    result = Curl_resolv_announce_start(data, NULL);
  597|    354|    if(result)
  ------------------
  |  Branch (597:8): [True: 0, False: 354]
  ------------------
  598|      0|      goto out;
  599|    354|    if(!async) {
  ------------------
  |  Branch (599:8): [True: 354, False: 0]
  ------------------
  600|    354|      async = hostip_async_new(data, dns_queries, hostname, port,
  601|    354|                               transport, for_proxy, timeout_ms);
  602|    354|      if(!async) {
  ------------------
  |  Branch (602:10): [True: 0, False: 354]
  ------------------
  603|      0|        result = CURLE_OUT_OF_MEMORY;
  604|      0|        goto out;
  605|      0|      }
  606|    354|    }
  607|    354|    result = Curl_doh(data, async);
  608|    354|    goto out;
  609|    354|  }
  610|       |#else
  611|       |  (void)allowDOH;
  612|       |#endif
  613|       |
  614|       |  /* Can we provide the requested IP specifics in resolving? */
  615|    440|  if(!can_resolve_dns_queries(data, dns_queries)) {
  ------------------
  |  Branch (615:6): [True: 0, False: 440]
  ------------------
  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|    440|#ifdef CURLRES_ASYNCH
  621|    440|  (void)addr;
  622|    440|  if(!async) {
  ------------------
  |  Branch (622:6): [True: 440, False: 0]
  ------------------
  623|    440|    async = hostip_async_new(data, dns_queries, hostname, port,
  624|    440|                             transport, for_proxy, timeout_ms);
  625|    440|    if(!async) {
  ------------------
  |  Branch (625:8): [True: 0, False: 440]
  ------------------
  626|      0|      result = CURLE_OUT_OF_MEMORY;
  627|      0|      goto out;
  628|      0|    }
  629|    440|  }
  630|    440|  result = Curl_async_getaddrinfo(data, async);
  631|    440|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (631:6): [True: 0, False: 440]
  ------------------
  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|  5.90k|out:
  653|  5.90k|  if(!result) {
  ------------------
  |  Branch (653:6): [True: 5.89k, False: 8]
  ------------------
  654|  5.89k|    if(addr) {
  ------------------
  |  Branch (654:8): [True: 5.10k, False: 786]
  ------------------
  655|       |      /* we got a response, create a dns entry, add to cache, return */
  656|  5.10k|      DEBUGASSERT(!*pdns);
  ------------------
  |  | 1077|  5.10k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (656:7): [True: 0, False: 5.10k]
  |  Branch (656:7): [True: 5.10k, False: 0]
  ------------------
  657|  5.10k|      *pdns = Curl_dnscache_mk_entry(data, dns_queries, &addr, hostname, port);
  658|  5.10k|      if(!*pdns)
  ------------------
  |  Branch (658:10): [True: 0, False: 5.10k]
  ------------------
  659|      0|        result = CURLE_OUT_OF_MEMORY;
  660|  5.10k|    }
  661|    786|    else if(!*pdns)
  ------------------
  |  Branch (661:13): [True: 786, False: 0]
  ------------------
  662|    786|      result = CURLE_AGAIN;
  663|  5.89k|  }
  664|      8|  else if(*pdns)
  ------------------
  |  Branch (664:11): [True: 0, False: 8]
  ------------------
  665|      0|    Curl_dns_entry_unlink(data, pdns);
  666|      8|  else if(addr)
  ------------------
  |  Branch (666:11): [True: 0, False: 8]
  ------------------
  667|      0|    Curl_freeaddrinfo(addr);
  668|       |
  669|  5.90k|#ifdef USE_CURL_ASYNC
  670|  5.90k|  if(async) {
  ------------------
  |  Branch (670:6): [True: 794, False: 5.10k]
  ------------------
  671|    794|    if(result == CURLE_AGAIN) { /* still need it, link, return id. */
  ------------------
  |  Branch (671:8): [True: 786, False: 8]
  ------------------
  672|    786|      *presolv_id = async->id;
  673|    786|      async->next = data->state.async;
  674|    786|      data->state.async = async;
  675|    786|    }
  676|      8|    else {
  677|      8|      *pnegative = !!async->negative_answer;
  678|      8|      Curl_async_destroy(data, async);
  679|      8|    }
  680|    794|  }
  681|  5.90k|#endif
  682|  5.90k|  return result;
  683|  5.90k|}
hostip.c:tailmatch:
  338|  1.61k|{
  339|  1.61k|  if(plen > flen)
  ------------------
  |  Branch (339:6): [True: 1.32k, False: 291]
  ------------------
  340|  1.32k|    return FALSE;
  ------------------
  |  | 1054|  1.32k|#define FALSE false
  ------------------
  341|    291|  return curl_strnequal(part, &full[flen - plen], plen);
  342|  1.61k|}
hostip.c:get_localhost:
  248|     85|{
  249|     85|  struct Curl_addrinfo *ca;
  250|     85|  struct Curl_addrinfo *ca6;
  251|     85|  const size_t ss_size = sizeof(struct sockaddr_in);
  252|     85|  const size_t hostlen = strlen(name);
  253|     85|  struct sockaddr_in sa;
  254|     85|  unsigned int ipv4;
  255|     85|  unsigned short port16 = (unsigned short)(port & 0xffff);
  256|       |
  257|       |  /* memset to clear the sa.sin_zero field */
  258|     85|  memset(&sa, 0, sizeof(sa));
  259|     85|  sa.sin_family = AF_INET;
  260|     85|  sa.sin_port = htons(port16);
  261|     85|  if(curlx_inet_pton(AF_INET, "127.0.0.1", (char *)&ipv4) < 1)
  ------------------
  |  Branch (261:6): [True: 0, False: 85]
  ------------------
  262|      0|    return NULL;
  263|     85|  memcpy(&sa.sin_addr, &ipv4, sizeof(ipv4));
  264|       |
  265|     85|  ca = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen + 1);
  ------------------
  |  | 1485|     85|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  266|     85|  if(!ca)
  ------------------
  |  Branch (266:6): [True: 0, False: 85]
  ------------------
  267|      0|    return NULL;
  268|     85|  ca->ai_flags     = 0;
  269|     85|  ca->ai_family    = AF_INET;
  270|     85|  ca->ai_socktype  = SOCK_STREAM;
  271|     85|  ca->ai_protocol  = IPPROTO_TCP;
  272|     85|  ca->ai_addrlen   = (curl_socklen_t)ss_size;
  273|     85|  ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  274|     85|  memcpy(ca->ai_addr, &sa, ss_size);
  275|     85|  ca->ai_canonname = (char *)ca->ai_addr + ss_size;
  276|     85|  curlx_strcopy(ca->ai_canonname, hostlen + 1, name, hostlen);
  277|       |
  278|     85|  ca6 = get_localhost6(port, name);
  279|     85|  if(!ca6)
  ------------------
  |  Branch (279:6): [True: 0, False: 85]
  ------------------
  280|      0|    return ca;
  281|     85|  ca6->ai_next = ca;
  282|     85|  return ca6;
  283|     85|}
hostip.c:get_localhost6:
  212|     85|{
  213|     85|  struct Curl_addrinfo *ca;
  214|     85|  const size_t ss_size = sizeof(struct sockaddr_in6);
  215|     85|  const size_t hostlen = strlen(name);
  216|     85|  struct sockaddr_in6 sa6;
  217|     85|  unsigned char ipv6[16];
  218|     85|  unsigned short port16 = (unsigned short)(port & 0xffff);
  219|     85|  ca = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen + 1);
  ------------------
  |  | 1485|     85|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  220|     85|  if(!ca)
  ------------------
  |  Branch (220:6): [True: 0, False: 85]
  ------------------
  221|      0|    return NULL;
  222|       |
  223|     85|  memset(&sa6, 0, sizeof(sa6));
  224|     85|  sa6.sin6_family = AF_INET6;
  225|     85|  sa6.sin6_port = htons(port16);
  226|       |
  227|     85|  (void)curlx_inet_pton(AF_INET6, "::1", ipv6);
  228|     85|  memcpy(&sa6.sin6_addr, ipv6, sizeof(ipv6));
  229|       |
  230|     85|  ca->ai_flags     = 0;
  231|     85|  ca->ai_family    = AF_INET6;
  232|     85|  ca->ai_socktype  = SOCK_STREAM;
  233|     85|  ca->ai_protocol  = IPPROTO_TCP;
  234|     85|  ca->ai_addrlen   = (curl_socklen_t)ss_size;
  235|       |  ca->ai_next      = NULL;
  236|     85|  ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  237|     85|  memcpy(ca->ai_addr, &sa6, ss_size);
  238|     85|  ca->ai_canonname = (char *)ca->ai_addr + ss_size;
  239|     85|  curlx_strcopy(ca->ai_canonname, hostlen + 1, name, hostlen);
  240|     85|  return ca;
  241|     85|}
hostip.c:hostip_async_new:
  390|    794|{
  391|    794|  struct Curl_resolv_async *async;
  392|    794|  size_t hostlen = strlen(hostname);
  393|       |
  394|    794|  if(!data->multi) {
  ------------------
  |  Branch (394:6): [True: 0, False: 794]
  ------------------
  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|    794|  async = curlx_calloc(1, sizeof(*async) + hostlen);
  ------------------
  |  | 1485|    794|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  401|    794|  if(!async)
  ------------------
  |  Branch (401:6): [True: 0, False: 794]
  ------------------
  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|    794|  if(data->multi->last_resolv_id == UINT32_MAX)
  ------------------
  |  Branch (409:6): [True: 0, False: 794]
  ------------------
  410|      0|    data->multi->last_resolv_id = 1; /* wrap around */
  411|    794|  else
  412|    794|    data->multi->last_resolv_id++;
  413|    794|  async->id = data->multi->last_resolv_id;
  414|    794|  async->dns_queries = dns_queries;
  415|    794|  async->port = port;
  416|    794|  async->transport = transport;
  417|    794|  async->for_proxy = for_proxy;
  418|    794|  async->start = *Curl_pgrs_now(data);
  419|    794|  async->timeout_ms = timeout_ms;
  420|    794|  if(hostlen) {
  ------------------
  |  Branch (420:6): [True: 794, False: 0]
  ------------------
  421|    794|    memcpy(async->hostname, hostname, hostlen);
  422|    794|    async->is_ipaddr = Curl_is_ipaddr(async->hostname);
  423|    794|    if(async->is_ipaddr)
  ------------------
  |  Branch (423:8): [True: 0, False: 794]
  ------------------
  424|      0|      async->is_ipv4addr = Curl_is_ipv4addr(async->hostname);
  425|    794|  }
  426|       |
  427|    794|  return async;
  428|    794|}
hostip.c:can_resolve_dns_queries:
  355|    440|{
  356|    440|  (void)data;
  357|    440|  if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) && !ipv6works(data))
  ------------------
  |  |   56|    440|#define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   51|    440|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   52|    440|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
                if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) && !ipv6works(data))
  ------------------
  |  |   52|    440|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (357:6): [True: 43, False: 397]
  |  Branch (357:55): [True: 0, False: 43]
  ------------------
  358|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  359|    440|  return TRUE;
  ------------------
  |  | 1051|    440|#define TRUE true
  ------------------
  360|    440|}
hostip.c:resolv_unix:
  953|     23|{
  954|     23|  struct Curl_addrinfo *addr;
  955|     23|  CURLcode result;
  956|       |
  957|     23|  DEBUGASSERT(unix_path);
  ------------------
  |  | 1077|     23|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (957:3): [True: 0, False: 23]
  |  Branch (957:3): [True: 23, False: 0]
  ------------------
  958|     23|  *pdns = NULL;
  959|       |
  960|     23|  result = Curl_unix2addr(unix_path, abstract_path, &addr);
  961|     23|  if(result) {
  ------------------
  |  Branch (961:6): [True: 4, False: 19]
  ------------------
  962|      4|    if(result == CURLE_TOO_LARGE) {
  ------------------
  |  Branch (962:8): [True: 4, False: 0]
  ------------------
  963|       |      /* Long paths are not supported for now */
  964|      4|      failf(data, "Unix socket path too long: '%s'", unix_path);
  ------------------
  |  |   62|      4|#define failf Curl_failf
  ------------------
  965|      4|      result = CURLE_COULDNT_RESOLVE_HOST;
  966|      4|    }
  967|      4|    return result;
  968|      4|  }
  969|       |
  970|     19|  *pdns = Curl_dnscache_mk_entry(data, 0, &addr, NULL, 0);
  971|     19|  return *pdns ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (971:10): [True: 19, False: 0]
  ------------------
  972|     23|}
hostip.c:hostip_resolv_take_result:
  433|  1.23k|{
  434|  1.23k|  CURLcode result;
  435|       |
  436|       |  /* If async resolving is ongoing, this must be set */
  437|  1.23k|  if(!async)
  ------------------
  |  Branch (437:6): [True: 0, False: 1.23k]
  ------------------
  438|      0|    return CURLE_FAILED_INIT;
  439|       |
  440|  1.23k|#ifndef CURL_DISABLE_DOH
  441|  1.23k|  if(async->doh)
  ------------------
  |  Branch (441:6): [True: 688, False: 542]
  ------------------
  442|    688|    result = Curl_doh_take_result(data, async, pdns);
  443|    542|  else
  444|    542|#endif
  445|    542|  result = Curl_async_take_result(data, async, pdns);
  446|       |
  447|  1.23k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (447:6): [True: 1.08k, False: 147]
  ------------------
  448|  1.08k|    CURL_TRC_DNS(data, "resolve incomplete, queries=%s, responses=%s, "
  ------------------
  |  |  168|  1.08k|  do {                                 \
  |  |  169|  1.08k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  1.08k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  1.08k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  2.16k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 1.08k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.08k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  2.16k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((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.08k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  1.08k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  1.08k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 1.08k]
  |  |  ------------------
  ------------------
  449|  1.08k|                 "ongoing=%d for %s:%d",
  450|  1.08k|                 Curl_resolv_query_str(async->dns_queries),
  451|  1.08k|                 Curl_resolv_query_str(async->dns_responses),
  452|  1.08k|                 async->queries_ongoing, async->hostname, async->port);
  453|  1.08k|    result = CURLE_OK;
  454|  1.08k|  }
  455|    147|  else if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|    147|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 143, False: 4]
  |  |  ------------------
  |  |   78|    147|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 4, False: 0]
  |  |  ------------------
  ------------------
  456|    147|    result = Curl_async_failed(data, async, NULL);
  457|    147|  }
  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.23k|  return result;
  471|  1.23k|}

Curl_hsts_init:
   67|  10.8k|{
   68|  10.8k|  struct hsts *h = curlx_calloc(1, sizeof(struct hsts));
  ------------------
  |  | 1485|  10.8k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   69|  10.8k|  if(h) {
  ------------------
  |  Branch (69:6): [True: 10.8k, False: 0]
  ------------------
   70|       |    Curl_llist_init(&h->list, NULL);
   71|  10.8k|  }
   72|  10.8k|  return h;
   73|  10.8k|}
Curl_hsts_cleanup:
   78|  23.9k|{
   79|  23.9k|  struct hsts *h = *hp;
   80|  23.9k|  if(h) {
  ------------------
  |  Branch (80:6): [True: 10.8k, False: 13.1k]
  ------------------
   81|  10.8k|    struct Curl_llist_node *e;
   82|  10.8k|    struct Curl_llist_node *n;
   83|  10.8k|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (83:40): [True: 0, False: 10.8k]
  ------------------
   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|  10.8k|    curlx_free(h->filename);
  ------------------
  |  | 1488|  10.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   89|  10.8k|    curlx_free(h);
  ------------------
  |  | 1488|  10.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   90|       |    *hp = NULL;
   91|  10.8k|  }
   92|  23.9k|}
hsts_check:
  165|    678|{
  166|    678|  struct stsentry *bestsub = NULL;
  167|    678|  if(h) {
  ------------------
  |  Branch (167:6): [True: 678, False: 0]
  ------------------
  168|    678|    time_t now = time(NULL);
  ------------------
  |  |   63|    678|#define time(x) hsts_debugtime(x)
  ------------------
  169|    678|    struct Curl_llist_node *e;
  170|    678|    struct Curl_llist_node *n;
  171|    678|    size_t blen = 0;
  172|       |
  173|    678|    if((hlen > MAX_HSTS_HOSTLEN) || !hlen)
  ------------------
  |  |   42|    678|#define MAX_HSTS_HOSTLEN 2048
  ------------------
  |  Branch (173:8): [True: 2, False: 676]
  |  Branch (173:37): [True: 0, False: 676]
  ------------------
  174|      2|      return NULL;
  175|    676|    if(hostname[hlen - 1] == '.')
  ------------------
  |  Branch (175:8): [True: 19, False: 657]
  ------------------
  176|       |      /* remove the trailing dot */
  177|     19|      --hlen;
  178|       |
  179|    676|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (179:40): [True: 0, False: 676]
  ------------------
  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|    676|  }
  205|    676|  return bestsub;
  206|    678|}
Curl_hsts_save:
  368|  23.9k|{
  369|  23.9k|  struct Curl_llist_node *e;
  370|  23.9k|  struct Curl_llist_node *n;
  371|  23.9k|  CURLcode result = CURLE_OK;
  372|  23.9k|  FILE *out;
  373|  23.9k|  char *tempstore = NULL;
  374|       |
  375|  23.9k|  if(!h)
  ------------------
  |  Branch (375:6): [True: 13.1k, False: 10.8k]
  ------------------
  376|       |    /* no cache activated */
  377|  13.1k|    return CURLE_OK;
  378|       |
  379|       |  /* if no new name is given, use the one we stored from the load */
  380|  10.8k|  if(!file && h->filename)
  ------------------
  |  Branch (380:6): [True: 2, False: 10.8k]
  |  Branch (380:15): [True: 0, False: 2]
  ------------------
  381|      0|    file = h->filename;
  382|       |
  383|  10.8k|  if((h->flags & CURLHSTS_READONLYFILE) || !file || !file[0])
  ------------------
  |  | 1074|  10.8k|#define CURLHSTS_READONLYFILE (1L << 1)
  ------------------
  |  Branch (383:6): [True: 0, False: 10.8k]
  |  Branch (383:44): [True: 2, False: 10.8k]
  |  Branch (383:53): [True: 0, False: 10.8k]
  ------------------
  384|       |    /* marked as read-only, no file or zero length filename */
  385|      2|    goto skipsave;
  386|       |
  387|  10.8k|  result = Curl_fopen(data, file, &out, &tempstore);
  388|  10.8k|  if(!result) {
  ------------------
  |  Branch (388:6): [True: 10.8k, False: 0]
  ------------------
  389|  10.8k|    fputs("# Your HSTS cache. https://curl.se/docs/hsts.html\n"
  390|  10.8k|          "# This file was generated by libcurl! Edit at your own risk.\n",
  391|  10.8k|          out);
  392|  10.8k|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (392:40): [True: 0, False: 10.8k]
  ------------------
  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|  10.8k|    curlx_fclose(out);
  ------------------
  |  |   79|  10.8k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  400|  10.8k|    if(!result && tempstore && curlx_rename(tempstore, file))
  ------------------
  |  |   70|      0|#define curlx_rename            rename
  ------------------
  |  Branch (400:8): [True: 10.8k, False: 0]
  |  Branch (400:19): [True: 0, False: 10.8k]
  |  Branch (400:32): [True: 0, False: 0]
  ------------------
  401|      0|      result = CURLE_WRITE_ERROR;
  402|       |
  403|  10.8k|    if(result && tempstore)
  ------------------
  |  Branch (403:8): [True: 0, False: 10.8k]
  |  Branch (403:18): [True: 0, False: 0]
  ------------------
  404|      0|      unlink(tempstore);
  405|  10.8k|  }
  406|  10.8k|  curlx_free(tempstore);
  ------------------
  |  | 1488|  10.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  407|  10.8k|skipsave:
  408|  10.8k|  if(data->set.hsts_write) {
  ------------------
  |  Branch (408:6): [True: 0, False: 10.8k]
  ------------------
  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|  10.8k|  return result;
  424|  10.8k|}
Curl_hsts_loadfile:
  603|  6.84k|{
  604|  6.84k|  DEBUGASSERT(h);
  ------------------
  |  | 1077|  6.84k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (604:3): [True: 0, False: 6.84k]
  |  Branch (604:3): [True: 6.84k, False: 0]
  ------------------
  605|  6.84k|  (void)data;
  606|  6.84k|  return hsts_load(h, file);
  607|  6.84k|}
Curl_hsts_loadcb:
  613|  7.51k|{
  614|  7.51k|  if(h)
  ------------------
  |  Branch (614:6): [True: 6.84k, False: 675]
  ------------------
  615|  6.84k|    return hsts_pull(data, h);
  616|    675|  return CURLE_OK;
  617|  7.51k|}
Curl_hsts_loadfiles:
  620|  7.51k|{
  621|  7.51k|  CURLcode result = CURLE_OK;
  622|  7.51k|  struct curl_slist *l = data->state.hstslist;
  623|  7.51k|  if(l) {
  ------------------
  |  Branch (623:6): [True: 6.84k, False: 675]
  ------------------
  624|  6.84k|    Curl_share_lock(data, CURL_LOCK_DATA_HSTS, CURL_LOCK_ACCESS_SINGLE);
  625|       |
  626|  13.6k|    while(l) {
  ------------------
  |  Branch (626:11): [True: 6.84k, False: 6.84k]
  ------------------
  627|  6.84k|      result = Curl_hsts_loadfile(data, data->hsts, l->data);
  628|  6.84k|      if(result)
  ------------------
  |  Branch (628:10): [True: 0, False: 6.84k]
  ------------------
  629|      0|        break;
  630|  6.84k|      l = l->next;
  631|  6.84k|    }
  632|  6.84k|    Curl_share_unlock(data, CURL_LOCK_DATA_HSTS);
  633|  6.84k|  }
  634|  7.51k|  return result;
  635|  7.51k|}
Curl_hsts_applies:
  638|    678|{
  639|       |  return !!hsts_check(h, dest->hostname, strlen(dest->hostname), TRUE);
  ------------------
  |  | 1051|    678|#define TRUE true
  ------------------
  640|    678|}
hsts.c:hsts_debugtime:
   51|    678|{
   52|    678|  const char *timestr = getenv("CURL_TIME");
   53|    678|  (void)unused;
   54|    678|  if(timestr) {
  ------------------
  |  Branch (54:6): [True: 0, False: 678]
  ------------------
   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|    678|  return time(NULL);
   61|    678|}
hsts.c:hsts_load:
  558|  6.84k|{
  559|  6.84k|  CURLcode result = CURLE_OK;
  560|  6.84k|  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|  6.84k|  curlx_free(h->filename);
  ------------------
  |  | 1488|  6.84k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  565|  6.84k|  h->filename = curlx_strdup(file);
  ------------------
  |  | 1482|  6.84k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  566|  6.84k|  if(!h->filename)
  ------------------
  |  Branch (566:6): [True: 0, False: 6.84k]
  ------------------
  567|      0|    return CURLE_OUT_OF_MEMORY;
  568|       |
  569|  6.84k|  fp = curlx_fopen(file, FOPEN_READTEXT);
  ------------------
  |  |   74|  6.84k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  570|  6.84k|  if(fp) {
  ------------------
  |  Branch (570:6): [True: 6.84k, False: 0]
  ------------------
  571|  6.84k|    curlx_struct_stat stat;
  ------------------
  |  |   63|  6.84k|#define curlx_struct_stat       struct stat
  ------------------
  572|  6.84k|    if((curlx_fstat(fileno(fp), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|  6.84k|#define curlx_fstat             fstat
  ------------------
  |  Branch (572:8): [True: 0, False: 6.84k]
  |  Branch (572:50): [True: 6.84k, False: 0]
  ------------------
  573|  6.84k|      struct dynbuf buf;
  574|  6.84k|      bool eof = FALSE;
  ------------------
  |  | 1054|  6.84k|#define FALSE false
  ------------------
  575|  6.84k|      curlx_dyn_init(&buf, MAX_HSTS_LINE);
  ------------------
  |  |   41|  6.84k|#define MAX_HSTS_LINE    4095
  ------------------
  576|  6.84k|      do {
  577|  6.84k|        result = Curl_get_line(&buf, fp, &eof);
  578|  6.84k|        if(!result) {
  ------------------
  |  Branch (578:12): [True: 6.84k, False: 0]
  ------------------
  579|  6.84k|          const char *lineptr = curlx_dyn_ptr(&buf);
  580|  6.84k|          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|  6.84k|          if((*lineptr == '#') || strlen(lineptr) <= 1)
  ------------------
  |  Branch (585:14): [True: 0, False: 6.84k]
  |  Branch (585:35): [True: 6.84k, False: 0]
  ------------------
  586|  6.84k|            continue;
  587|       |
  588|      0|          hsts_add(h, lineptr);
  589|      0|        }
  590|  6.84k|      } while(!result && !eof);
  ------------------
  |  Branch (590:15): [True: 6.84k, False: 0]
  |  Branch (590:26): [True: 0, False: 6.84k]
  ------------------
  591|  6.84k|      curlx_dyn_free(&buf); /* free the line buffer */
  592|  6.84k|    }
  593|  6.84k|    curlx_fclose(fp);
  ------------------
  |  |   79|  6.84k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  594|  6.84k|  }
  595|  6.84k|  return result;
  596|  6.84k|}
hsts.c:hsts_pull:
  510|  6.84k|{
  511|       |  /* if the HSTS read callback is set, use it */
  512|  6.84k|  if(data->set.hsts_read) {
  ------------------
  |  Branch (512:6): [True: 0, False: 6.84k]
  ------------------
  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|  6.84k|  return CURLE_OK;
  547|  6.84k|}

Curl_http_neg_init:
   89|  7.51k|{
   90|  7.51k|  memset(neg, 0, sizeof(*neg));
   91|  7.51k|  neg->accept_09 = data->set.http09_allowed;
   92|  7.51k|  switch(data->set.httpwant) {
   93|      3|  case CURL_HTTP_VERSION_1_0:
  ------------------
  |  | 2321|      3|#define CURL_HTTP_VERSION_1_0   1L /* please use HTTP 1.0 in the request */
  ------------------
  |  Branch (93:3): [True: 3, False: 7.51k]
  ------------------
   94|      3|    neg->wanted = neg->allowed = (CURL_HTTP_V1x);
  ------------------
  |  |   40|      3|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
   95|      3|    neg->only_10 = TRUE;
  ------------------
  |  | 1051|      3|#define TRUE true
  ------------------
   96|      3|    break;
   97|      7|  case CURL_HTTP_VERSION_1_1:
  ------------------
  |  | 2322|      7|#define CURL_HTTP_VERSION_1_1   2L /* please use HTTP 1.1 in the request */
  ------------------
  |  Branch (97:3): [True: 7, False: 7.51k]
  ------------------
   98|      7|    neg->wanted = neg->allowed = (CURL_HTTP_V1x);
  ------------------
  |  |   40|      7|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
   99|      7|    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: 7.51k]
  ------------------
  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|    677|  case CURL_HTTP_VERSION_2TLS:
  ------------------
  |  | 2324|    677|#define CURL_HTTP_VERSION_2TLS  4L /* use version 2 for HTTPS, version 1.1 for
  ------------------
  |  Branch (104:3): [True: 677, False: 6.84k]
  ------------------
  105|    677|    neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|    677|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|    677|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  106|    677|    break;
  107|      3|  case CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE:
  ------------------
  |  | 2326|      3|#define CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 5L /* please use HTTP 2 without
  ------------------
  |  Branch (107:3): [True: 3, False: 7.51k]
  ------------------
  108|      3|    neg->wanted = neg->allowed = (CURL_HTTP_V2x);
  ------------------
  |  |   41|      3|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  109|      3|    data->state.http_neg.h2_prior_knowledge = TRUE;
  ------------------
  |  | 1051|      3|#define TRUE true
  ------------------
  110|      3|    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: 7.51k]
  ------------------
  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: 7.51k]
  ------------------
  116|      0|    neg->wanted = neg->allowed = (CURL_HTTP_V3x);
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  117|      0|    break;
  118|  6.82k|  case CURL_HTTP_VERSION_NONE:
  ------------------
  |  | 2318|  6.82k|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  |  Branch (118:3): [True: 6.82k, False: 691]
  ------------------
  119|  6.82k|  default:
  ------------------
  |  Branch (119:3): [True: 0, False: 7.51k]
  ------------------
  120|  6.82k|    neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|  6.82k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|  6.82k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  121|  6.82k|    neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   40|  6.82k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   41|  6.82k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                  neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   42|  6.82k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  122|  6.82k|    break;
  123|  7.51k|  }
  124|  7.51k|}
Curl_http_setup_conn:
  128|  5.85k|{
  129|       |  /* allocate the HTTP-specific struct for the Curl_easy, only to survive
  130|       |     during this request */
  131|  5.85k|  if(data->state.http_neg.wanted == CURL_HTTP_V3x) {
  ------------------
  |  |   42|  5.85k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (131:6): [True: 0, False: 5.85k]
  ------------------
  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|  5.85k|  return CURLE_OK;
  138|  5.85k|}
Curl_checkProxyheaders:
  154|  5.81k|{
  155|  5.81k|  struct curl_slist *head;
  156|       |
  157|  5.81k|  for(head = (conn->http_proxy.peer && data->set.sep_headers) ?
  ------------------
  |  Branch (157:15): [True: 5.81k, False: 0]
  |  Branch (157:40): [True: 4.99k, False: 820]
  ------------------
  158|  4.99k|        data->set.proxyheaders : data->set.headers;
  159|   146k|      head; head = head->next) {
  ------------------
  |  Branch (159:7): [True: 141k, False: 5.81k]
  ------------------
  160|   141k|    if(curl_strnequal(head->data, thisheader, thislen) &&
  ------------------
  |  Branch (160:8): [True: 22, False: 141k]
  ------------------
  161|     22|       Curl_headersep(head->data[thislen]))
  ------------------
  |  |   26|     22|#define Curl_headersep(x) ((((x) == ':') || ((x) == ';')))
  |  |  ------------------
  |  |  |  Branch (26:29): [True: 1, False: 21]
  |  |  |  Branch (26:45): [True: 0, False: 21]
  |  |  ------------------
  ------------------
  162|      1|      return head->data;
  163|   141k|  }
  164|       |
  165|  5.81k|  return NULL;
  166|  5.81k|}
Curl_http_auth_act:
  553|     38|{
  554|     38|  struct connectdata *conn = data->conn;
  555|     38|  bool pickhost = FALSE;
  ------------------
  |  | 1054|     38|#define FALSE false
  ------------------
  556|     38|  bool pickproxy = FALSE;
  ------------------
  |  | 1054|     38|#define FALSE false
  ------------------
  557|     38|  CURLcode result = CURLE_OK;
  558|     38|  unsigned long authmask = ~0UL;
  559|       |
  560|     38|  if(!Curl_creds_has_oauth_bearer(data->state.creds))
  ------------------
  |  |   78|     38|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (78:43): [True: 2, False: 36]
  |  |  |  Branch (78:50): [True: 1, False: 1]
  |  |  ------------------
  ------------------
  561|     37|    authmask &= (unsigned long)~CURLAUTH_BEARER;
  ------------------
  |  |  844|     37|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  562|       |
  563|     38|  if(100 <= data->req.httpcode && data->req.httpcode <= 199)
  ------------------
  |  Branch (563:6): [True: 5, False: 33]
  |  Branch (563:35): [True: 2, False: 3]
  ------------------
  564|       |    /* this is a transient response code, ignore */
  565|      2|    return CURLE_OK;
  566|       |
  567|     36|  if(data->state.authproblem)
  ------------------
  |  Branch (567:6): [True: 0, False: 36]
  ------------------
  568|      0|    return data->set.http_fail_on_error ? CURLE_HTTP_RETURNED_ERROR : CURLE_OK;
  ------------------
  |  Branch (568:12): [True: 0, False: 0]
  ------------------
  569|       |
  570|     36|  if(data->state.creds &&
  ------------------
  |  Branch (570:6): [True: 2, False: 34]
  ------------------
  571|      2|     ((data->req.httpcode == 401) ||
  ------------------
  |  Branch (571:7): [True: 0, False: 2]
  ------------------
  572|      2|      (data->req.authneg && data->req.httpcode < 300))) {
  ------------------
  |  Branch (572:8): [True: 0, False: 2]
  |  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|     36|#ifndef CURL_DISABLE_PROXY
  587|     36|  if(conn->http_proxy.creds &&
  ------------------
  |  Branch (587:6): [True: 21, False: 15]
  ------------------
  588|     21|     ((data->req.httpcode == 407) ||
  ------------------
  |  Branch (588:7): [True: 1, False: 20]
  ------------------
  589|     20|      (data->req.authneg && data->req.httpcode < 300))) {
  ------------------
  |  Branch (589:8): [True: 0, False: 20]
  |  Branch (589:29): [True: 0, False: 0]
  ------------------
  590|      1|    pickproxy = pickoneauth(&data->state.authproxy,
  591|      1|                            authmask & ~CURLAUTH_BEARER,
  ------------------
  |  |  844|      1|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  592|      1|                            conn->http_proxy.creds);
  593|      1|    if(!pickproxy)
  ------------------
  |  Branch (593:8): [True: 1, False: 0]
  ------------------
  594|      1|      data->state.authproblem = TRUE;
  ------------------
  |  | 1051|      1|#define TRUE true
  ------------------
  595|      0|    else
  596|      0|      data->info.proxyauthpicked = data->state.authproxy.picked;
  597|      1|  }
  598|     36|#endif
  599|       |
  600|     36|  if(pickhost || pickproxy) {
  ------------------
  |  Branch (600:6): [True: 0, False: 36]
  |  Branch (600:18): [True: 0, False: 36]
  ------------------
  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|     36|  else if((data->req.httpcode < 300) &&
  ------------------
  |  Branch (614:11): [True: 33, False: 3]
  ------------------
  615|     33|          !data->state.authhost.done &&
  ------------------
  |  Branch (615:11): [True: 1, False: 32]
  ------------------
  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|     36|  if(http_should_fail(data, data->req.httpcode)) {
  ------------------
  |  Branch (630:6): [True: 0, False: 36]
  ------------------
  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|     36|  return result;
  637|     36|}
Curl_http_output_auth:
  778|  1.53k|{
  779|  1.53k|  CURLcode result = CURLE_OK;
  780|  1.53k|  struct auth *authhost;
  781|  1.53k|  struct auth *authproxy;
  782|  1.53k|  const char *path_and_query = path;
  783|  1.53k|  char *tmp_str = NULL;
  784|       |
  785|  1.53k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  1.53k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (785:3): [True: 0, False: 1.53k]
  |  Branch (785:3): [True: 1.53k, False: 0]
  ------------------
  786|  1.53k|  authhost = &data->state.authhost;
  787|  1.53k|  authproxy = &data->state.authproxy;
  788|       |
  789|  1.53k|  if(
  790|  1.53k|#ifndef CURL_DISABLE_PROXY
  791|  1.53k|    (!conn->http_proxy.peer || !conn->http_proxy.creds) &&
  ------------------
  |  Branch (791:6): [True: 0, False: 1.53k]
  |  Branch (791:32): [True: 172, False: 1.36k]
  ------------------
  792|    172|#endif
  793|       |#ifdef USE_SPNEGO
  794|       |    !(authhost->want & CURLAUTH_NEGOTIATE) &&
  795|       |    !(authproxy->want & CURLAUTH_NEGOTIATE) &&
  796|       |#endif
  797|    172|    !data->state.creds) {
  ------------------
  |  Branch (797:5): [True: 141, False: 31]
  ------------------
  798|       |    /* no authentication with no user or password */
  799|    141|    authhost->done = TRUE;
  ------------------
  |  | 1051|    141|#define TRUE true
  ------------------
  800|    141|    authproxy->done = TRUE;
  ------------------
  |  | 1051|    141|#define TRUE true
  ------------------
  801|    141|    result = CURLE_OK;
  802|    141|    goto out;
  803|    141|  }
  804|       |
  805|  1.39k|  if(query) {
  ------------------
  |  Branch (805:6): [True: 0, False: 1.39k]
  ------------------
  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.39k|  if(authhost->want && !authhost->picked)
  ------------------
  |  Branch (814:6): [True: 1.39k, False: 1]
  |  Branch (814:24): [True: 1.39k, 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.39k|    authhost->picked = authhost->want;
  819|       |
  820|  1.39k|  if(authproxy->want && !authproxy->picked)
  ------------------
  |  Branch (820:6): [True: 1.39k, False: 1]
  |  Branch (820:25): [True: 1.39k, 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.39k|    authproxy->picked = authproxy->want;
  825|       |
  826|  1.39k|#ifndef CURL_DISABLE_PROXY
  827|       |  /* Send proxy authentication header if needed */
  828|  1.39k|  if(conn->bits.origin_is_proxy || is_connect) {
  ------------------
  |  Branch (828:6): [True: 0, False: 1.39k]
  |  Branch (828:36): [True: 1.39k, False: 0]
  ------------------
  829|  1.39k|    result = output_auth_headers(data, conn, authproxy, request,
  830|  1.39k|                                 path_and_query, TRUE);
  ------------------
  |  | 1051|  1.39k|#define TRUE true
  ------------------
  831|  1.39k|    if(result)
  ------------------
  |  Branch (831:8): [True: 0, False: 1.39k]
  ------------------
  832|      0|      goto out;
  833|  1.39k|  }
  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.39k|  if(data->state.creds || Curl_auth_allowed_to_host(data))
  ------------------
  |  Branch (844:6): [True: 138, False: 1.25k]
  |  Branch (844:27): [True: 1.25k, False: 0]
  ------------------
  845|  1.39k|    result = output_auth_headers(data, conn, authhost, request,
  846|  1.39k|                                 path_and_query, FALSE);
  ------------------
  |  | 1054|  1.39k|#define FALSE false
  ------------------
  847|      0|  else
  848|      0|    authhost->done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  849|       |
  850|  1.39k|  if(((authhost->multipass && !authhost->done) ||
  ------------------
  |  Branch (850:8): [True: 1, False: 1.39k]
  |  Branch (850:31): [True: 1, False: 0]
  ------------------
  851|  1.39k|      (authproxy->multipass && !authproxy->done)) &&
  ------------------
  |  Branch (851:8): [True: 1, False: 1.39k]
  |  Branch (851:32): [True: 1, False: 0]
  ------------------
  852|      2|     (httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (852:6): [True: 0, False: 2]
  ------------------
  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.39k|  else
  859|  1.39k|    data->req.authneg = FALSE;
  ------------------
  |  | 1054|  1.39k|#define FALSE false
  ------------------
  860|       |
  861|  1.53k|out:
  862|  1.53k|  curlx_free(tmp_str);
  ------------------
  |  | 1488|  1.53k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  863|  1.53k|  return result;
  864|  1.39k|}
Curl_compareheader:
 1399|  2.41k|{
 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|  2.41k|  const char *p;
 1406|  2.41k|  struct Curl_str val;
 1407|  2.41k|  DEBUGASSERT(hlen);
  ------------------
  |  | 1077|  2.41k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1407:3): [True: 0, False: 2.41k]
  |  Branch (1407:3): [True: 2.41k, False: 0]
  ------------------
 1408|  2.41k|  DEBUGASSERT(clen);
  ------------------
  |  | 1077|  2.41k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1408:3): [True: 0, False: 2.41k]
  |  Branch (1408:3): [True: 2.41k, False: 0]
  ------------------
 1409|  2.41k|  DEBUGASSERT(header);
  ------------------
  |  | 1077|  2.41k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1409:3): [True: 0, False: 2.41k]
  |  Branch (1409:3): [True: 2.41k, False: 0]
  ------------------
 1410|  2.41k|  DEBUGASSERT(content);
  ------------------
  |  | 1077|  2.41k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1410:3): [True: 0, False: 2.41k]
  |  Branch (1410:3): [True: 2.41k, False: 0]
  ------------------
 1411|       |
 1412|  2.41k|  if(!curl_strnequal(headerline, header, hlen))
  ------------------
  |  Branch (1412:6): [True: 2.29k, False: 117]
  ------------------
 1413|  2.29k|    return FALSE; /* does not start with header */
  ------------------
  |  | 1054|  2.29k|#define FALSE false
  ------------------
 1414|       |
 1415|       |  /* pass the header */
 1416|    117|  p = &headerline[hlen];
 1417|       |
 1418|    117|  if(curlx_str_untilnl(&p, &val, MAX_HTTP_RESP_HEADER_SIZE))
  ------------------
  |  |  158|    117|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (1418:6): [True: 10, False: 107]
  ------------------
 1419|     10|    return FALSE;
  ------------------
  |  | 1054|     10|#define FALSE false
  ------------------
 1420|    107|  curlx_str_trimblanks(&val);
 1421|       |
 1422|       |  /* find the content string in the rest of the line */
 1423|    107|  if(curlx_strlen(&val) >= clen) {
  ------------------
  |  |   50|    107|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1423:6): [True: 84, False: 23]
  ------------------
 1424|     84|    size_t len;
 1425|     84|    p = curlx_str(&val);
  ------------------
  |  |   49|     84|#define curlx_str(x)    ((x)->str)
  ------------------
 1426|    287|    for(len = curlx_strlen(&val); len >= clen;) {
  ------------------
  |  |   50|     84|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1426:35): [True: 265, False: 22]
  ------------------
 1427|    265|      struct Curl_str next;
 1428|    265|      const char *o = p;
 1429|       |      /* after a match there must be a comma, space, newline or null byte */
 1430|    265|      if(curl_strnequal(p, content, clen) &&
  ------------------
  |  Branch (1430:10): [True: 0, False: 265]
  ------------------
 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|    265|      if(curlx_str_until(&p, &next, MAX_HTTP_RESP_HEADER_SIZE, ',') ||
  ------------------
  |  |  158|    265|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (1435:10): [True: 11, False: 254]
  ------------------
 1436|    254|         curlx_str_single(&p, ','))
  ------------------
  |  Branch (1436:10): [True: 51, False: 203]
  ------------------
 1437|     62|        break; /* no comma, get out */
 1438|       |
 1439|       |      /* if there are more dummy commas, move over them as well */
 1440|    203|      do
 1441|    470|        curlx_str_passblanks(&p);
 1442|    470|      while(!curlx_str_single(&p, ','));
  ------------------
  |  Branch (1442:13): [True: 267, False: 203]
  ------------------
 1443|    203|      len -= (p - o);
 1444|    203|    }
 1445|     84|  }
 1446|    107|  return FALSE; /* no match */
  ------------------
  |  | 1054|    107|#define FALSE false
  ------------------
 1447|    107|}
Curl_http_method:
 1943|  1.03k|{
 1944|  1.03k|  Curl_HttpReq httpreq = (Curl_HttpReq)data->state.httpreq;
 1945|  1.03k|  const char *request;
 1946|  1.03k|#ifndef CURL_DISABLE_WEBSOCKETS
 1947|  1.03k|  if(data->conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   63|  1.03k|#define CURLPROTO_WS     (1L << 30)
  ------------------
                if(data->conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   64|  1.03k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  ------------------
  |  Branch (1947:6): [True: 0, False: 1.03k]
  ------------------
 1948|      0|    httpreq = HTTPREQ_GET;
 1949|  1.03k|  else
 1950|  1.03k|#endif
 1951|  1.03k|  if((data->conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_FTP)) &&
  ------------------
  |  |   84|  1.03k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|  1.03k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|  1.03k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  1.03k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  1.03k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  1.03k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
                if((data->conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_FTP)) &&
  ------------------
  |  | 1080|  1.03k|#define CURLPROTO_FTP     (1L << 2)
  ------------------
  |  Branch (1951:6): [True: 1.03k, False: 0]
  ------------------
 1952|  1.03k|     data->state.upload)
  ------------------
  |  Branch (1952:6): [True: 2, False: 1.03k]
  ------------------
 1953|      2|    httpreq = HTTPREQ_PUT;
 1954|       |
 1955|       |  /* Now set the 'request' pointer to the proper request string */
 1956|  1.03k|  if(data->set.str[STRING_CUSTOMREQUEST] &&
  ------------------
  |  Branch (1956:6): [True: 2, False: 1.03k]
  ------------------
 1957|      2|     !data->state.http_ignorecustom) {
  ------------------
  |  Branch (1957:6): [True: 2, False: 0]
  ------------------
 1958|      2|    request = data->set.str[STRING_CUSTOMREQUEST];
 1959|      2|  }
 1960|  1.03k|  else {
 1961|  1.03k|    if(data->req.no_body)
  ------------------
  |  Branch (1961:8): [True: 1, False: 1.03k]
  ------------------
 1962|      1|      request = "HEAD";
 1963|  1.03k|    else {
 1964|  1.03k|      DEBUGASSERT((httpreq >= HTTPREQ_GET) && (httpreq <= HTTPREQ_HEAD));
  ------------------
  |  | 1077|  1.03k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1964:7): [True: 0, False: 1.03k]
  |  Branch (1964:7): [True: 0, False: 0]
  |  Branch (1964:7): [True: 1.03k, False: 0]
  |  Branch (1964:7): [True: 1.03k, False: 0]
  ------------------
 1965|  1.03k|      switch(httpreq) {
 1966|      3|      case HTTPREQ_POST:
  ------------------
  |  Branch (1966:7): [True: 3, False: 1.02k]
  ------------------
 1967|      7|      case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (1967:7): [True: 4, False: 1.02k]
  ------------------
 1968|     45|      case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (1968:7): [True: 38, False: 992]
  ------------------
 1969|     45|        request = "POST";
 1970|     45|        break;
 1971|      2|      case HTTPREQ_PUT:
  ------------------
  |  Branch (1971:7): [True: 2, False: 1.02k]
  ------------------
 1972|      2|        request = "PUT";
 1973|      2|        break;
 1974|      0|      default: /* this should never happen */
  ------------------
  |  Branch (1974:7): [True: 0, False: 1.03k]
  ------------------
 1975|    983|      case HTTPREQ_GET:
  ------------------
  |  Branch (1975:7): [True: 983, False: 47]
  ------------------
 1976|    983|        request = "GET";
 1977|    983|        break;
 1978|      0|      case HTTPREQ_HEAD:
  ------------------
  |  Branch (1978:7): [True: 0, False: 1.03k]
  ------------------
 1979|      0|        request = "HEAD";
 1980|      0|        break;
 1981|  1.03k|      }
 1982|  1.03k|    }
 1983|  1.03k|  }
 1984|  1.03k|  *method = request;
 1985|  1.03k|  *reqp = httpreq;
 1986|  1.03k|}
Curl_verify_header:
 3833|  1.32k|{
 3834|  1.32k|  struct SingleRequest *k = &data->req;
 3835|  1.32k|  const char *ptr = memchr(hd, 0x00, hdlen);
 3836|  1.32k|  if(ptr) {
  ------------------
  |  Branch (3836:6): [True: 37, False: 1.28k]
  ------------------
 3837|       |    /* this is bad, bail out */
 3838|     37|    failf(data, "Nul byte in header");
  ------------------
  |  |   62|     37|#define failf Curl_failf
  ------------------
 3839|     37|    return CURLE_WEIRD_SERVER_REPLY;
 3840|     37|  }
 3841|  1.28k|  if(hdlen > 2) {
  ------------------
  |  Branch (3841:6): [True: 894, False: 394]
  ------------------
 3842|    894|    ptr = memchr(hd, '\r', hdlen - 2);
 3843|    894|    if(ptr) {
  ------------------
  |  Branch (3843:8): [True: 5, False: 889]
  ------------------
 3844|       |      /* CR may only precede the LF, nothing else */
 3845|      5|      failf(data, "Carriage return found in header");
  ------------------
  |  |   62|      5|#define failf Curl_failf
  ------------------
 3846|      5|      return CURLE_WEIRD_SERVER_REPLY;
 3847|      5|    }
 3848|    894|  }
 3849|  1.28k|  if(k->headerline < 2)
  ------------------
  |  Branch (3849:6): [True: 1.28k, False: 0]
  ------------------
 3850|       |    /* the first "header" is the status-line and it has no colon */
 3851|  1.28k|    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|  1.24k|{
 3870|  1.24k|  size_t bad = 0;
 3871|  1.24k|  unsigned int max = MAX_HTTP_RESP_HEADER_SIZE;
  ------------------
  |  |  158|  1.24k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
 3872|  1.24k|  if(delta < MAX_HTTP_RESP_HEADER_SIZE) {
  ------------------
  |  |  158|  1.24k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (3872:6): [True: 1.24k, False: 0]
  ------------------
 3873|  1.24k|    data->info.header_size += (unsigned int)delta;
 3874|  1.24k|    data->req.allheadercount += (unsigned int)delta;
 3875|  1.24k|    if(!connect_only)
  ------------------
  |  Branch (3875:8): [True: 0, False: 1.24k]
  ------------------
 3876|      0|      data->req.headerbytecount += (unsigned int)delta;
 3877|  1.24k|    if(data->req.allheadercount > max)
  ------------------
  |  Branch (3877:8): [True: 0, False: 1.24k]
  ------------------
 3878|      0|      bad = data->req.allheadercount;
 3879|  1.24k|    else if(data->info.header_size > (max * 20)) {
  ------------------
  |  Branch (3879:13): [True: 0, False: 1.24k]
  ------------------
 3880|      0|      bad = data->info.header_size;
 3881|      0|      max *= 20;
 3882|      0|    }
 3883|  1.24k|  }
 3884|      0|  else
 3885|      0|    bad = data->req.allheadercount + delta;
 3886|  1.24k|  if(bad) {
  ------------------
  |  Branch (3886:6): [True: 0, False: 1.24k]
  ------------------
 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|  1.24k|  return CURLE_OK;
 3891|  1.24k|}
Curl_http_to_fold:
 4410|    490|{
 4411|    490|  size_t len = curlx_dyn_len(bf);
 4412|    490|  const char *hd = curlx_dyn_ptr(bf);
 4413|    490|  if(len && (hd[len - 1] == '\n'))
  ------------------
  |  Branch (4413:6): [True: 490, False: 0]
  |  Branch (4413:13): [True: 490, False: 0]
  ------------------
 4414|    490|    len--;
 4415|    490|  if(len && (hd[len - 1] == '\r'))
  ------------------
  |  Branch (4415:6): [True: 490, False: 0]
  |  Branch (4415:13): [True: 280, False: 210]
  ------------------
 4416|    280|    len--;
 4417|  1.21k|  while(len && ISBLANK(hd[len - 1])) /* strip off trailing whitespace */
  ------------------
  |  |   45|  1.19k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 247, False: 949]
  |  |  |  Branch (45:38): [True: 482, False: 467]
  |  |  ------------------
  ------------------
  |  Branch (4417:9): [True: 1.19k, False: 23]
  ------------------
 4418|    729|    len--;
 4419|    490|  curlx_dyn_setlen(bf, len);
 4420|    490|}
Curl_http_req_make:
 4707|  1.53k|{
 4708|  1.53k|  struct httpreq *req;
 4709|  1.53k|  CURLcode result = CURLE_OUT_OF_MEMORY;
 4710|       |
 4711|  1.53k|  DEBUGASSERT(method && m_len);
  ------------------
  |  | 1077|  1.53k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4711:3): [True: 0, False: 1.53k]
  |  Branch (4711:3): [True: 0, False: 0]
  |  Branch (4711:3): [True: 1.53k, False: 0]
  |  Branch (4711:3): [True: 1.53k, False: 0]
  ------------------
 4712|       |
 4713|  1.53k|  req = curlx_calloc(1, sizeof(*req) + m_len);
  ------------------
  |  | 1485|  1.53k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 4714|  1.53k|  if(!req)
  ------------------
  |  Branch (4714:6): [True: 0, False: 1.53k]
  ------------------
 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.53k|  memcpy(req->method, method, m_len);
 4724|       |#if defined(__GNUC__) && __GNUC__ >= 13
 4725|       |#pragma GCC diagnostic pop
 4726|       |#endif
 4727|  1.53k|  if(scheme) {
  ------------------
  |  Branch (4727:6): [True: 0, False: 1.53k]
  ------------------
 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.53k|  if(authority) {
  ------------------
  |  Branch (4732:6): [True: 1.53k, False: 0]
  ------------------
 4733|  1.53k|    req->authority = curlx_memdup0(authority, a_len);
 4734|  1.53k|    if(!req->authority)
  ------------------
  |  Branch (4734:8): [True: 0, False: 1.53k]
  ------------------
 4735|      0|      goto out;
 4736|  1.53k|  }
 4737|  1.53k|  if(path) {
  ------------------
  |  Branch (4737:6): [True: 0, False: 1.53k]
  ------------------
 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.53k|  Curl_dynhds_init(&req->headers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|  1.53k|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 4743|  1.53k|  Curl_dynhds_init(&req->trailers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|  1.53k|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 4744|  1.53k|  result = CURLE_OK;
 4745|       |
 4746|  1.53k|out:
 4747|  1.53k|  if(result && req)
  ------------------
  |  Branch (4747:6): [True: 0, False: 1.53k]
  |  Branch (4747:16): [True: 0, False: 0]
  ------------------
 4748|      0|    Curl_http_req_free(req);
 4749|  1.53k|  *preq = result ? NULL : req;
  ------------------
  |  Branch (4749:11): [True: 0, False: 1.53k]
  ------------------
 4750|  1.53k|  return result;
 4751|  1.53k|}
Curl_http_req_free:
 4875|  1.53k|{
 4876|  1.53k|  if(req) {
  ------------------
  |  Branch (4876:6): [True: 1.53k, False: 0]
  ------------------
 4877|  1.53k|    curlx_free(req->scheme);
  ------------------
  |  | 1488|  1.53k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4878|  1.53k|    curlx_free(req->authority);
  ------------------
  |  | 1488|  1.53k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4879|  1.53k|    curlx_free(req->path);
  ------------------
  |  | 1488|  1.53k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4880|  1.53k|    Curl_dynhds_free(&req->headers);
 4881|  1.53k|    Curl_dynhds_free(&req->trailers);
 4882|  1.53k|    curlx_free(req);
  ------------------
  |  | 1488|  1.53k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4883|  1.53k|  }
 4884|  1.53k|}
http.c:pickoneauth:
  352|      1|{
  353|      1|  bool have_user_pass = Curl_creds_has_user_or_pass(creds);
  ------------------
  |  |   77|      1|    ((c) && ((c)->user[0] || (c)->passwd[0]))
  |  |  ------------------
  |  |  |  Branch (77:6): [True: 1, False: 0]
  |  |  |  Branch (77:14): [True: 0, False: 1]
  |  |  |  Branch (77:30): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  354|      1|  bool picked;
  355|       |  /* only deal with authentication we want */
  356|      1|  unsigned long avail = pick->avail & pick->want & mask;
  357|      1|  picked = TRUE;
  ------------------
  |  | 1051|      1|#define TRUE true
  ------------------
  358|       |
  359|       |  /* The order of these checks is highly relevant, as this will be the order
  360|       |     of preference in case of the existence of multiple accepted types. */
  361|      1|  if(avail & CURLAUTH_NEGOTIATE)  /* available on empty creds */
  ------------------
  |  |  833|      1|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  ------------------
  |  Branch (361:6): [True: 0, False: 1]
  ------------------
  362|      0|    pick->picked = CURLAUTH_NEGOTIATE;
  ------------------
  |  |  833|      0|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  ------------------
  363|      1|#ifndef CURL_DISABLE_BEARER_AUTH
  364|      1|  else if((avail & CURLAUTH_BEARER) && Curl_creds_has_oauth_bearer(creds))
  ------------------
  |  |  844|      1|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
                else if((avail & CURLAUTH_BEARER) && Curl_creds_has_oauth_bearer(creds))
  ------------------
  |  |   78|      0|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (78:43): [True: 0, False: 0]
  |  |  |  Branch (78:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (364:11): [True: 0, False: 1]
  ------------------
  365|      0|    pick->picked = CURLAUTH_BEARER;
  ------------------
  |  |  844|      0|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  366|      1|#endif
  367|      1|#ifndef CURL_DISABLE_DIGEST_AUTH
  368|      1|  else if((avail & CURLAUTH_DIGEST) && have_user_pass)
  ------------------
  |  |  832|      1|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (368:11): [True: 0, False: 1]
  |  Branch (368:40): [True: 0, False: 0]
  ------------------
  369|      0|    pick->picked = CURLAUTH_DIGEST;
  ------------------
  |  |  832|      0|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  370|      1|#endif
  371|      1|  else if(avail & CURLAUTH_NTLM)
  ------------------
  |  |  838|      1|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  |  Branch (371:11): [True: 0, False: 1]
  ------------------
  372|      0|    pick->picked = CURLAUTH_NTLM;
  ------------------
  |  |  838|      0|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  373|      1|#ifndef CURL_DISABLE_BASIC_AUTH
  374|      1|  else if((avail & CURLAUTH_BASIC) && have_user_pass)
  ------------------
  |  |  831|      1|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (374:11): [True: 0, False: 1]
  |  Branch (374:39): [True: 0, False: 0]
  ------------------
  375|      0|    pick->picked = CURLAUTH_BASIC;
  ------------------
  |  |  831|      0|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  376|      1|#endif
  377|      1|#ifndef CURL_DISABLE_AWS
  378|      1|  else if(avail & CURLAUTH_AWS_SIGV4)
  ------------------
  |  |  845|      1|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  |  Branch (378:11): [True: 0, False: 1]
  ------------------
  379|      0|    pick->picked = CURLAUTH_AWS_SIGV4;
  ------------------
  |  |  845|      0|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  380|      1|#endif
  381|      1|  else {
  382|      1|    pick->picked = CURLAUTH_PICKNONE; /* we select to use nothing */
  ------------------
  |  |  128|      1|#define CURLAUTH_PICKNONE (1 << 30) /* do not use auth */
  ------------------
  383|      1|    picked = FALSE;
  ------------------
  |  | 1054|      1|#define FALSE false
  ------------------
  384|      1|  }
  385|      1|  pick->avail = CURLAUTH_NONE; /* clear it here */
  ------------------
  |  |  830|      1|#define CURLAUTH_NONE         ((unsigned long)0)
  ------------------
  386|       |
  387|      1|  return picked;
  388|      1|}
http.c:http_should_fail:
  484|     36|{
  485|     36|  DEBUGASSERT(data);
  ------------------
  |  | 1077|     36|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (485:3): [True: 0, False: 36]
  |  Branch (485:3): [True: 36, False: 0]
  ------------------
  486|     36|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|     36|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (486:3): [True: 0, False: 36]
  |  Branch (486:3): [True: 36, False: 0]
  ------------------
  487|       |
  488|       |  /*
  489|       |   * If we have not been asked to fail on error,
  490|       |   * do not fail.
  491|       |   */
  492|     36|  if(!data->set.http_fail_on_error)
  ------------------
  |  Branch (492:6): [True: 35, False: 1]
  ------------------
  493|     35|    return FALSE;
  ------------------
  |  | 1054|     35|#define FALSE false
  ------------------
  494|       |
  495|       |  /*
  496|       |   * Any code < 400 is never terminal.
  497|       |   */
  498|      1|  if(httpcode < 400)
  ------------------
  |  Branch (498:6): [True: 1, False: 0]
  ------------------
  499|      1|    return FALSE;
  ------------------
  |  | 1054|      1|#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.78k|{
  651|  2.78k|  const char *auth = NULL;
  652|  2.78k|  CURLcode result = CURLE_OK;
  653|  2.78k|  (void)conn;
  654|       |
  655|       |#ifdef CURL_DISABLE_DIGEST_AUTH
  656|       |  (void)request;
  657|       |  (void)path;
  658|       |#endif
  659|  2.78k|#ifndef CURL_DISABLE_AWS
  660|  2.78k|  if((authstatus->picked == CURLAUTH_AWS_SIGV4) && !proxy) {
  ------------------
  |  |  845|  2.78k|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  |  Branch (660:6): [True: 1.04k, False: 1.74k]
  |  Branch (660:52): [True: 1.04k, False: 1]
  ------------------
  661|       |    /* this method is never for proxy */
  662|  1.04k|    auth = "AWS_SIGV4";
  663|  1.04k|    result = Curl_output_aws_sigv4(data);
  664|  1.04k|    if(result)
  ------------------
  |  Branch (664:8): [True: 13, False: 1.03k]
  ------------------
  665|     13|      return result;
  666|  1.04k|  }
  667|  1.74k|  else
  668|  1.74k|#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.74k|#ifndef CURL_DISABLE_DIGEST_AUTH
  688|  1.74k|  if(authstatus->picked == CURLAUTH_DIGEST) {
  ------------------
  |  |  832|  1.74k|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (688:6): [True: 2, False: 1.74k]
  ------------------
  689|      2|    auth = "Digest";
  690|      2|    result = Curl_output_digest(data,
  691|      2|                                proxy,
  692|      2|                                (const unsigned char *)request,
  693|      2|                                (const unsigned char *)path);
  694|      2|    if(result)
  ------------------
  |  Branch (694:8): [True: 0, False: 2]
  ------------------
  695|      0|      return result;
  696|      2|  }
  697|  1.74k|  else
  698|  1.74k|#endif
  699|  1.74k|#ifndef CURL_DISABLE_BASIC_AUTH
  700|  1.74k|  if(authstatus->picked == CURLAUTH_BASIC) {
  ------------------
  |  |  831|  1.74k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (700:6): [True: 1.66k, False: 77]
  ------------------
  701|       |    /* Basic */
  702|  1.66k|    if(
  703|  1.66k|#ifndef CURL_DISABLE_PROXY
  704|  1.66k|       (proxy && conn->http_proxy.creds &&
  ------------------
  |  Branch (704:9): [True: 1.35k, False: 311]
  |  Branch (704:18): [True: 1.32k, False: 31]
  ------------------
  705|  1.32k|        Curl_creds_has_user_or_pass(conn->http_proxy.creds) &&
  ------------------
  |  |   77|  2.98k|    ((c) && ((c)->user[0] || (c)->passwd[0]))
  |  |  ------------------
  |  |  |  Branch (77:6): [True: 1.32k, False: 0]
  |  |  |  Branch (77:14): [True: 1.23k, False: 83]
  |  |  |  Branch (77:30): [True: 8, False: 75]
  |  |  ------------------
  ------------------
  706|  1.24k|        !Curl_checkProxyheaders(data, conn,
  ------------------
  |  Branch (706:9): [True: 1.24k, False: 0]
  ------------------
  707|  1.24k|                                STRCONST("Proxy-authorization"))) ||
  ------------------
  |  | 1297|  1.24k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  708|    417|#endif
  709|    417|       (!proxy && data->state.creds &&
  ------------------
  |  Branch (709:9): [True: 311, False: 106]
  |  Branch (709:19): [True: 28, False: 283]
  ------------------
  710|     28|        Curl_creds_has_user_or_pass(data->state.creds) &&
  ------------------
  |  |   77|    445|    ((c) && ((c)->user[0] || (c)->passwd[0]))
  |  |  ------------------
  |  |  |  Branch (77:6): [True: 28, False: 0]
  |  |  |  Branch (77:14): [True: 19, False: 9]
  |  |  |  Branch (77:30): [True: 6, False: 3]
  |  |  ------------------
  ------------------
  711|  1.27k|        !Curl_checkheaders(data, STRCONST("Authorization")))) {
  ------------------
  |  | 1297|     25|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (711:9): [True: 25, False: 0]
  ------------------
  712|  1.27k|      auth = "Basic";
  713|  1.27k|      result = http_output_basic(data, conn, proxy);
  714|  1.27k|      if(result)
  ------------------
  |  Branch (714:10): [True: 0, False: 1.27k]
  ------------------
  715|      0|        return result;
  716|  1.27k|    }
  717|       |
  718|       |    /* NOTE: this function should set 'done' TRUE, as the other auth
  719|       |       functions work that way */
  720|  1.66k|    authstatus->done = TRUE;
  ------------------
  |  | 1051|  1.66k|#define TRUE true
  ------------------
  721|  1.66k|  }
  722|  2.77k|#endif
  723|  2.77k|#ifndef CURL_DISABLE_BEARER_AUTH
  724|  2.77k|  if(authstatus->picked == CURLAUTH_BEARER) {
  ------------------
  |  |  844|  2.77k|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  |  Branch (724:6): [True: 3, False: 2.77k]
  ------------------
  725|       |    /* Bearer */
  726|      3|    if(!proxy && Curl_creds_has_oauth_bearer(data->state.creds) &&
  ------------------
  |  |   78|      5|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (78:43): [True: 1, False: 1]
  |  |  |  Branch (78:50): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (726:8): [True: 2, False: 1]
  ------------------
  727|      0|       !Curl_checkheaders(data, STRCONST("Authorization"))) {
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (727:8): [True: 0, False: 0]
  ------------------
  728|      0|      auth = "Bearer";
  729|      0|      result = http_output_bearer(data);
  730|      0|      if(result)
  ------------------
  |  Branch (730:10): [True: 0, False: 0]
  ------------------
  731|      0|        return result;
  732|      0|    }
  733|       |
  734|       |    /* NOTE: this function should set 'done' TRUE, as the other auth
  735|       |       functions work that way */
  736|      3|    authstatus->done = TRUE;
  ------------------
  |  | 1051|      3|#define TRUE true
  ------------------
  737|      3|  }
  738|  2.77k|#endif
  739|       |
  740|  2.77k|  if(auth) {
  ------------------
  |  Branch (740:6): [True: 2.30k, False: 469]
  ------------------
  741|  2.30k|#ifndef CURL_DISABLE_PROXY
  742|  2.30k|    if(proxy)
  ------------------
  |  Branch (742:8): [True: 1.24k, False: 1.05k]
  ------------------
  743|  1.24k|      data->info.proxyauthpicked = authstatus->picked;
  744|  1.05k|    else
  745|  1.05k|      data->info.httpauthpicked = authstatus->picked;
  746|  2.30k|    infof(data, "%s auth using %s with user '%s'",
  ------------------
  |  |  143|  2.30k|  do {                               \
  |  |  144|  2.30k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  2.30k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2.30k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.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|  2.30k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  2.30k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.30k]
  |  |  ------------------
  ------------------
  747|  2.30k|          proxy ? "Proxy" : "Server", auth,
  748|  2.30k|          proxy ? (conn->http_proxy.creds ?
  749|  2.30k|                   conn->http_proxy.creds->user : "") :
  750|  2.30k|          (data->state.creds ?
  751|  2.30k|           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|  2.30k|    authstatus->multipass = !authstatus->done;
  759|  2.30k|  }
  760|    469|  else {
  761|    469|    authstatus->multipass = FALSE;
  ------------------
  |  | 1054|    469|#define FALSE false
  ------------------
  762|    469|    if(proxy)
  ------------------
  |  Branch (762:8): [True: 146, False: 323]
  ------------------
  763|    146|      data->info.proxyauthpicked = 0;
  764|    323|    else
  765|    323|      data->info.httpauthpicked = 0;
  766|    469|  }
  767|       |
  768|  2.77k|  return result;
  769|  2.77k|}
http.c:http_output_basic:
  255|  1.27k|{
  256|  1.27k|  size_t size = 0;
  257|  1.27k|  char *authorization = NULL;
  258|  1.27k|  char **p_hd;
  259|  1.27k|  CURLcode result;
  260|  1.27k|  struct Curl_creds *creds = NULL;
  261|  1.27k|  char *out;
  262|       |
  263|       |  /* credentials are unique per transfer for HTTP, do not use the ones for the
  264|       |     connection */
  265|  1.27k|  if(proxy) {
  ------------------
  |  Branch (265:6): [True: 1.24k, False: 25]
  ------------------
  266|  1.24k|#ifndef CURL_DISABLE_PROXY
  267|  1.24k|    p_hd = &data->req.hd_proxy_auth;
  268|  1.24k|    creds = conn->http_proxy.creds;
  269|       |#else
  270|       |    (void)conn;
  271|       |    return CURLE_NOT_BUILT_IN;
  272|       |#endif
  273|  1.24k|  }
  274|     25|  else {
  275|     25|    p_hd = &data->req.hd_auth;
  276|     25|    creds = data->state.creds;
  277|     25|  }
  278|       |
  279|  1.27k|  if(!creds) {
  ------------------
  |  Branch (279:6): [True: 0, False: 1.27k]
  ------------------
  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|  1.27k|  out = curl_maprintf("%s:%s", creds->user, creds->passwd);
  285|  1.27k|  if(!out)
  ------------------
  |  Branch (285:6): [True: 0, False: 1.27k]
  ------------------
  286|      0|    return CURLE_OUT_OF_MEMORY;
  287|       |
  288|  1.27k|  result = curlx_base64_encode((uint8_t *)out, strlen(out),
  289|  1.27k|                               &authorization, &size);
  290|  1.27k|  if(result)
  ------------------
  |  Branch (290:6): [True: 0, False: 1.27k]
  ------------------
  291|      0|    goto fail;
  292|       |
  293|  1.27k|  if(!authorization) {
  ------------------
  |  Branch (293:6): [True: 0, False: 1.27k]
  ------------------
  294|      0|    result = CURLE_REMOTE_ACCESS_DENIED;
  295|      0|    goto fail;
  296|      0|  }
  297|       |
  298|  1.27k|  curlx_free(*p_hd);
  ------------------
  |  | 1488|  1.27k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  299|  1.27k|  *p_hd = curl_maprintf("%sAuthorization: Basic %s\r\n",
  300|  1.27k|                        proxy ? "Proxy-" : "",
  ------------------
  |  Branch (300:25): [True: 1.24k, False: 25]
  ------------------
  301|  1.27k|                        authorization);
  302|  1.27k|  curlx_free(authorization);
  ------------------
  |  | 1488|  1.27k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  303|  1.27k|  if(!*p_hd) {
  ------------------
  |  Branch (303:6): [True: 0, False: 1.27k]
  ------------------
  304|      0|    result = CURLE_OUT_OF_MEMORY;
  305|      0|    goto fail;
  306|      0|  }
  307|       |
  308|  1.27k|fail:
  309|  1.27k|  curlx_free(out);
  ------------------
  |  | 1488|  1.27k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  310|  1.27k|  return result;
  311|  1.27k|}

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

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

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

Curl_output_digest:
   90|      2|{
   91|      2|  CURLcode result;
   92|      2|  char *response;
   93|      2|  size_t len;
   94|      2|  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|      2|  char **allocuserpwd;
   99|       |
  100|       |  /* Point to the name and password for this */
  101|      2|  struct Curl_creds *creds = NULL;
  102|       |
  103|       |  /* Point to the correct struct with this */
  104|      2|  struct digestdata *digest;
  105|      2|  struct auth *authp;
  106|       |
  107|      2|  if(proxy) {
  ------------------
  |  Branch (107:6): [True: 1, False: 1]
  ------------------
  108|       |#ifdef CURL_DISABLE_PROXY
  109|       |    return CURLE_NOT_BUILT_IN;
  110|       |#else
  111|      1|    digest = &data->state.proxydigest;
  112|      1|    digest_flush_stale(digest, data->conn->http_proxy.peer,
  113|      1|                       data->conn->http_proxy.creds);
  114|      1|    allocuserpwd = &data->req.hd_proxy_auth;
  115|      1|    creds = data->conn->http_proxy.creds;
  116|      1|    authp = &data->state.authproxy;
  117|      1|#endif
  118|      1|  }
  119|      1|  else {
  120|      1|    DEBUGASSERT(data->state.origin);
  ------------------
  |  | 1077|      1|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (120:5): [True: 0, False: 1]
  |  Branch (120:5): [True: 1, False: 0]
  ------------------
  121|      1|    digest = &data->state.digest;
  122|      1|    digest_flush_stale(digest, data->state.origin, data->state.creds);
  123|      1|    allocuserpwd = &data->req.hd_auth;
  124|      1|    creds = data->state.creds;
  125|      1|    authp = &data->state.authhost;
  126|      1|  }
  127|       |
  128|      2|  curlx_safefree(*allocuserpwd);
  ------------------
  |  | 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]
  |  |  ------------------
  ------------------
  129|       |
  130|       |#ifdef USE_WINDOWS_SSPI
  131|       |  have_chlg = !!digest->input_token;
  132|       |#else
  133|      2|  have_chlg = !!digest->nonce;
  134|      2|#endif
  135|       |
  136|      2|  if(!have_chlg) {
  ------------------
  |  Branch (136:6): [True: 2, False: 0]
  ------------------
  137|      2|    authp->done = FALSE;
  ------------------
  |  | 1054|      2|#define FALSE false
  ------------------
  138|      2|    return CURLE_OK;
  139|      2|  }
  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|  23.9k|{
  160|  23.9k|  Curl_auth_digest_cleanup(&data->state.digest);
  161|  23.9k|  Curl_auth_digest_cleanup(&data->state.proxydigest);
  162|  23.9k|}
http_digest.c:digest_flush_stale:
   71|      2|{
   72|      2|  bool flush = FALSE;
  ------------------
  |  | 1054|      2|#define FALSE false
  ------------------
   73|      2|  if(digest->origin && !Curl_peer_same_destination(peer, digest->origin))
  ------------------
  |  Branch (73:6): [True: 0, False: 2]
  |  Branch (73:24): [True: 0, False: 0]
  ------------------
   74|      0|    flush = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
   75|      2|  else if(digest->creds && !Curl_creds_same(creds, digest->creds))
  ------------------
  |  Branch (75:11): [True: 0, False: 2]
  |  Branch (75:28): [True: 0, False: 0]
  ------------------
   76|      0|    flush = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
   77|       |
   78|      2|  if(flush)
  ------------------
  |  Branch (78:6): [True: 0, False: 2]
  ------------------
   79|       |    /* flush Digest state */
   80|      0|    Curl_auth_digest_cleanup(digest);
   81|       |
   82|      2|  Curl_peer_link(&digest->origin, peer);
   83|      2|  Curl_creds_link(&digest->creds, creds);
   84|      2|}

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

Curl_is_ASCII_str:
  238|  14.4k|{
  239|  14.4k|  if(s && s->len) {
  ------------------
  |  Branch (239:6): [True: 14.4k, False: 0]
  |  Branch (239:11): [True: 14.4k, False: 0]
  ------------------
  240|  14.4k|    const unsigned char *ch = (const unsigned char *)s->str;
  241|  14.4k|    size_t i;
  242|   227k|    for(i = 0; i < s->len; ++i) {
  ------------------
  |  Branch (242:16): [True: 212k, False: 14.3k]
  ------------------
  243|   212k|      if(ch[i] & 0x80)
  ------------------
  |  Branch (243:10): [True: 131, False: 212k]
  ------------------
  244|    131|        return FALSE;
  ------------------
  |  | 1054|    131|#define FALSE false
  ------------------
  245|   212k|    }
  246|  14.4k|  }
  247|  14.3k|  return TRUE;
  ------------------
  |  | 1051|  14.3k|#define TRUE true
  ------------------
  248|  14.4k|}
Curl_idn_decode:
  315|    131|{
  316|    131|  char *d = NULL;
  317|    131|  CURLcode result = idn_decode(input, &d);
  318|    131|#ifdef USE_LIBIDN2
  319|    131|  if(!result) {
  ------------------
  |  Branch (319:6): [True: 0, False: 131]
  ------------------
  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|    131|#endif
  328|    131|  if(!result) {
  ------------------
  |  Branch (328:6): [True: 0, False: 131]
  ------------------
  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|    131|  return result;
  337|    131|}
idn.c:idn_decode:
  260|    131|{
  261|    131|  char *decoded = NULL;
  262|    131|  CURLcode result = CURLE_OK;
  263|    131|#ifdef USE_LIBIDN2
  264|    131|  if(idn2_check_version(IDN2_VERSION)) {
  ------------------
  |  Branch (264:6): [True: 131, False: 0]
  ------------------
  265|    131|    int flags = IDN2_NFC_INPUT
  266|    131|#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|    131|      | IDN2_NONTRANSITIONAL
  271|    131|#endif
  272|    131|      ;
  273|    131|    int rc = IDN2_LOOKUP(input, &decoded, flags);
  ------------------
  |  |   41|    131|  idn2_lookup_ul((const char *)(name), (char **)(host), flags)
  ------------------
  274|    131|    if(rc != IDN2_OK)
  ------------------
  |  Branch (274:8): [True: 131, False: 0]
  ------------------
  275|       |      /* fallback to TR46 Transitional mode for better IDNA2003
  276|       |         compatibility */
  277|    131|      rc = IDN2_LOOKUP(input, &decoded, IDN2_TRANSITIONAL);
  ------------------
  |  |   41|    131|  idn2_lookup_ul((const char *)(name), (char **)(host), flags)
  ------------------
  278|    131|    if(rc != IDN2_OK)
  ------------------
  |  Branch (278:8): [True: 131, False: 0]
  ------------------
  279|    131|      result = CURLE_URL_MALFORMAT;
  280|    131|  }
  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|    131|  if(!result)
  ------------------
  |  Branch (289:6): [True: 0, False: 131]
  ------------------
  290|      0|    *output = decoded;
  291|    131|  return result;
  292|    131|}

Curl_ipv6_scope:
   62|  5.08k|{
   63|  5.08k|  if(sa->sa_family == AF_INET6) {
  ------------------
  |  Branch (63:6): [True: 126, False: 4.95k]
  ------------------
   64|    126|    const struct sockaddr_in6 *sa6 =
   65|    126|      (const struct sockaddr_in6 *)(const void *)sa;
   66|    126|    const unsigned char *b = sa6->sin6_addr.s6_addr;
   67|    126|    unsigned short w = (unsigned short)((b[0] << 8) | b[1]);
   68|       |
   69|    126|    if((b[0] & 0xFE) == 0xFC) /* Handle ULAs */
  ------------------
  |  Branch (69:8): [True: 3, False: 123]
  ------------------
   70|      3|      return IPV6_SCOPE_UNIQUELOCAL;
  ------------------
  |  |   32|      3|#define IPV6_SCOPE_UNIQUELOCAL  3       /* Unique local */
  ------------------
   71|    123|    switch(w & 0xFFC0) {
   72|      3|    case 0xFE80:
  ------------------
  |  Branch (72:5): [True: 3, False: 120]
  ------------------
   73|      3|      return IPV6_SCOPE_LINKLOCAL;
  ------------------
  |  |   30|      3|#define IPV6_SCOPE_LINKLOCAL    1       /* Link-local scope. */
  ------------------
   74|      3|    case 0xFEC0:
  ------------------
  |  Branch (74:5): [True: 3, False: 120]
  ------------------
   75|      3|      return IPV6_SCOPE_SITELOCAL;
  ------------------
  |  |   31|      3|#define IPV6_SCOPE_SITELOCAL    2       /* Site-local scope (deprecated). */
  ------------------
   76|    100|    case 0x0000:
  ------------------
  |  Branch (76:5): [True: 100, False: 23]
  ------------------
   77|    100|      w = b[1] | b[2] | b[3] | b[4] | b[5] | b[6] | b[7] | b[8] | b[9] |
   78|    100|          b[10] | b[11] | b[12] | b[13] | b[14];
   79|    100|      if(w || b[15] != 0x01)
  ------------------
  |  Branch (79:10): [True: 24, False: 76]
  |  Branch (79:15): [True: 13, False: 63]
  ------------------
   80|     37|        break;
   81|     63|      return IPV6_SCOPE_NODELOCAL;
  ------------------
  |  |   33|     63|#define IPV6_SCOPE_NODELOCAL    4       /* Loopback. */
  ------------------
   82|     17|    default:
  ------------------
  |  Branch (82:5): [True: 17, False: 106]
  ------------------
   83|     17|      break;
   84|    123|    }
   85|    123|  }
   86|  5.00k|  return IPV6_SCOPE_GLOBAL;
  ------------------
  |  |   29|  5.00k|#define IPV6_SCOPE_GLOBAL       0       /* Global scope. */
  ------------------
   87|  5.08k|}
Curl_if2ip:
  101|    183|{
  102|    183|  struct ifaddrs *iface, *head;
  103|    183|  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|    183|  if(getifaddrs(&head) >= 0) {
  ------------------
  |  Branch (109:6): [True: 183, False: 0]
  ------------------
  110|    913|    for(iface = head; iface; iface = iface->ifa_next) {
  ------------------
  |  Branch (110:23): [True: 731, False: 182]
  ------------------
  111|    731|      if(iface->ifa_addr) {
  ------------------
  |  Branch (111:10): [True: 731, False: 0]
  ------------------
  112|    731|        if(iface->ifa_addr->sa_family == af) {
  ------------------
  |  Branch (112:12): [True: 263, False: 468]
  ------------------
  113|    263|          if(curl_strequal(iface->ifa_name, interf)) {
  ------------------
  |  Branch (113:14): [True: 1, False: 262]
  ------------------
  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|    263|        }
  163|    468|        else if((res == IF2IP_NOT_FOUND) &&
  ------------------
  |  Branch (163:17): [True: 467, False: 1]
  ------------------
  164|    467|                curl_strequal(iface->ifa_name, interf)) {
  ------------------
  |  Branch (164:17): [True: 1, False: 466]
  ------------------
  165|      1|          res = IF2IP_AF_NOT_SUPPORTED;
  166|      1|        }
  167|    731|      }
  168|    731|    }
  169|       |
  170|    183|    freeifaddrs(head);
  171|    183|  }
  172|       |
  173|    183|  return res;
  174|    183|}

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

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

Curl_mime_cleanpart:
 1099|  50.6k|{
 1100|  50.6k|  if(part) {
  ------------------
  |  Branch (1100:6): [True: 2.61k, False: 48.0k]
  ------------------
 1101|  2.61k|    cleanup_part_content(part);
 1102|  2.61k|    curl_slist_free_all(part->curlheaders);
 1103|  2.61k|    if(part->flags & MIME_USERHEADERS_OWNER)
  ------------------
  |  |   34|  2.61k|#define MIME_USERHEADERS_OWNER  (1 << 0)
  ------------------
  |  Branch (1103:8): [True: 0, False: 2.61k]
  ------------------
 1104|      0|      curl_slist_free_all(part->userheaders);
 1105|  2.61k|    curlx_safefree(part->mimetype);
  ------------------
  |  | 1332|  2.61k|  do {                      \
  |  | 1333|  2.61k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  2.61k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  2.61k|    (ptr) = NULL;           \
  |  | 1335|  2.61k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 2.61k]
  |  |  ------------------
  ------------------
 1106|  2.61k|    curlx_safefree(part->name);
  ------------------
  |  | 1332|  2.61k|  do {                      \
  |  | 1333|  2.61k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  2.61k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  2.61k|    (ptr) = NULL;           \
  |  | 1335|  2.61k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 2.61k]
  |  |  ------------------
  ------------------
 1107|       |    curlx_safefree(part->filename);
  ------------------
  |  | 1332|  2.61k|  do {                      \
  |  | 1333|  2.61k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  2.61k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  2.61k|    (ptr) = NULL;           \
  |  | 1335|  2.61k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 2.61k]
  |  |  ------------------
  ------------------
 1108|  2.61k|    Curl_mime_initpart(part);
 1109|  2.61k|  }
 1110|  50.6k|}
curl_mime_free:
 1114|    176|{
 1115|    176|  curl_mimepart *part;
 1116|       |
 1117|    176|  if(mime) {
  ------------------
  |  Branch (1117:6): [True: 176, False: 0]
  ------------------
 1118|    176|    mime_subparts_unbind(mime);  /* Be sure it is not referenced anymore. */
 1119|  2.62k|    while(mime->firstpart) {
  ------------------
  |  Branch (1119:11): [True: 2.45k, False: 176]
  ------------------
 1120|  2.45k|      part = mime->firstpart;
 1121|  2.45k|      mime->firstpart = part->nextpart;
 1122|  2.45k|      Curl_mime_cleanpart(part);
 1123|  2.45k|      curlx_free(part);
  ------------------
  |  | 1488|  2.45k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1124|  2.45k|    }
 1125|    176|    curlx_free(mime);
  ------------------
  |  | 1488|    176|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1126|    176|  }
 1127|    176|}
curl_mime_init:
 1213|    176|{
 1214|    176|  curl_mime *mime = curlx_malloc(sizeof(*mime));
  ------------------
  |  | 1483|    176|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1215|       |
 1216|    176|  if(mime) {
  ------------------
  |  Branch (1216:6): [True: 176, False: 0]
  ------------------
 1217|    176|    mime->parent = NULL;
 1218|    176|    mime->firstpart = NULL;
 1219|    176|    mime->lastpart = NULL;
 1220|       |
 1221|    176|    memset(mime->boundary, '-', MIME_BOUNDARY_DASHES);
  ------------------
  |  |   28|    176|#define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
  ------------------
 1222|    176|    if(Curl_rand_alnum(easy,
  ------------------
  |  Branch (1222:8): [True: 0, False: 176]
  ------------------
 1223|    176|                       (unsigned char *)&mime->boundary[MIME_BOUNDARY_DASHES],
  ------------------
  |  |   28|    176|#define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
  ------------------
 1224|    176|                       MIME_RAND_BOUNDARY_CHARS + 1)) {
  ------------------
  |  |   29|    176|#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|    176|    mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL);
 1230|    176|  }
 1231|       |
 1232|    176|  return mime;
 1233|    176|}
Curl_mime_initpart:
 1237|  5.22k|{
 1238|  5.22k|  memset(part, 0, sizeof(*part));
 1239|  5.22k|  part->lastreadstatus = 1; /* Successful read status. */
 1240|       |  mimesetstate(&part->state, MIMESTATE_BEGIN, NULL);
 1241|  5.22k|}
curl_mime_addpart:
 1245|  2.45k|{
 1246|  2.45k|  curl_mimepart *part;
 1247|       |
 1248|  2.45k|  if(!mime)
  ------------------
  |  Branch (1248:6): [True: 0, False: 2.45k]
  ------------------
 1249|      0|    return NULL;
 1250|       |
 1251|  2.45k|  part = curlx_malloc(sizeof(*part));
  ------------------
  |  | 1483|  2.45k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1252|       |
 1253|  2.45k|  if(part) {
  ------------------
  |  Branch (1253:6): [True: 2.45k, False: 0]
  ------------------
 1254|  2.45k|    Curl_mime_initpart(part);
 1255|  2.45k|    part->parent = mime;
 1256|       |
 1257|  2.45k|    if(mime->lastpart)
  ------------------
  |  Branch (1257:8): [True: 2.27k, False: 176]
  ------------------
 1258|  2.27k|      mime->lastpart->nextpart = part;
 1259|    176|    else
 1260|    176|      mime->firstpart = part;
 1261|       |
 1262|  2.45k|    mime->lastpart = part;
 1263|  2.45k|  }
 1264|       |
 1265|  2.45k|  return part;
 1266|  2.45k|}
curl_mime_name:
 1270|    292|{
 1271|    292|  if(!part)
  ------------------
  |  Branch (1271:6): [True: 0, False: 292]
  ------------------
 1272|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1273|       |
 1274|    292|  curlx_safefree(part->name);
  ------------------
  |  | 1332|    292|  do {                      \
  |  | 1333|    292|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|    292|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|    292|    (ptr) = NULL;           \
  |  | 1335|    292|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 292]
  |  |  ------------------
  ------------------
 1275|       |
 1276|    292|  if(name) {
  ------------------
  |  Branch (1276:6): [True: 292, False: 0]
  ------------------
 1277|    292|    part->name = curlx_strdup(name);
  ------------------
  |  | 1482|    292|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1278|    292|    if(!part->name)
  ------------------
  |  Branch (1278:8): [True: 0, False: 292]
  ------------------
 1279|      0|      return CURLE_OUT_OF_MEMORY;
 1280|    292|  }
 1281|       |
 1282|    292|  return CURLE_OK;
 1283|    292|}
curl_mime_data:
 1304|    873|{
 1305|    873|  if(!part)
  ------------------
  |  Branch (1305:6): [True: 0, False: 873]
  ------------------
 1306|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1307|       |
 1308|    873|  cleanup_part_content(part);
 1309|       |
 1310|    873|  if(data) {
  ------------------
  |  Branch (1310:6): [True: 873, False: 0]
  ------------------
 1311|    873|    if(datasize == CURL_ZERO_TERMINATED)
  ------------------
  |  | 2429|    873|#define CURL_ZERO_TERMINATED ((size_t)-1)
  ------------------
  |  Branch (1311:8): [True: 0, False: 873]
  ------------------
 1312|      0|      datasize = strlen(data);
 1313|       |
 1314|    873|    part->data = curlx_memdup0(data, datasize);
 1315|    873|    if(!part->data)
  ------------------
  |  Branch (1315:8): [True: 0, False: 873]
  ------------------
 1316|      0|      return CURLE_OUT_OF_MEMORY;
 1317|       |
 1318|    873|    part->datasize = datasize;
 1319|    873|    part->readfunc = mime_mem_read;
 1320|    873|    part->seekfunc = mime_mem_seek;
 1321|    873|    part->freefunc = mime_mem_free;
 1322|    873|    part->flags |= MIME_FAST_READ;
  ------------------
  |  |   36|    873|#define MIME_FAST_READ          (1 << 2)
  ------------------
 1323|    873|    part->kind = MIMEKIND_DATA;
 1324|    873|  }
 1325|       |
 1326|    873|  return CURLE_OK;
 1327|    873|}
Curl_mime_set_subparts:
 1470|    161|{
 1471|    161|  curl_mime *root;
 1472|       |
 1473|    161|  if(!part)
  ------------------
  |  Branch (1473:6): [True: 0, False: 161]
  ------------------
 1474|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1475|       |
 1476|       |  /* Accept setting twice the same subparts. */
 1477|    161|  if(part->kind == MIMEKIND_MULTIPART && part->arg == subparts)
  ------------------
  |  Branch (1477:6): [True: 0, False: 161]
  |  Branch (1477:42): [True: 0, False: 0]
  ------------------
 1478|      0|    return CURLE_OK;
 1479|       |
 1480|    161|  cleanup_part_content(part);
 1481|       |
 1482|    161|  if(subparts) {
  ------------------
  |  Branch (1482:6): [True: 161, False: 0]
  ------------------
 1483|       |    /* Should not have been attached already. */
 1484|    161|    if(subparts->parent)
  ------------------
  |  Branch (1484:8): [True: 0, False: 161]
  ------------------
 1485|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1486|       |
 1487|       |    /* Should not be the part's root. */
 1488|    161|    root = part->parent;
 1489|    161|    if(root) {
  ------------------
  |  Branch (1489:8): [True: 0, False: 161]
  ------------------
 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|    161|    if(mime_subparts_seek(subparts, (curl_off_t)0, SEEK_SET) !=
  ------------------
  |  Branch (1502:8): [True: 0, False: 161]
  ------------------
 1503|    161|       CURL_SEEKFUNC_OK)
  ------------------
  |  |  380|    161|#define CURL_SEEKFUNC_OK       0
  ------------------
 1504|      0|      return CURLE_SEND_FAIL_REWIND;
 1505|       |
 1506|    161|    subparts->parent = part;
 1507|       |    /* Subparts are processed internally: no read callback. */
 1508|    161|    part->seekfunc = mime_subparts_seek;
 1509|    161|    part->freefunc = take_ownership ? mime_subparts_free :
  ------------------
  |  Branch (1509:22): [True: 0, False: 161]
  ------------------
 1510|    161|      mime_subparts_unbind;
 1511|    161|    part->arg = subparts;
 1512|    161|    part->datasize = -1;
 1513|    161|    part->kind = MIMEKIND_MULTIPART;
 1514|    161|  }
 1515|       |
 1516|    161|  return CURLE_OK;
 1517|    161|}
mime.c:cleanup_part_content:
 1057|  3.80k|{
 1058|  3.80k|  if(part->freefunc)
  ------------------
  |  Branch (1058:6): [True: 873, False: 2.93k]
  ------------------
 1059|    873|    part->freefunc(part->arg);
 1060|       |
 1061|  3.80k|  part->readfunc = NULL;
 1062|  3.80k|  part->seekfunc = NULL;
 1063|  3.80k|  part->freefunc = NULL;
 1064|  3.80k|  part->arg = (void *)part;           /* Defaults to part itself. */
 1065|  3.80k|  part->data = NULL;
 1066|  3.80k|  part->fp = NULL;
 1067|  3.80k|  part->datasize = (curl_off_t)0;     /* No size yet. */
 1068|  3.80k|  cleanup_encoder_state(&part->encstate);
 1069|  3.80k|  part->kind = MIMEKIND_NONE;
 1070|  3.80k|  part->flags &= ~(unsigned int)MIME_FAST_READ;
  ------------------
  |  |   36|  3.80k|#define MIME_FAST_READ          (1 << 2)
  ------------------
 1071|  3.80k|  part->lastreadstatus = 1; /* Successful read status. */
 1072|  3.80k|  part->state.state = MIMESTATE_BEGIN;
 1073|  3.80k|}
mime.c:cleanup_encoder_state:
  284|  3.80k|{
  285|  3.80k|  p->pos = 0;
  286|  3.80k|  p->bufbeg = 0;
  287|  3.80k|  p->bufend = 0;
  288|  3.80k|}
mime.c:mime_subparts_unbind:
 1088|    176|{
 1089|    176|  curl_mime *mime = (curl_mime *)ptr;
 1090|       |
 1091|    176|  if(mime && mime->parent) {
  ------------------
  |  Branch (1091:6): [True: 176, False: 0]
  |  Branch (1091:14): [True: 161, False: 15]
  ------------------
 1092|    161|    mime->parent->freefunc = NULL;  /* Be sure we will not be called again. */
 1093|    161|    cleanup_part_content(mime->parent);  /* Avoid dangling pointer in part. */
 1094|       |    mime->parent = NULL;
 1095|    161|  }
 1096|    176|}
mime.c:mimesetstate:
  190|  5.40k|{
  191|  5.40k|  state->state = tok;
  192|  5.40k|  state->ptr = ptr;
  193|  5.40k|  state->offset = 0;
  194|  5.40k|}
mime.c:mime_mem_free:
  614|    873|{
  615|       |  curlx_safefree(((curl_mimepart *)ptr)->data);
  ------------------
  |  | 1332|    873|  do {                      \
  |  | 1333|    873|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|    873|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|    873|    (ptr) = NULL;           \
  |  | 1335|    873|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 873]
  |  |  ------------------
  ------------------
  616|    873|}
mime.c:mime_subparts_seek:
 1032|    161|{
 1033|    161|  curl_mime *mime = (curl_mime *)instream;
 1034|    161|  curl_mimepart *part;
 1035|    161|  int rc = CURL_SEEKFUNC_OK;
  ------------------
  |  |  380|    161|#define CURL_SEEKFUNC_OK       0
  ------------------
 1036|       |
 1037|    161|  if(whence != SEEK_SET || offset)
  ------------------
  |  Branch (1037:6): [True: 0, False: 161]
  |  Branch (1037:28): [True: 0, False: 161]
  ------------------
 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|    161|  if(mime->state.state == MIMESTATE_BEGIN)
  ------------------
  |  Branch (1040:6): [True: 161, False: 0]
  ------------------
 1041|    161|    return CURL_SEEKFUNC_OK;           /* Already rewound. */
  ------------------
  |  |  380|    161|#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|    161|}

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

Curl_multi_handle:
  244|  10.8k|{
  245|  10.8k|  struct Curl_multi *multi = curlx_calloc(1, sizeof(struct Curl_multi));
  ------------------
  |  | 1485|  10.8k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  246|       |
  247|  10.8k|  if(!multi)
  ------------------
  |  Branch (247:6): [True: 0, False: 10.8k]
  ------------------
  248|      0|    return NULL;
  249|       |
  250|  10.8k|  multi->magic = CURL_MULTI_HANDLE;
  ------------------
  |  |   75|  10.8k|#define CURL_MULTI_HANDLE 0x000bab1e
  ------------------
  251|       |
  252|  10.8k|  Curl_dnscache_init(&multi->dnscache, dnssize);
  253|  10.8k|  Curl_mntfy_init(multi);
  254|  10.8k|  Curl_multi_ev_init(multi, ev_hashsize);
  255|  10.8k|  Curl_uint32_tbl_init(&multi->xfers, NULL);
  256|  10.8k|  Curl_uint32_bset_init(&multi->process);
  257|  10.8k|  Curl_uint32_bset_init(&multi->dirty);
  258|  10.8k|  Curl_uint32_bset_init(&multi->pending);
  259|  10.8k|  Curl_uint32_bset_init(&multi->msgsent);
  260|  10.8k|  Curl_hash_init(&multi->proto_hash, 23,
  261|  10.8k|                 Curl_hash_str, curlx_str_key_compare, ph_freeentry);
  262|  10.8k|  Curl_llist_init(&multi->msglist, NULL);
  263|       |
  264|  10.8k|  multi->multiplexing = TRUE;
  ------------------
  |  | 1051|  10.8k|#define TRUE true
  ------------------
  265|  10.8k|  multi->max_concurrent_streams = 100;
  266|  10.8k|  multi->last_timeout_ms = -1;
  267|  10.8k|#ifdef ENABLE_WAKEUP
  268|  10.8k|  multi->wakeup_pair[0] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  10.8k|#define CURL_SOCKET_BAD (-1)
  ------------------
  269|  10.8k|  multi->wakeup_pair[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  10.8k|#define CURL_SOCKET_BAD (-1)
  ------------------
  270|  10.8k|#endif
  271|       |
  272|  10.8k|  if(Curl_mntfy_resize(multi) ||
  ------------------
  |  Branch (272:6): [True: 0, False: 10.8k]
  ------------------
  273|  10.8k|     Curl_uint32_bset_resize(&multi->process, xfer_table_size) ||
  ------------------
  |  Branch (273:6): [True: 0, False: 10.8k]
  ------------------
  274|  10.8k|     Curl_uint32_bset_resize(&multi->pending, xfer_table_size) ||
  ------------------
  |  Branch (274:6): [True: 0, False: 10.8k]
  ------------------
  275|  10.8k|     Curl_uint32_bset_resize(&multi->dirty, xfer_table_size) ||
  ------------------
  |  Branch (275:6): [True: 0, False: 10.8k]
  ------------------
  276|  10.8k|     Curl_uint32_bset_resize(&multi->msgsent, xfer_table_size) ||
  ------------------
  |  Branch (276:6): [True: 0, False: 10.8k]
  ------------------
  277|  10.8k|     Curl_uint32_tbl_resize(&multi->xfers, xfer_table_size))
  ------------------
  |  Branch (277:6): [True: 0, False: 10.8k]
  ------------------
  278|      0|    goto error;
  279|       |
  280|  10.8k|  multi->admin = curl_easy_init();
  281|  10.8k|  if(!multi->admin)
  ------------------
  |  Branch (281:6): [True: 0, False: 10.8k]
  ------------------
  282|      0|    goto error;
  283|       |  /* Initialize admin handle to operate inside this multi */
  284|  10.8k|  multi->admin->multi = multi;
  285|  10.8k|  multi->admin->state.internal = TRUE;
  ------------------
  |  | 1051|  10.8k|#define TRUE true
  ------------------
  286|  10.8k|  Curl_llist_init(&multi->admin->state.timeoutlist, NULL);
  287|       |
  288|  10.8k|#ifdef DEBUGBUILD
  289|  10.8k|  if(getenv("CURL_DEBUG"))
  ------------------
  |  Branch (289:6): [True: 0, False: 10.8k]
  ------------------
  290|      0|    multi->admin->set.verbose = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  291|  10.8k|#endif
  292|  10.8k|  Curl_uint32_tbl_add(&multi->xfers, multi->admin, &multi->admin->mid);
  293|  10.8k|  Curl_uint32_bset_add(&multi->process, multi->admin->mid);
  294|       |
  295|  10.8k|  if(Curl_cshutdn_init(&multi->cshutdn, multi))
  ------------------
  |  Branch (295:6): [True: 0, False: 10.8k]
  ------------------
  296|      0|    goto error;
  297|       |
  298|  10.8k|  Curl_cpool_init(&multi->cpool, multi->admin, NULL, chashsize);
  299|       |
  300|  10.8k|#ifdef USE_SSL
  301|  10.8k|  if(Curl_ssl_scache_create(sesssize, 2, &multi->ssl_scache))
  ------------------
  |  Branch (301:6): [True: 0, False: 10.8k]
  ------------------
  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|  10.8k|#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|  10.8k|  if(Curl_wakeup_init(multi->wakeup_pair, TRUE) < 0)
  ------------------
  |  | 1051|  10.8k|#define TRUE true
  ------------------
  |  Branch (315:6): [True: 0, False: 10.8k]
  ------------------
  316|      0|    goto error;
  317|  10.8k|#endif
  318|       |
  319|  10.8k|  if(Curl_probeipv6(multi))
  ------------------
  |  Branch (319:6): [True: 0, False: 10.8k]
  ------------------
  320|      0|    goto error;
  321|       |
  322|  10.8k|#ifdef USE_RESOLV_THREADED
  323|  10.8k|  if(xfer_table_size < CURL_XFER_TABLE_SIZE) { /* easy multi */
  ------------------
  |  |   52|  10.8k|#define CURL_XFER_TABLE_SIZE 512
  ------------------
  |  Branch (323:6): [True: 0, False: 10.8k]
  ------------------
  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|  10.8k|  else { /* real multi handle */
  328|  10.8k|    if(Curl_async_thrdd_multi_init(multi, 0, 20, 2000))
  ------------------
  |  Branch (328:8): [True: 0, False: 10.8k]
  ------------------
  329|      0|      goto error;
  330|  10.8k|  }
  331|  10.8k|#endif
  332|       |
  333|  10.8k|  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|  10.8k|}
curl_multi_init:
  369|  10.8k|{
  370|  10.8k|  return Curl_multi_handle(CURL_XFER_TABLE_SIZE,
  ------------------
  |  |   52|  10.8k|#define CURL_XFER_TABLE_SIZE 512
  ------------------
  371|  10.8k|                           CURL_SOCKET_HASH_TABLE_SIZE,
  ------------------
  |  |   60|  10.8k|#define CURL_SOCKET_HASH_TABLE_SIZE 911
  ------------------
  372|  10.8k|                           CURL_CONNECTION_HASH_SIZE,
  ------------------
  |  |   64|  10.8k|#define CURL_CONNECTION_HASH_SIZE 97
  ------------------
  373|  10.8k|                           CURL_DNS_HASH_SIZE,
  ------------------
  |  |   68|  10.8k|#define CURL_DNS_HASH_SIZE 71
  ------------------
  374|  10.8k|                           CURL_TLS_SESSION_SIZE);
  ------------------
  |  |   72|  10.8k|#define CURL_TLS_SESSION_SIZE 25
  ------------------
  375|  10.8k|}
Curl_is_connecting:
  392|  31.5k|{
  393|  31.5k|  return data->mstate < MSTATE_DO;
  394|  31.5k|}
curl_multi_add_handle:
  467|  11.4k|{
  468|  11.4k|  CURLMcode mresult;
  469|  11.4k|  struct Curl_multi *multi = m;
  470|  11.4k|  struct Curl_easy *data = curl;
  471|       |
  472|       |  /* First, make some basic checks that the CURLM handle is a good handle */
  473|  11.4k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|  11.4k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  11.4k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  11.4k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 11.4k, False: 0]
  |  |  |  Branch (82:12): [True: 11.4k, False: 0]
  |  |  ------------------
  |  |   83|  11.4k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (473:6): [True: 0, False: 11.4k]
  |  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|  11.4k|  if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  141|  11.4k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  135|  11.4k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  11.4k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (141:5): [True: 11.4k, False: 0]
  |  |  |  Branch (141:12): [True: 11.4k, False: 0]
  |  |  ------------------
  |  |  142|  11.4k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (477:6): [True: 0, False: 11.4k]
  |  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|  11.4k|  if(data->multi)
  ------------------
  |  Branch (482:6): [True: 0, False: 11.4k]
  ------------------
  483|      0|    return CURLM_ADDED_ALREADY;
  484|       |
  485|  11.4k|  if(multi->in_callback)
  ------------------
  |  Branch (485:6): [True: 0, False: 11.4k]
  ------------------
  486|      0|    return CURLM_RECURSIVE_API_CALL;
  487|       |
  488|  11.4k|  if(multi->dead) {
  ------------------
  |  Branch (488:6): [True: 0, False: 11.4k]
  ------------------
  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|  11.4k|  if(data->multi_easy) {
  ------------------
  |  Branch (503:6): [True: 0, False: 11.4k]
  ------------------
  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|  11.4k|  if(multi_xfers_add(multi, data))
  ------------------
  |  Branch (511:6): [True: 0, False: 11.4k]
  ------------------
  512|      0|    return CURLM_OUT_OF_MEMORY;
  513|       |
  514|       |  /* Initialize timeout list for this handle */
  515|  11.4k|  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|  11.4k|  if(data->set.errorbuffer)
  ------------------
  |  Branch (523:6): [True: 0, False: 11.4k]
  ------------------
  524|      0|    data->set.errorbuffer[0] = 0;
  525|       |
  526|  11.4k|  data->state.os_errno = 0;
  527|       |
  528|       |  /* make the Curl_easy refer back to this multi handle - before Curl_expire()
  529|       |     is called. */
  530|  11.4k|  data->multi = multi;
  531|       |
  532|       |  /* set the easy handle */
  533|  11.4k|  multistate(data, MSTATE_INIT);
  ------------------
  |  |  212|  11.4k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
  534|       |  /* not yet passed INIT state */
  535|  11.4k|  data->state.really_alive = FALSE;
  ------------------
  |  | 1054|  11.4k|#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|  11.4k|  Curl_uint32_bset_add(&multi->process, data->mid);
  547|  11.4k|  ++multi->xfers_alive;
  548|  11.4k|  ++multi->xfers_total_ever;
  549|       |
  550|  11.4k|  Curl_cpool_xfer_init(data);
  551|  11.4k|  multi_warn_debug(multi, data);
  552|       |
  553|       |  /* Make sure the new handle will run */
  554|  11.4k|  Curl_multi_mark_dirty(data);
  555|       |
  556|       |  /* Necessary in event based processing, where dirty handles trigger
  557|       |   * a timeout callback invocation. */
  558|  11.4k|  mresult = Curl_update_timer(multi);
  559|  11.4k|  if(mresult) {
  ------------------
  |  Branch (559:6): [True: 0, False: 11.4k]
  ------------------
  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|  11.4k|  multi->admin->set.timeout = data->set.timeout;
  571|  11.4k|  multi->admin->set.server_response_timeout =
  572|  11.4k|    data->set.server_response_timeout;
  573|  11.4k|  multi->admin->set.no_signal = data->set.no_signal;
  574|       |
  575|  11.4k|  CURL_TRC_M(data, "added to multi, mid=%u, running=%u, total=%u",
  ------------------
  |  |  148|  11.4k|  do {                                   \
  |  |  149|  11.4k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  11.4k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  11.4k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  22.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 11.4k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 11.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  22.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  11.4k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  11.4k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  11.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
  576|  11.4k|             data->mid, Curl_multi_xfers_running(multi),
  577|  11.4k|             Curl_uint32_tbl_count(&multi->xfers));
  578|  11.4k|  return CURLM_OK;
  579|  11.4k|}
curl_multi_remove_handle:
  785|  11.4k|{
  786|  11.4k|  struct Curl_multi *multi = m;
  787|  11.4k|  struct Curl_easy *data = curl;
  788|  11.4k|  bool premature;
  789|  11.4k|  struct Curl_llist_node *e;
  790|  11.4k|  CURLMcode mresult;
  791|  11.4k|  uint32_t mid;
  792|       |
  793|       |  /* First, make some basic checks that the CURLM handle is a good handle */
  794|  11.4k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|  11.4k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  11.4k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  11.4k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 11.4k, False: 0]
  |  |  |  Branch (82:12): [True: 11.4k, False: 0]
  |  |  ------------------
  |  |   83|  11.4k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (794:6): [True: 0, False: 11.4k]
  |  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|  11.4k|  if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  141|  11.4k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  135|  11.4k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  11.4k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (141:5): [True: 11.4k, False: 0]
  |  |  |  Branch (141:12): [True: 11.4k, False: 0]
  |  |  ------------------
  |  |  142|  11.4k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (798:6): [True: 0, False: 11.4k]
  |  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|  11.4k|  if(!data->multi)
  ------------------
  |  Branch (802:6): [True: 0, False: 11.4k]
  ------------------
  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|  11.4k|  if(data->multi != multi)
  ------------------
  |  Branch (806:6): [True: 0, False: 11.4k]
  ------------------
  807|      0|    return CURLM_BAD_EASY_HANDLE;
  808|       |
  809|  11.4k|  if(data->mid == UINT32_MAX) {
  ------------------
  |  Branch (809:6): [True: 0, False: 11.4k]
  ------------------
  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|  11.4k|  if(Curl_uint32_tbl_get(&multi->xfers, data->mid) != data) {
  ------------------
  |  Branch (813:6): [True: 0, False: 11.4k]
  ------------------
  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|  11.4k|  if(multi->in_callback)
  ------------------
  |  Branch (818:6): [True: 0, False: 11.4k]
  ------------------
  819|      0|    return CURLM_RECURSIVE_API_CALL;
  820|       |
  821|  11.4k|  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|  11.4k|  if(data->conn &&
  ------------------
  |  Branch (825:6): [True: 512, False: 10.9k]
  ------------------
  826|    512|     data->mstate > MSTATE_DO &&
  ------------------
  |  Branch (826:6): [True: 0, False: 512]
  ------------------
  827|      0|     data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (827:6): [True: 0, 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|      0|    streamclose(data->conn, "Removed with partial response");
  ------------------
  |  |   96|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   86|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
  831|      0|  }
  832|       |
  833|  11.4k|  if(data->conn) {
  ------------------
  |  Branch (833:6): [True: 512, False: 10.9k]
  ------------------
  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|    512|    (void)multi_done(data, data->result, premature);
  840|    512|  }
  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|  11.4k|  Curl_expire_clear(data);
  846|       |
  847|       |  /* If in `msgsent`, it was deducted from `multi->xfers_alive` already. */
  848|  11.4k|  if(!Curl_uint32_bset_contains(&multi->msgsent, data->mid))
  ------------------
  |  Branch (848:6): [True: 690, False: 10.7k]
  ------------------
  849|    690|    --multi->xfers_alive;
  850|  11.4k|  if(data->state.really_alive) {
  ------------------
  |  Branch (850:6): [True: 690, False: 10.7k]
  ------------------
  851|    690|    data->state.really_alive = FALSE;
  ------------------
  |  | 1054|    690|#define FALSE false
  ------------------
  852|    690|    --multi->xfers_really_alive;
  853|    690|    if(!multi->xfers_really_alive)
  ------------------
  |  Branch (853:8): [True: 311, False: 379]
  ------------------
  854|    311|      (void)multi_assess_wakeup(multi);
  855|    690|  }
  856|       |
  857|  11.4k|  Curl_wildcard_dtor(&data->wildcard);
  858|       |
  859|  11.4k|  data->mstate = MSTATE_COMPLETED;
  860|       |
  861|       |  /* Remove the association between the connection and the handle */
  862|  11.4k|  Curl_detach_connection(data);
  863|       |
  864|       |  /* Tell event handling that this transfer is definitely going away */
  865|  11.4k|  Curl_multi_ev_xfer_done(multi, data);
  866|       |
  867|  11.4k|  if(data->set.connect_only && !data->multi_easy) {
  ------------------
  |  Branch (867:6): [True: 2, False: 11.4k]
  |  Branch (867:32): [True: 2, 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|      2|    struct connectdata *c;
  877|      2|    curl_socket_t s;
  878|      2|    s = Curl_getconnectinfo(data, &c);
  879|      2|    if((s != CURL_SOCKET_BAD) && c) {
  ------------------
  |  |  145|      2|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (879:8): [True: 0, False: 2]
  |  Branch (879:34): [True: 0, False: 0]
  ------------------
  880|      0|      Curl_conn_terminate(data, c, TRUE);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  881|      0|    }
  882|      2|  }
  883|       |
  884|  11.4k|  if(data->state.lastconnect_id != -1) {
  ------------------
  |  Branch (884:6): [True: 0, False: 11.4k]
  ------------------
  885|       |    /* Mark any connect-only connection for closure */
  886|      0|    Curl_cpool_do_by_id(data, data->state.lastconnect_id,
  887|      0|                        close_connect_only, NULL);
  888|      0|  }
  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|  11.4k|  for(e = Curl_llist_head(&multi->msglist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (898:45): [True: 10.4k, False: 986]
  ------------------
  899|  10.4k|    struct Curl_message *msg = Curl_node_elem(e);
  900|       |
  901|  10.4k|    if(msg->extmsg.easy_handle == data) {
  ------------------
  |  Branch (901:8): [True: 10.4k, False: 0]
  ------------------
  902|  10.4k|      Curl_node_remove(e);
  903|       |      /* there can only be one from this specific handle */
  904|  10.4k|      break;
  905|  10.4k|    }
  906|  10.4k|  }
  907|       |
  908|       |  /* clear the association to this multi handle */
  909|  11.4k|  mid = data->mid;
  910|  11.4k|  DEBUGASSERT(Curl_uint32_tbl_contains(&multi->xfers, mid));
  ------------------
  |  | 1077|  11.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (910:3): [True: 0, False: 11.4k]
  |  Branch (910:3): [True: 11.4k, False: 0]
  ------------------
  911|  11.4k|  Curl_uint32_tbl_remove(&multi->xfers, mid);
  912|  11.4k|  Curl_uint32_bset_remove(&multi->process, mid);
  913|  11.4k|  Curl_uint32_bset_remove(&multi->dirty, mid);
  914|  11.4k|  Curl_uint32_bset_remove(&multi->pending, mid);
  915|  11.4k|  Curl_uint32_bset_remove(&multi->msgsent, mid);
  916|  11.4k|  data->multi = NULL;
  917|  11.4k|  data->mid = UINT32_MAX;
  918|  11.4k|  data->master_mid = UINT32_MAX;
  919|       |
  920|       |  /* NOTE NOTE NOTE
  921|       |     We do not touch the easy handle here! */
  922|  11.4k|  process_pending_handles(multi);
  923|       |
  924|  11.4k|  mresult = Curl_update_timer(multi);
  925|  11.4k|  if(mresult)
  ------------------
  |  Branch (925:6): [True: 0, False: 11.4k]
  ------------------
  926|      0|    return mresult;
  927|       |
  928|  11.4k|  mresult = multi_assess_wakeup(multi);
  929|  11.4k|  if(mresult) {
  ------------------
  |  Branch (929:6): [True: 0, False: 11.4k]
  ------------------
  930|      0|    failf(data, "error enabling wakeup listening: %d", mresult);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  931|      0|    return mresult;
  932|      0|  }
  933|       |
  934|  11.4k|  CURL_TRC_M(data, "removed from multi, mid=%u, running=%u, total=%u",
  ------------------
  |  |  148|  11.4k|  do {                                   \
  |  |  149|  11.4k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  11.4k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  11.4k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  22.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 11.4k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 11.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  22.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  11.4k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  11.4k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  11.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
  935|  11.4k|             mid, Curl_multi_xfers_running(multi),
  936|  11.4k|             Curl_uint32_tbl_count(&multi->xfers));
  937|  11.4k|  return CURLM_OK;
  938|  11.4k|}
Curl_multiplex_wanted:
  942|  5.85k|{
  943|  5.85k|  return multi && multi->multiplexing;
  ------------------
  |  Branch (943:10): [True: 5.85k, False: 0]
  |  Branch (943:19): [True: 5.85k, False: 0]
  ------------------
  944|  5.85k|}
Curl_detach_connection:
  953|  57.5k|{
  954|  57.5k|  struct connectdata *conn = data->conn;
  955|  57.5k|  if(conn) {
  ------------------
  |  Branch (955:6): [True: 11.3k, False: 46.2k]
  ------------------
  956|       |    /* this should never happen, prevent underflow */
  957|  11.3k|    DEBUGASSERT(conn->attached_xfers);
  ------------------
  |  | 1077|  11.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (957:5): [True: 0, False: 11.3k]
  |  Branch (957:5): [True: 11.3k, False: 0]
  ------------------
  958|  11.3k|    if(conn->attached_xfers) {
  ------------------
  |  Branch (958:8): [True: 11.3k, False: 0]
  ------------------
  959|  11.3k|      conn->attached_xfers--;
  960|  11.3k|      if(!conn->attached_xfers)
  ------------------
  |  Branch (960:10): [True: 11.3k, False: 0]
  ------------------
  961|  11.3k|        conn->attached_multi = NULL;
  962|  11.3k|    }
  963|  11.3k|  }
  964|  57.5k|  data->conn = NULL;
  965|  57.5k|}
Curl_attach_connection:
  974|  11.3k|{
  975|  11.3k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  11.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (975:3): [True: 0, False: 11.3k]
  |  Branch (975:3): [True: 11.3k, False: 0]
  ------------------
  976|  11.3k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1077|  11.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (976:3): [True: 0, False: 11.3k]
  |  Branch (976:3): [True: 11.3k, False: 0]
  ------------------
  977|  11.3k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  11.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (977:3): [True: 0, False: 11.3k]
  |  Branch (977:3): [True: 11.3k, False: 0]
  ------------------
  978|  11.3k|  DEBUGASSERT(conn->attached_xfers < UINT32_MAX);
  ------------------
  |  | 1077|  11.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (978:3): [True: 0, False: 11.3k]
  |  Branch (978:3): [True: 11.3k, False: 0]
  ------------------
  979|  11.3k|  data->conn = conn;
  980|  11.3k|  conn->attached_xfers++;
  981|       |  /* all attached transfers must be from the same multi */
  982|  11.3k|  if(!conn->attached_multi)
  ------------------
  |  Branch (982:6): [True: 11.3k, False: 0]
  ------------------
  983|  11.3k|    conn->attached_multi = data->multi;
  984|  11.3k|  DEBUGASSERT(conn->attached_multi == data->multi);
  ------------------
  |  | 1077|  11.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (984:3): [True: 0, False: 11.3k]
  |  Branch (984:3): [True: 11.3k, False: 0]
  ------------------
  985|       |
  986|  11.3k|  if(conn->scheme && conn->scheme->run->attach)
  ------------------
  |  Branch (986:6): [True: 11.3k, False: 0]
  |  Branch (986:22): [True: 0, False: 11.3k]
  ------------------
  987|      0|    conn->scheme->run->attach(data, conn);
  988|  11.3k|}
Curl_multi_pollset:
 1147|  3.35k|{
 1148|  3.35k|  CURLcode result = CURLE_OK;
 1149|       |
 1150|  3.35k|  Curl_pollset_reset(ps);
 1151|  3.35k|#ifdef ENABLE_WAKEUP
 1152|       |  /* The admin handle always listens on the wakeup socket when there
 1153|       |   * are transfers alive. */
 1154|  3.35k|  if(data->multi && (data == data->multi->admin) &&
  ------------------
  |  Branch (1154:6): [True: 3.35k, False: 0]
  |  Branch (1154:21): [True: 1.47k, False: 1.88k]
  ------------------
 1155|  1.47k|     data->multi->xfers_really_alive) {
  ------------------
  |  Branch (1155:6): [True: 1.47k, False: 0]
  ------------------
 1156|  1.47k|    CURL_TRC_M(data, "adding wakeup, %u xfers really alive",
  ------------------
  |  |  148|  1.47k|  do {                                   \
  |  |  149|  1.47k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  1.47k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  1.47k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  2.94k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 1.47k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.47k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  2.94k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  1.47k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  1.47k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  1.47k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
 1157|  1.47k|               data->multi->xfers_really_alive);
 1158|  1.47k|    result = Curl_pollset_add_in(data, ps, data->multi->wakeup_pair[0]);
  ------------------
  |  |  162|  1.47k|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
  |  |  ------------------
  |  |  |  |  283|  1.47k|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1159|  1.47k|  }
 1160|  3.35k|#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|  3.35k|  if(!result && data->conn) {
  ------------------
  |  Branch (1164:6): [True: 3.35k, False: 0]
  |  Branch (1164:17): [True: 1.88k, False: 1.47k]
  ------------------
 1165|  1.88k|    switch(data->mstate) {
 1166|      0|    case MSTATE_INIT:
  ------------------
  |  Branch (1166:5): [True: 0, False: 1.88k]
  ------------------
 1167|      0|    case MSTATE_PENDING:
  ------------------
  |  Branch (1167:5): [True: 0, False: 1.88k]
  ------------------
 1168|      0|    case MSTATE_SETUP:
  ------------------
  |  Branch (1168:5): [True: 0, False: 1.88k]
  ------------------
 1169|      0|    case MSTATE_CONNECT:
  ------------------
  |  Branch (1169:5): [True: 0, False: 1.88k]
  ------------------
 1170|       |      /* nothing to poll for yet */
 1171|      0|      break;
 1172|       |
 1173|  1.88k|    case MSTATE_CONNECTING:
  ------------------
  |  Branch (1173:5): [True: 1.88k, False: 0]
  ------------------
 1174|  1.88k|      if(data->conn && !data->conn->bits.dns_resolved)
  ------------------
  |  Branch (1174:10): [True: 1.88k, False: 0]
  |  Branch (1174:24): [True: 1.01k, False: 874]
  ------------------
 1175|  1.01k|        result = Curl_resolv_pollset(data, ps);
 1176|  1.88k|      if(!result)
  ------------------
  |  Branch (1176:10): [True: 1.88k, False: 0]
  ------------------
 1177|  1.88k|        result = mstate_connecting_pollset(data, ps);
 1178|  1.88k|      break;
 1179|       |
 1180|      0|    case MSTATE_PROTOCONNECT:
  ------------------
  |  Branch (1180:5): [True: 0, False: 1.88k]
  ------------------
 1181|      0|    case MSTATE_PROTOCONNECTING:
  ------------------
  |  Branch (1181:5): [True: 0, False: 1.88k]
  ------------------
 1182|      0|      result = mstate_protocol_pollset(data, ps);
 1183|      0|      break;
 1184|       |
 1185|      0|    case MSTATE_DO:
  ------------------
  |  Branch (1185:5): [True: 0, False: 1.88k]
  ------------------
 1186|      0|    case MSTATE_DOING:
  ------------------
  |  Branch (1186:5): [True: 0, False: 1.88k]
  ------------------
 1187|      0|      result = mstate_do_pollset(data, ps);
 1188|      0|      break;
 1189|       |
 1190|      0|    case MSTATE_DOING_MORE:
  ------------------
  |  Branch (1190:5): [True: 0, False: 1.88k]
  ------------------
 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: 1.88k]
  ------------------
 1195|      0|    case MSTATE_PERFORMING:
  ------------------
  |  Branch (1195:5): [True: 0, False: 1.88k]
  ------------------
 1196|      0|      result = mstate_perform_pollset(data, ps);
 1197|      0|      break;
 1198|       |
 1199|      0|    case MSTATE_RATELIMITING:
  ------------------
  |  Branch (1199:5): [True: 0, False: 1.88k]
  ------------------
 1200|       |      /* we need to let time pass, ignore socket(s) */
 1201|      0|      break;
 1202|       |
 1203|      0|    case MSTATE_DONE:
  ------------------
  |  Branch (1203:5): [True: 0, False: 1.88k]
  ------------------
 1204|      0|    case MSTATE_COMPLETED:
  ------------------
  |  Branch (1204:5): [True: 0, False: 1.88k]
  ------------------
 1205|      0|    case MSTATE_MSGSENT:
  ------------------
  |  Branch (1205:5): [True: 0, False: 1.88k]
  ------------------
 1206|       |      /* nothing more to poll for */
 1207|      0|      break;
 1208|       |
 1209|      0|    default:
  ------------------
  |  Branch (1209:5): [True: 0, False: 1.88k]
  ------------------
 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|  1.88k|    }
 1215|  1.88k|  }
 1216|       |
 1217|  3.35k|  if(result) {
  ------------------
  |  Branch (1217:6): [True: 0, False: 3.35k]
  ------------------
 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|  3.35k|#ifdef CURLVERBOSE
 1225|  3.35k|  if(CURL_TRC_M_is_verbose(data)) {
  ------------------
  |  |  135|  3.35k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  ------------------
  |  |  |  |  326|  3.35k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  6.71k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.35k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.35k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  6.71k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((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|  3.35k|   (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|  3.35k|#endif
 1259|       |
 1260|  3.35k|  return CURLM_OK;
 1261|  3.35k|}
curl_multi_fdset:
 1266|  1.47k|{
 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|  1.47k|  int this_max_fd = -1;
 1271|  1.47k|  struct Curl_multi *multi = m;
 1272|  1.47k|  struct easy_pollset ps;
 1273|  1.47k|  unsigned int i;
 1274|  1.47k|  uint32_t mid;
 1275|  1.47k|  (void)exc_fd_set;
 1276|       |
 1277|  1.47k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|  1.47k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  1.47k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  1.47k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 1.47k, False: 0]
  |  |  |  Branch (82:12): [True: 1.47k, False: 0]
  |  |  ------------------
  |  |   83|  1.47k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (1277:6): [True: 0, False: 1.47k]
  |  Branch (1277:7): [True: 0, False: 0]
  |  Branch (1277:7): [True: 0, False: 0]
  ------------------
 1278|      0|    return CURLM_BAD_HANDLE;
 1279|       |
 1280|  1.47k|  if(multi->in_callback)
  ------------------
  |  Branch (1280:6): [True: 0, False: 1.47k]
  ------------------
 1281|      0|    return CURLM_RECURSIVE_API_CALL;
 1282|       |
 1283|  1.47k|  Curl_pollset_init(&ps);
 1284|  1.47k|  if(Curl_uint32_bset_first(&multi->process, &mid)) {
  ------------------
  |  Branch (1284:6): [True: 1.47k, False: 0]
  ------------------
 1285|  3.35k|    do {
 1286|  3.35k|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 1287|       |
 1288|  3.35k|      if(!data) {
  ------------------
  |  Branch (1288:10): [True: 0, False: 3.35k]
  ------------------
 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|  3.35k|      Curl_multi_pollset(data, &ps);
 1294|  5.70k|      for(i = 0; i < ps.n; i++) {
  ------------------
  |  Branch (1294:18): [True: 2.34k, False: 3.35k]
  ------------------
 1295|  2.34k|        if(!FDSET_SOCK(ps.sockets[i]))
  ------------------
  |  |  101|  2.34k|#define FDSET_SOCK(s) ((s) < FD_SETSIZE)
  ------------------
  |  Branch (1295:12): [True: 0, False: 2.34k]
  ------------------
 1296|       |          /* pretend it does not exist */
 1297|      0|          continue;
 1298|  2.34k|        if(ps.actions[i] & CURL_POLL_IN)
  ------------------
  |  |  283|  2.34k|#define CURL_POLL_IN     1
  ------------------
  |  Branch (1298:12): [True: 2.28k, False: 59]
  ------------------
 1299|  2.34k|          FD_SET(ps.sockets[i], read_fd_set);
 1300|  2.34k|        if(ps.actions[i] & CURL_POLL_OUT)
  ------------------
  |  |  284|  2.34k|#define CURL_POLL_OUT    2
  ------------------
  |  Branch (1300:12): [True: 59, False: 2.28k]
  ------------------
 1301|  2.34k|          FD_SET(ps.sockets[i], write_fd_set);
 1302|  2.34k|        if((int)ps.sockets[i] > this_max_fd)
  ------------------
  |  Branch (1302:12): [True: 2.34k, False: 0]
  ------------------
 1303|  2.34k|          this_max_fd = (int)ps.sockets[i];
 1304|  2.34k|      }
 1305|  3.35k|    } while(Curl_uint32_bset_next(&multi->process, mid, &mid));
  ------------------
  |  Branch (1305:13): [True: 1.88k, False: 1.47k]
  ------------------
 1306|  1.47k|  }
 1307|       |
 1308|  1.47k|  Curl_cshutdn_setfds(&multi->cshutdn, multi->admin,
 1309|  1.47k|                      read_fd_set, write_fd_set, &this_max_fd);
 1310|       |
 1311|  1.47k|  *max_fd = this_max_fd;
 1312|  1.47k|  Curl_pollset_cleanup(&ps);
 1313|       |
 1314|  1.47k|  return CURLM_OK;
 1315|  1.47k|}
curl_multi_wakeup:
 1691|    456|{
 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|    456|  struct Curl_multi *multi = m;
 1696|    456|  CURLMcode mresult = CURLM_WAKEUP_FAILURE;
 1697|       |
 1698|       |  /* GOOD_MULTI_HANDLE can be safely called */
 1699|    456|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|    456|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|    456|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|    456|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 456, False: 0]
  |  |  |  Branch (82:12): [True: 456, False: 0]
  |  |  ------------------
  |  |   83|    456|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (1699:6): [True: 0, False: 456]
  |  Branch (1699:7): [True: 0, False: 0]
  |  Branch (1699:7): [True: 0, False: 0]
  ------------------
 1700|      0|    return CURLM_BAD_HANDLE;
 1701|       |
 1702|    456|#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|    456|  if(!Curl_wakeup_signal(multi->wakeup_pair))
  ------------------
  |  Branch (1706:6): [True: 456, False: 0]
  ------------------
 1707|    456|    mresult = CURLM_OK;
 1708|    456|#endif
 1709|       |#ifdef USE_WINSOCK
 1710|       |  if(WSASetEvent(multi->wsa_event))
 1711|       |    mresult = CURLM_OK;
 1712|       |#endif
 1713|    456|  return mresult;
 1714|    456|}
Curl_multi_connchanged:
 1744|  5.65k|{
 1745|       |  multi->recheckstate = TRUE;
  ------------------
  |  | 1051|  5.65k|#define TRUE true
  ------------------
 1746|  5.65k|}
curl_multi_perform:
 2969|  11.9k|{
 2970|  11.9k|  struct Curl_multi *multi = m;
 2971|       |
 2972|  11.9k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|  11.9k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  11.9k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  11.9k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 11.9k, False: 0]
  |  |  |  Branch (82:12): [True: 11.9k, False: 0]
  |  |  ------------------
  |  |   83|  11.9k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2972:6): [True: 0, False: 11.9k]
  |  Branch (2972:7): [True: 0, False: 0]
  |  Branch (2972:7): [True: 0, False: 0]
  ------------------
 2973|      0|    return CURLM_BAD_HANDLE;
 2974|       |
 2975|  11.9k|  return multi_perform(multi, running_handles);
 2976|  11.9k|}
curl_multi_cleanup:
 2979|  10.8k|{
 2980|  10.8k|  struct Curl_multi *multi = m;
 2981|  10.8k|  if(GOOD_MULTI_HANDLE(multi)) {
  ------------------
  |  |   82|  10.8k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  10.8k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  10.8k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:3): [True: 10.8k, False: 0]
  |  |  |  Branch (82:5): [True: 10.8k, False: 0]
  |  |  |  Branch (82:12): [True: 10.8k, False: 0]
  |  |  ------------------
  |  |   83|  10.8k|  (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|  10.8k|    void *entry;
 2983|  10.8k|    uint32_t mid;
 2984|  10.8k|    if(multi->in_callback)
  ------------------
  |  Branch (2984:8): [True: 0, False: 10.8k]
  ------------------
 2985|      0|      return CURLM_RECURSIVE_API_CALL;
 2986|  10.8k|    if(multi->in_ntfy_callback)
  ------------------
  |  Branch (2986:8): [True: 0, False: 10.8k]
  ------------------
 2987|      0|      return CURLM_RECURSIVE_API_CALL;
 2988|       |
 2989|       |    /* First remove all remaining easy handles,
 2990|       |     * close internal ones. admin handle is special */
 2991|  10.8k|    if(Curl_uint32_tbl_first(&multi->xfers, &mid, &entry)) {
  ------------------
  |  Branch (2991:8): [True: 10.8k, False: 0]
  ------------------
 2992|  10.8k|      do {
 2993|  10.8k|        struct Curl_easy *data = entry;
 2994|  10.8k|        if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  141|  10.8k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  135|  10.8k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  10.8k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (141:5): [True: 10.8k, False: 0]
  |  |  |  Branch (141:12): [True: 10.8k, False: 0]
  |  |  ------------------
  |  |  142|  10.8k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2994:12): [True: 0, False: 10.8k]
  |  Branch (2994:13): [True: 0, False: 0]
  |  Branch (2994:13): [True: 0, False: 0]
  ------------------
 2995|      0|          return CURLM_BAD_HANDLE;
 2996|       |
 2997|  10.8k|#ifdef DEBUGBUILD
 2998|  10.8k|        if(mid != data->mid) {
  ------------------
  |  Branch (2998:12): [True: 0, False: 10.8k]
  ------------------
 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|  10.8k|#endif
 3004|       |
 3005|  10.8k|        if(data == multi->admin)
  ------------------
  |  Branch (3005:12): [True: 10.8k, False: 0]
  ------------------
 3006|  10.8k|          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|  10.8k|      } while(Curl_uint32_tbl_next(&multi->xfers, mid, &mid, &entry));
  ------------------
  |  Branch (3022:15): [True: 0, False: 10.8k]
  ------------------
 3023|  10.8k|    }
 3024|       |
 3025|  10.8k|#ifdef USE_RESOLV_THREADED
 3026|  10.8k|    Curl_async_thrdd_multi_destroy(multi, !multi->quick_exit);
 3027|  10.8k|#endif
 3028|  10.8k|    Curl_cpool_destroy(&multi->cpool);
 3029|  10.8k|    Curl_cshutdn_destroy(&multi->cshutdn, multi->admin);
 3030|  10.8k|    if(multi->admin) {
  ------------------
  |  Branch (3030:8): [True: 10.8k, False: 0]
  ------------------
 3031|  10.8k|      CURL_TRC_M(multi->admin, "multi_cleanup, closing admin handle, done");
  ------------------
  |  |  148|  10.8k|  do {                                   \
  |  |  149|  10.8k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  10.8k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.8k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  21.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.8k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  21.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|  10.8k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  10.8k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  10.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
 3032|  10.8k|      multi->admin->multi = NULL;
 3033|  10.8k|      Curl_uint32_tbl_remove(&multi->xfers, multi->admin->mid);
 3034|  10.8k|      Curl_close(&multi->admin);
 3035|  10.8k|    }
 3036|       |
 3037|  10.8k|    multi->magic = 0; /* not good anymore */
 3038|       |
 3039|  10.8k|    Curl_multi_ev_cleanup(multi);
 3040|  10.8k|    Curl_hash_destroy(&multi->proto_hash);
 3041|  10.8k|    Curl_dnscache_destroy(&multi->dnscache);
 3042|  10.8k|    Curl_psl_destroy(&multi->psl);
 3043|  10.8k|#ifdef USE_SSL
 3044|  10.8k|    Curl_ssl_scache_destroy(multi->ssl_scache);
 3045|  10.8k|#endif
 3046|       |
 3047|       |#ifdef USE_WINSOCK
 3048|       |    WSACloseEvent(multi->wsa_event);
 3049|       |#endif
 3050|  10.8k|#ifdef ENABLE_WAKEUP
 3051|  10.8k|  Curl_wakeup_destroy(multi->wakeup_pair);
 3052|  10.8k|#endif
 3053|       |
 3054|  10.8k|    multi_xfer_bufs_free(multi);
 3055|  10.8k|    Curl_mntfy_cleanup(multi);
 3056|  10.8k|#ifdef DEBUGBUILD
 3057|  10.8k|    if(Curl_uint32_tbl_count(&multi->xfers)) {
  ------------------
  |  Branch (3057:8): [True: 0, False: 10.8k]
  ------------------
 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|  10.8k|#endif
 3062|  10.8k|    Curl_uint32_bset_destroy(&multi->process);
 3063|  10.8k|    Curl_uint32_bset_destroy(&multi->dirty);
 3064|  10.8k|    Curl_uint32_bset_destroy(&multi->pending);
 3065|  10.8k|    Curl_uint32_bset_destroy(&multi->msgsent);
 3066|  10.8k|    Curl_uint32_tbl_destroy(&multi->xfers);
 3067|  10.8k|    curlx_free(multi);
  ------------------
  |  | 1488|  10.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3068|       |
 3069|  10.8k|    return CURLM_OK;
 3070|  10.8k|  }
 3071|      0|  return CURLM_BAD_HANDLE;
 3072|  10.8k|}
Curl_multi_will_close:
 3113|  5.09k|{
 3114|  5.09k|  if(data) {
  ------------------
  |  Branch (3114:6): [True: 5.09k, False: 0]
  ------------------
 3115|  5.09k|    struct Curl_multi *multi = data->multi;
 3116|  5.09k|    if(multi) {
  ------------------
  |  Branch (3116:8): [True: 5.09k, False: 0]
  ------------------
 3117|  5.09k|      CURL_TRC_M(data, "Curl_multi_will_close fd=%" FMT_SOCKET_T, s);
  ------------------
  |  |  148|  5.09k|  do {                                   \
  |  |  149|  5.09k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.09k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.09k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  10.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.09k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.09k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  10.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|  5.09k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.09k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.09k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.09k]
  |  |  ------------------
  ------------------
 3118|  5.09k|      Curl_multi_ev_socket_done(multi, data, s);
 3119|  5.09k|    }
 3120|  5.09k|  }
 3121|  5.09k|}
Curl_update_timer:
 3598|  34.9k|{
 3599|  34.9k|  struct curltime expire_ts;
 3600|  34.9k|  long timeout_ms;
 3601|  34.9k|  int rc;
 3602|  34.9k|  bool set_value = FALSE;
  ------------------
  |  | 1054|  34.9k|#define FALSE false
  ------------------
 3603|       |
 3604|  34.9k|  if(!multi->timer_cb || multi->dead)
  ------------------
  |  Branch (3604:6): [True: 34.9k, False: 0]
  |  Branch (3604:26): [True: 0, False: 0]
  ------------------
 3605|  34.9k|    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|  8.18k|{
 3714|  8.18k|  struct Curl_multi *multi = data->multi;
 3715|  8.18k|  struct curltime *curr_expire = &data->state.expiretime;
 3716|  8.18k|  struct curltime set;
 3717|       |
 3718|       |  /* this is only interesting while there is still an associated multi struct
 3719|       |     remaining! */
 3720|  8.18k|  if(!multi)
  ------------------
  |  Branch (3720:6): [True: 0, False: 8.18k]
  ------------------
 3721|      0|    return;
 3722|       |
 3723|  8.18k|  DEBUGASSERT(id < EXPIRE_LAST);
  ------------------
  |  | 1077|  8.18k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3723:3): [True: 0, False: 8.18k]
  |  Branch (3723:3): [True: 8.18k, False: 0]
  ------------------
 3724|       |
 3725|  8.18k|  set = *Curl_pgrs_now(data);
 3726|  8.18k|  set.tv_sec += (time_t)(milli / 1000); /* may be a 64 to 32-bit conversion */
 3727|  8.18k|  set.tv_usec += (int)(milli % 1000) * 1000;
 3728|       |
 3729|  8.18k|  if(set.tv_usec >= 1000000) {
  ------------------
  |  Branch (3729:6): [True: 1.66k, False: 6.51k]
  ------------------
 3730|  1.66k|    set.tv_sec++;
 3731|  1.66k|    set.tv_usec -= 1000000;
 3732|  1.66k|  }
 3733|       |
 3734|       |  /* Remove any timer with the same id */
 3735|  8.18k|  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|  8.18k|  multi_addtimeout(data, &set, id);
 3740|       |
 3741|  8.18k|  if(curr_expire->tv_sec || curr_expire->tv_usec) {
  ------------------
  |  Branch (3741:6): [True: 668, False: 7.51k]
  |  Branch (3741:29): [True: 0, False: 7.51k]
  ------------------
 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|    668|    timediff_t diff = curlx_ptimediff_ms(&set, curr_expire);
 3746|    668|    int rc;
 3747|       |
 3748|    668|    if(diff > 0) {
  ------------------
  |  Branch (3748:8): [True: 117, False: 551]
  ------------------
 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|    117|      return;
 3752|    117|    }
 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|    551|    rc = Curl_splayremove(multi->timetree, &data->state.timenode,
 3757|    551|                          &multi->timetree);
 3758|    551|    if(rc)
  ------------------
  |  Branch (3758:8): [True: 0, False: 551]
  ------------------
 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|    551|  }
 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|  8.06k|  *curr_expire = set;
 3765|  8.06k|  Curl_splayset(&data->state.timenode, data);
 3766|  8.06k|  multi->timetree = Curl_splayinsert(curr_expire, multi->timetree,
 3767|  8.06k|                                     &data->state.timenode);
 3768|  8.06k|}
Curl_expire:
 3782|  8.18k|{
 3783|  8.18k|  Curl_expire_ex(data, milli, id);
 3784|  8.18k|}
Curl_expire_done:
 3793|  4.99k|{
 3794|       |  /* remove the timer, if there */
 3795|  4.99k|  multi_deltimeout(data, id);
 3796|  4.99k|  CURL_TRC_TIMER(data, id, "cleared");
  ------------------
  |  |  173|  4.99k|  do {                                        \
  |  |  174|  4.99k|    if(CURL_TRC_TIMER_is_verbose(data))       \
  |  |  ------------------
  |  |  |  |  139|  4.99k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  4.99k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  9.98k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 4.99k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.99k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  9.98k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  4.99k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  175|  4.99k|      Curl_trc_timer(data, tid, __VA_ARGS__); \
  |  |  176|  4.99k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (176:11): [Folded, False: 4.99k]
  |  |  ------------------
  ------------------
 3797|  4.99k|}
Curl_expire_clear:
 3805|  46.2k|{
 3806|  46.2k|  struct Curl_multi *multi = data->multi;
 3807|  46.2k|  struct curltime *nowp = &data->state.expiretime;
 3808|       |
 3809|       |  /* this is only interesting while there is still an associated multi struct
 3810|       |     remaining! */
 3811|  46.2k|  if(!multi)
  ------------------
  |  Branch (3811:6): [True: 23.9k, False: 22.2k]
  ------------------
 3812|  23.9k|    return;
 3813|       |
 3814|  22.2k|  if(nowp->tv_sec || nowp->tv_usec) {
  ------------------
  |  Branch (3814:6): [True: 7.51k, False: 14.7k]
  |  Branch (3814:22): [True: 0, False: 14.7k]
  ------------------
 3815|       |    /* Since this is an cleared time, we must remove the previous entry from
 3816|       |       the splay tree */
 3817|  7.51k|    struct Curl_llist *list = &data->state.timeoutlist;
 3818|  7.51k|    int rc;
 3819|       |
 3820|  7.51k|    rc = Curl_splayremove(multi->timetree, &data->state.timenode,
 3821|  7.51k|                          &multi->timetree);
 3822|  7.51k|    if(rc)
  ------------------
  |  Branch (3822:8): [True: 0, False: 7.51k]
  ------------------
 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|  7.51k|    Curl_llist_destroy(list, NULL);
 3827|       |
 3828|  7.51k|    if(data->id >= 0)
  ------------------
  |  Branch (3828:8): [True: 7.51k, False: 0]
  ------------------
 3829|  7.51k|      CURL_TRC_M(data, "[TIMEOUT] all cleared");
  ------------------
  |  |  148|  7.51k|  do {                                   \
  |  |  149|  7.51k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  7.51k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  7.51k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  15.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 7.51k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 7.51k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  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]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  7.51k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  7.51k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  7.51k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 7.51k]
  |  |  ------------------
  ------------------
 3830|  7.51k|    nowp->tv_sec = 0;
 3831|  7.51k|    nowp->tv_usec = 0;
 3832|  7.51k|  }
 3833|  22.2k|}
Curl_set_in_callback:
 3910|  20.5k|{
 3911|  20.5k|  if(data && data->multi)
  ------------------
  |  Branch (3911:6): [True: 20.5k, False: 0]
  |  Branch (3911:14): [True: 20.5k, False: 0]
  ------------------
 3912|  20.5k|    data->multi->in_callback = value;
 3913|  20.5k|}
Curl_multi_get_easy:
 4160|  29.7k|{
 4161|  29.7k|  struct Curl_easy *data = Curl_uint32_tbl_get(&multi->xfers, mid);
 4162|  29.7k|  if(GOOD_EASY_HANDLE(data))
  ------------------
  |  |  141|  29.7k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  135|  29.7k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  29.7k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (141:3): [True: 29.7k, False: 0]
  |  |  |  Branch (141:5): [True: 29.7k, False: 0]
  |  |  |  Branch (141:12): [True: 29.7k, False: 0]
  |  |  ------------------
  |  |  142|  29.7k|   (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|  29.7k|    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|  29.7k|}
Curl_multi_xfers_running:
 4171|  11.9k|{
 4172|  11.9k|  DEBUGASSERT(multi);
  ------------------
  |  | 1077|  11.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4172:3): [True: 0, False: 11.9k]
  |  Branch (4172:3): [True: 11.9k, False: 0]
  ------------------
 4173|  11.9k|  if(!multi)
  ------------------
  |  Branch (4173:6): [True: 0, False: 11.9k]
  ------------------
 4174|      0|    return 0;
 4175|  11.9k|  return multi->xfers_alive;
 4176|  11.9k|}
Curl_multi_mark_dirty:
 4179|  12.1k|{
 4180|  12.1k|  if(data->multi && data->mid != UINT32_MAX)
  ------------------
  |  Branch (4180:6): [True: 12.1k, False: 0]
  |  Branch (4180:21): [True: 12.1k, False: 0]
  ------------------
 4181|  12.1k|    Curl_uint32_bset_add(&data->multi->dirty, data->mid);
 4182|  12.1k|}
multi.c:multi_xfers_add:
  409|  11.4k|{
  410|  11.4k|  uint32_t capacity = Curl_uint32_tbl_capacity(&multi->xfers);
  411|  11.4k|  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|  11.4k|  const uint32_t max_capacity = UINT_MAX - 1;
  416|       |
  417|  11.4k|  if(capacity < max_capacity) {
  ------------------
  |  Branch (417:6): [True: 11.4k, 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|  11.4k|    uint32_t used = Curl_uint32_tbl_count(&multi->xfers);
  424|  11.4k|    uint32_t unused = capacity - used;
  425|  11.4k|    uint32_t min_unused = CURLMAX(capacity >> 2, 4);
  ------------------
  |  | 1291|  11.4k|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 11.4k, False: 0]
  |  |  ------------------
  ------------------
  426|  11.4k|    if(unused <= min_unused) {
  ------------------
  |  Branch (426:8): [True: 0, False: 11.4k]
  ------------------
  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|  11.4k|  }
  441|       |
  442|  11.4k|  if(new_size > capacity) {
  ------------------
  |  Branch (442:6): [True: 0, False: 11.4k]
  ------------------
  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|  11.4k|  if(!Curl_uint32_tbl_add(&multi->xfers, data, &data->mid)) {
  ------------------
  |  Branch (457:6): [True: 0, False: 11.4k]
  ------------------
  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|  11.4k|  return CURLM_OK;
  464|  11.4k|}
multi.c:mstate:
  171|  54.1k|{
  172|  54.1k|  CURLMstate oldstate = data->mstate;
  173|  54.1k|  static const mstate_enter_func state_enter[MSTATE_LAST] = {
  174|  54.1k|    NULL,                      /* INIT */
  175|  54.1k|    NULL,                      /* PENDING */
  176|  54.1k|    NULL,                      /* SETUP */
  177|  54.1k|    mstate_enter_connect,      /* CONNECT */
  178|  54.1k|    NULL,                      /* CONNECTING */
  179|  54.1k|    NULL,                      /* PROTOCONNECT */
  180|  54.1k|    NULL,                      /* PROTOCONNECTING */
  181|  54.1k|    NULL,                      /* DO */
  182|  54.1k|    NULL,                      /* DOING */
  183|  54.1k|    NULL,                      /* DOING_MORE */
  184|  54.1k|    mstate_enter_did,          /* DID */
  185|  54.1k|    NULL,                      /* PERFORMING */
  186|  54.1k|    NULL,                      /* RATELIMITING */
  187|  54.1k|    mstate_enter_done,         /* DONE */
  188|  54.1k|    mstate_enter_completed,    /* COMPLETED */
  189|       |    NULL                       /* MSGSENT */
  190|  54.1k|  };
  191|       |
  192|  54.1k|  if(oldstate == state)
  ------------------
  |  Branch (192:6): [True: 11.4k, False: 42.6k]
  ------------------
  193|       |    /* do not bother when the new state is the same as the old state */
  194|  11.4k|    return;
  195|       |
  196|  42.6k|#ifdef DEBUGBUILD
  197|  42.6k|  NOVERBOSE((void)lineno);
  ------------------
  |  | 1624|  42.6k|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1185|  42.6k|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1185:35): [Folded, False: 42.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  198|  42.6k|  CURL_TRC_M(data, "-> [%s] (line %d)", CURL_MSTATE_NAME(state), lineno);
  ------------------
  |  |  148|  42.6k|  do {                                   \
  |  |  149|  42.6k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  42.6k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  42.6k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  85.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 42.6k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 42.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  85.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|  42.6k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  42.6k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  42.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 42.6k]
  |  |  ------------------
  ------------------
  199|       |#else
  200|       |  CURL_TRC_M(data, "-> [%s]", CURL_MSTATE_NAME(state));
  201|       |#endif
  202|       |
  203|       |  /* really switching state */
  204|  42.6k|  data->mstate = state;
  205|  42.6k|  if(state_enter[state])
  ------------------
  |  Branch (205:6): [True: 18.5k, False: 24.1k]
  ------------------
  206|  18.5k|    state_enter[state](data, oldstate);
  207|  42.6k|}
multi.c:mstate_enter_connect:
  115|  7.71k|{
  116|  7.71k|  (void)from_state;
  117|  7.71k|  Curl_init_CONNECT(data);
  118|  7.71k|}
multi.c:mstate_enter_completed:
  139|  10.7k|{
  140|       |  /* we sometimes directly jump to COMPLETED, trigger things
  141|       |   * we then missed. */
  142|  10.7k|  if(from_state < MSTATE_DID) {
  ------------------
  |  Branch (142:6): [True: 10.7k, False: 0]
  ------------------
  143|  10.7k|    Curl_pgrsTime(data, TIMER_PRETRANSFER);
  144|  10.7k|    Curl_pgrsTime(data, TIMER_POSTRANSFER);
  145|  10.7k|    Curl_pgrsTime(data, TIMER_STARTTRANSFER);
  146|  10.7k|  }
  147|  10.7k|  Curl_pgrsCompleted(data);
  148|  10.7k|  if(from_state < MSTATE_DONE)
  ------------------
  |  Branch (148:6): [True: 10.7k, False: 0]
  ------------------
  149|  10.7k|    CURLM_NTFY(data, CURLMNOTIFY_EASY_DONE);
  ------------------
  |  |   51|  10.7k|  do {                                                \
  |  |   52|  10.7k|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 10.7k, False: 0]
  |  |  |  Branch (52:15): [True: 10.7k, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 10.7k]
  |  |  ------------------
  |  |   53|  10.7k|      Curl_mntfy_add((d), (t));                       \
  |  |   54|  10.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 10.7k]
  |  |  ------------------
  ------------------
  150|       |  /* changing to COMPLETED means it is in process and needs to go */
  151|  10.7k|  DEBUGASSERT(Curl_uint32_bset_contains(&data->multi->process, data->mid));
  ------------------
  |  | 1077|  10.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (151:3): [True: 0, False: 10.7k]
  |  Branch (151:3): [True: 10.7k, False: 0]
  ------------------
  152|  10.7k|  Curl_uint32_bset_remove(&data->multi->process, data->mid);
  153|  10.7k|  Curl_uint32_bset_remove(&data->multi->pending, data->mid); /* to be sure */
  154|       |
  155|  10.7k|  if(Curl_uint32_bset_empty(&data->multi->process)) {
  ------------------
  |  Branch (155:6): [True: 0, False: 10.7k]
  ------------------
  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|  10.7k|  Curl_detach_connection(data);
  162|  10.7k|  Curl_expire_clear(data); /* stop all timers */
  163|  10.7k|}
multi.c:multi_warn_debug:
  379|  36.3k|{
  380|  36.3k|  if(!multi->warned) {
  ------------------
  |  Branch (380:6): [True: 10.8k, False: 25.5k]
  ------------------
  381|  10.8k|    infof(data, "!!! WARNING !!!");
  ------------------
  |  |  143|  10.8k|  do {                               \
  |  |  144|  10.8k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  10.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 10.8k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.8k]
  |  |  |  |  ------------------
  |  |  |  |  320|  10.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  10.8k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  10.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
  382|  10.8k|    infof(data, "This is a debug build of libcurl, "
  ------------------
  |  |  143|  10.8k|  do {                               \
  |  |  144|  10.8k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  10.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 10.8k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.8k]
  |  |  |  |  ------------------
  |  |  |  |  320|  10.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  10.8k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  10.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
  383|  10.8k|                "do not use in production.");
  384|       |    multi->warned = TRUE;
  ------------------
  |  | 1051|  10.8k|#define TRUE true
  ------------------
  385|  10.8k|  }
  386|  36.3k|}
multi.c:multi_done:
  698|  5.65k|{
  699|  5.65k|  CURLcode result;
  700|  5.65k|  struct connectdata *conn = data->conn;
  701|       |
  702|  5.65k|  CURL_TRC_M(data, "multi_done: status: %d prem: %d done: %d",
  ------------------
  |  |  148|  5.65k|  do {                                   \
  |  |  149|  5.65k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.65k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.65k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  11.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.65k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.65k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  11.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  5.65k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.65k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
  703|  5.65k|             (int)status, (int)premature, data->state.done);
  704|       |
  705|  5.65k|  if(data->state.done)
  ------------------
  |  Branch (705:6): [True: 0, False: 5.65k]
  ------------------
  706|       |    /* Stop if multi_done() has already been called */
  707|      0|    return CURLE_OK;
  708|       |
  709|       |  /* Shut down any ongoing async resolver operation. */
  710|  5.65k|  Curl_resolv_shutdown_all(data);
  711|       |
  712|       |  /* Cleanup possible redirect junk */
  713|  5.65k|  curlx_safefree(data->req.newurl);
  ------------------
  |  | 1332|  5.65k|  do {                      \
  |  | 1333|  5.65k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  5.65k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  5.65k|    (ptr) = NULL;           \
  |  | 1335|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
  714|  5.65k|  curlx_safefree(data->req.location);
  ------------------
  |  | 1332|  5.65k|  do {                      \
  |  | 1333|  5.65k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  5.65k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  5.65k|    (ptr) = NULL;           \
  |  | 1335|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
  715|       |
  716|  5.65k|  switch(status) {
  717|      0|  case CURLE_ABORTED_BY_CALLBACK:
  ------------------
  |  Branch (717:3): [True: 0, False: 5.65k]
  ------------------
  718|      0|  case CURLE_READ_ERROR:
  ------------------
  |  Branch (718:3): [True: 0, False: 5.65k]
  ------------------
  719|      0|  case CURLE_WRITE_ERROR:
  ------------------
  |  Branch (719:3): [True: 0, False: 5.65k]
  ------------------
  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|  5.65k|  default:
  ------------------
  |  Branch (726:3): [True: 5.65k, False: 0]
  ------------------
  727|  5.65k|    break;
  728|  5.65k|  }
  729|       |
  730|       |  /* this calls the protocol-specific function pointer previously set */
  731|  5.65k|  if(conn && conn->scheme->run->done && (data->mstate >= MSTATE_PROTOCONNECT))
  ------------------
  |  Branch (731:6): [True: 5.65k, False: 0]
  |  Branch (731:14): [True: 5.65k, False: 0]
  |  Branch (731:41): [True: 0, False: 5.65k]
  ------------------
  732|      0|    result = conn->scheme->run->done(data, status, premature);
  733|  5.65k|  else
  734|  5.65k|    result = status;
  735|       |
  736|  5.65k|  if(data->mstate > MSTATE_CONNECTING &&
  ------------------
  |  Branch (736:6): [True: 0, False: 5.65k]
  ------------------
  737|      0|     (result != CURLE_ABORTED_BY_CALLBACK)) {
  ------------------
  |  Branch (737:6): [True: 0, False: 0]
  ------------------
  738|       |    /* avoid this if
  739|       |     * - the transfer has not connected
  740|       |     * - we already aborted by callback to avoid this calling another callback
  741|       |     */
  742|      0|    int rc = Curl_pgrsDone(data);
  743|      0|    if(!result && rc)
  ------------------
  |  Branch (743:8): [True: 0, False: 0]
  |  Branch (743:19): [True: 0, False: 0]
  ------------------
  744|      0|      result = CURLE_ABORTED_BY_CALLBACK;
  745|      0|  }
  746|       |
  747|       |  /* Make sure that transfer client writes are really done now. */
  748|  5.65k|  result = Curl_1st_fatal(result, Curl_xfer_write_done(data, premature));
  749|       |
  750|       |  /* Inform connection filters that this transfer is done */
  751|  5.65k|  if(conn)
  ------------------
  |  Branch (751:6): [True: 5.65k, False: 0]
  ------------------
  752|  5.65k|    Curl_conn_ev_data_done(data, premature);
  753|       |
  754|  5.65k|  process_pending_handles(data->multi); /* connection / multiplex */
  755|       |
  756|  5.65k|  if(!result)
  ------------------
  |  Branch (756:6): [True: 512, False: 5.13k]
  ------------------
  757|    512|    result = Curl_req_done(&data->req, data, premature);
  758|       |
  759|  5.65k|  if(conn) {
  ------------------
  |  Branch (759:6): [True: 5.65k, False: 0]
  ------------------
  760|       |    /* Under the potential connection pool's share lock, decide what to
  761|       |     * do with the transfer's connection. */
  762|  5.65k|    struct multi_done_ctx mdctx;
  763|       |
  764|  5.65k|    memset(&mdctx, 0, sizeof(mdctx));
  765|  5.65k|    mdctx.premature = premature;
  766|  5.65k|    Curl_cpool_do_locked(data, data->conn, multi_done_locked, &mdctx);
  767|  5.65k|  }
  768|       |
  769|       |  /* flush the netrc cache */
  770|  5.65k|  Curl_netrc_cleanup(&data->state.netrc);
  771|  5.65k|  return result;
  772|  5.65k|}
multi.c:multi_done_locked:
  645|  5.65k|{
  646|  5.65k|  struct multi_done_ctx *mdctx = userdata;
  647|       |
  648|  5.65k|  Curl_detach_connection(data);
  649|       |
  650|  5.65k|  CURL_TRC_M(data, "multi_done_locked, in use=%u", conn->attached_xfers);
  ------------------
  |  |  148|  5.65k|  do {                                   \
  |  |  149|  5.65k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.65k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.65k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  11.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.65k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.65k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  11.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  5.65k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.65k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
  651|  5.65k|  if(CONN_INUSE(conn)) {
  ------------------
  |  |  284|  5.65k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (284:23): [True: 0, False: 5.65k]
  |  |  ------------------
  ------------------
  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|  5.65k|  data->state.done = TRUE; /* called now! */
  ------------------
  |  | 1051|  5.65k|#define TRUE true
  ------------------
  659|  5.65k|  data->state.recent_conn_id = conn->connection_id;
  660|       |
  661|  5.65k|  Curl_dnscache_prune(data);
  662|       |
  663|  5.65k|  if(multi_conn_should_close(conn, data, (bool)mdctx->premature)) {
  ------------------
  |  Branch (663:6): [True: 5.65k, False: 0]
  ------------------
  664|  5.65k|    CURL_TRC_M(data, "multi_done, terminating conn #%" FMT_OFF_T " to %s, "
  ------------------
  |  |  148|  5.65k|  do {                                   \
  |  |  149|  5.65k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.65k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.65k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  11.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.65k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.65k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  11.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  5.65k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.65k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
  665|  5.65k|               "forbid=%d, close=%d, premature=%d, conn_multiplex=%d",
  666|  5.65k|               conn->connection_id, conn->destination,
  667|  5.65k|               data->set.reuse_forbid, conn->bits.close, mdctx->premature,
  668|  5.65k|               Curl_conn_is_multiplex(conn, FIRSTSOCKET));
  669|  5.65k|    connclose(conn, "disconnecting");
  ------------------
  |  |   97|  5.65k|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   85|  5.65k|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  670|  5.65k|    Curl_conn_terminate(data, conn, (bool)mdctx->premature);
  671|  5.65k|  }
  672|      0|  else if(!Curl_conn_get_max_concurrent(data, conn, FIRSTSOCKET)) {
  ------------------
  |  |  245|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (672:11): [True: 0, False: 0]
  ------------------
  673|      0|    CURL_TRC_M(data, "multi_done, conn #%" FMT_OFF_T " to %s was shutdown"
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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|      0|  else {
  680|       |    /* the connection is no longer in use by any transfer */
  681|      0|    if(Curl_cpool_conn_now_idle(data, conn)) {
  ------------------
  |  Branch (681:8): [True: 0, False: 0]
  ------------------
  682|       |      /* connection kept in the cpool */
  683|      0|      data->state.lastconnect_id = conn->connection_id;
  684|      0|      infof(data, "Connection #%" FMT_OFF_T " to host %s left intact",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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]
  |  |  ------------------
  ------------------
  685|      0|            conn->connection_id, conn->destination);
  686|      0|    }
  687|      0|    else {
  688|       |      /* connection was removed from the cpool and destroyed. */
  689|      0|      data->state.lastconnect_id = -1;
  690|      0|    }
  691|      0|  }
  692|  5.65k|}
multi.c:multi_conn_should_close:
  604|  5.65k|{
  605|       |  /* if conn->bits.close is TRUE, it means that the connection should be
  606|       |     closed in spite of everything else. */
  607|  5.65k|  if(conn->bits.close)
  ------------------
  |  Branch (607:6): [True: 0, False: 5.65k]
  ------------------
  608|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  609|       |
  610|       |  /* if data->set.reuse_forbid is TRUE, it means the libcurl client has
  611|       |     forced us to close this connection. This is ignored for requests taking
  612|       |     place in a NTLM/NEGOTIATE authentication handshake. */
  613|  5.65k|  if(data->set.reuse_forbid
  ------------------
  |  Branch (613:6): [True: 4, False: 5.64k]
  ------------------
  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|  5.65k|    )
  623|      4|    return TRUE;
  ------------------
  |  | 1051|      4|#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|  5.64k|  if(!data->set.connect_only && conn->scheme &&
  ------------------
  |  Branch (627:6): [True: 5.64k, False: 1]
  |  Branch (627:33): [True: 5.64k, False: 0]
  ------------------
  628|  5.64k|     !(conn->scheme->flags & PROTOPT_CONN_REUSE))
  ------------------
  |  |  238|  5.64k|#define PROTOPT_CONN_REUSE (1 << 16)  /* this protocol can reuse connections */
  ------------------
  |  Branch (628:6): [True: 0, False: 5.64k]
  ------------------
  629|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  630|       |
  631|       |  /* if premature is TRUE, it means this connection was said to be DONE before
  632|       |     the entire request operation is complete and thus we cannot know in what
  633|       |     state it is for reusing, so we are forced to close it. In a perfect world
  634|       |     we can add code that keep track of if we really must close it here or not,
  635|       |     but currently we have no such detail knowledge. */
  636|  5.64k|  if(premature && !Curl_conn_is_multiplex(conn, FIRSTSOCKET))
  ------------------
  |  |  245|  5.64k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (636:6): [True: 5.64k, False: 0]
  |  Branch (636:19): [True: 5.64k, False: 0]
  ------------------
  637|  5.64k|    return TRUE;
  ------------------
  |  | 1051|  5.64k|#define TRUE true
  ------------------
  638|       |
  639|      0|  return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  640|  5.64k|}
multi.c:multi_assess_wakeup:
  397|  43.5k|{
  398|  43.5k|#ifdef ENABLE_WAKEUP
  399|  43.5k|  if(multi->socket_cb)
  ------------------
  |  Branch (399:6): [True: 0, False: 43.5k]
  ------------------
  400|      0|    return Curl_multi_ev_assess_xfer(multi, multi->admin);
  401|       |#else
  402|       |  (void)multi;
  403|       |#endif
  404|  43.5k|  return CURLM_OK;
  405|  43.5k|}
multi.c:mstate_connecting_pollset:
 1037|  1.88k|{
 1038|  1.88k|  struct connectdata *conn = data->conn;
 1039|  1.88k|  curl_socket_t sockfd;
 1040|  1.88k|  CURLcode result = CURLE_OK;
 1041|       |
 1042|  1.88k|  if(Curl_xfer_recv_is_paused(data))
  ------------------
  |  Branch (1042:6): [True: 0, False: 1.88k]
  ------------------
 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.88k|  sockfd = Curl_conn_get_first_socket(data);
 1048|  1.88k|  if(sockfd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  1.88k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1048:6): [True: 83, False: 1.80k]
  ------------------
 1049|     83|    result = Curl_pollset_change(data, ps, sockfd, CURL_POLL_IN, 0);
  ------------------
  |  |  283|     83|#define CURL_POLL_IN     1
  ------------------
 1050|     83|    if(!result)
  ------------------
  |  Branch (1050:8): [True: 83, False: 0]
  ------------------
 1051|     83|      result = multi_adjust_pollset(data, ps);
 1052|     83|  }
 1053|  1.88k|  if(!result)
  ------------------
  |  Branch (1053:6): [True: 1.88k, False: 0]
  ------------------
 1054|  1.88k|    result = Curl_conn_adjust_pollset(data, conn, ps);
 1055|  1.88k|  return result;
 1056|  1.88k|}
multi.c:multi_adjust_pollset:
  993|     83|{
  994|     83|  CURLcode result = CURLE_OK;
  995|       |
  996|     83|  if(ps->n) {
  ------------------
  |  Branch (996:6): [True: 83, False: 0]
  ------------------
  997|     83|    bool send_blocked, recv_blocked;
  998|       |
  999|     83|    recv_blocked = (Curl_rlimit_avail(&data->progress.dl.rlimit, NULL) <= 0);
 1000|     83|    send_blocked = (Curl_rlimit_avail(&data->progress.ul.rlimit, NULL) <= 0);
 1001|     83|    if(send_blocked || recv_blocked) {
  ------------------
  |  Branch (1001:8): [True: 0, False: 83]
  |  Branch (1001:24): [True: 0, False: 83]
  ------------------
 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|     83|    if(!recv_blocked &&
  ------------------
  |  Branch (1022:8): [True: 83, False: 0]
  ------------------
 1023|     83|       ((Curl_pollset_want_recv(data, ps, data->conn->sock[FIRSTSOCKET]) &&
  ------------------
  |  |  245|     83|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1023:10): [True: 0, False: 83]
  ------------------
 1024|      0|         Curl_conn_data_pending(data, FIRSTSOCKET)) ||
  ------------------
  |  |  245|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1024:10): [True: 0, False: 0]
  ------------------
 1025|     83|        (Curl_pollset_want_recv(data, ps, data->conn->sock[SECONDARYSOCKET]) &&
  ------------------
  |  |  246|     83|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (1025:10): [True: 0, False: 83]
  ------------------
 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|     83|  }
 1032|     83|  return result;
 1033|     83|}
multi.c:multi_perform:
 2888|  11.9k|{
 2889|  11.9k|  CURLMcode returncode = CURLM_OK;
 2890|  11.9k|  struct curltime start = *multi_now(multi);
 2891|  11.9k|  uint32_t mid;
 2892|  11.9k|  struct Curl_sigpipe_ctx sigpipe_ctx;
 2893|       |
 2894|  11.9k|  if(multi->in_callback)
  ------------------
  |  Branch (2894:6): [True: 0, False: 11.9k]
  ------------------
 2895|      0|    return CURLM_RECURSIVE_API_CALL;
 2896|       |
 2897|  11.9k|  if(multi->in_ntfy_callback)
  ------------------
  |  Branch (2897:6): [True: 0, False: 11.9k]
  ------------------
 2898|      0|    return CURLM_RECURSIVE_API_CALL;
 2899|       |
 2900|  11.9k|  sigpipe_init(&sigpipe_ctx);
 2901|       |
 2902|  11.9k|  if(Curl_uint32_bset_first(&multi->process, &mid)) {
  ------------------
  |  Branch (2902:6): [True: 11.9k, False: 0]
  ------------------
 2903|  11.9k|    CURL_TRC_M(multi->admin, "multi_perform(running=%u)",
  ------------------
  |  |  148|  11.9k|  do {                                   \
  |  |  149|  11.9k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  11.9k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  11.9k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  23.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 11.9k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 11.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  23.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  11.9k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  11.9k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  11.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 11.9k]
  |  |  ------------------
  ------------------
 2904|  11.9k|               Curl_multi_xfers_running(multi));
 2905|  24.8k|    do {
 2906|  24.8k|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 2907|  24.8k|      CURLMcode mresult;
 2908|  24.8k|      if(!data) {
  ------------------
  |  Branch (2908:10): [True: 0, False: 24.8k]
  ------------------
 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|  24.8k|      mresult = multi_runsingle(multi, data, &sigpipe_ctx);
 2915|  24.8k|      if(mresult)
  ------------------
  |  Branch (2915:10): [True: 0, False: 24.8k]
  ------------------
 2916|      0|        returncode = mresult;
 2917|  24.8k|    } while(Curl_uint32_bset_next(&multi->process, mid, &mid));
  ------------------
  |  Branch (2917:13): [True: 12.8k, False: 11.9k]
  ------------------
 2918|  11.9k|  }
 2919|  11.9k|  sigpipe_restore(&sigpipe_ctx);
 2920|       |
 2921|  11.9k|  if(multi_ischanged(multi, TRUE))
  ------------------
  |  | 1051|  11.9k|#define TRUE true
  ------------------
  |  Branch (2921:6): [True: 5.09k, False: 6.87k]
  ------------------
 2922|  5.09k|    process_pending_handles(multi);
 2923|       |
 2924|  11.9k|  if(!returncode && CURL_MNTFY_HAS_ENTRIES(multi))
  ------------------
  |  |   56|  11.9k|#define CURL_MNTFY_HAS_ENTRIES(m)       ((m)->ntfy.has_entries)
  |  |  ------------------
  |  |  |  Branch (56:41): [True: 0, False: 11.9k]
  |  |  ------------------
  ------------------
  |  Branch (2924:6): [True: 11.9k, 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|  11.9k|  if(multi->timetree) {
  ------------------
  |  Branch (2937:6): [True: 1.47k, False: 10.4k]
  ------------------
 2938|  1.47k|    struct Curl_tree *t = NULL;
 2939|  1.47k|    do {
 2940|  1.47k|      multi->timetree = Curl_splaygetbest(&start, multi->timetree, &t);
 2941|  1.47k|      if(t) {
  ------------------
  |  Branch (2941:10): [True: 0, False: 1.47k]
  ------------------
 2942|       |        /* the removed may have another timeout in queue */
 2943|      0|        struct Curl_easy *data = Curl_splayget(t);
 2944|      0|        (void)add_next_timeout(&start, multi, data);
 2945|      0|        if(data->mstate == MSTATE_PENDING) {
  ------------------
  |  Branch (2945:12): [True: 0, False: 0]
  ------------------
 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|      0|      }
 2954|  1.47k|    } while(t);
  ------------------
  |  Branch (2954:13): [True: 0, False: 1.47k]
  ------------------
 2955|  1.47k|  }
 2956|       |
 2957|  11.9k|  if(running_handles) {
  ------------------
  |  Branch (2957:6): [True: 11.9k, False: 0]
  ------------------
 2958|  11.9k|    unsigned int running = Curl_multi_xfers_running(multi);
 2959|  11.9k|    *running_handles = (running < INT_MAX) ? (int)running : INT_MAX;
  ------------------
  |  Branch (2959:24): [True: 11.9k, False: 0]
  ------------------
 2960|  11.9k|  }
 2961|       |
 2962|  11.9k|  if(CURLM_OK >= returncode)
  ------------------
  |  Branch (2962:6): [True: 11.9k, False: 0]
  ------------------
 2963|  11.9k|    returncode = Curl_update_timer(multi);
 2964|       |
 2965|  11.9k|  return returncode;
 2966|  11.9k|}
multi.c:multi_now:
  104|  11.9k|{
  105|  11.9k|  curlx_pnow(&multi->now);
  106|  11.9k|  return &multi->now;
  107|  11.9k|}
multi.c:multi_runsingle:
 2719|  24.8k|{
 2720|  24.8k|  CURLMcode mresult;
 2721|  24.8k|  CURLcode result = CURLE_OK;
 2722|       |
 2723|  24.8k|  if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  141|  24.8k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  135|  24.8k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1051|  24.8k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (141:5): [True: 24.8k, False: 0]
  |  |  |  Branch (141:12): [True: 24.8k, False: 0]
  |  |  ------------------
  |  |  142|  24.8k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2723:6): [True: 0, False: 24.8k]
  |  Branch (2723:7): [True: 0, False: 0]
  |  Branch (2723:7): [True: 0, False: 0]
  ------------------
 2724|      0|    return CURLM_BAD_EASY_HANDLE;
 2725|       |
 2726|  24.8k|  if(multi->dead) {
  ------------------
  |  Branch (2726:6): [True: 0, False: 24.8k]
  ------------------
 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|  24.8k|  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|  24.8k|  Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2740|       |
 2741|  24.8k|  if(data == multi->admin) {
  ------------------
  |  Branch (2741:6): [True: 11.9k, False: 12.8k]
  ------------------
 2742|  11.9k|#ifdef ENABLE_WAKEUP
 2743|       |    /* Consume any pending wakeup signals before processing.
 2744|       |     * This is necessary for event based processing. See #21547 */
 2745|  11.9k|    (void)Curl_wakeup_consume(multi->wakeup_pair, TRUE);
  ------------------
  |  | 1051|  11.9k|#define TRUE true
  ------------------
 2746|  11.9k|#endif
 2747|  11.9k|#ifdef USE_RESOLV_THREADED
 2748|  11.9k|    Curl_async_thrdd_multi_process(multi);
 2749|  11.9k|#endif
 2750|  11.9k|    Curl_cshutdn_perform(&multi->cshutdn, multi->admin, sigpipe_ctx);
 2751|  11.9k|    return CURLM_OK;
 2752|  11.9k|  }
 2753|       |
 2754|  12.8k|  sigpipe_apply(data, sigpipe_ctx);
 2755|  33.5k|  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|  33.5k|    bool stream_error = FALSE;
  ------------------
  |  | 1054|  33.5k|#define FALSE false
  ------------------
 2759|  33.5k|    mresult = CURLM_OK;
 2760|       |
 2761|  33.5k|    if(multi_ischanged(multi, TRUE)) {
  ------------------
  |  | 1051|  33.5k|#define TRUE true
  ------------------
  |  Branch (2761:8): [True: 43, False: 33.5k]
  ------------------
 2762|     43|      CURL_TRC_M(data, "multi changed, check CONNECT_PEND queue");
  ------------------
  |  |  148|     43|  do {                                   \
  |  |  149|     43|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|     43|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|     43|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|     86|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 43, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 43]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|     86|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|     43|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|     43|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|     43|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 43]
  |  |  ------------------
  ------------------
 2763|     43|      process_pending_handles(multi); /* multiplexed */
 2764|     43|    }
 2765|       |
 2766|  33.5k|    if(data->mstate > MSTATE_CONNECT &&
  ------------------
  |  Branch (2766:8): [True: 7.02k, False: 26.5k]
  ------------------
 2767|  7.02k|       data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (2767:8): [True: 7.02k, False: 0]
  ------------------
 2768|       |      /* Make sure we set the connection's current owner */
 2769|  7.02k|      DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|  7.02k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2769:7): [True: 0, False: 7.02k]
  |  Branch (2769:7): [True: 7.02k, False: 0]
  ------------------
 2770|  7.02k|      if(!data->conn)
  ------------------
  |  Branch (2770:10): [True: 0, False: 7.02k]
  ------------------
 2771|      0|        return CURLM_INTERNAL_ERROR;
 2772|  7.02k|    }
 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|  33.5k|    if((data->mstate >= MSTATE_CONNECT) && (data->mstate < MSTATE_COMPLETED) &&
  ------------------
  |  Branch (2776:8): [True: 14.5k, False: 19.0k]
  |  Branch (2776:44): [True: 14.5k, False: 0]
  ------------------
 2777|  14.5k|       multi_handle_timeout(data, &stream_error, &result))
  ------------------
  |  Branch (2777:8): [True: 9, False: 14.5k]
  ------------------
 2778|       |      /* Skip the statemachine and go directly to error handling section. */
 2779|      9|      goto statemachine_end;
 2780|       |
 2781|  33.5k|    switch(data->mstate) {
 2782|  11.4k|    case MSTATE_INIT:
  ------------------
  |  Branch (2782:5): [True: 11.4k, False: 22.0k]
  ------------------
 2783|       |      /* Transitional state. init this transfer. A handle never comes back to
 2784|       |         this state. */
 2785|  11.4k|      mresult = multistate_init(data, &result);
 2786|  11.4k|      break;
 2787|       |
 2788|  7.51k|    case MSTATE_SETUP:
  ------------------
  |  Branch (2788:5): [True: 7.51k, False: 26.0k]
  ------------------
 2789|       |      /* Transitional state. Setup things for a new transfer. The handle
 2790|       |         can come back to this state on a redirect. */
 2791|  7.51k|      mresult = multistate_setup(data);
 2792|  7.51k|      break;
 2793|       |
 2794|  7.54k|    case MSTATE_CONNECT:
  ------------------
  |  Branch (2794:5): [True: 7.54k, False: 26.0k]
  ------------------
 2795|  7.54k|      mresult = multistate_connect(multi, data, &result);
 2796|  7.54k|      break;
 2797|       |
 2798|  7.01k|    case MSTATE_CONNECTING:
  ------------------
  |  Branch (2798:5): [True: 7.01k, False: 26.5k]
  ------------------
 2799|       |      /* awaiting a completion of an asynch TCP connect */
 2800|  7.01k|      mresult = multistate_connecting(data, &stream_error, &result);
 2801|  7.01k|      break;
 2802|       |
 2803|      0|    case MSTATE_PROTOCONNECT:
  ------------------
  |  Branch (2803:5): [True: 0, False: 33.5k]
  ------------------
 2804|      0|      mresult = multistate_protoconnect(data, &stream_error, &result);
 2805|      0|      break;
 2806|       |
 2807|      0|    case MSTATE_PROTOCONNECTING:
  ------------------
  |  Branch (2807:5): [True: 0, False: 33.5k]
  ------------------
 2808|       |      /* protocol-specific connect phase */
 2809|      0|      mresult = multistate_protoconnecting(data, &stream_error, &result);
 2810|      0|      break;
 2811|       |
 2812|      0|    case MSTATE_DO:
  ------------------
  |  Branch (2812:5): [True: 0, False: 33.5k]
  ------------------
 2813|      0|      mresult = multistate_do(data, &stream_error, &result);
 2814|      0|      break;
 2815|       |
 2816|      0|    case MSTATE_DOING:
  ------------------
  |  Branch (2816:5): [True: 0, False: 33.5k]
  ------------------
 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: 33.5k]
  ------------------
 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|      0|    case MSTATE_DID:
  ------------------
  |  Branch (2828:5): [True: 0, False: 33.5k]
  ------------------
 2829|      0|      mresult = multistate_did(multi, data);
 2830|      0|      break;
 2831|       |
 2832|      0|    case MSTATE_RATELIMITING: /* limit-rate exceeded in either direction */
  ------------------
  |  Branch (2832:5): [True: 0, False: 33.5k]
  ------------------
 2833|      0|      mresult = multistate_ratelimiting(data, &result);
 2834|      0|      break;
 2835|       |
 2836|      0|    case MSTATE_PERFORMING:
  ------------------
  |  Branch (2836:5): [True: 0, False: 33.5k]
  ------------------
 2837|      0|      mresult = multistate_performing(data, &stream_error, &result);
 2838|      0|      break;
 2839|       |
 2840|      0|    case MSTATE_DONE:
  ------------------
  |  Branch (2840:5): [True: 0, False: 33.5k]
  ------------------
 2841|      0|      mresult = multistate_done(data, &result);
 2842|      0|      break;
 2843|       |
 2844|      0|    case MSTATE_COMPLETED:
  ------------------
  |  Branch (2844:5): [True: 0, False: 33.5k]
  ------------------
 2845|      0|      break;
 2846|       |
 2847|      0|    case MSTATE_PENDING:
  ------------------
  |  Branch (2847:5): [True: 0, False: 33.5k]
  ------------------
 2848|      0|    case MSTATE_MSGSENT:
  ------------------
  |  Branch (2848:5): [True: 0, False: 33.5k]
  ------------------
 2849|       |      /* handles in these states should NOT be in this list */
 2850|      0|      break;
 2851|       |
 2852|      0|    default:
  ------------------
  |  Branch (2852:5): [True: 0, False: 33.5k]
  ------------------
 2853|      0|      return CURLM_INTERNAL_ERROR;
 2854|  33.5k|    }
 2855|       |
 2856|  33.5k|    if(data->mstate >= MSTATE_CONNECT &&
  ------------------
  |  Branch (2856:8): [True: 21.8k, False: 11.6k]
  ------------------
 2857|  21.8k|       data->mstate < MSTATE_DO &&
  ------------------
  |  Branch (2857:8): [True: 21.8k, False: 0]
  ------------------
 2858|  21.8k|       mresult != CURLM_CALL_MULTI_PERFORM &&
  ------------------
  |  Branch (2858:8): [True: 8.70k, False: 13.1k]
  ------------------
 2859|  8.70k|       !multi_ischanged(multi, FALSE)) {
  ------------------
  |  | 1054|  8.70k|#define FALSE false
  ------------------
  |  Branch (2859:8): [True: 3.57k, False: 5.13k]
  ------------------
 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|  3.57k|      multi_handle_timeout(data, &stream_error, &result);
 2867|  3.57k|    }
 2868|       |
 2869|  33.5k|statemachine_end:
 2870|       |
 2871|  33.5k|    result = is_finished(multi, data, stream_error, result);
 2872|  33.5k|    if(result)
  ------------------
  |  Branch (2872:8): [True: 10.7k, False: 22.7k]
  ------------------
 2873|  10.7k|      mresult = CURLM_CALL_MULTI_PERFORM;
 2874|       |
 2875|  33.5k|    if(MSTATE_COMPLETED == data->mstate) {
  ------------------
  |  Branch (2875:8): [True: 10.7k, False: 22.7k]
  ------------------
 2876|  10.7k|      handle_completed(multi, data, result);
 2877|  10.7k|      return CURLM_OK;
 2878|  10.7k|    }
 2879|  33.5k|  } while((mresult == CURLM_CALL_MULTI_PERFORM) ||
  ------------------
  |  Branch (2879:11): [True: 20.6k, False: 2.08k]
  ------------------
 2880|  2.08k|          multi_ischanged(multi, FALSE));
  ------------------
  |  | 1054|  2.08k|#define FALSE false
  ------------------
  |  Branch (2880:11): [True: 0, False: 2.08k]
  ------------------
 2881|       |
 2882|  2.08k|  data->result = result;
 2883|  2.08k|  return mresult;
 2884|  12.8k|}
multi.c:multi_posttransfer:
 1947|  6.81k|{
 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|  6.81k|  (void)data;
 1954|  6.81k|#endif
 1955|  6.81k|}
multi.c:multistate_init:
 2477|  11.4k|{
 2478|  11.4k|  if(!data->state.really_alive) {
  ------------------
  |  Branch (2478:6): [True: 11.4k, False: 0]
  ------------------
 2479|  11.4k|    data->state.really_alive = TRUE;
  ------------------
  |  | 1051|  11.4k|#define TRUE true
  ------------------
 2480|  11.4k|    ++data->multi->xfers_really_alive;
 2481|  11.4k|    if(data->multi->xfers_really_alive == 1) {
  ------------------
  |  Branch (2481:8): [True: 10.8k, False: 675]
  ------------------
 2482|  10.8k|      CURLMcode mresult = multi_assess_wakeup(data->multi);
 2483|  10.8k|      if(mresult) {
  ------------------
  |  Branch (2483:10): [True: 0, False: 10.8k]
  ------------------
 2484|      0|        failf(data, "error enabling wakeup listening: %d", mresult);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2485|      0|        return mresult;
 2486|      0|      }
 2487|  10.8k|    }
 2488|  11.4k|  }
 2489|       |
 2490|  11.4k|  *result = Curl_pretransfer(data);
 2491|  11.4k|  if(*result)
  ------------------
  |  Branch (2491:6): [True: 3.96k, False: 7.51k]
  ------------------
 2492|  3.96k|    return CURLM_OK;
 2493|       |
 2494|       |  /* after init, go SETUP */
 2495|  7.51k|  multistate(data, MSTATE_SETUP);
  ------------------
  |  |  212|  7.51k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2496|  7.51k|  Curl_pgrsTime(data, TIMER_STARTOP);
 2497|  7.51k|  return CURLM_CALL_MULTI_PERFORM;
 2498|  11.4k|}
multi.c:multistate_setup:
 2501|  7.51k|{
 2502|  7.51k|  Curl_pgrsTime(data, TIMER_STARTSINGLE);
 2503|  7.51k|  if(data->set.timeout)
  ------------------
  |  Branch (2503:6): [True: 7.51k, False: 0]
  ------------------
 2504|  7.51k|    Curl_expire(data, data->set.timeout, EXPIRE_TIMEOUT);
 2505|  7.51k|  if(data->set.connecttimeout)
  ------------------
  |  Branch (2505:6): [True: 146, False: 7.37k]
  ------------------
 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|    146|    Curl_expire(data, data->set.connecttimeout, EXPIRE_CONNECTTIMEOUT);
 2510|       |
 2511|  7.51k|  multistate(data, MSTATE_CONNECT);
  ------------------
  |  |  212|  7.51k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2512|  7.51k|  return CURLM_CALL_MULTI_PERFORM;
 2513|  7.51k|}
multi.c:multistate_connect:
 2325|  7.54k|{
 2326|       |  /* Connect. We want to get a connection identifier filled in. This state can
 2327|       |     be entered from SETUP and from PENDING. */
 2328|  7.54k|  bool connected;
 2329|  7.54k|  CURLMcode mresult = CURLM_OK;
 2330|  7.54k|  CURLcode result = Curl_connect(data, &connected);
 2331|  7.54k|  if(result == CURLE_NO_CONNECTION_AVAILABLE) {
  ------------------
  |  Branch (2331:6): [True: 202, False: 7.33k]
  ------------------
 2332|       |    /* There was no connection available. We will go to the pending state and
 2333|       |       wait for an available connection. */
 2334|    202|    multistate(data, MSTATE_PENDING);
  ------------------
  |  |  212|    202|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2335|       |    /* move from process to pending set */
 2336|    202|    Curl_uint32_bset_remove(&multi->process, data->mid);
 2337|    202|    Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2338|    202|    Curl_uint32_bset_add(&multi->pending, data->mid);
 2339|    202|    *resultp = CURLE_OK;
 2340|    202|    return mresult;
 2341|    202|  }
 2342|  7.33k|  else
 2343|  7.33k|    process_pending_handles(data->multi);
 2344|       |
 2345|  7.33k|  if(!result) {
  ------------------
  |  Branch (2345:6): [True: 5.65k, False: 1.68k]
  ------------------
 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|  5.65k|    mresult = CURLM_CALL_MULTI_PERFORM;
 2350|       |
 2351|  5.65k|    if(connected) {
  ------------------
  |  Branch (2351:8): [True: 0, False: 5.65k]
  ------------------
 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|  5.65k|    else {
 2360|  5.65k|      multistate(data, MSTATE_CONNECTING);
  ------------------
  |  |  212|  5.65k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2361|  5.65k|    }
 2362|  5.65k|  }
 2363|  7.33k|  *resultp = result;
 2364|  7.33k|  return mresult;
 2365|  7.54k|}
multi.c:multistate_connecting:
 2518|  7.01k|{
 2519|  7.01k|  bool connected;
 2520|       |
 2521|  7.01k|  if(!data->conn) {
  ------------------
  |  Branch (2521:6): [True: 0, False: 7.01k]
  ------------------
 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|  7.01k|  if(!Curl_xfer_recv_is_paused(data)) {
  ------------------
  |  Branch (2526:6): [True: 7.01k, False: 0]
  ------------------
 2527|  7.01k|    *result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &connected);
  ------------------
  |  |  245|  7.01k|#define FIRSTSOCKET     0
  ------------------
                  *result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &connected);
  ------------------
  |  | 1054|  7.01k|#define FALSE false
  ------------------
 2528|  7.01k|    if(connected && !*result) {
  ------------------
  |  Branch (2528:8): [True: 0, False: 7.01k]
  |  Branch (2528:21): [True: 0, False: 0]
  ------------------
 2529|      0|      if(!data->conn->bits.reuse &&
  ------------------
  |  Branch (2529:10): [True: 0, False: 0]
  ------------------
 2530|      0|         Curl_conn_is_multiplex(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  245|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2530:10): [True: 0, False: 0]
  ------------------
 2531|       |        /* new connection, can multiplex, wake pending handles */
 2532|      0|        process_pending_handles(data->multi);
 2533|      0|      }
 2534|      0|      multistate(data, MSTATE_PROTOCONNECT);
  ------------------
  |  |  212|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2535|      0|      return CURLM_CALL_MULTI_PERFORM;
 2536|      0|    }
 2537|  7.01k|    else if(*result) {
  ------------------
  |  Branch (2537:13): [True: 5.13k, False: 1.88k]
  ------------------
 2538|       |      /* failure detected */
 2539|  5.13k|      CURL_TRC_M(data, "connect failed -> %d", (int)*result);
  ------------------
  |  |  148|  5.13k|  do {                                   \
  |  |  149|  5.13k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.13k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.13k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  10.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.13k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  10.2k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  5.13k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.13k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.13k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.13k]
  |  |  ------------------
  ------------------
 2540|  5.13k|      multi_posttransfer(data);
 2541|  5.13k|      multi_done(data, *result, TRUE);
  ------------------
  |  | 1051|  5.13k|#define TRUE true
  ------------------
 2542|  5.13k|      *stream_error = TRUE;
  ------------------
  |  | 1051|  5.13k|#define TRUE true
  ------------------
 2543|  5.13k|      return CURLM_OK;
 2544|  5.13k|    }
 2545|  7.01k|  }
 2546|  1.88k|  return CURLM_OK;
 2547|  7.01k|}
multi.c:is_finished:
 2372|  33.5k|{
 2373|  33.5k|  if(data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (2373:6): [True: 33.5k, False: 0]
  ------------------
 2374|  33.5k|    if(result) {
  ------------------
  |  Branch (2374:8): [True: 10.7k, False: 22.7k]
  ------------------
 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|  10.7k|      process_pending_handles(multi); /* connection */
 2385|       |
 2386|  10.7k|      if(data->conn) {
  ------------------
  |  Branch (2386:10): [True: 0, False: 10.7k]
  ------------------
 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|  10.7k|      else if(data->mstate == MSTATE_CONNECT) {
  ------------------
  |  Branch (2399:15): [True: 1.68k, False: 9.10k]
  ------------------
 2400|       |        /* Curl_connect() failed */
 2401|  1.68k|        multi_posttransfer(data);
 2402|  1.68k|        Curl_pgrsUpdate_nometer(data);
 2403|  1.68k|      }
 2404|       |
 2405|  10.7k|      multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  212|  10.7k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2406|  10.7k|      return result;
 2407|  10.7k|    }
 2408|       |    /* if there is still a connection to use, call the progress function */
 2409|  22.7k|    else if(data->conn && Curl_conn_is_connected(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  245|  7.53k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2409:13): [True: 7.53k, False: 15.2k]
  |  Branch (2409:27): [True: 0, False: 7.53k]
  ------------------
 2410|      0|      result = Curl_pgrsUpdate(data);
 2411|      0|      if(result) {
  ------------------
  |  Branch (2411:10): [True: 0, False: 0]
  ------------------
 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|      0|    }
 2422|  33.5k|  }
 2423|  22.7k|  return result;
 2424|  33.5k|}
multi.c:handle_completed:
 2429|  10.7k|{
 2430|  10.7k|  if(data->master_mid != UINT32_MAX) {
  ------------------
  |  Branch (2430:6): [True: 296, False: 10.4k]
  ------------------
 2431|       |    /* A sub transfer, not for msgsent to application */
 2432|    296|    struct Curl_easy *mdata;
 2433|       |
 2434|    296|    CURL_TRC_M(data, "sub xfer done for master %u", data->master_mid);
  ------------------
  |  |  148|    296|  do {                                   \
  |  |  149|    296|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    296|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    296|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    592|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 296, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 296]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    592|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((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|    296|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    296|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|    296|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 296]
  |  |  ------------------
  ------------------
 2435|    296|    mdata = Curl_multi_get_easy(multi, data->master_mid);
 2436|    296|    if(mdata) {
  ------------------
  |  Branch (2436:8): [True: 296, False: 0]
  ------------------
 2437|    296|      if(mdata->sub_xfer_done)
  ------------------
  |  Branch (2437:10): [True: 296, False: 0]
  ------------------
 2438|    296|        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|    296|                   data->master_mid);
 2442|    296|    }
 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|    296|  }
 2447|  10.4k|  else {
 2448|       |    /* now fill in the Curl_message with this info */
 2449|  10.4k|    struct Curl_message *msg = &data->msg;
 2450|       |
 2451|  10.4k|    msg->extmsg.msg = CURLMSG_DONE;
 2452|  10.4k|    msg->extmsg.easy_handle = data;
 2453|  10.4k|    msg->extmsg.data.result = result;
 2454|       |
 2455|  10.4k|    multi_addmsg(multi, msg);
 2456|  10.4k|    DEBUGASSERT(!data->conn);
  ------------------
  |  | 1077|  10.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2456:5): [True: 0, False: 10.4k]
  |  Branch (2456:5): [True: 10.4k, False: 0]
  ------------------
 2457|  10.4k|  }
 2458|  10.7k|  multistate(data, MSTATE_MSGSENT);
  ------------------
  |  |  212|  10.7k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2459|       |
 2460|       |  /* remove from the other sets, add to msgsent */
 2461|  10.7k|  Curl_uint32_bset_remove(&multi->process, data->mid);
 2462|  10.7k|  Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2463|  10.7k|  Curl_uint32_bset_remove(&multi->pending, data->mid);
 2464|  10.7k|  Curl_uint32_bset_add(&multi->msgsent, data->mid);
 2465|  10.7k|  if(data->state.really_alive) {
  ------------------
  |  Branch (2465:6): [True: 10.7k, False: 0]
  ------------------
 2466|  10.7k|    data->state.really_alive = FALSE;
  ------------------
  |  | 1054|  10.7k|#define FALSE false
  ------------------
 2467|  10.7k|    --multi->xfers_really_alive;
 2468|  10.7k|    if(!multi->xfers_really_alive)
  ------------------
  |  Branch (2468:8): [True: 10.4k, False: 296]
  ------------------
 2469|  10.4k|      (void)multi_assess_wakeup(multi);
 2470|  10.7k|  }
 2471|  10.7k|  --multi->xfers_alive;
 2472|  10.7k|  if(!multi->xfers_alive)
  ------------------
  |  Branch (2472:6): [True: 10.4k, False: 296]
  ------------------
 2473|  10.4k|    multi_assess_wakeup(multi);
 2474|  10.7k|}
multi.c:multi_addmsg:
  233|  10.4k|{
  234|  10.4k|  if(!Curl_llist_count(&multi->msglist))
  ------------------
  |  Branch (234:6): [True: 10.4k, False: 0]
  ------------------
  235|  10.4k|    CURLM_NTFY(multi->admin, CURLMNOTIFY_INFO_READ);
  ------------------
  |  |   51|  10.4k|  do {                                                \
  |  |   52|  10.4k|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 10.4k, False: 0]
  |  |  |  Branch (52:15): [True: 10.4k, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 10.4k]
  |  |  ------------------
  |  |   53|  10.4k|      Curl_mntfy_add((d), (t));                       \
  |  |   54|  10.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 10.4k]
  |  |  ------------------
  ------------------
  236|  10.4k|  Curl_llist_append(&multi->msglist, msg, &msg->list);
  237|  10.4k|}
multi.c:multi_ischanged:
 1725|  56.3k|{
 1726|  56.3k|  bool retval = FALSE;
  ------------------
  |  | 1054|  56.3k|#define FALSE false
  ------------------
 1727|  56.3k|  DEBUGASSERT(multi);
  ------------------
  |  | 1077|  56.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1727:3): [True: 0, False: 56.3k]
  |  Branch (1727:3): [True: 56.3k, False: 0]
  ------------------
 1728|  56.3k|  if(multi) {
  ------------------
  |  Branch (1728:6): [True: 56.3k, False: 0]
  ------------------
 1729|  56.3k|    retval = (bool)multi->recheckstate;
 1730|  56.3k|    if(clear)
  ------------------
  |  Branch (1730:8): [True: 45.5k, False: 10.7k]
  ------------------
 1731|  45.5k|      multi->recheckstate = FALSE;
  ------------------
  |  | 1054|  45.5k|#define FALSE false
  ------------------
 1732|  56.3k|  }
 1733|  56.3k|  return retval;
 1734|  56.3k|}
multi.c:multi_handle_timeout:
 1819|  18.1k|{
 1820|  18.1k|  timediff_t timeout_ms;
 1821|       |
 1822|  18.1k|  timeout_ms = Curl_timeleft_ms(data);
 1823|  18.1k|  if(timeout_ms < 0) {
  ------------------
  |  Branch (1823:6): [True: 9, False: 18.1k]
  ------------------
 1824|       |    /* Handle timed out */
 1825|      9|    struct curltime since;
 1826|      9|    if(Curl_is_connecting(data))
  ------------------
  |  Branch (1826:8): [True: 9, False: 0]
  ------------------
 1827|      9|      since = data->progress.t_startsingle;
 1828|      0|    else
 1829|      0|      since = data->progress.t_startop;
 1830|      9|    if(data->mstate == MSTATE_CONNECTING)
  ------------------
  |  Branch (1830:8): [True: 9, False: 0]
  ------------------
 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: 1, False: 8]
  ------------------
 1833|      9|            curlx_ptimediff_ms(Curl_pgrs_now(data), &since));
 1834|      0|    else {
 1835|      0|      struct SingleRequest *k = &data->req;
 1836|      0|      if(k->size != -1) {
  ------------------
  |  Branch (1836:10): [True: 0, False: 0]
  ------------------
 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|      0|      else {
 1844|      0|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1845|      0|              " milliseconds with %" FMT_OFF_T " bytes received",
 1846|      0|              curlx_ptimediff_ms(Curl_pgrs_now(data), &since),
 1847|      0|              k->bytecount);
 1848|      0|      }
 1849|      0|    }
 1850|      9|    *result = CURLE_OPERATION_TIMEDOUT;
 1851|      9|    if(data->conn) {
  ------------------
  |  Branch (1851:8): [True: 9, False: 0]
  ------------------
 1852|       |      /* Force connection closed if the connection has indeed been used */
 1853|      9|      if(data->mstate > MSTATE_DO) {
  ------------------
  |  Branch (1853:10): [True: 0, False: 9]
  ------------------
 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|      9|      (void)multi_done(data, *result, TRUE);
  ------------------
  |  | 1051|      9|#define TRUE true
  ------------------
 1858|      9|    }
 1859|      9|    return TRUE;
  ------------------
  |  | 1051|      9|#define TRUE true
  ------------------
 1860|      9|  }
 1861|       |
 1862|  18.1k|  return FALSE;
  ------------------
  |  | 1054|  18.1k|#define FALSE false
  ------------------
 1863|  18.1k|}
multi.c:move_pending_to_connect:
 3847|    202|{
 3848|    202|  DEBUGASSERT(data->mstate == MSTATE_PENDING);
  ------------------
  |  | 1077|    202|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3848:3): [True: 0, False: 202]
  |  Branch (3848:3): [True: 202, False: 0]
  ------------------
 3849|       |
 3850|       |  /* Remove this node from the pending set, add into process set */
 3851|    202|  Curl_uint32_bset_remove(&multi->pending, data->mid);
 3852|    202|  Curl_uint32_bset_add(&multi->process, data->mid);
 3853|       |
 3854|    202|  multistate(data, MSTATE_CONNECT);
  ------------------
  |  |  212|    202|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 3855|    202|  Curl_multi_mark_dirty(data); /* make it run */
 3856|    202|}
multi.c:multi_deltimeout:
 3655|  13.1k|{
 3656|  13.1k|  struct Curl_llist_node *e;
 3657|  13.1k|  struct Curl_llist *timeoutlist = &data->state.timeoutlist;
 3658|       |  /* find and remove the specific node from the list */
 3659|  18.8k|  for(e = Curl_llist_head(timeoutlist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (3659:41): [True: 5.97k, False: 12.9k]
  ------------------
 3660|  5.97k|    struct time_node *n = Curl_node_elem(e);
 3661|  5.97k|    if(n->eid == eid) {
  ------------------
  |  Branch (3661:8): [True: 268, False: 5.70k]
  ------------------
 3662|    268|      Curl_node_remove(e);
 3663|    268|      return;
 3664|    268|    }
 3665|  5.97k|  }
 3666|  13.1k|}
multi.c:multi_addtimeout:
 3678|  8.18k|{
 3679|  8.18k|  struct Curl_llist_node *e;
 3680|  8.18k|  struct time_node *node;
 3681|  8.18k|  struct Curl_llist_node *prev = NULL;
 3682|  8.18k|  size_t n;
 3683|  8.18k|  struct Curl_llist *timeoutlist = &data->state.timeoutlist;
 3684|       |
 3685|  8.18k|  node = &data->state.expires[eid];
 3686|       |
 3687|       |  /* copy the timestamp and id */
 3688|  8.18k|  memcpy(&node->time, stamp, sizeof(*stamp));
 3689|  8.18k|  node->eid = eid; /* also marks it as in use */
 3690|       |
 3691|  8.18k|  n = Curl_llist_count(timeoutlist);
 3692|  8.18k|  if(n) {
  ------------------
  |  Branch (3692:6): [True: 668, False: 7.51k]
  ------------------
 3693|       |    /* find the correct spot in the list */
 3694|  1.30k|    for(e = Curl_llist_head(timeoutlist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (3694:43): [True: 711, False: 598]
  ------------------
 3695|    711|      struct time_node *check = Curl_node_elem(e);
 3696|    711|      timediff_t diff = curlx_ptimediff_ms(&check->time, &node->time);
 3697|    711|      if(diff > 0)
  ------------------
  |  Branch (3697:10): [True: 70, False: 641]
  ------------------
 3698|     70|        break;
 3699|    641|      prev = e;
 3700|    641|    }
 3701|    668|  }
 3702|       |  /* else
 3703|       |     this is the first timeout on the list */
 3704|       |
 3705|  8.18k|  Curl_llist_insert_next(timeoutlist, prev, node, &node->list);
 3706|  8.18k|  CURL_TRC_TIMER(data, eid, "set for %" FMT_TIMEDIFF_T "us",
  ------------------
  |  |  173|  8.18k|  do {                                        \
  |  |  174|  8.18k|    if(CURL_TRC_TIMER_is_verbose(data))       \
  |  |  ------------------
  |  |  |  |  139|  8.18k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  8.18k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  16.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 8.18k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 8.18k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  16.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|  8.18k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  175|  8.18k|      Curl_trc_timer(data, tid, __VA_ARGS__); \
  |  |  176|  8.18k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (176:11): [Folded, False: 8.18k]
  |  |  ------------------
  ------------------
 3707|  8.18k|                 curlx_ptimediff_us(&node->time, Curl_pgrs_now(data)));
 3708|  8.18k|  return CURLM_OK;
 3709|  8.18k|}
multi.c:process_pending_handles:
 3873|  40.4k|{
 3874|  40.4k|  uint32_t mid = multi->last_pending_mid;
 3875|       |
 3876|  40.4k|  if(mid) {
  ------------------
  |  Branch (3876:6): [True: 202, False: 40.2k]
  ------------------
 3877|    202|    while(Curl_uint32_bset_next(&multi->pending, mid, &mid)) {
  ------------------
  |  Branch (3877:11): [True: 0, False: 202]
  ------------------
 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|    202|    multi->last_pending_mid = 0;
 3891|    202|  }
 3892|       |
 3893|  40.4k|  if(Curl_uint32_bset_first(&multi->pending, &mid)) {
  ------------------
  |  Branch (3893:6): [True: 202, False: 40.2k]
  ------------------
 3894|    202|    do {
 3895|    202|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 3896|    202|      if(data) {
  ------------------
  |  Branch (3896:10): [True: 202, False: 0]
  ------------------
 3897|    202|        move_pending_to_connect(multi, data);
 3898|    202|        multi->last_pending_mid = mid;
 3899|    202|        return;
 3900|    202|      }
 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|    202|  }
 3906|  40.4k|}
multi.c:multi_xfer_bufs_free:
 4145|  10.8k|{
 4146|  10.8k|  DEBUGASSERT(multi);
  ------------------
  |  | 1077|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4146:3): [True: 0, False: 10.8k]
  |  Branch (4146:3): [True: 10.8k, False: 0]
  ------------------
 4147|  10.8k|  curlx_safefree(multi->xfer_buf);
  ------------------
  |  | 1332|  10.8k|  do {                      \
  |  | 1333|  10.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  10.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  10.8k|    (ptr) = NULL;           \
  |  | 1335|  10.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
 4148|  10.8k|  multi->xfer_buf_len = 0;
 4149|  10.8k|  multi->xfer_buf_borrowed = FALSE;
  ------------------
  |  | 1054|  10.8k|#define FALSE false
  ------------------
 4150|  10.8k|  curlx_safefree(multi->xfer_ulbuf);
  ------------------
  |  | 1332|  10.8k|  do {                      \
  |  | 1333|  10.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  10.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  10.8k|    (ptr) = NULL;           \
  |  | 1335|  10.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
 4151|  10.8k|  multi->xfer_ulbuf_len = 0;
 4152|  10.8k|  multi->xfer_ulbuf_borrowed = FALSE;
  ------------------
  |  | 1054|  10.8k|#define FALSE false
  ------------------
 4153|  10.8k|  curlx_safefree(multi->xfer_sockbuf);
  ------------------
  |  | 1332|  10.8k|  do {                      \
  |  | 1333|  10.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  10.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  10.8k|    (ptr) = NULL;           \
  |  | 1335|  10.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
 4154|  10.8k|  multi->xfer_sockbuf_len = 0;
 4155|       |  multi->xfer_sockbuf_borrowed = FALSE;
  ------------------
  |  | 1054|  10.8k|#define FALSE false
  ------------------
 4156|  10.8k|}

Curl_multi_ev_socket_done:
  618|  5.09k|{
  619|  5.09k|  mev_forget_socket(multi, data, s, "socket done");
  620|  5.09k|}
Curl_multi_ev_xfer_done:
  624|  11.4k|{
  625|  11.4k|  DEBUGASSERT(!data->conn); /* transfer should have been detached */
  ------------------
  |  | 1077|  11.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (625:3): [True: 0, False: 11.4k]
  |  Branch (625:3): [True: 11.4k, False: 0]
  ------------------
  626|  11.4k|  (void)mev_assess(multi, data, NULL);
  627|  11.4k|  Curl_meta_remove(data, CURL_META_MEV_POLLSET);
  ------------------
  |  |   34|  11.4k|#define CURL_META_MEV_POLLSET   "meta:mev:ps"
  ------------------
  628|  11.4k|}
Curl_multi_ev_conn_done:
  633|  5.65k|{
  634|  5.65k|  (void)mev_assess(multi, data, conn);
  635|  5.65k|  Curl_conn_meta_remove(conn, CURL_META_MEV_POLLSET);
  ------------------
  |  |   34|  5.65k|#define CURL_META_MEV_POLLSET   "meta:mev:ps"
  ------------------
  636|  5.65k|}
Curl_multi_ev_init:
  639|  10.8k|{
  640|  10.8k|  Curl_hash_init(&multi->ev.sh_entries, hashsize, mev_sh_entry_hash,
  641|  10.8k|                 mev_sh_entry_compare, mev_sh_entry_dtor);
  642|  10.8k|}
Curl_multi_ev_cleanup:
  645|  10.8k|{
  646|  10.8k|  Curl_hash_destroy(&multi->ev.sh_entries);
  647|  10.8k|}
multi_ev.c:mev_assess:
  500|  17.1k|{
  501|  17.1k|  struct easy_pollset ps, *last_ps;
  502|  17.1k|  CURLMcode mresult = CURLM_OK;
  503|       |
  504|  17.1k|  if(!multi || !multi->socket_cb)
  ------------------
  |  Branch (504:6): [True: 0, False: 17.1k]
  |  Branch (504:16): [True: 17.1k, False: 0]
  ------------------
  505|  17.1k|    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|  5.09k|{
   94|  5.09k|  if(s != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  5.09k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (94:6): [True: 5.09k, False: 0]
  ------------------
   95|       |    /* only look for proper sockets */
   96|  5.09k|    return Curl_hash_pick(sh, (char *)&s, sizeof(curl_socket_t));
   97|  5.09k|  }
   98|      0|  return NULL;
   99|  5.09k|}
multi_ev.c:mev_forget_socket:
  200|  5.09k|{
  201|  5.09k|  struct mev_sh_entry *entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
  202|  5.09k|  int rc = 0;
  203|       |
  204|  5.09k|  if(!entry) /* we never knew or already forgot about this socket */
  ------------------
  |  Branch (204:6): [True: 5.09k, False: 0]
  ------------------
  205|  5.09k|    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|  10.8k|{
  126|  10.8k|  memset(&multi->ntfy, 0, sizeof(multi->ntfy));
  127|  10.8k|  Curl_uint32_bset_init(&multi->ntfy.enabled);
  128|  10.8k|}
Curl_mntfy_resize:
  131|  10.8k|{
  132|  10.8k|  if(Curl_uint32_bset_resize(&multi->ntfy.enabled, CURLMNOTIFY_EASY_DONE + 1))
  ------------------
  |  |  540|  10.8k|#define CURLMNOTIFY_EASY_DONE    1
  ------------------
  |  Branch (132:6): [True: 0, False: 10.8k]
  ------------------
  133|      0|    return CURLM_OUT_OF_MEMORY;
  134|  10.8k|  return CURLM_OK;
  135|  10.8k|}
Curl_mntfy_cleanup:
  138|  10.8k|{
  139|  10.8k|  while(multi->ntfy.head) {
  ------------------
  |  Branch (139:9): [True: 0, False: 10.8k]
  ------------------
  140|      0|    struct mntfy_chunk *chunk = multi->ntfy.head;
  141|      0|    multi->ntfy.head = chunk->next;
  142|      0|    mnfty_chunk_destroy(chunk);
  143|      0|  }
  144|       |  multi->ntfy.tail = NULL;
  145|  10.8k|  Curl_uint32_bset_destroy(&multi->ntfy.enabled);
  146|  10.8k|}

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|  23.9k|{
  666|  23.9k|  curlx_dyn_init(&store->filebuf, MAX_NETRC_FILE);
  ------------------
  |  |   77|  23.9k|#define MAX_NETRC_FILE  (128 * 1024)
  ------------------
  667|  23.9k|  store->loaded = FALSE;
  ------------------
  |  | 1054|  23.9k|#define FALSE false
  ------------------
  668|       |  store->filename = NULL;
  669|  23.9k|}
Curl_netrc_cleanup:
  671|  29.6k|{
  672|  29.6k|  curlx_dyn_free(&store->filebuf);
  673|  29.6k|  curlx_safefree(store->filename);
  ------------------
  |  | 1332|  29.6k|  do {                      \
  |  | 1333|  29.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  29.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  29.6k|    (ptr) = NULL;           \
  |  | 1335|  29.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 29.6k]
  |  |  ------------------
  ------------------
  674|       |  store->loaded = FALSE;
  ------------------
  |  | 1054|  29.6k|#define FALSE false
  ------------------
  675|  29.6k|}
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: 1, False: 4]
  ------------------
  348|      5|  netrc_scan_reset(sc);
  349|      5|}
netrc.c:netrc_lexer_init:
  139|      5|{
  140|      5|  curlx_dyn_init(&lexer->literal, MAX_NETRC_TOKEN);
  ------------------
  |  |   78|      5|#define MAX_NETRC_TOKEN 4096
  ------------------
  141|      5|  lexer->data = data;
  142|      5|  lexer->content = lexer->pos = content;
  143|      5|}
netrc.c:netrc_scan_reset:
  332|     15|{
  333|     15|  curlx_safefree(sc->login);
  ------------------
  |  | 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|}

Curl_getdate_capped:
  606|  10.6k|{
  607|  10.6k|  int rc = parsedate(p, tp);
  608|  10.6k|  return (rc == PARSEDATE_FAIL);
  ------------------
  |  |   97|  10.6k|#define PARSEDATE_FAIL   (-1)
  ------------------
  609|  10.6k|}
parsedate.c:parsedate:
  543|  10.6k|{
  544|  10.6k|  curl_off_t seconds = 0;
  545|  10.6k|  enum assume dignext = DATE_MDAY;
  546|  10.6k|  const char *indate = date; /* save the original pointer */
  547|  10.6k|  int part = 0; /* max 6 parts */
  548|  10.6k|  int rc = 0;
  549|  10.6k|  struct when w;
  550|  10.6k|  initwhen(&w);
  551|       |
  552|  32.3k|  while(*date && (part < 6)) {
  ------------------
  |  Branch (552:9): [True: 28.0k, False: 4.28k]
  |  Branch (552:18): [True: 28.0k, False: 0]
  ------------------
  553|  28.0k|    skip(&date);
  554|       |
  555|  28.0k|    if(ISALPHA(*date))
  ------------------
  |  |   38|  28.0k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  56.1k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 3.47k, False: 24.6k]
  |  |  |  |  |  Branch (43:38): [True: 3.47k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  24.6k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 6.72k, False: 17.8k]
  |  |  |  |  |  Branch (42:38): [True: 6.72k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  556|  10.1k|      rc = datestring(&date, &w);
  557|  17.8k|    else if(ISDIGIT(*date))
  ------------------
  |  |   44|  17.8k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 15.6k, False: 2.22k]
  |  |  |  Branch (44:38): [True: 15.6k, False: 0]
  |  |  ------------------
  ------------------
  558|  15.6k|      rc = datenum(indate, &date, &w, &dignext);
  559|  28.0k|    if(rc)
  ------------------
  |  Branch (559:8): [True: 6.35k, False: 21.7k]
  ------------------
  560|  6.35k|      return rc;
  561|       |
  562|  21.7k|    part++;
  563|  21.7k|  }
  564|       |
  565|  4.28k|  rc = datecheck(&w);
  566|  4.28k|  if(rc)
  ------------------
  |  Branch (566:6): [True: 4.05k, False: 229]
  ------------------
  567|  4.05k|    return rc;
  568|       |
  569|    229|  seconds = time2epoch(&w); /* get number of seconds */
  570|    229|  tzadjust(&seconds, &w); /* handle the time zone offset */
  571|    229|  rc = mktimet(seconds, output); /* squeeze seconds into a time_t */
  572|       |
  573|    229|  return rc;
  574|  4.28k|}
parsedate.c:initwhen:
  360|  10.6k|{
  361|  10.6k|  w->wday = w->mon = w->mday = w->hour = w->min = w->sec = w->year = w->tzoff =
  362|  10.6k|    -1;
  363|  10.6k|}
parsedate.c:skip:
  256|  28.0k|{
  257|       |  /* skip everything that are not letters or digits */
  258|  49.4k|  while(**date && !ISALNUM(**date))
  ------------------
  |  |   41|  47.2k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   44|  94.4k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 35.0k, False: 12.2k]
  |  |  |  |  |  Branch (44:38): [True: 15.6k, False: 19.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  78.8k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 4.85k, False: 26.7k]
  |  |  |  |  |  Branch (43:38): [True: 3.47k, False: 1.38k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  28.1k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 9.24k, False: 18.8k]
  |  |  |  |  |  Branch (42:38): [True: 6.72k, False: 2.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (258:9): [True: 47.2k, False: 2.22k]
  ------------------
  259|  21.3k|    (*date)++;
  260|  28.0k|}
parsedate.c:datestring:
  366|  10.1k|{
  367|       |  /* a name coming up */
  368|  10.1k|  size_t len = 0;
  369|  10.1k|  const char *p = *datep;
  370|  10.1k|  bool found = FALSE;
  ------------------
  |  | 1054|  10.1k|#define FALSE false
  ------------------
  371|  34.3k|  while(ISALPHA(*p) && (len < NAME_LEN)) {
  ------------------
  |  |   38|  68.7k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  68.7k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 13.4k, False: 20.9k]
  |  |  |  |  |  Branch (43:38): [True: 13.0k, False: 331]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  21.2k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 11.9k, False: 9.32k]
  |  |  |  |  |  Branch (42:38): [True: 11.1k, False: 806]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                while(ISALPHA(*p) && (len < NAME_LEN)) {
  ------------------
  |  |  357|  24.2k|#define NAME_LEN 12
  ------------------
  |  Branch (371:24): [True: 24.1k, False: 72]
  ------------------
  372|  24.1k|    p++;
  373|  24.1k|    len++;
  374|  24.1k|  }
  375|       |
  376|  10.1k|  if(len != NAME_LEN) {
  ------------------
  |  |  357|  10.1k|#define NAME_LEN 12
  ------------------
  |  Branch (376:6): [True: 10.0k, False: 101]
  ------------------
  377|  10.0k|    if(w->wday == -1) {
  ------------------
  |  Branch (377:8): [True: 9.39k, False: 705]
  ------------------
  378|  9.39k|      w->wday = checkday(*datep, len);
  379|  9.39k|      if(w->wday != -1)
  ------------------
  |  Branch (379:10): [True: 589, False: 8.80k]
  ------------------
  380|    589|        found = TRUE;
  ------------------
  |  | 1051|    589|#define TRUE true
  ------------------
  381|  9.39k|    }
  382|  10.0k|    if(!found && (w->mon == -1)) {
  ------------------
  |  Branch (382:8): [True: 9.50k, False: 589]
  |  Branch (382:18): [True: 8.08k, False: 1.42k]
  ------------------
  383|  8.08k|      w->mon = checkmonth(*datep, len);
  384|  8.08k|      if(w->mon != -1)
  ------------------
  |  Branch (384:10): [True: 2.17k, False: 5.90k]
  ------------------
  385|  2.17k|        found = TRUE;
  ------------------
  |  | 1051|  2.17k|#define TRUE true
  ------------------
  386|  8.08k|    }
  387|       |
  388|  10.0k|    if(!found && (w->tzoff == -1)) {
  ------------------
  |  Branch (388:8): [True: 7.33k, False: 2.76k]
  |  Branch (388:18): [True: 5.92k, False: 1.40k]
  ------------------
  389|       |      /* this must be a time zone string */
  390|  5.92k|      w->tzoff = checktz(*datep, len);
  391|  5.92k|      if(w->tzoff != -1)
  ------------------
  |  Branch (391:10): [True: 3.15k, False: 2.76k]
  ------------------
  392|  3.15k|        found = TRUE;
  ------------------
  |  | 1051|  3.15k|#define TRUE true
  ------------------
  393|  5.92k|    }
  394|  10.0k|  }
  395|  10.1k|  if(!found)
  ------------------
  |  Branch (395:6): [True: 4.27k, False: 5.92k]
  ------------------
  396|  4.27k|    return PARSEDATE_FAIL; /* bad string */
  ------------------
  |  |   97|  4.27k|#define PARSEDATE_FAIL   (-1)
  ------------------
  397|       |
  398|  5.92k|  *datep += len;
  399|  5.92k|  return PARSEDATE_OK;
  ------------------
  |  |   96|  5.92k|#define PARSEDATE_OK     0
  ------------------
  400|  10.1k|}
parsedate.c:checkday:
  199|  9.39k|{
  200|  9.39k|  int i;
  201|  9.39k|  const char * const *what;
  202|  9.39k|  if(len > 3)
  ------------------
  |  Branch (202:6): [True: 1.10k, False: 8.28k]
  ------------------
  203|  1.10k|    what = &weekday[0];
  204|  8.28k|  else if(len == 3)
  ------------------
  |  Branch (204:11): [True: 3.58k, False: 4.70k]
  ------------------
  205|  3.58k|    what = &Curl_wkday[0];
  206|  4.70k|  else
  207|  4.70k|    return -1; /* too short */
  208|  35.4k|  for(i = 0; i < 7; i++) {
  ------------------
  |  Branch (208:14): [True: 31.3k, False: 4.10k]
  ------------------
  209|  31.3k|    size_t ilen = strlen(what[0]);
  210|  31.3k|    if((ilen == len) &&
  ------------------
  |  Branch (210:8): [True: 24.0k, False: 7.31k]
  ------------------
  211|  24.0k|       curl_strnequal(check, what[0], len))
  ------------------
  |  Branch (211:8): [True: 589, False: 23.4k]
  ------------------
  212|    589|      return i;
  213|  30.7k|    what++;
  214|  30.7k|  }
  215|  4.10k|  return -1;
  216|  4.69k|}
parsedate.c:checkmonth:
  219|  8.08k|{
  220|  8.08k|  int i;
  221|  8.08k|  const char * const *what = &Curl_month[0];
  222|  8.08k|  if(len != 3)
  ------------------
  |  Branch (222:6): [True: 5.08k, False: 2.99k]
  ------------------
  223|  5.08k|    return -1; /* not a month */
  224|       |
  225|  25.0k|  for(i = 0; i < 12; i++) {
  ------------------
  |  Branch (225:14): [True: 24.2k, False: 819]
  ------------------
  226|  24.2k|    if(curl_strnequal(check, what[0], 3))
  ------------------
  |  Branch (226:8): [True: 2.17k, False: 22.0k]
  ------------------
  227|  2.17k|      return i;
  228|  22.0k|    what++;
  229|  22.0k|  }
  230|    819|  return -1; /* return the offset or -1, no real offset is -1 */
  231|  2.99k|}
parsedate.c:checktz:
  243|  5.92k|{
  244|  5.92k|  if(len <= 4) {
  ------------------
  |  Branch (244:6): [True: 5.24k, False: 678]
  ------------------
  245|  5.24k|    const struct tzinfo *what;
  246|  5.24k|    struct tzinfo find;
  247|  5.24k|    curlx_strcopy(find.name, sizeof(find.name), check, len);
  248|  5.24k|    what = bsearch(&find, tz, CURL_ARRAYSIZE(tz), sizeof(tz[0]), tzcompare);
  ------------------
  |  | 1299|  5.24k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  249|  5.24k|    if(what)
  ------------------
  |  Branch (249:8): [True: 3.15k, False: 2.08k]
  ------------------
  250|  3.15k|      return what->offset * 60;
  251|  5.24k|  }
  252|  2.76k|  return -1;
  253|  5.92k|}
parsedate.c:tzcompare:
  234|  29.6k|{
  235|  29.6k|  const struct tzinfo *tz1 = m1;
  236|  29.6k|  const struct tzinfo *tz2 = m2;
  237|  29.6k|  return strcmp(tz1->name, tz2->name);
  238|  29.6k|}
parsedate.c:datenum:
  404|  15.6k|{
  405|       |  /* a digit */
  406|  15.6k|  unsigned int val;
  407|  15.6k|  char *end;
  408|  15.6k|  const char *date = *datep;
  409|  15.6k|  enum assume dignext = *dignextp;
  410|       |
  411|  15.6k|  if((w->sec == -1) && match_time(date, w, &end)) {
  ------------------
  |  Branch (411:6): [True: 13.5k, False: 2.09k]
  |  Branch (411:24): [True: 2.49k, False: 11.0k]
  ------------------
  412|       |    /* time stamp */
  413|  2.49k|    date = end;
  414|  2.49k|  }
  415|  13.1k|  else {
  416|  13.1k|    bool found = FALSE;
  ------------------
  |  | 1054|  13.1k|#define FALSE false
  ------------------
  417|  13.1k|    curl_off_t lval;
  418|  13.1k|    int num_digits = 0;
  419|  13.1k|    const char *p = *datep;
  420|  13.1k|    if(curlx_str_number(&p, &lval, 99999999))
  ------------------
  |  Branch (420:8): [True: 128, False: 13.0k]
  ------------------
  421|    128|      return PARSEDATE_FAIL;
  ------------------
  |  |   97|    128|#define PARSEDATE_FAIL   (-1)
  ------------------
  422|       |
  423|       |    /* we know num_digits cannot be larger than 8 */
  424|  13.0k|    num_digits = (int)(p - *datep);
  425|  13.0k|    val = (unsigned int)lval;
  426|       |
  427|  13.0k|    if((w->tzoff == -1) &&
  ------------------
  |  Branch (427:8): [True: 10.5k, False: 2.48k]
  ------------------
  428|  10.5k|       (num_digits == 4) &&
  ------------------
  |  Branch (428:8): [True: 1.39k, False: 9.17k]
  ------------------
  429|  1.39k|       (val <= 1400) &&
  ------------------
  |  Branch (429:8): [True: 1.08k, False: 311]
  ------------------
  430|  1.08k|       (indate < date) &&
  ------------------
  |  Branch (430:8): [True: 819, False: 261]
  ------------------
  431|    819|       (date[-1] == '+' || date[-1] == '-')) {
  ------------------
  |  Branch (431:9): [True: 235, False: 584]
  |  Branch (431:28): [True: 322, False: 262]
  ------------------
  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|    557|      found = TRUE;
  ------------------
  |  | 1051|    557|#define TRUE true
  ------------------
  441|    557|      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|    557|      w->tzoff = date[-1] == '+' ? -w->tzoff : w->tzoff;
  ------------------
  |  Branch (445:18): [True: 235, False: 322]
  ------------------
  446|    557|    }
  447|       |
  448|  12.4k|    else if((num_digits == 8) && (w->year == -1) &&
  ------------------
  |  Branch (448:13): [True: 949, False: 11.5k]
  |  Branch (448:34): [True: 785, False: 164]
  ------------------
  449|    785|            (w->mon == -1) && (w->mday == -1)) {
  ------------------
  |  Branch (449:13): [True: 680, False: 105]
  |  Branch (449:31): [True: 436, False: 244]
  ------------------
  450|       |      /* 8 digits, no year, month or day yet. This is YYYYMMDD */
  451|    436|      found = TRUE;
  ------------------
  |  | 1051|    436|#define TRUE true
  ------------------
  452|    436|      w->year = val / 10000;
  453|    436|      w->mon = ((val % 10000) / 100) - 1; /* month is 0 - 11 */
  454|    436|      w->mday = val % 100;
  455|    436|    }
  456|       |
  457|  13.0k|    if(!found && (dignext == DATE_MDAY) && (w->mday == -1)) {
  ------------------
  |  Branch (457:8): [True: 12.0k, False: 993]
  |  Branch (457:18): [True: 7.82k, False: 4.22k]
  |  Branch (457:44): [True: 7.72k, False: 97]
  ------------------
  458|  7.72k|      if((val > 0) && (val < 32)) {
  ------------------
  |  Branch (458:10): [True: 6.35k, False: 1.37k]
  |  Branch (458:23): [True: 4.83k, False: 1.51k]
  ------------------
  459|  4.83k|        w->mday = val;
  460|  4.83k|        found = TRUE;
  ------------------
  |  | 1051|  4.83k|#define TRUE true
  ------------------
  461|  4.83k|      }
  462|  7.72k|      dignext = DATE_YEAR;
  463|  7.72k|    }
  464|       |
  465|  13.0k|    if(!found && (dignext == DATE_YEAR) && (w->year == -1)) {
  ------------------
  |  Branch (465:8): [True: 7.21k, False: 5.83k]
  |  Branch (465:18): [True: 7.11k, False: 97]
  |  Branch (465:44): [True: 5.26k, False: 1.84k]
  ------------------
  466|  5.26k|      w->year = val;
  467|  5.26k|      found = TRUE;
  ------------------
  |  | 1051|  5.26k|#define TRUE true
  ------------------
  468|  5.26k|      if(w->year < 100) {
  ------------------
  |  Branch (468:10): [True: 3.39k, False: 1.86k]
  ------------------
  469|  3.39k|        if(w->year > 70)
  ------------------
  |  Branch (469:12): [True: 519, False: 2.87k]
  ------------------
  470|    519|          w->year += 1900;
  471|  2.87k|        else
  472|  2.87k|          w->year += 2000;
  473|  3.39k|      }
  474|  5.26k|      if(w->mday == -1)
  ------------------
  |  Branch (474:10): [True: 2.30k, False: 2.95k]
  ------------------
  475|  2.30k|        dignext = DATE_MDAY;
  476|  5.26k|    }
  477|       |
  478|  13.0k|    if(!found)
  ------------------
  |  Branch (478:8): [True: 1.94k, False: 11.0k]
  ------------------
  479|  1.94k|      return PARSEDATE_FAIL;
  ------------------
  |  |   97|  1.94k|#define PARSEDATE_FAIL   (-1)
  ------------------
  480|       |
  481|  11.0k|    date = p;
  482|  11.0k|  }
  483|  13.5k|  *datep = date;
  484|  13.5k|  *dignextp = dignext;
  485|  13.5k|  return PARSEDATE_OK;
  ------------------
  |  |   96|  13.5k|#define PARSEDATE_OK     0
  ------------------
  486|  15.6k|}
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|  4.10k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 3.69k, False: 416]
  |  |  |  Branch (44:38): [True: 3.32k, False: 373]
  |  |  ------------------
  ------------------
  |  Branch (320:6): [True: 10.5k, False: 3.04k]
  |  Branch (320:19): [True: 4.10k, False: 6.42k]
  ------------------
  321|  3.32k|    mm = oneortwodigit(&p[1], &p);
  322|  3.32k|    if(mm < 60) {
  ------------------
  |  Branch (322:8): [True: 2.80k, False: 515]
  ------------------
  323|  2.80k|      if((*p == ':') && ISDIGIT(p[1])) {
  ------------------
  |  |   44|  1.73k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 1.26k, False: 469]
  |  |  |  Branch (44:38): [True: 973, False: 293]
  |  |  ------------------
  ------------------
  |  Branch (323:10): [True: 1.73k, False: 1.07k]
  ------------------
  324|    973|        ss = oneortwodigit(&p[1], &p);
  325|    973|        if(ss <= 60) {
  ------------------
  |  Branch (325:12): [True: 658, False: 315]
  ------------------
  326|       |          /* valid HH:MM:SS */
  327|    658|          goto match;
  328|    658|        }
  329|    973|      }
  330|  1.83k|      else {
  331|       |        /* valid HH:MM */
  332|  1.83k|        goto match;
  333|  1.83k|      }
  334|  2.80k|    }
  335|  3.32k|  }
  336|  11.0k|  return FALSE; /* not a time string */
  ------------------
  |  | 1054|  11.0k|#define FALSE false
  ------------------
  337|  2.49k|match:
  338|  2.49k|  w->hour = hh;
  339|  2.49k|  w->min = mm;
  340|  2.49k|  w->sec = ss;
  341|  2.49k|  *endp = (char *)CURL_UNCONST(p);
  ------------------
  |  |  862|  2.49k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  342|       |  return TRUE;
  ------------------
  |  | 1051|  2.49k|#define TRUE true
  ------------------
  343|  13.5k|}
parsedate.c:oneortwodigit:
  304|  17.8k|{
  305|  17.8k|  int num = date[0] - '0';
  306|  17.8k|  if(ISDIGIT(date[1])) {
  ------------------
  |  |   44|  17.8k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 15.6k, False: 2.22k]
  |  |  |  Branch (44:38): [True: 7.73k, False: 7.90k]
  |  |  ------------------
  ------------------
  307|  7.73k|    *endp = &date[2];
  308|  7.73k|    return (num * 10) + (date[1] - '0');
  309|  7.73k|  }
  310|  10.1k|  *endp = &date[1];
  311|  10.1k|  return num;
  312|  17.8k|}
parsedate.c:datecheck:
  489|  4.28k|{
  490|  4.28k|  if(w->sec == -1)
  ------------------
  |  Branch (490:6): [True: 2.90k, False: 1.38k]
  ------------------
  491|  2.90k|    w->sec = w->min = w->hour = 0; /* no time, make it zero */
  492|       |
  493|  4.28k|  if((w->mday == -1) || (w->mon == -1) || (w->year == -1))
  ------------------
  |  Branch (493:6): [True: 1.72k, False: 2.55k]
  |  Branch (493:25): [True: 1.38k, False: 1.17k]
  |  Branch (493:43): [True: 362, False: 814]
  ------------------
  494|       |    /* lacks vital info, fail */
  495|  3.47k|    return PARSEDATE_FAIL;
  ------------------
  |  |   97|  3.47k|#define PARSEDATE_FAIL   (-1)
  ------------------
  496|       |
  497|       |  /* The Gregorian calendar was introduced 1582 */
  498|    814|  else if(w->year < 1583)
  ------------------
  |  Branch (498:11): [True: 381, False: 433]
  ------------------
  499|    381|    return PARSEDATE_FAIL;
  ------------------
  |  |   97|    381|#define PARSEDATE_FAIL   (-1)
  ------------------
  500|       |
  501|    433|  else if((w->mday > 31) || (w->mon > 11) || (w->hour > 23) ||
  ------------------
  |  Branch (501:11): [True: 93, False: 340]
  |  Branch (501:29): [True: 111, False: 229]
  |  Branch (501:46): [True: 0, False: 229]
  ------------------
  502|    229|          (w->min > 59) || (w->sec > 60))
  ------------------
  |  Branch (502:11): [True: 0, False: 229]
  |  Branch (502:28): [True: 0, False: 229]
  ------------------
  503|    204|    return PARSEDATE_FAIL; /* clearly an illegal date */
  ------------------
  |  |   97|    204|#define PARSEDATE_FAIL   (-1)
  ------------------
  504|       |
  505|    229|  return PARSEDATE_OK;
  ------------------
  |  |   96|    229|#define PARSEDATE_OK     0
  ------------------
  506|  4.28k|}
parsedate.c:time2epoch:
  288|    229|{
  289|    229|  static const int cumulative_days[12] = {
  290|    229|    0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
  291|    229|  };
  292|    229|  int y = w->year - (w->mon <= 1);
  293|    229|  int leap_days = (y / 4) - (y / 100) + (y / 400) - LEAP_DAYS_BEFORE_1969;
  ------------------
  |  |  281|    229|#define LEAP_DAYS_BEFORE_1969 477
  ------------------
  294|    229|  curl_off_t days = (curl_off_t)(w->year - 1970) * 365 + leap_days +
  295|    229|    cumulative_days[w->mon] + w->mday - 1;
  296|       |
  297|    229|  return (((days * 24 + w->hour) * 60 + w->min) * 60) + w->sec;
  298|    229|}
parsedate.c:tzadjust:
  509|    229|{
  510|    229|  if(w->tzoff == -1) /* unknown tz means no offset */
  ------------------
  |  Branch (510:6): [True: 179, False: 50]
  ------------------
  511|    179|    w->tzoff = 0;
  512|       |
  513|       |  /* Add the time zone diff between local time zone and GMT. */
  514|    229|  if((w->tzoff > 0) && (*tp > (curl_off_t)(CURL_OFF_T_MAX - w->tzoff)))
  ------------------
  |  |  590|     13|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (514:6): [True: 13, False: 216]
  |  Branch (514:24): [True: 0, False: 13]
  ------------------
  515|      0|    *tp = CURL_OFF_T_MAX;
  ------------------
  |  |  590|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  516|    229|  else
  517|    229|    *tp += w->tzoff;
  518|       |  /* this needs no minimum check since we require a year > 1582 */
  519|    229|}
parsedate.c:mktimet:
  522|    229|{
  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|    229|  *output = (time_t)seconds;
  539|    229|  return PARSEDATE_OK;
  ------------------
  |  |   96|    229|#define PARSEDATE_OK     0
  ------------------
  540|    229|}

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

time2str:
   40|     66|{
   41|     66|  curl_off_t h;
   42|     66|  if(seconds <= 0) {
  ------------------
  |  Branch (42:6): [True: 66, False: 0]
  ------------------
   43|     66|    curlx_strcopy(r, rsize, STRCONST("       "));
  ------------------
  |  | 1297|     66|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
   44|     66|    return;
   45|     66|  }
   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|    132|{
   91|       |  /* a signed 64-bit value is 8192 petabytes maximum, shown as
   92|       |     8.0E (exabytes)*/
   93|    132|  if(bytes < 100000)
  ------------------
  |  Branch (93:6): [True: 132, False: 0]
  ------------------
   94|    132|    curl_msnprintf(max6, mlen, "%6" CURL_FORMAT_CURL_OFF_T, bytes);
  ------------------
  |  |  341|    132|#    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|    132|  return max6;
  121|    132|}
Curl_pgrs_now:
  174|  1.03M|{
  175|  1.03M|  curlx_pnow(&data->progress.now);
  176|  1.03M|  return &data->progress.now;
  177|  1.03M|}
Curl_pgrsReset:
  208|  5.65k|{
  209|  5.65k|  Curl_pgrsSetUploadCounter(data, 0);
  210|  5.65k|  data->progress.dl.cur_size = 0;
  211|  5.65k|  Curl_pgrsSetUploadSize(data, -1);
  212|  5.65k|  Curl_pgrsSetDownloadSize(data, -1);
  213|  5.65k|  data->progress.speeder_c = 0; /* reset speed records */
  214|  5.65k|  data->progress.deliver = 0;
  215|  5.65k|  pgrs_speedinit(data);
  216|  5.65k|}
Curl_pgrsResetTransferSizes:
  220|  7.51k|{
  221|  7.51k|  Curl_pgrsSetDownloadSize(data, -1);
  222|  7.51k|  Curl_pgrsSetUploadSize(data, -1);
  223|  7.51k|}
Curl_pgrsTimeWas:
  270|  62.9k|{
  271|  62.9k|  timediff_t *delta = NULL;
  272|       |
  273|  62.9k|  switch(timer) {
  274|      0|  default:
  ------------------
  |  Branch (274:3): [True: 0, False: 62.9k]
  ------------------
  275|      0|  case TIMER_NONE:
  ------------------
  |  Branch (275:3): [True: 0, False: 62.9k]
  ------------------
  276|       |    /* mistake filter */
  277|      0|    break;
  278|  7.51k|  case TIMER_STARTOP:
  ------------------
  |  Branch (278:3): [True: 7.51k, False: 55.4k]
  ------------------
  279|       |    /* This is set at the start of a transfer */
  280|  7.51k|    data->progress.t_startop = timestamp;
  281|  7.51k|    data->progress.t_startqueue = timestamp;
  282|  7.51k|    data->progress.t_postqueue = 0;
  283|  7.51k|    break;
  284|  7.51k|  case TIMER_STARTSINGLE:
  ------------------
  |  Branch (284:3): [True: 7.51k, False: 55.4k]
  ------------------
  285|       |    /* This is set at the start of each single transfer */
  286|  7.51k|    data->progress.t_startsingle = timestamp;
  287|  7.51k|    data->progress.is_t_startransfer_set = FALSE;
  ------------------
  |  | 1054|  7.51k|#define FALSE false
  ------------------
  288|  7.51k|    break;
  289|  5.65k|  case TIMER_POSTQUEUE:
  ------------------
  |  Branch (289:3): [True: 5.65k, False: 57.2k]
  ------------------
  290|       |    /* Queue time is accumulative from all involved redirects */
  291|  5.65k|    data->progress.t_postqueue +=
  292|  5.65k|      curlx_ptimediff_us(&timestamp, &data->progress.t_startqueue);
  293|  5.65k|    break;
  294|      0|  case TIMER_STARTACCEPT:
  ------------------
  |  Branch (294:3): [True: 0, False: 62.9k]
  ------------------
  295|      0|    data->progress.t_acceptdata = timestamp;
  296|      0|    break;
  297|  5.12k|  case TIMER_NAMELOOKUP:
  ------------------
  |  Branch (297:3): [True: 5.12k, False: 57.8k]
  ------------------
  298|  5.12k|    delta = &data->progress.t_nslookup;
  299|  5.12k|    break;
  300|  4.75k|  case TIMER_CONNECT:
  ------------------
  |  Branch (300:3): [True: 4.75k, False: 58.1k]
  ------------------
  301|  4.75k|    delta = &data->progress.t_connect;
  302|  4.75k|    break;
  303|      0|  case TIMER_APPCONNECT:
  ------------------
  |  Branch (303:3): [True: 0, False: 62.9k]
  ------------------
  304|      0|    delta = &data->progress.t_appconnect;
  305|      0|    break;
  306|  10.7k|  case TIMER_PRETRANSFER:
  ------------------
  |  Branch (306:3): [True: 10.7k, False: 52.1k]
  ------------------
  307|  10.7k|    delta = &data->progress.t_pretransfer;
  308|  10.7k|    break;
  309|  10.7k|  case TIMER_STARTTRANSFER:
  ------------------
  |  Branch (309:3): [True: 10.7k, False: 52.1k]
  ------------------
  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|  10.7k|    if(data->progress.is_t_startransfer_set) {
  ------------------
  |  Branch (316:8): [True: 0, False: 10.7k]
  ------------------
  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|  10.7k|    data->progress.is_t_startransfer_set = TRUE;
  ------------------
  |  | 1051|  10.7k|#define TRUE true
  ------------------
  321|  10.7k|    delta = &data->progress.t_starttransfer;
  322|  10.7k|    break;
  323|  10.7k|  case TIMER_POSTRANSFER:
  ------------------
  |  Branch (323:3): [True: 10.7k, False: 52.1k]
  ------------------
  324|  10.7k|    delta = &data->progress.t_posttransfer;
  325|  10.7k|    break;
  326|      0|  case TIMER_REDIRECT:
  ------------------
  |  Branch (326:3): [True: 0, False: 62.9k]
  ------------------
  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|  62.9k|  }
  332|  62.9k|  if(delta) {
  ------------------
  |  Branch (332:6): [True: 42.2k, False: 20.6k]
  ------------------
  333|  42.2k|    timediff_t us = curlx_ptimediff_us(&timestamp,
  334|  42.2k|                                       &data->progress.t_startsingle);
  335|  42.2k|    if(us < 1)
  ------------------
  |  Branch (335:8): [True: 2, False: 42.2k]
  ------------------
  336|      2|      us = 1; /* make sure at least one microsecond passed */
  337|  42.2k|    *delta += us;
  338|  42.2k|    CURL_TRC_M(data, "[%s] added %" FMT_TIMEDIFF_T "us",
  ------------------
  |  |  148|  42.2k|  do {                                   \
  |  |  149|  42.2k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  42.2k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  42.2k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  84.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 42.2k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 42.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  84.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|  42.2k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  42.2k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  42.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 42.2k]
  |  |  ------------------
  ------------------
  339|  42.2k|               pgrs_timer_name(timer), us);
  340|  42.2k|  }
  341|  20.6k|  else
  342|  20.6k|    CURL_TRC_M(data, "[%s] set", pgrs_timer_name(timer));
  ------------------
  |  |  148|  20.6k|  do {                                   \
  |  |  149|  20.6k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  20.6k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  20.6k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  41.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 20.6k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 20.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  41.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|  20.6k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  20.6k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  20.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 20.6k]
  |  |  ------------------
  ------------------
  343|  62.9k|}
Curl_pgrsTime:
  352|  58.1k|{
  353|  58.1k|  Curl_pgrsTimeWas(data, timer, *Curl_pgrs_now(data));
  354|  58.1k|}
Curl_pgrsStartNow:
  357|  7.51k|{
  358|  7.51k|  struct Progress *p = &data->progress;
  359|       |
  360|  7.51k|  p->speeder_c = 0; /* reset the progress meter display */
  361|  7.51k|  p->start = *Curl_pgrs_now(data);
  362|  7.51k|  p->is_t_startransfer_set = FALSE;
  ------------------
  |  | 1054|  7.51k|#define FALSE false
  ------------------
  363|  7.51k|  p->dl.cur_size = 0;
  364|  7.51k|  p->ul.cur_size = 0;
  365|       |  /* the sizes are unknown at start */
  366|  7.51k|  p->dl_size_known = FALSE;
  ------------------
  |  | 1054|  7.51k|#define FALSE false
  ------------------
  367|       |  p->ul_size_known = FALSE;
  ------------------
  |  | 1054|  7.51k|#define FALSE false
  ------------------
  368|  7.51k|}
Curl_pgrs_deliver_check:
  373|    219|{
  374|    219|  if(data->set.max_filesize &&
  ------------------
  |  Branch (374:6): [True: 120, False: 99]
  ------------------
  375|    120|     ((curl_off_t)delta > data->set.max_filesize - data->progress.deliver)) {
  ------------------
  |  Branch (375:6): [True: 1, False: 119]
  ------------------
  376|      1|    failf(data, "Would have exceeded max file size");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  377|      1|    return CURLE_FILESIZE_EXCEEDED;
  378|      1|  }
  379|    218|  return CURLE_OK;
  380|    219|}
Curl_pgrs_deliver_inc:
  385|    218|{
  386|    218|  data->progress.deliver += delta;
  387|    218|}
Curl_pgrsSetUploadCounter:
  409|  5.65k|{
  410|  5.65k|  data->progress.ul.cur_size = size;
  411|  5.65k|}
Curl_pgrsSetDownloadSize:
  414|  13.1k|{
  415|  13.1k|  if(size >= 0) {
  ------------------
  |  Branch (415:6): [True: 0, False: 13.1k]
  ------------------
  416|      0|    data->progress.dl.total_size = size;
  417|      0|    data->progress.dl_size_known = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  418|      0|  }
  419|  13.1k|  else {
  420|  13.1k|    data->progress.dl.total_size = 0;
  421|       |    data->progress.dl_size_known = FALSE;
  ------------------
  |  | 1054|  13.1k|#define FALSE false
  ------------------
  422|  13.1k|  }
  423|  13.1k|}
Curl_pgrsSetUploadSize:
  426|  13.1k|{
  427|  13.1k|  if(size >= 0) {
  ------------------
  |  Branch (427:6): [True: 0, False: 13.1k]
  ------------------
  428|      0|    data->progress.ul.total_size = size;
  429|      0|    data->progress.ul_size_known = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  430|      0|  }
  431|  13.1k|  else {
  432|  13.1k|    data->progress.ul.total_size = 0;
  433|       |    data->progress.ul_size_known = FALSE;
  ------------------
  |  | 1054|  13.1k|#define FALSE false
  ------------------
  434|  13.1k|  }
  435|  13.1k|}
Curl_pgrsUpdate:
  710|   126k|{
  711|   126k|  return pgrs_update(data, Curl_pgrs_now(data));
  712|   126k|}
Curl_pgrsUpdate_nometer:
  728|  1.68k|{
  729|  1.68k|  (void)progress_calc(data, Curl_pgrs_now(data));
  730|  1.68k|}
Curl_pgrsCompleted:
  733|  10.7k|{
  734|  10.7k|  struct Progress * const p = &data->progress;
  735|  10.7k|  p->timespent = curlx_ptimediff_us(Curl_pgrs_now(data), &p->start);
  736|  10.7k|}
progress.c:pgrs_speedinit:
  125|  5.65k|{
  126|  5.65k|  memset(&data->state.keeps_speed, 0, sizeof(struct curltime));
  127|  5.65k|}
progress.c:pgrs_update:
  704|   126k|{
  705|       |  bool showprogress = progress_calc(data, pnow);
  706|   126k|  return pgrsupdate(data, showprogress);
  707|   126k|}
progress.c:pgrsupdate:
  657|   126k|{
  658|   126k|  if(!data->progress.hide) {
  ------------------
  |  Branch (658:6): [True: 237, False: 126k]
  ------------------
  659|    237|    int rc;
  660|    237|    if(data->set.fxferinfo) {
  ------------------
  |  Branch (660:8): [True: 0, False: 237]
  ------------------
  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|    237|    else if(data->set.fprogress) {
  ------------------
  |  Branch (677:13): [True: 0, False: 237]
  ------------------
  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|    237|    if(showprogress)
  ------------------
  |  Branch (695:8): [True: 22, False: 215]
  ------------------
  696|     22|      progress_meter(data);
  697|    237|  }
  698|       |
  699|   126k|  return CURLE_OK;
  700|   126k|}
progress.c:progress_meter:
  563|     22|{
  564|     22|  struct Progress *p = &data->progress;
  565|     22|  char max6[6][7];
  566|     22|  struct pgrs_estimate dl_estm;
  567|     22|  struct pgrs_estimate ul_estm;
  568|     22|  struct pgrs_estimate total_estm;
  569|     22|  curl_off_t total_cur_size;
  570|     22|  curl_off_t total_expected_size;
  571|     22|  curl_off_t dl_size;
  572|     22|  char time_left[8];
  573|     22|  char time_total[8];
  574|     22|  char time_spent[8];
  575|     22|  curl_off_t cur_secs = (curl_off_t)p->timespent / 1000000; /* seconds */
  576|       |
  577|     22|  if(!p->headers_out) {
  ------------------
  |  Branch (577:6): [True: 22, False: 0]
  ------------------
  578|     22|    if(data->state.resume_from) {
  ------------------
  |  Branch (578:8): [True: 14, False: 8]
  ------------------
  579|     14|      curl_mfprintf(data->set.err,
  580|     14|                    "** Resuming transfer from byte position %" FMT_OFF_T "\n",
  581|     14|                    data->state.resume_from);
  582|     14|    }
  583|     22|    curl_mfprintf(data->set.err,
  584|     22|                  "  %% Total    %% Received %% Xferd  Average Speed  "
  585|     22|                  "Time    Time    Time   Current\n"
  586|     22|                  "                                 Dload  Upload  "
  587|     22|                  "Total   Spent   Left   Speed\n");
  588|     22|    p->headers_out = TRUE; /* headers are shown */
  ------------------
  |  | 1051|     22|#define TRUE true
  ------------------
  589|     22|  }
  590|       |
  591|       |  /* Figure out the estimated time of arrival for upload and download */
  592|     22|  pgrs_estimates(&p->ul, (bool)p->ul_size_known, &ul_estm);
  593|     22|  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|     22|  total_estm.secs = CURLMAX(ul_estm.secs, dl_estm.secs);
  ------------------
  |  | 1291|     22|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 0, False: 22]
  |  |  ------------------
  ------------------
  597|       |  /* create the three time strings */
  598|     22|  time2str(time_left, sizeof(time_left),
  599|     22|           total_estm.secs > 0 ? (total_estm.secs - cur_secs) : 0);
  ------------------
  |  Branch (599:12): [True: 0, False: 22]
  ------------------
  600|     22|  time2str(time_total, sizeof(time_total), total_estm.secs);
  601|     22|  time2str(time_spent, sizeof(time_spent), cur_secs);
  602|       |
  603|       |  /* Get the total amount of data expected to get transferred */
  604|     22|  total_expected_size = p->ul_size_known ? p->ul.total_size : p->ul.cur_size;
  ------------------
  |  Branch (604:25): [True: 0, False: 22]
  ------------------
  605|       |
  606|     22|  dl_size = p->dl_size_known ? p->dl.total_size : p->dl.cur_size;
  ------------------
  |  Branch (606:13): [True: 0, False: 22]
  ------------------
  607|       |
  608|       |  /* integer overflow check */
  609|     22|  if((CURL_OFF_T_MAX - total_expected_size) < dl_size)
  ------------------
  |  |  590|     22|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (609:6): [True: 0, False: 22]
  ------------------
  610|      0|    total_expected_size = CURL_OFF_T_MAX; /* capped */
  ------------------
  |  |  590|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  611|     22|  else
  612|     22|    total_expected_size += dl_size;
  613|       |
  614|       |  /* We have transferred this much so far */
  615|     22|  total_cur_size = p->dl.cur_size + p->ul.cur_size;
  616|       |
  617|       |  /* Get the percentage of data transferred so far */
  618|     22|  total_estm.percent = pgrs_est_percent(total_expected_size, total_cur_size);
  619|       |
  620|     22|  curl_mfprintf(data->set.err,
  621|     22|                "\r"
  622|     22|                "%3" FMT_OFF_T " %s "
  623|     22|                "%3" FMT_OFF_T " %s "
  624|     22|                "%3" FMT_OFF_T " %s %s %s %s %s %s %s",
  625|     22|                total_estm.percent, /* 3 letters */    /* total % */
  626|     22|                max6out(total_expected_size, max6[2],
  627|     22|                        sizeof(max6[2])),              /* total size */
  628|     22|                dl_estm.percent, /* 3 letters */       /* rcvd % */
  629|     22|                max6out(p->dl.cur_size, max6[0],
  630|     22|                        sizeof(max6[0])),              /* rcvd size */
  631|     22|                ul_estm.percent, /* 3 letters */       /* xfer % */
  632|     22|                max6out(p->ul.cur_size, max6[1],
  633|     22|                        sizeof(max6[1])),              /* xfer size */
  634|     22|                max6out(p->dl.speed, max6[3],
  635|     22|                        sizeof(max6[3])),              /* avrg dl speed */
  636|     22|                max6out(p->ul.speed, max6[4],
  637|     22|                        sizeof(max6[4])),              /* avrg ul speed */
  638|     22|                time_total,    /* 7 letters */         /* total time */
  639|     22|                time_spent,    /* 7 letters */         /* time spent */
  640|     22|                time_left,     /* 7 letters */         /* time left */
  641|     22|                max6out(p->current_speed, max6[5],
  642|     22|                        sizeof(max6[5]))               /* current speed */
  643|     22|    );
  644|       |
  645|       |  /* we flush the output stream to make it appear as soon as possible */
  646|     22|  fflush(data->set.err);
  647|     22|}
progress.c:pgrs_estimates:
  553|     44|{
  554|     44|  est->secs = 0;
  555|     44|  est->percent = 0;
  556|     44|  if(total_known && (d->speed > 0)) {
  ------------------
  |  Branch (556:6): [True: 0, False: 44]
  |  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|     44|}
progress.c:pgrs_est_percent:
  542|     22|{
  543|     22|  if(total > 10000)
  ------------------
  |  Branch (543:6): [True: 0, False: 22]
  ------------------
  544|      0|    return cur / (total / 100);
  545|     22|  else if(total > 0)
  ------------------
  |  Branch (545:11): [True: 0, False: 22]
  ------------------
  546|      0|    return (cur * 100) / total;
  547|     22|  return 0;
  548|     22|}
progress.c:progress_calc:
  459|   128k|{
  460|   128k|  struct Progress * const p = &data->progress;
  461|   128k|  int i_next, i_oldest, i_latest;
  462|   128k|  timediff_t duration_us;
  463|   128k|  curl_off_t amount;
  464|       |
  465|       |  /* The time spent so far (from the start) in microseconds */
  466|   128k|  p->timespent = curlx_ptimediff_us(pnow, &p->start);
  467|   128k|  p->dl.speed = trspeed(p->dl.cur_size, p->timespent);
  468|   128k|  p->ul.speed = trspeed(p->ul.cur_size, p->timespent);
  469|       |
  470|   128k|  if(!p->speeder_c) { /* no previous record exists */
  ------------------
  |  Branch (470:6): [True: 3.21k, False: 124k]
  ------------------
  471|  3.21k|    p->speed_amount[0] = p->dl.cur_size + p->ul.cur_size;
  472|  3.21k|    p->speed_time[0] = *pnow;
  473|  3.21k|    p->speeder_c++;
  474|       |    /* use the overall average at the start */
  475|  3.21k|    p->current_speed = p->ul.speed + p->dl.speed;
  476|  3.21k|    p->lastshow = pnow->tv_sec;
  477|  3.21k|    return TRUE;
  ------------------
  |  | 1051|  3.21k|#define TRUE true
  ------------------
  478|  3.21k|  }
  479|       |  /* We have at least one record now. Where to put the next and
  480|       |   * where is the latest one? */
  481|   124k|  i_next = p->speeder_c % CURL_SPEED_RECORDS;
  ------------------
  |  |  479|   124k|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  482|   124k|  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: 124k, False: 0]
  ------------------
  483|       |
  484|       |  /* Make a new record only when some time has passed.
  485|       |   * Too frequent calls otherwise ruin the history. */
  486|   124k|  if(curlx_ptimediff_ms(pnow, &p->speed_time[i_latest]) >= 1000) {
  ------------------
  |  Branch (486:6): [True: 0, False: 124k]
  ------------------
  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|   124k|  else if(data->req.done) {
  ------------------
  |  Branch (492:11): [True: 0, False: 124k]
  ------------------
  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|      0|    if(!p->current_speed) {
  ------------------
  |  Branch (497:8): [True: 0, False: 0]
  ------------------
  498|      0|      p->speed_amount[i_latest] = p->dl.cur_size + p->ul.cur_size;
  499|      0|      p->speed_time[i_latest] = *pnow;
  500|      0|    }
  501|      0|  }
  502|   124k|  else {
  503|       |    /* transfer ongoing, wait for more time to pass. */
  504|   124k|    return FALSE;
  ------------------
  |  | 1054|   124k|#define FALSE false
  ------------------
  505|   124k|  }
  506|       |
  507|      0|  i_oldest = (p->speeder_c < CURL_SPEED_RECORDS) ? 0 :
  ------------------
  |  |  479|      0|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  |  Branch (507:14): [True: 0, False: 0]
  ------------------
  508|      0|             ((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|      0|  amount = p->speed_amount[i_latest] - p->speed_amount[i_oldest];
  512|       |  /* How long this took */
  513|      0|  duration_us = curlx_ptimediff_us(&p->speed_time[i_latest],
  514|      0|                                   &p->speed_time[i_oldest]);
  515|      0|  if(duration_us <= 0)
  ------------------
  |  Branch (515:6): [True: 0, False: 0]
  ------------------
  516|      0|    duration_us = 1;
  517|       |
  518|      0|  if(amount > (CURL_OFF_T_MAX / 1000000)) {
  ------------------
  |  |  590|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (518:6): [True: 0, False: 0]
  ------------------
  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|      0|  else {
  525|      0|    p->current_speed = amount * 1000000 / duration_us;
  526|      0|  }
  527|       |
  528|      0|  if((p->lastshow == pnow->tv_sec) && !data->req.done)
  ------------------
  |  Branch (528:6): [True: 0, False: 0]
  |  Branch (528:39): [True: 0, False: 0]
  ------------------
  529|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  530|      0|  p->lastshow = pnow->tv_sec;
  531|       |  return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  532|      0|}
progress.c:trspeed:
  445|   256k|{
  446|   256k|  if(us < 1)
  ------------------
  |  Branch (446:6): [True: 6, False: 256k]
  ------------------
  447|      6|    return size * 1000000;
  448|   256k|  else if(size < CURL_OFF_T_MAX / 1000000)
  ------------------
  |  |  590|   256k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (448:11): [True: 256k, False: 0]
  ------------------
  449|   256k|    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|   256k|}

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

cidr4_match:
   59|    815|{
   60|    815|  unsigned int address = 0;
   61|    815|  unsigned int check = 0;
   62|       |
   63|    815|  if(bits > 32)
  ------------------
  |  Branch (63:6): [True: 6, False: 809]
  ------------------
   64|       |    /* strange input */
   65|      6|    return FALSE;
  ------------------
  |  | 1054|      6|#define FALSE false
  ------------------
   66|       |
   67|    809|  if(curlx_inet_pton(AF_INET, ipv4, &address) != 1)
  ------------------
  |  Branch (67:6): [True: 0, False: 809]
  ------------------
   68|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
   69|    809|  if(curlx_inet_pton(AF_INET, network, &check) != 1)
  ------------------
  |  Branch (69:6): [True: 764, False: 45]
  ------------------
   70|    764|    return FALSE;
  ------------------
  |  | 1054|    764|#define FALSE false
  ------------------
   71|       |
   72|     45|  if(bits && (bits != 32)) {
  ------------------
  |  Branch (72:6): [True: 26, False: 19]
  |  Branch (72:14): [True: 16, False: 10]
  ------------------
   73|     16|    unsigned int mask = 0xffffffff << (32 - bits);
   74|     16|    unsigned int haddr = htonl(address);
   75|     16|    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|     16|    if((haddr ^ hcheck) & mask)
  ------------------
  |  Branch (82:8): [True: 15, False: 1]
  ------------------
   83|     15|      return FALSE;
  ------------------
  |  | 1054|     15|#define FALSE false
  ------------------
   84|      1|    return TRUE;
  ------------------
  |  | 1051|      1|#define TRUE true
  ------------------
   85|     16|  }
   86|     29|  return address == check;
   87|     45|}
cidr6_match:
   94|    351|{
   95|    351|#ifdef USE_IPV6
   96|    351|  unsigned int bytes;
   97|    351|  unsigned int rest;
   98|    351|  unsigned char address[16];
   99|    351|  unsigned char check[16];
  100|       |
  101|    351|  if(!bits)
  ------------------
  |  Branch (101:6): [True: 347, False: 4]
  ------------------
  102|    347|    bits = 128;
  103|       |
  104|    351|  bytes = bits / 8;
  105|    351|  rest = bits & 0x07;
  106|    351|  if((bytes > 16) || ((bytes == 16) && rest))
  ------------------
  |  Branch (106:6): [True: 0, False: 351]
  |  Branch (106:23): [True: 347, False: 4]
  |  Branch (106:40): [True: 0, False: 347]
  ------------------
  107|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  108|    351|  if(curlx_inet_pton(AF_INET6, ipv6, address) != 1)
  ------------------
  |  Branch (108:6): [True: 0, False: 351]
  ------------------
  109|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  110|    351|  if(curlx_inet_pton(AF_INET6, network, check) != 1)
  ------------------
  |  Branch (110:6): [True: 312, False: 39]
  ------------------
  111|    312|    return FALSE;
  ------------------
  |  | 1054|    312|#define FALSE false
  ------------------
  112|     39|  if(bytes && memcmp(address, check, bytes))
  ------------------
  |  Branch (112:6): [True: 38, False: 1]
  |  Branch (112:15): [True: 36, False: 2]
  ------------------
  113|     36|    return FALSE;
  ------------------
  |  | 1054|     36|#define FALSE false
  ------------------
  114|      3|  if(rest && ((address[bytes] ^ check[bytes]) & (0xff << (8 - rest))))
  ------------------
  |  Branch (114:6): [True: 1, False: 2]
  |  Branch (114:14): [True: 0, False: 1]
  ------------------
  115|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  116|       |
  117|      3|  return TRUE;
  ------------------
  |  | 1051|      3|#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|  5.84k|{
  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|  5.84k|  if(!name || name[0] == '\0')
  ------------------
  |  Branch (204:6): [True: 0, False: 5.84k]
  |  Branch (204:15): [True: 0, False: 5.84k]
  ------------------
  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|  5.84k|  if(no_proxy && no_proxy[0]) {
  ------------------
  |  Branch (212:6): [True: 242, False: 5.60k]
  |  Branch (212:18): [True: 239, False: 3]
  ------------------
  213|    239|    const char *p = no_proxy;
  214|    239|    size_t namelen;
  215|    239|    char address[16];
  216|    239|    enum nametype type = TYPE_HOST;
  217|    239|    if(!strcmp("*", no_proxy))
  ------------------
  |  Branch (217:8): [True: 1, False: 238]
  ------------------
  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|    238|    namelen = strlen(name);
  224|    238|    if(curlx_inet_pton(AF_INET, name, &address) == 1)
  ------------------
  |  Branch (224:8): [True: 90, False: 148]
  ------------------
  225|     90|      type = TYPE_IPV4;
  226|    148|#ifdef USE_IPV6
  227|    148|    else if(curlx_inet_pton(AF_INET6, name, &address) == 1)
  ------------------
  |  Branch (227:13): [True: 51, False: 97]
  ------------------
  228|     51|      type = TYPE_IPV6;
  229|     97|#endif
  230|     97|    else {
  231|       |      /* ignore trailing dots in the hostname */
  232|     97|      if(name[namelen - 1] == '.')
  ------------------
  |  Branch (232:10): [True: 4, False: 93]
  ------------------
  233|      4|        namelen--;
  234|     97|    }
  235|       |
  236|  3.89k|    while(*p) {
  ------------------
  |  Branch (236:11): [True: 3.86k, False: 28]
  ------------------
  237|  3.86k|      const char *token;
  238|  3.86k|      size_t tokenlen = 0;
  239|       |
  240|       |      /* pass blanks */
  241|  3.86k|      curlx_str_passblanks(&p);
  242|       |
  243|  3.86k|      token = p;
  244|       |      /* pass over the pattern */
  245|   252k|      while(*p && !ISBLANK(*p) && (*p != ',')) {
  ------------------
  |  |   45|   505k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 107, False: 252k]
  |  |  |  Branch (45:38): [True: 26, False: 252k]
  |  |  ------------------
  ------------------
  |  Branch (245:13): [True: 252k, False: 180]
  |  Branch (245:35): [True: 248k, False: 3.55k]
  ------------------
  246|   248k|        p++;
  247|   248k|        tokenlen++;
  248|   248k|      }
  249|       |
  250|  3.86k|      if(tokenlen) {
  ------------------
  |  Branch (250:10): [True: 3.78k, False: 85]
  ------------------
  251|  3.78k|        bool match = FALSE;
  ------------------
  |  | 1054|  3.78k|#define FALSE false
  ------------------
  252|  3.78k|        if(type == TYPE_HOST)
  ------------------
  |  Branch (252:12): [True: 2.24k, False: 1.54k]
  ------------------
  253|  2.24k|          match = match_host(token, tokenlen, name, namelen);
  254|  1.54k|        else
  255|  1.54k|          match = match_ip(type, token, tokenlen, name);
  256|       |
  257|  3.78k|        if(match)
  ------------------
  |  Branch (257:12): [True: 7, False: 3.77k]
  ------------------
  258|      7|          return TRUE;
  ------------------
  |  | 1051|      7|#define TRUE true
  ------------------
  259|  3.78k|      }
  260|       |
  261|       |      /* pass blanks after pattern */
  262|  3.86k|      curlx_str_passblanks(&p);
  263|       |      /* if not a comma, this ends the loop */
  264|  3.86k|      if(*p != ',')
  ------------------
  |  Branch (264:10): [True: 203, False: 3.65k]
  ------------------
  265|    203|        break;
  266|       |      /* pass any number of commas */
  267|  8.79k|      while(*p == ',')
  ------------------
  |  Branch (267:13): [True: 5.13k, False: 3.65k]
  ------------------
  268|  5.13k|        p++;
  269|  3.65k|    } /* while(*p) */
  270|    238|  } /* NO_PROXY was specified and it was not only an asterisk */
  271|       |
  272|  5.83k|  return FALSE;
  ------------------
  |  | 1054|  5.83k|#define FALSE false
  ------------------
  273|  5.84k|}
Curl_proxy_init_conn:
  521|  5.84k|{
  522|  5.84k|  char *proxy = NULL;
  523|  5.84k|  char *pre_proxy = NULL;
  524|  5.84k|  bool do_env_detect = TRUE;
  ------------------
  |  | 1051|  5.84k|#define TRUE true
  ------------------
  525|  5.84k|  CURLcode result = CURLE_OK;
  526|       |
  527|       |  /* Enforce no proxy use unless we decide to use one */
  528|  5.84k|  conn->bits.origin_is_proxy = FALSE;
  ------------------
  |  | 1054|  5.84k|#define FALSE false
  ------------------
  529|  5.84k|  DEBUGASSERT(!conn->socks_proxy.peer);
  ------------------
  |  | 1077|  5.84k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (529:3): [True: 0, False: 5.84k]
  |  Branch (529:3): [True: 5.84k, False: 0]
  ------------------
  530|  5.84k|  DEBUGASSERT(!conn->http_proxy.peer);
  ------------------
  |  | 1077|  5.84k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (530:3): [True: 0, False: 5.84k]
  |  Branch (530:3): [True: 5.84k, False: 0]
  ------------------
  531|       |
  532|  5.84k|  if(proxy_do_not_proxy(data))
  ------------------
  |  Branch (532:6): [True: 8, False: 5.83k]
  ------------------
  533|      8|    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|  5.83k|  if(data->set.str[STRING_PROXY]) {
  ------------------
  |  Branch (539:6): [True: 2.22k, False: 3.61k]
  ------------------
  540|  2.22k|    if(*data->set.str[STRING_PROXY]) {
  ------------------
  |  Branch (540:8): [True: 2.22k, False: 1]
  ------------------
  541|  2.22k|      proxy = curlx_strdup(data->set.str[STRING_PROXY]);
  ------------------
  |  | 1482|  2.22k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  542|       |      /* if global proxy is set, this is it */
  543|  2.22k|      if(!proxy) {
  ------------------
  |  Branch (543:10): [True: 0, False: 2.22k]
  ------------------
  544|      0|        failf(data, "memory shortage");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  545|      0|        result = CURLE_OUT_OF_MEMORY;
  546|      0|        goto out;
  547|      0|      }
  548|  2.22k|    }
  549|      1|    else
  550|      1|      do_env_detect = FALSE;
  ------------------
  |  | 1054|      1|#define FALSE false
  ------------------
  551|  2.22k|  }
  552|       |
  553|  5.83k|  if(data->set.str[STRING_PRE_PROXY]) {
  ------------------
  |  Branch (553:6): [True: 398, False: 5.44k]
  ------------------
  554|    398|    if(*data->set.str[STRING_PRE_PROXY]) {
  ------------------
  |  Branch (554:8): [True: 395, False: 3]
  ------------------
  555|    395|      pre_proxy = curlx_strdup(data->set.str[STRING_PRE_PROXY]);
  ------------------
  |  | 1482|    395|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  556|       |      /* if global socks proxy is set, this is it */
  557|    395|      if(!pre_proxy) {
  ------------------
  |  Branch (557:10): [True: 0, False: 395]
  ------------------
  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|    395|    }
  563|      3|    else
  564|      3|      do_env_detect = FALSE;
  ------------------
  |  | 1054|      3|#define FALSE false
  ------------------
  565|    398|  }
  566|       |
  567|  5.83k|#ifndef CURL_DISABLE_HTTP
  568|       |  /* None configured, detect possible proxy from environment. */
  569|  5.83k|  if(!proxy && !pre_proxy && do_env_detect)
  ------------------
  |  Branch (569:6): [True: 3.61k, False: 2.22k]
  |  Branch (569:16): [True: 3.26k, False: 344]
  |  Branch (569:30): [True: 3.26k, False: 4]
  ------------------
  570|  3.26k|    proxy = proxy_detect_proxy(data, conn->scheme);
  571|       |#else
  572|       |  (void)do_env_detect;
  573|       |#endif /* CURL_DISABLE_HTTP */
  574|       |
  575|  5.83k|  if(!proxy && !pre_proxy)
  ------------------
  |  Branch (575:6): [True: 3.61k, False: 2.22k]
  |  Branch (575:16): [True: 3.26k, False: 344]
  ------------------
  576|  3.26k|    goto out;
  577|       |
  578|  2.57k|  if(pre_proxy) {
  ------------------
  |  Branch (578:6): [True: 395, False: 2.17k]
  ------------------
  579|    395|    result = parse_proxy(data, pre_proxy, TRUE, &conn->socks_proxy);
  ------------------
  |  | 1051|    395|#define TRUE true
  ------------------
  580|    395|    if(result)
  ------------------
  |  Branch (580:8): [True: 7, False: 388]
  ------------------
  581|      7|      goto out;
  582|    395|  }
  583|       |
  584|  2.56k|  if(proxy) {
  ------------------
  |  Branch (584:6): [True: 2.22k, False: 338]
  ------------------
  585|  2.22k|    result = parse_proxy(data, proxy, FALSE, &conn->http_proxy);
  ------------------
  |  | 1054|  2.22k|#define FALSE false
  ------------------
  586|  2.22k|    if(result)
  ------------------
  |  Branch (586:8): [True: 6, False: 2.22k]
  ------------------
  587|      6|      goto out;
  588|       |
  589|  2.22k|    switch(conn->http_proxy.proxytype) {
  590|      3|    case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|      3|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (590:5): [True: 3, False: 2.21k]
  ------------------
  591|      7|    case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|      7|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (591:5): [True: 4, False: 2.21k]
  ------------------
  592|     38|    case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|     38|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (592:5): [True: 31, False: 2.18k]
  ------------------
  593|     44|    case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|     44|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (593:5): [True: 6, False: 2.21k]
  ------------------
  594|       |      /* Whoops, it is not an HTTP proxy */
  595|     44|      if(pre_proxy) {
  ------------------
  |  Branch (595:10): [True: 1, False: 43]
  ------------------
  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|     43|      conn->socks_proxy = conn->http_proxy;
  604|     43|      memset(&conn->http_proxy, 0, sizeof(conn->http_proxy));
  605|     43|      break;
  606|  2.17k|    default:
  ------------------
  |  Branch (606:5): [True: 2.17k, False: 44]
  ------------------
  607|       |      /* all other types are HTTP */
  608|  2.17k|      break;
  609|  2.22k|    }
  610|  2.22k|  }
  611|       |
  612|  2.55k|  if(conn->socks_proxy.peer) {
  ------------------
  |  Branch (612:6): [True: 429, False: 2.12k]
  ------------------
  613|    429|    DEBUGASSERT(!CURL_PROXY_IS_ANY_HTTP(conn->socks_proxy.proxytype));
  ------------------
  |  | 1077|    429|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (613:5): [True: 429, 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: 429]
  |  Branch (613:5): [True: 0, False: 429]
  |  Branch (613:5): [True: 0, False: 429]
  |  Branch (613:5): [True: 0, False: 429]
  |  Branch (613:5): [True: 0, False: 429]
  ------------------
  614|    429|  }
  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.55k|  if(conn->http_proxy.peer) {
  ------------------
  |  Branch (624:6): [True: 2.17k, False: 381]
  ------------------
  625|  2.17k|    const struct Curl_scheme *scheme = data->state.origin->scheme;
  626|  2.17k|    bool tunnel_proxy = (bool)data->set.tunnel_thru_httpproxy;
  627|  2.17k|    DEBUGASSERT(CURL_PROXY_IS_ANY_HTTP(conn->http_proxy.proxytype));
  ------------------
  |  | 1077|  2.17k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (627:5): [True: 2.17k, 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.75k, False: 418]
  |  Branch (627:5): [True: 1, False: 417]
  |  Branch (627:5): [True: 415, False: 2]
  |  Branch (627:5): [True: 2, False: 0]
  |  Branch (627:5): [True: 0, False: 0]
  ------------------
  628|       |
  629|  2.17k|    if(!tunnel_proxy) {
  ------------------
  |  Branch (629:8): [True: 2.17k, False: 1]
  ------------------
  630|       |      /* Decide if we tunnel through proxy automatically */
  631|  2.17k|      if(conn->via_peer) {
  ------------------
  |  Branch (631:10): [True: 2.17k, False: 0]
  ------------------
  632|       |        /* With connect-to, we always tunnel */
  633|  2.17k|        tunnel_proxy = TRUE;
  ------------------
  |  | 1051|  2.17k|#define TRUE true
  ------------------
  634|  2.17k|      }
  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|  2.17k|    }
  649|       |
  650|  2.17k|    if(!tunnel_proxy) {
  ------------------
  |  Branch (650:8): [True: 0, False: 2.17k]
  ------------------
  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|  2.17k|#ifndef CURL_DISABLE_DIGEST_AUTH
  660|  2.17k|    if(!Curl_safecmp(data->state.envproxy, proxy)) {
  ------------------
  |  Branch (660:8): [True: 2.17k, False: 0]
  ------------------
  661|       |      /* proxy changed */
  662|  2.17k|      Curl_auth_digest_cleanup(&data->state.proxydigest);
  663|  2.17k|      curlx_free(data->state.envproxy);
  ------------------
  |  | 1488|  2.17k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  664|  2.17k|      data->state.envproxy = curlx_strdup(proxy);
  ------------------
  |  | 1482|  2.17k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  665|  2.17k|    }
  666|  2.17k|#endif
  667|  2.17k|  }
  668|  2.55k|#endif /* !CURL_DISABLE_HTTP */
  669|       |
  670|  5.84k|out:
  671|  5.84k|  curlx_free(pre_proxy);
  ------------------
  |  | 1488|  5.84k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  672|  5.84k|  curlx_free(proxy);
  ------------------
  |  | 1488|  5.84k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  673|  5.84k|  return result;
  674|  2.55k|}
proxy.c:match_host:
  134|  2.24k|{
  135|  2.24k|  bool match = FALSE;
  ------------------
  |  | 1054|  2.24k|#define FALSE false
  ------------------
  136|       |
  137|       |  /* ignore trailing dots in the token to check */
  138|  2.24k|  if(token[tokenlen - 1] == '.')
  ------------------
  |  Branch (138:6): [True: 402, False: 1.83k]
  ------------------
  139|    402|    tokenlen--;
  140|       |
  141|  2.24k|  if(tokenlen && (*token == '.')) {
  ------------------
  |  Branch (141:6): [True: 2.06k, False: 176]
  |  Branch (141:18): [True: 209, False: 1.85k]
  ------------------
  142|       |    /* ignore leading token dot as well */
  143|    209|    token++;
  144|    209|    tokenlen--;
  145|    209|  }
  146|       |  /* A: example.com matches 'example.com'
  147|       |     B: www.example.com matches 'example.com'
  148|       |     C: nonexample.com DOES NOT match 'example.com'
  149|       |  */
  150|  2.24k|  if(tokenlen == namelen)
  ------------------
  |  Branch (150:6): [True: 496, False: 1.74k]
  ------------------
  151|       |    /* case A, exact match */
  152|    496|    match = curl_strnequal(token, name, namelen);
  153|  1.74k|  else if(tokenlen < namelen) {
  ------------------
  |  Branch (153:11): [True: 781, False: 963]
  ------------------
  154|       |    /* case B, tailmatch domain */
  155|    781|    match = (name[namelen - tokenlen - 1] == '.') &&
  ------------------
  |  Branch (155:13): [True: 245, False: 536]
  ------------------
  156|    245|            curl_strnequal(token, name + (namelen - tokenlen), tokenlen);
  ------------------
  |  Branch (156:13): [True: 2, False: 243]
  ------------------
  157|    781|  }
  158|       |  /* case C passes through, not a match */
  159|  2.24k|  return match;
  160|  2.24k|}
proxy.c:match_ip:
  164|  1.54k|{
  165|  1.54k|  char *slash;
  166|  1.54k|  unsigned int bits = 0;
  167|  1.54k|  char checkip[128];
  168|  1.54k|  if(tokenlen >= sizeof(checkip))
  ------------------
  |  Branch (168:6): [True: 46, False: 1.49k]
  ------------------
  169|       |    /* this cannot match */
  170|     46|    return FALSE;
  ------------------
  |  | 1054|     46|#define FALSE false
  ------------------
  171|       |  /* copy the check name to a temp buffer */
  172|  1.49k|  memcpy(checkip, token, tokenlen);
  173|  1.49k|  checkip[tokenlen] = 0;
  174|       |
  175|  1.49k|  slash = strchr(checkip, '/');
  176|       |  /* if the slash is part of this token, use it */
  177|  1.49k|  if(slash) {
  ------------------
  |  Branch (177:6): [True: 380, False: 1.11k]
  ------------------
  178|    380|    curl_off_t value;
  179|    380|    const char *p = &slash[1];
  180|    380|    if(curlx_str_number(&p, &value, 128) || *p)
  ------------------
  |  Branch (180:8): [True: 310, False: 70]
  |  Branch (180:45): [True: 21, False: 49]
  ------------------
  181|    331|      return FALSE;
  ------------------
  |  | 1054|    331|#define FALSE false
  ------------------
  182|       |    /* a too large value is rejected in the cidr function below */
  183|     49|    bits = (unsigned int)value;
  184|     49|    *slash = 0; /* null-terminate there */
  185|     49|  }
  186|  1.16k|  if(type == TYPE_IPV6)
  ------------------
  |  Branch (186:6): [True: 351, False: 815]
  ------------------
  187|    351|    return cidr6_match(name, checkip, bits);
  188|    815|  else
  189|    815|    return cidr4_match(name, checkip, bits);
  190|  1.16k|}
proxy.c:proxy_do_not_proxy:
  492|  5.84k|{
  493|  5.84k|  const char *no_proxy;
  494|  5.84k|  char *env_no_proxy = NULL;
  495|  5.84k|  bool do_not_proxy;
  496|       |
  497|       |  /* no proxying if the transfer does not use the network */
  498|  5.84k|  if(data->state.origin->scheme->flags & PROTOPT_NONETWORK)
  ------------------
  |  |  215|  5.84k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (498:6): [True: 0, False: 5.84k]
  ------------------
  499|      0|    return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  500|       |
  501|  5.84k|  no_proxy = data->set.str[STRING_NOPROXY];
  502|  5.84k|  if(!no_proxy) {
  ------------------
  |  Branch (502:6): [True: 5.60k, False: 242]
  ------------------
  503|  5.60k|    const char *p = "no_proxy";
  504|  5.60k|    env_no_proxy = curl_getenv(p);
  505|  5.60k|    if(!env_no_proxy) {
  ------------------
  |  Branch (505:8): [True: 5.60k, False: 0]
  ------------------
  506|  5.60k|      p = "NO_PROXY";
  507|  5.60k|      env_no_proxy = curl_getenv(p);
  508|  5.60k|    }
  509|  5.60k|    if(env_no_proxy)
  ------------------
  |  Branch (509:8): [True: 0, False: 5.60k]
  ------------------
  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|  5.60k|    no_proxy = env_no_proxy;
  512|  5.60k|  }
  513|       |
  514|  5.84k|  do_not_proxy = proxy_check_noproxy(data->state.origin->hostname, no_proxy);
  515|       |  curlx_safefree(env_no_proxy);
  ------------------
  |  | 1332|  5.84k|  do {                      \
  |  | 1333|  5.84k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  5.84k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  5.84k|    (ptr) = NULL;           \
  |  | 1335|  5.84k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 5.84k]
  |  |  ------------------
  ------------------
  516|  5.84k|  return do_not_proxy;
  517|  5.84k|}
proxy.c:proxy_detect_proxy:
  284|  3.26k|{
  285|       |  /* If proxy was not specified, we check for default proxy environment
  286|       |   * variables, to enable i.e Lynx compliance:
  287|       |   *
  288|       |   * http_proxy=http://some.server.dom:port/
  289|       |   * https_proxy=http://some.server.dom:port/
  290|       |   * ftp_proxy=http://some.server.dom:port/
  291|       |   * no_proxy=domain1.dom,host.domain2.dom
  292|       |   *   (a comma-separated list of hosts which should
  293|       |   *   not be proxied, or an asterisk to override
  294|       |   *   all proxy variables)
  295|       |   * all_proxy=http://some.server.dom:port/
  296|       |   *   (seems to exist for the CERN www lib. Probably
  297|       |   *   the first to check for.)
  298|       |   *
  299|       |   * For compatibility, the all-uppercase versions of these variables are
  300|       |   * checked if the lowercase versions do not exist.
  301|       |   */
  302|  3.26k|  const char *env_name = NULL;
  303|  3.26k|  char *proxy = NULL;
  304|  3.26k|  char name_buf[20];
  305|       |
  306|       |  /* Try scheme specific env var first, unless http(s).
  307|       |   * lowercase first, then uppercase. */
  308|  3.26k|  if((scheme != &Curl_scheme_https) && (scheme != &Curl_scheme_http)) {
  ------------------
  |  Branch (308:6): [True: 25, False: 3.23k]
  |  Branch (308:40): [True: 0, False: 25]
  ------------------
  309|      0|    curl_msnprintf(name_buf, sizeof(name_buf), "%s_proxy", scheme->name);
  310|      0|    env_name = name_buf;
  311|      0|    proxy = curl_getenv(env_name);
  312|      0|    if(!proxy) {
  ------------------
  |  Branch (312:8): [True: 0, False: 0]
  ------------------
  313|      0|      Curl_strntoupper(name_buf, name_buf, sizeof(name_buf));
  314|      0|      proxy = curl_getenv(env_name);
  315|      0|    }
  316|      0|  }
  317|       |
  318|  3.26k|  if(!proxy &&
  ------------------
  |  Branch (318:6): [True: 3.26k, False: 0]
  ------------------
  319|  3.26k|     ((scheme == &Curl_scheme_https) || (scheme == &Curl_scheme_wss))) {
  ------------------
  |  Branch (319:7): [True: 3.23k, False: 25]
  |  Branch (319:41): [True: 0, False: 25]
  ------------------
  320|       |    /* Not found, check 'https' env vars, also for 'wss'.
  321|       |     * Again, first lowercase then uppercase. */
  322|  3.23k|    env_name = "https_proxy";
  323|  3.23k|    proxy = curl_getenv(env_name);
  324|  3.23k|    if(!proxy) {
  ------------------
  |  Branch (324:8): [True: 3.23k, False: 0]
  ------------------
  325|  3.23k|      env_name = "HTTPS_PROXY";
  326|  3.23k|      proxy = curl_getenv(env_name);
  327|  3.23k|    }
  328|  3.23k|  }
  329|     25|  else if(!proxy &&
  ------------------
  |  Branch (329:11): [True: 25, False: 0]
  ------------------
  330|     25|          ((scheme == &Curl_scheme_http) || (scheme == &Curl_scheme_ws))) {
  ------------------
  |  Branch (330:12): [True: 25, False: 0]
  |  Branch (330:45): [True: 0, False: 0]
  ------------------
  331|       |    /* Not found, check 'http' env vars, also for 'ws'.
  332|       |     * We do NOT try the uppercase version 'HTTP_PROXY' because of
  333|       |     * security reasons:
  334|       |     *
  335|       |     * When curl is used in a webserver application
  336|       |     * environment (cgi or php), this environment variable can
  337|       |     * be controlled by the web server user by setting the
  338|       |     * http header 'Proxy:' to some value.
  339|       |     *
  340|       |     * This can cause 'internal' http/ftp requests to be
  341|       |     * arbitrarily redirected by any external attacker.
  342|       |     */
  343|     25|    env_name = "http_proxy";
  344|     25|    proxy = curl_getenv(env_name);
  345|     25|  }
  346|       |
  347|  3.26k|  if(!proxy) {
  ------------------
  |  Branch (347:6): [True: 3.26k, False: 0]
  ------------------
  348|       |    /* still not found, last resort checks. */
  349|  3.26k|    env_name = "all_proxy";
  350|  3.26k|    proxy = curl_getenv(env_name);
  351|  3.26k|    if(!proxy) {
  ------------------
  |  Branch (351:8): [True: 3.26k, False: 0]
  ------------------
  352|  3.26k|      env_name = "ALL_PROXY";
  353|  3.26k|      proxy = curl_getenv(env_name);
  354|  3.26k|    }
  355|  3.26k|  }
  356|       |
  357|  3.26k|  if(proxy)
  ------------------
  |  Branch (357:6): [True: 0, False: 3.26k]
  ------------------
  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|  3.26k|  return proxy;
  361|  3.26k|}
proxy.c:parse_proxy:
  373|  2.62k|{
  374|  2.62k|  char *proxyuser = NULL;
  375|  2.62k|  char *proxypasswd = NULL;
  376|  2.62k|  char *scheme = NULL;
  377|  2.62k|  CURLcode result = CURLE_OK;
  378|       |  /* Set the start proxy type for URL scheme guessing */
  379|  2.62k|  uint8_t proxytype = for_pre_proxy ? CURLPROXY_SOCKS4 : data->set.proxytype;
  ------------------
  |  |  798|    395|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (379:23): [True: 395, False: 2.22k]
  ------------------
  380|  2.62k|  CURLU *uhp = curl_url();
  381|  2.62k|  CURLUcode uc;
  382|       |
  383|  2.62k|  if(!uhp) {
  ------------------
  |  Branch (383:6): [True: 0, False: 2.62k]
  ------------------
  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.62k|  uc = curl_url_set(uhp, CURLUPART_URL, proxy,
  390|  2.62k|                    CURLU_NON_SUPPORT_SCHEME | CURLU_GUESS_SCHEME);
  ------------------
  |  |   90|  2.62k|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
                                  CURLU_NON_SUPPORT_SCHEME | CURLU_GUESS_SCHEME);
  ------------------
  |  |   96|  2.62k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  391|  2.62k|  if(!uc) {
  ------------------
  |  Branch (391:6): [True: 2.61k, False: 4]
  ------------------
  392|       |    /* parsed okay as a URL - only update proxytype when scheme was explicit */
  393|  2.61k|    uc = curl_url_get(uhp, CURLUPART_SCHEME, &scheme, CURLU_NO_GUESS_SCHEME);
  ------------------
  |  |  105|  2.61k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  394|  2.61k|    if(!uc) {
  ------------------
  |  Branch (394:8): [True: 416, False: 2.20k]
  ------------------
  395|    416|      result = Curl_scheme_to_proxytype(data, scheme, &proxytype, proxy);
  396|    416|      if(result)
  ------------------
  |  Branch (396:10): [True: 1, False: 415]
  ------------------
  397|      1|        goto error;
  398|    416|    }
  399|  2.20k|    else if(uc != CURLUE_NO_SCHEME) {
  ------------------
  |  Branch (399:13): [True: 0, False: 2.20k]
  ------------------
  400|      0|      result = CURLE_OUT_OF_MEMORY;
  401|      0|      goto error;
  402|      0|    }
  403|       |    /* else: no explicit scheme, keep the configured proxytype */
  404|  2.61k|  }
  405|      4|  else {
  406|      4|    failf(data, "Unsupported proxy syntax in \'%s\': %s", proxy,
  ------------------
  |  |   62|      4|#define failf Curl_failf
  ------------------
  407|      4|          curl_url_strerror(uc));
  408|      4|    result = CURLE_COULDNT_RESOLVE_PROXY;
  409|      4|    goto error;
  410|      4|  }
  411|       |
  412|  2.61k|  result = Curl_peer_from_proxy_url(uhp, data, proxy, proxytype,
  413|  2.61k|                                    &proxyinfo->peer, &proxytype);
  414|  2.61k|  if(result)
  ------------------
  |  Branch (414:6): [True: 5, False: 2.61k]
  ------------------
  415|      5|    goto error;
  416|       |
  417|  2.61k|  switch(proxytype) {
  418|  1.75k|    case CURLPROXY_HTTP:
  ------------------
  |  |  790|  1.75k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  |  Branch (418:5): [True: 1.75k, False: 853]
  ------------------
  419|  1.75k|    case CURLPROXY_HTTP_1_0:
  ------------------
  |  |  792|  1.75k|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (419:5): [True: 1, False: 2.61k]
  ------------------
  420|  2.17k|    case CURLPROXY_HTTPS:
  ------------------
  |  |  794|  2.17k|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  ------------------
  |  Branch (420:5): [True: 416, False: 2.19k]
  ------------------
  421|  2.17k|    case CURLPROXY_HTTPS2:
  ------------------
  |  |  796|  2.17k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (421:5): [True: 2, False: 2.60k]
  ------------------
  422|  2.17k|    case CURLPROXY_HTTPS3:
  ------------------
  |  |  805|  2.17k|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (422:5): [True: 0, False: 2.61k]
  ------------------
  423|  2.17k|      if(for_pre_proxy) {
  ------------------
  |  Branch (423:10): [True: 1, False: 2.17k]
  ------------------
  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|  2.17k|      break;
  429|  2.17k|    case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|    393|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (429:5): [True: 393, False: 2.21k]
  ------------------
  430|    397|    case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|    397|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (430:5): [True: 4, False: 2.60k]
  ------------------
  431|    428|    case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|    428|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (431:5): [True: 31, False: 2.58k]
  ------------------
  432|    434|    case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|    434|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (432:5): [True: 6, False: 2.60k]
  ------------------
  433|    434|      break;
  434|      0|    default:
  ------------------
  |  Branch (434:5): [True: 0, False: 2.61k]
  ------------------
  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.61k|  }
  439|       |
  440|       |  /* Is there a username and password given in this proxy URL? */
  441|  2.61k|  uc = curl_url_get(uhp, CURLUPART_USER, &proxyuser, CURLU_URLDECODE);
  ------------------
  |  |   93|  2.61k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  442|  2.61k|  if(uc && (uc != CURLUE_NO_USER)) {
  ------------------
  |  Branch (442:6): [True: 1.21k, False: 1.39k]
  |  Branch (442:12): [True: 1, False: 1.21k]
  ------------------
  443|      1|    result = Curl_uc_to_curlcode(uc);
  444|      1|    goto error;
  445|      1|  }
  446|  2.60k|  uc = curl_url_get(uhp, CURLUPART_PASSWORD, &proxypasswd, CURLU_URLDECODE);
  ------------------
  |  |   93|  2.60k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  447|  2.60k|  if(uc && (uc != CURLUE_NO_PASSWORD)) {
  ------------------
  |  Branch (447:6): [True: 2.21k, False: 398]
  |  Branch (447:12): [True: 1, False: 2.21k]
  ------------------
  448|      1|    result = Curl_uc_to_curlcode(uc);
  449|      1|    goto error;
  450|      1|  }
  451|       |
  452|  2.60k|  if(proxyuser || proxypasswd) {
  ------------------
  |  Branch (452:6): [True: 1.39k, False: 1.21k]
  |  Branch (452:19): [True: 0, False: 1.21k]
  ------------------
  453|  1.39k|    result = Curl_creds_create(proxyuser, proxypasswd, NULL, NULL,
  454|  1.39k|                               data->set.str[STRING_PROXY_SERVICE_NAME],
  455|  1.39k|                               CREDS_URL, &proxyinfo->creds);
  ------------------
  |  |   30|  1.39k|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
  456|  1.39k|    if(result)
  ------------------
  |  Branch (456:8): [True: 0, False: 1.39k]
  ------------------
  457|      0|      goto error;
  458|  1.39k|  }
  459|  1.21k|  else if(!for_pre_proxy &&
  ------------------
  |  Branch (459:11): [True: 844, False: 371]
  ------------------
  460|    844|          (data->set.str[STRING_PROXYUSERNAME] ||
  ------------------
  |  Branch (460:12): [True: 27, False: 817]
  ------------------
  461|    817|           data->set.str[STRING_PROXYPASSWORD] ||
  ------------------
  |  Branch (461:12): [True: 3, False: 814]
  ------------------
  462|    814|           data->set.str[STRING_PROXY_SERVICE_NAME])) {
  ------------------
  |  Branch (462:12): [True: 3, False: 811]
  ------------------
  463|       |    /* No user/passwd in URL, if this is not a pre-proxy, the
  464|       |     * CURLOPT_PROXY* settings apply. */
  465|     33|    result = Curl_creds_create(data->set.str[STRING_PROXYUSERNAME],
  466|     33|                               data->set.str[STRING_PROXYPASSWORD],
  467|     33|                               NULL, NULL,
  468|     33|                               data->set.str[STRING_PROXY_SERVICE_NAME],
  469|     33|                               CREDS_OPTION, &proxyinfo->creds);
  ------------------
  |  |   31|     33|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
  470|     33|  }
  471|  1.18k|  else
  472|  1.18k|    Curl_creds_unlink(&proxyinfo->creds);
  473|       |
  474|  2.60k|  proxyinfo->proxytype = proxytype;
  475|       |
  476|  2.62k|error:
  477|  2.62k|  curlx_free(scheme);
  ------------------
  |  | 1488|  2.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  478|  2.62k|  curlx_free(proxyuser);
  ------------------
  |  | 1488|  2.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  479|  2.62k|  curlx_free(proxypasswd);
  ------------------
  |  | 1488|  2.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  480|  2.62k|  curl_url_cleanup(uhp);
  481|  2.62k|#ifdef DEBUGBUILD
  482|  2.62k|  if(!result) {
  ------------------
  |  Branch (482:6): [True: 2.60k, False: 13]
  ------------------
  483|  2.60k|    DEBUGASSERT(proxyinfo);
  ------------------
  |  | 1077|  2.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (483:5): [True: 0, False: 2.60k]
  |  Branch (483:5): [True: 2.60k, False: 0]
  ------------------
  484|  2.60k|    DEBUGASSERT(proxyinfo->peer);
  ------------------
  |  | 1077|  2.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (484:5): [True: 0, False: 2.60k]
  |  Branch (484:5): [True: 2.60k, False: 0]
  ------------------
  485|  2.60k|  }
  486|  2.62k|#endif
  487|  2.62k|  return result;
  488|  2.62k|}

Curl_rand_bytes:
  160|     16|{
  161|     16|  CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT;
  162|       |#ifndef DEBUGBUILD
  163|       |  const bool env_override = FALSE;
  164|       |#endif
  165|       |
  166|     16|  DEBUGASSERT(num);
  ------------------
  |  | 1077|     16|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 16]
  |  Branch (166:3): [True: 16, False: 0]
  ------------------
  167|       |
  168|     48|  while(num) {
  ------------------
  |  Branch (168:9): [True: 32, False: 16]
  ------------------
  169|     32|    unsigned int r;
  170|     32|    size_t left = num < sizeof(unsigned int) ? num : sizeof(unsigned int);
  ------------------
  |  Branch (170:19): [True: 0, False: 32]
  ------------------
  171|       |
  172|     32|    result = randit(data, &r, env_override);
  173|     32|    if(result)
  ------------------
  |  Branch (173:8): [True: 0, False: 32]
  ------------------
  174|      0|      return result;
  175|       |
  176|    160|    while(left) {
  ------------------
  |  Branch (176:11): [True: 128, False: 32]
  ------------------
  177|    128|      *rnd++ = (unsigned char)(r & 0xFF);
  178|    128|      r >>= 8;
  179|    128|      --num;
  180|    128|      --left;
  181|    128|    }
  182|     32|  }
  183|       |
  184|     16|  return result;
  185|     16|}
Curl_rand_alnum:
  225|    176|{
  226|    176|  CURLcode result = CURLE_OK;
  227|    176|  const unsigned int alnumspace = sizeof(alnum) - 1;
  228|    176|  unsigned int r;
  229|    176|  DEBUGASSERT(num > 1);
  ------------------
  |  | 1077|    176|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (229:3): [True: 0, False: 176]
  |  Branch (229:3): [True: 176, False: 0]
  ------------------
  230|       |
  231|    176|  num--; /* save one for null-termination */
  232|       |
  233|  4.04k|  while(num) {
  ------------------
  |  Branch (233:9): [True: 3.87k, False: 176]
  ------------------
  234|  3.87k|    do {
  235|  3.87k|      result = randit(data, &r, TRUE);
  ------------------
  |  | 1051|  3.87k|#define TRUE true
  ------------------
  236|  3.87k|      if(result)
  ------------------
  |  Branch (236:10): [True: 0, False: 3.87k]
  ------------------
  237|      0|        return result;
  238|  3.87k|    } while(r >= (UINT_MAX - UINT_MAX % alnumspace));
  ------------------
  |  Branch (238:13): [True: 0, False: 3.87k]
  ------------------
  239|       |
  240|  3.87k|    *rnd++ = (unsigned char)alnum[r % alnumspace];
  241|  3.87k|    num--;
  242|  3.87k|  }
  243|    176|  *rnd = 0;
  244|       |
  245|    176|  return result;
  246|    176|}
rand.c:randit:
  105|  3.90k|{
  106|  3.90k|#ifdef DEBUGBUILD
  107|  3.90k|  if(env_override) {
  ------------------
  |  Branch (107:6): [True: 3.90k, False: 0]
  ------------------
  108|  3.90k|    char *force_entropy = getenv("CURL_ENTROPY");
  109|  3.90k|    if(force_entropy) {
  ------------------
  |  Branch (109:8): [True: 0, False: 3.90k]
  ------------------
  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.90k|  }
  128|       |#else
  129|       |  (void)env_override;
  130|       |#endif
  131|       |
  132|       |  /* data may be NULL! */
  133|  3.90k|#ifdef USE_SSL
  134|  3.90k|  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.90k|}

Curl_rlimit_init:
  158|    149|{
  159|    149|  DEBUGASSERT(rate_per_sec >= 0);
  ------------------
  |  | 1077|    149|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (159:3): [True: 0, False: 149]
  |  Branch (159:3): [True: 149, False: 0]
  ------------------
  160|    149|  DEBUGASSERT(burst_per_sec >= rate_per_sec || !burst_per_sec);
  ------------------
  |  | 1077|    149|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (160:3): [True: 149, False: 0]
  |  Branch (160:3): [True: 0, False: 0]
  |  Branch (160:3): [True: 149, False: 0]
  |  Branch (160:3): [True: 0, False: 0]
  ------------------
  161|    149|  DEBUGASSERT(pts);
  ------------------
  |  | 1077|    149|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (161:3): [True: 0, False: 149]
  |  Branch (161:3): [True: 149, False: 0]
  ------------------
  162|    149|  r->rate_per_step = r->rate_per_sec = rate_per_sec;
  163|    149|  r->burst_per_step = r->burst_per_sec = burst_per_sec;
  164|    149|  r->step_us = CURL_US_PER_SEC;
  ------------------
  |  |   29|    149|#define CURL_US_PER_SEC         1000000
  ------------------
  165|    149|  r->spare_us = 0;
  166|    149|  r->tokens = r->rate_per_step;
  167|    149|  r->ts = *pts;
  168|       |  r->blocked = FALSE;
  ------------------
  |  | 1054|    149|#define FALSE false
  ------------------
  169|    149|}
Curl_rlimit_is_blocked:
  196|  8.90k|{
  197|  8.90k|  return (bool)r->blocked;
  198|  8.90k|}
Curl_rlimit_avail:
  202|    166|{
  203|    166|  struct curltime ts;
  204|       |
  205|    166|  if(r->blocked)
  ------------------
  |  Branch (205:6): [True: 0, False: 166]
  ------------------
  206|      0|    return 0;
  207|    166|  else if(r->rate_per_step) {
  ------------------
  |  Branch (207:11): [True: 76, False: 90]
  ------------------
  208|     76|    if(!pts) {
  ------------------
  |  Branch (208:8): [True: 76, False: 0]
  ------------------
  209|     76|      curlx_pnow(&ts);
  210|     76|      pts = &ts;
  211|     76|    }
  212|     76|    rlimit_update(r, pts);
  213|     76|    return r->tokens;
  214|     76|  }
  215|     90|  else
  216|     90|    return INT64_MAX;
  217|    166|}
Curl_rlimit_block:
  292|  15.0k|{
  293|  15.0k|  if(!activate == !r->blocked)
  ------------------
  |  Branch (293:6): [True: 15.0k, False: 0]
  ------------------
  294|  15.0k|    return;
  295|       |
  296|      0|  r->ts = *pts;
  297|      0|  r->blocked = activate;
  298|      0|  if(!r->blocked) {
  ------------------
  |  Branch (298:6): [True: 0, False: 0]
  ------------------
  299|       |    /* Start rate limiting fresh. The amount of time this was blocked
  300|       |     * does not generate extra tokens. */
  301|      0|    Curl_rlimit_start(r, pts, -1);
  302|      0|  }
  303|      0|  else {
  304|      0|    r->tokens = 0;
  305|      0|  }
  306|      0|}
ratelimit.c:rlimit_update:
   35|     76|{
   36|     76|  timediff_t elapsed_us, elapsed_steps;
   37|     76|  int64_t token_gain;
   38|       |
   39|     76|  DEBUGASSERT(r->rate_per_step);
  ------------------
  |  | 1077|     76|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (39:3): [True: 0, False: 76]
  |  Branch (39:3): [True: 76, False: 0]
  ------------------
   40|     76|  if((r->ts.tv_sec == pts->tv_sec) && (r->ts.tv_usec == pts->tv_usec))
  ------------------
  |  Branch (40:6): [True: 76, False: 0]
  |  Branch (40:39): [True: 0, False: 76]
  ------------------
   41|      0|    return;
   42|       |
   43|     76|  elapsed_us = curlx_ptimediff_us(pts, &r->ts);
   44|     76|  if(elapsed_us < 0) { /* not going back in time */
  ------------------
  |  Branch (44:6): [True: 0, False: 76]
  ------------------
   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|     76|  elapsed_us += r->spare_us;
   50|     76|  if(elapsed_us < r->step_us)
  ------------------
  |  Branch (50:6): [True: 76, False: 0]
  ------------------
   51|     76|    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|  23.9k|{
   40|  23.9k|  memset(req, 0, sizeof(*req));
   41|  23.9k|}
Curl_req_soft_reset:
   45|  5.65k|{
   46|  5.65k|  CURLcode result;
   47|       |
   48|  5.65k|  req->done = FALSE;
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
   49|  5.65k|  req->upload_done = FALSE;
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
   50|  5.65k|  req->upload_aborted = FALSE;
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
   51|  5.65k|  req->download_done = FALSE;
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
   52|  5.65k|  req->eos_written = FALSE;
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
   53|  5.65k|  req->eos_read = FALSE;
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
   54|  5.65k|  req->eos_sent = FALSE;
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
   55|  5.65k|  req->ignorebody = FALSE;
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
   56|  5.65k|  req->shutdown = FALSE;
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
   57|  5.65k|  req->bytecount = 0;
   58|  5.65k|  req->writebytecount = 0;
   59|  5.65k|  req->header = FALSE;
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
   60|  5.65k|  req->headerline = 0;
   61|  5.65k|  req->headerbytecount = 0;
   62|  5.65k|  req->allheadercount = 0;
   63|  5.65k|  req->deductheadercount = 0;
   64|  5.65k|  req->httpversion_sent = 0;
   65|  5.65k|  req->httpversion = 0;
   66|  5.65k|  req->sendbuf_hds_len = 0;
   67|       |
   68|  5.65k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1332|  5.65k|  do {                      \
  |  | 1333|  5.65k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  5.65k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  5.65k|    (ptr) = NULL;           \
  |  | 1335|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
   69|  5.65k|#ifndef CURL_DISABLE_PROXY
   70|  5.65k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1332|  5.65k|  do {                      \
  |  | 1333|  5.65k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  5.65k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  5.65k|    (ptr) = NULL;           \
  |  | 1335|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
   71|  5.65k|#endif
   72|       |
   73|  5.65k|  result = Curl_client_start(data);
   74|  5.65k|  if(result)
  ------------------
  |  Branch (74:6): [True: 0, False: 5.65k]
  ------------------
   75|      0|    return result;
   76|       |
   77|  5.65k|  if(!req->sendbuf_init) {
  ------------------
  |  Branch (77:6): [True: 5.65k, False: 3]
  ------------------
   78|  5.65k|    Curl_bufq_init2(&req->sendbuf, data->set.upload_buffer_size, 1,
   79|  5.65k|                    BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|  5.65k|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
   80|  5.65k|    req->sendbuf_init = TRUE;
  ------------------
  |  | 1051|  5.65k|#define TRUE true
  ------------------
   81|  5.65k|  }
   82|      3|  else {
   83|      3|    Curl_bufq_reset(&req->sendbuf);
   84|      3|    if(data->set.upload_buffer_size != req->sendbuf.chunk_size) {
  ------------------
  |  Branch (84:8): [True: 0, False: 3]
  ------------------
   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|      3|  }
   90|       |
   91|  5.65k|  return CURLE_OK;
   92|  5.65k|}
Curl_req_start:
   96|  5.65k|{
   97|  5.65k|  req->start = *Curl_pgrs_now(data);
   98|  5.65k|  return Curl_req_soft_reset(req, data);
   99|  5.65k|}
Curl_req_done:
  105|    512|{
  106|    512|  (void)req;
  107|    512|  if(!aborted)
  ------------------
  |  Branch (107:6): [True: 0, False: 512]
  ------------------
  108|      0|    (void)req_flush(data);
  109|    512|  Curl_client_reset(data);
  110|    512|  return CURLE_OK;
  111|    512|}
Curl_req_hard_reset:
  114|  7.54k|{
  115|  7.54k|  struct curltime t0 = { 0, 0 };
  116|       |
  117|  7.54k|  curlx_safefree(req->newurl);
  ------------------
  |  | 1332|  7.54k|  do {                      \
  |  | 1333|  7.54k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  7.54k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.54k|    (ptr) = NULL;           \
  |  | 1335|  7.54k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.54k]
  |  |  ------------------
  ------------------
  118|  7.54k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1332|  7.54k|  do {                      \
  |  | 1333|  7.54k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  7.54k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.54k|    (ptr) = NULL;           \
  |  | 1335|  7.54k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.54k]
  |  |  ------------------
  ------------------
  119|  7.54k|#ifndef CURL_DISABLE_PROXY
  120|  7.54k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1332|  7.54k|  do {                      \
  |  | 1333|  7.54k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  7.54k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.54k|    (ptr) = NULL;           \
  |  | 1335|  7.54k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.54k]
  |  |  ------------------
  ------------------
  121|  7.54k|#endif
  122|  7.54k|#ifndef CURL_DISABLE_COOKIES
  123|  7.54k|  curlx_safefree(req->cookiehost);
  ------------------
  |  | 1332|  7.54k|  do {                      \
  |  | 1333|  7.54k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  7.54k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.54k|    (ptr) = NULL;           \
  |  | 1335|  7.54k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.54k]
  |  |  ------------------
  ------------------
  124|  7.54k|#endif
  125|  7.54k|  Curl_client_reset(data);
  126|  7.54k|  if(req->sendbuf_init)
  ------------------
  |  Branch (126:6): [True: 0, False: 7.54k]
  ------------------
  127|      0|    Curl_bufq_reset(&req->sendbuf);
  128|       |
  129|       |  /* clear any resolve data */
  130|  7.54k|  Curl_resolv_destroy_all(data);
  131|       |  /* Can no longer memset() this struct as we need to keep some state */
  132|  7.54k|  req->size = -1;
  133|  7.54k|  req->maxdownload = -1;
  134|  7.54k|  req->bytecount = 0;
  135|  7.54k|  req->writebytecount = 0;
  136|  7.54k|  req->start = t0;
  137|  7.54k|  req->headerbytecount = 0;
  138|  7.54k|  req->allheadercount = 0;
  139|  7.54k|  req->deductheadercount = 0;
  140|  7.54k|  req->headerline = 0;
  141|  7.54k|  req->offset = 0;
  142|  7.54k|  req->httpcode = 0;
  143|  7.54k|  req->io_flags = 0;
  144|  7.54k|  req->upgr101 = UPGR101_NONE;
  145|  7.54k|  req->sendbuf_hds_len = 0;
  146|  7.54k|  req->timeofdoc = 0;
  147|  7.54k|  req->location = NULL;
  148|  7.54k|  req->newurl = NULL;
  149|  7.54k|#ifndef CURL_DISABLE_COOKIES
  150|  7.54k|  req->setcookies = 0;
  151|  7.54k|#endif
  152|  7.54k|  req->header = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  153|  7.54k|  req->content_range = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  154|  7.54k|  req->download_done = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  155|  7.54k|  req->eos_written = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  156|  7.54k|  req->eos_read = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  157|  7.54k|  req->eos_sent = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  158|  7.54k|  req->rewind_read = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  159|  7.54k|  req->upload_done = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  160|  7.54k|  req->upload_aborted = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  161|  7.54k|  req->ignorebody = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  162|  7.54k|  req->http_bodyless = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  163|  7.54k|  req->chunk = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  164|  7.54k|  req->resp_trailer = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  165|  7.54k|  req->ignore_cl = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  166|  7.54k|  req->upload_chunky = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  167|  7.54k|  req->no_body = data->set.opt_no_body;
  168|  7.54k|  req->authneg = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  169|  7.54k|  req->shutdown = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  170|       |  /* Unpause all directions */
  171|  7.54k|  Curl_rlimit_block(&data->progress.dl.rlimit, FALSE, &t0);
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  172|       |  Curl_rlimit_block(&data->progress.ul.rlimit, FALSE, &t0);
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
  173|  7.54k|}
Curl_req_free:
  176|  23.9k|{
  177|  23.9k|  curlx_safefree(req->newurl);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  178|  23.9k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  179|  23.9k|#ifndef CURL_DISABLE_PROXY
  180|  23.9k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  181|  23.9k|#endif
  182|  23.9k|  if(req->sendbuf_init)
  ------------------
  |  Branch (182:6): [True: 5.65k, False: 18.3k]
  ------------------
  183|  5.65k|    Curl_bufq_free(&req->sendbuf);
  184|  23.9k|  Curl_client_cleanup(data);
  185|  23.9k|}

Curl_socket_check:
  124|     30|{
  125|     30|  struct pollfd pfd[3];
  126|     30|  int num;
  127|     30|  int r;
  128|       |
  129|     30|  if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
                if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (129:6): [True: 30, False: 0]
  |  Branch (129:38): [True: 30, False: 0]
  ------------------
  130|     30|     (writefd == CURL_SOCKET_BAD)) {
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (130:6): [True: 0, False: 30]
  ------------------
  131|       |    /* no sockets, wait */
  132|      0|    return curlx_wait_ms(timeout_ms);
  133|      0|  }
  134|       |
  135|       |  /* Avoid initial timestamp, avoid curlx_now() call, when elapsed
  136|       |     time in this function does not need to be measured. This happens
  137|       |     when function is called with a zero timeout or a negative timeout
  138|       |     value indicating a blocking call should be performed. */
  139|       |
  140|     30|  num = 0;
  141|     30|  if(readfd0 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (141:6): [True: 0, False: 30]
  ------------------
  142|      0|    pfd[num].fd = readfd0;
  143|      0|    pfd[num].events = POLLRDNORM | POLLIN | POLLRDBAND | POLLPRI;
  144|      0|    pfd[num].revents = 0;
  145|      0|    num++;
  146|      0|  }
  147|     30|  if(readfd1 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (147:6): [True: 0, False: 30]
  ------------------
  148|      0|    pfd[num].fd = readfd1;
  149|      0|    pfd[num].events = POLLRDNORM | POLLIN | POLLRDBAND | POLLPRI;
  150|      0|    pfd[num].revents = 0;
  151|      0|    num++;
  152|      0|  }
  153|     30|  if(writefd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (153:6): [True: 30, False: 0]
  ------------------
  154|     30|    pfd[num].fd = writefd;
  155|     30|    pfd[num].events = POLLWRNORM | POLLOUT | POLLPRI;
  156|     30|    pfd[num].revents = 0;
  157|     30|    num++;
  158|     30|  }
  159|       |
  160|     30|  r = Curl_poll(pfd, (unsigned int)num, timeout_ms);
  161|     30|  if(r <= 0)
  ------------------
  |  Branch (161:6): [True: 20, False: 10]
  ------------------
  162|     20|    return r;
  163|       |
  164|     10|  r = 0;
  165|     10|  num = 0;
  166|     10|  if(readfd0 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     10|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (166:6): [True: 0, False: 10]
  ------------------
  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|     10|  if(readfd1 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     10|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (173:6): [True: 0, False: 10]
  ------------------
  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|     10|  if(writefd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     10|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (180:6): [True: 10, False: 0]
  ------------------
  181|     10|    if(pfd[num].revents & (POLLWRNORM | POLLOUT))
  ------------------
  |  Branch (181:8): [True: 10, False: 0]
  ------------------
  182|     10|      r |= CURL_CSELECT_OUT;
  ------------------
  |  |  291|     10|#define CURL_CSELECT_OUT  0x02
  ------------------
  183|     10|    if(pfd[num].revents & (POLLERR | POLLHUP | POLLPRI | POLLNVAL))
  ------------------
  |  Branch (183:8): [True: 10, False: 0]
  ------------------
  184|     10|      r |= CURL_CSELECT_ERR;
  ------------------
  |  |  292|     10|#define CURL_CSELECT_ERR  0x04
  ------------------
  185|     10|  }
  186|       |
  187|     10|  return r;
  188|     30|}
Curl_poll:
  204|     30|{
  205|     30|#ifdef HAVE_POLL
  206|     30|  int pending_ms;
  207|       |#else
  208|       |  fd_set fds_read;
  209|       |  fd_set fds_write;
  210|       |  fd_set fds_err;
  211|       |  curl_socket_t maxfd;
  212|       |#endif
  213|     30|  bool fds_none = TRUE;
  ------------------
  |  | 1051|     30|#define TRUE true
  ------------------
  214|     30|  unsigned int i;
  215|     30|  int r;
  216|       |
  217|     30|  if(ufds) {
  ------------------
  |  Branch (217:6): [True: 30, False: 0]
  ------------------
  218|     30|    for(i = 0; i < nfds; i++) {
  ------------------
  |  Branch (218:16): [True: 30, False: 0]
  ------------------
  219|     30|      if(ufds[i].fd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     30|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (219:10): [True: 30, False: 0]
  ------------------
  220|     30|        fds_none = FALSE;
  ------------------
  |  | 1054|     30|#define FALSE false
  ------------------
  221|     30|        break;
  222|     30|      }
  223|     30|    }
  224|     30|  }
  225|     30|  if(fds_none) {
  ------------------
  |  Branch (225:6): [True: 0, False: 30]
  ------------------
  226|       |    /* no sockets, wait */
  227|      0|    return curlx_wait_ms(timeout_ms);
  228|      0|  }
  229|       |
  230|       |  /* Avoid initial timestamp, avoid curlx_now() call, when elapsed
  231|       |     time in this function does not need to be measured. This happens
  232|       |     when function is called with a zero timeout or a negative timeout
  233|       |     value indicating a blocking call should be performed. */
  234|       |
  235|     30|#ifdef HAVE_POLL
  236|       |
  237|       |  /* prevent overflow, timeout_ms is typecast to int. */
  238|     30|#if TIMEDIFF_T_MAX > INT_MAX
  239|     30|  if(timeout_ms > INT_MAX)
  ------------------
  |  Branch (239:6): [True: 0, False: 30]
  ------------------
  240|      0|    timeout_ms = INT_MAX;
  241|     30|#endif
  242|     30|  if(timeout_ms > 0)
  ------------------
  |  Branch (242:6): [True: 0, False: 30]
  ------------------
  243|      0|    pending_ms = (int)timeout_ms;
  244|     30|  else if(timeout_ms < 0)
  ------------------
  |  Branch (244:11): [True: 0, False: 30]
  ------------------
  245|      0|    pending_ms = -1;
  246|     30|  else
  247|     30|    pending_ms = 0;
  248|     30|  r = poll(ufds, nfds, pending_ms);
  249|     30|  if(r <= 0) {
  ------------------
  |  Branch (249:6): [True: 20, False: 10]
  ------------------
  250|     20|    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: 20]
  |  Branch (250:21): [True: 0, False: 0]
  ------------------
  251|       |      /* make EINTR from select or poll not a "lethal" error */
  252|      0|      r = 0;
  253|     20|    return r;
  254|     20|  }
  255|       |
  256|     20|  for(i = 0; i < nfds; i++) {
  ------------------
  |  Branch (256:14): [True: 10, False: 10]
  ------------------
  257|     10|    if(ufds[i].fd == CURL_SOCKET_BAD)
  ------------------
  |  |  145|     10|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (257:8): [True: 0, False: 10]
  ------------------
  258|      0|      continue;
  259|     10|    if(ufds[i].revents & POLLHUP)
  ------------------
  |  Branch (259:8): [True: 10, False: 0]
  ------------------
  260|     10|      ufds[i].revents |= POLLIN;
  261|     10|    if(ufds[i].revents & POLLERR)
  ------------------
  |  Branch (261:8): [True: 10, False: 0]
  ------------------
  262|     10|      ufds[i].revents |= POLLIN | POLLOUT;
  263|     10|  }
  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|     10|  return r;
  334|     30|}
Curl_pollfds_init:
  339|  7.01k|{
  340|  7.01k|  DEBUGASSERT(cpfds);
  ------------------
  |  | 1077|  7.01k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (340:3): [True: 0, False: 7.01k]
  |  Branch (340:3): [True: 7.01k, False: 0]
  ------------------
  341|  7.01k|  memset(cpfds, 0, sizeof(*cpfds));
  342|  7.01k|  if(static_pfds && static_count) {
  ------------------
  |  Branch (342:6): [True: 7.01k, False: 0]
  |  Branch (342:21): [True: 7.01k, False: 0]
  ------------------
  343|  7.01k|    cpfds->pfds = static_pfds;
  344|  7.01k|    cpfds->count = static_count;
  345|  7.01k|  }
  346|  7.01k|}
Curl_pollfds_cleanup:
  354|  7.01k|{
  355|  7.01k|  DEBUGASSERT(cpfds);
  ------------------
  |  | 1077|  7.01k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (355:3): [True: 0, False: 7.01k]
  |  Branch (355:3): [True: 7.01k, False: 0]
  ------------------
  356|  7.01k|  if(cpfds->allocated_pfds) {
  ------------------
  |  Branch (356:6): [True: 0, False: 7.01k]
  ------------------
  357|      0|    curlx_free(cpfds->pfds);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  358|      0|  }
  359|  7.01k|  memset(cpfds, 0, sizeof(*cpfds));
  360|  7.01k|}
Curl_pollset_reset:
  488|  20.3k|{
  489|  20.3k|  unsigned int i;
  490|  20.3k|  ps->n = 0;
  491|  20.3k|#ifdef DEBUGBUILD
  492|  20.3k|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1077|  20.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (492:3): [True: 0, False: 20.3k]
  |  Branch (492:3): [True: 20.3k, False: 0]
  ------------------
  493|  20.3k|#endif
  494|  20.3k|  DEBUGASSERT(ps->count);
  ------------------
  |  | 1077|  20.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (494:3): [True: 0, False: 20.3k]
  |  Branch (494:3): [True: 20.3k, False: 0]
  ------------------
  495|  60.9k|  for(i = 0; i < ps->count; i++)
  ------------------
  |  Branch (495:14): [True: 40.6k, False: 20.3k]
  ------------------
  496|  40.6k|    ps->sockets[i] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  60.9k|#define CURL_SOCKET_BAD (-1)
  ------------------
  497|  20.3k|  memset(ps->actions, 0, ps->count * sizeof(ps->actions[0]));
  498|  20.3k|}
Curl_pollset_init:
  501|  8.48k|{
  502|  8.48k|#ifdef DEBUGBUILD
  503|  8.48k|  ps->init = CURL_EASY_POLLSET_MAGIC;
  ------------------
  |  |  131|  8.48k|#define CURL_EASY_POLLSET_MAGIC  0x7a657370
  ------------------
  504|  8.48k|#endif
  505|  8.48k|  ps->sockets = ps->def_sockets;
  506|  8.48k|  ps->actions = ps->def_actions;
  507|  8.48k|  ps->count = CURL_ARRAYSIZE(ps->def_sockets);
  ------------------
  |  | 1299|  8.48k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  508|  8.48k|  ps->n = 0;
  509|  8.48k|  Curl_pollset_reset(ps);
  510|  8.48k|}
Curl_pollset_cleanup:
  521|  8.48k|{
  522|  8.48k|#ifdef DEBUGBUILD
  523|  8.48k|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1077|  8.48k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (523:3): [True: 0, False: 8.48k]
  |  Branch (523:3): [True: 8.48k, False: 0]
  ------------------
  524|  8.48k|#endif
  525|  8.48k|  if(ps->sockets != ps->def_sockets) {
  ------------------
  |  Branch (525:6): [True: 0, False: 8.48k]
  ------------------
  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|  8.48k|  if(ps->actions != ps->def_actions) {
  ------------------
  |  Branch (529:6): [True: 0, False: 8.48k]
  ------------------
  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|  8.48k|  ps->count = CURL_ARRAYSIZE(ps->def_sockets);
  ------------------
  |  | 1299|  8.48k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  534|  8.48k|  Curl_pollset_reset(ps);
  535|  8.48k|}
Curl_pollset_change:
  564|  3.17k|{
  565|  3.17k|  unsigned int i;
  566|       |
  567|  3.17k|#ifdef DEBUGBUILD
  568|  3.17k|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1077|  3.17k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (568:3): [True: 0, False: 3.17k]
  |  Branch (568:3): [True: 3.17k, False: 0]
  ------------------
  569|  3.17k|#endif
  570|       |
  571|  3.17k|  DEBUGASSERT(VALID_SOCK(sock));
  ------------------
  |  | 1077|  3.17k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (571:3): [True: 0, False: 3.17k]
  |  Branch (571:3): [True: 3.17k, False: 0]
  ------------------
  572|  3.17k|  if(!VALID_SOCK(sock))
  ------------------
  |  |   98|  3.17k|#define VALID_SOCK(s) ((s) >= 0)
  ------------------
  |  Branch (572:6): [True: 0, False: 3.17k]
  ------------------
  573|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  574|       |
  575|  3.17k|  DEBUGASSERT(add_flags <= (CURL_POLL_IN | CURL_POLL_OUT));
  ------------------
  |  | 1077|  3.17k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (575:3): [True: 0, False: 3.17k]
  |  Branch (575:3): [True: 3.17k, False: 0]
  ------------------
  576|  3.17k|  DEBUGASSERT(remove_flags <= (CURL_POLL_IN | CURL_POLL_OUT));
  ------------------
  |  | 1077|  3.17k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (576:3): [True: 0, False: 3.17k]
  |  Branch (576:3): [True: 3.17k, False: 0]
  ------------------
  577|  3.17k|  DEBUGASSERT((add_flags & remove_flags) == 0); /* no overlap */
  ------------------
  |  | 1077|  3.17k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (577:3): [True: 0, False: 3.17k]
  |  Branch (577:3): [True: 3.17k, False: 0]
  ------------------
  578|  3.17k|  for(i = 0; i < ps->n; ++i) {
  ------------------
  |  Branch (578:14): [True: 827, False: 2.34k]
  ------------------
  579|    827|    if(ps->sockets[i] == sock) {
  ------------------
  |  Branch (579:8): [True: 827, False: 0]
  ------------------
  580|    827|      ps->actions[i] &= (unsigned char)(~remove_flags);
  581|    827|      ps->actions[i] |= (unsigned char)add_flags;
  582|       |      /* all gone? remove socket */
  583|    827|      if(!ps->actions[i]) {
  ------------------
  |  Branch (583:10): [True: 0, False: 827]
  ------------------
  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|    827|      return CURLE_OK;
  593|    827|    }
  594|    827|  }
  595|       |  /* not present */
  596|  2.34k|  if(add_flags) {
  ------------------
  |  Branch (596:6): [True: 2.34k, False: 0]
  ------------------
  597|  2.34k|    if(i >= ps->count) { /* need to grow */
  ------------------
  |  Branch (597:8): [True: 0, False: 2.34k]
  ------------------
  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|  2.34k|    DEBUGASSERT(i < ps->count);
  ------------------
  |  | 1077|  2.34k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (624:5): [True: 0, False: 2.34k]
  |  Branch (624:5): [True: 2.34k, False: 0]
  ------------------
  625|  2.34k|    if(i < ps->count) {
  ------------------
  |  Branch (625:8): [True: 2.34k, False: 0]
  ------------------
  626|  2.34k|      ps->sockets[i] = sock;
  627|  2.34k|      ps->actions[i] = (unsigned char)add_flags;
  628|  2.34k|      ps->n = i + 1;
  629|  2.34k|    }
  630|  2.34k|  }
  631|  2.34k|  return CURLE_OK;
  632|  2.34k|}
Curl_pollset_want_recv:
  712|    166|{
  713|    166|  unsigned int i;
  714|    166|  (void)data;
  715|    332|  for(i = 0; i < ps->n; ++i) {
  ------------------
  |  Branch (715:14): [True: 166, False: 166]
  ------------------
  716|    166|    if((ps->sockets[i] == sock) && (ps->actions[i] & CURL_POLL_IN))
  ------------------
  |  |  283|      0|#define CURL_POLL_IN     1
  ------------------
  |  Branch (716:8): [True: 0, False: 166]
  |  Branch (716:36): [True: 0, False: 0]
  ------------------
  717|      0|      return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  718|    166|  }
  719|    166|  return FALSE;
  ------------------
  |  | 1054|    166|#define FALSE false
  ------------------
  720|    166|}

Curl_client_cleanup:
   71|  23.9k|{
   72|  23.9k|  cl_reset_reader(data);
   73|  23.9k|  cl_reset_writer(data);
   74|       |
   75|  23.9k|  data->req.bytecount = 0;
   76|  23.9k|  data->req.headerline = 0;
   77|  23.9k|}
Curl_client_reset:
   80|  8.05k|{
   81|  8.05k|  if(data->req.rewind_read) {
  ------------------
  |  Branch (81:6): [True: 0, False: 8.05k]
  ------------------
   82|       |    /* already requested */
   83|      0|    CURL_TRC_READ(data, "client_reset, will rewind reader");
  ------------------
  |  |  163|      0|  do {                                                    \
  |  |  164|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
   84|      0|  }
   85|  8.05k|  else {
   86|  8.05k|    CURL_TRC_READ(data, "client_reset, clear readers");
  ------------------
  |  |  163|  8.05k|  do {                                                    \
  |  |  164|  8.05k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|  8.05k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  16.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 8.05k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 8.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  16.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|  8.05k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|  8.05k|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|  8.05k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 8.05k]
  |  |  ------------------
  ------------------
   87|  8.05k|    cl_reset_reader(data);
   88|  8.05k|  }
   89|  8.05k|  cl_reset_writer(data);
   90|       |
   91|  8.05k|  data->req.bytecount = 0;
   92|  8.05k|  data->req.headerline = 0;
   93|  8.05k|}
Curl_client_start:
   96|  5.65k|{
   97|  5.65k|  if(data->req.rewind_read) {
  ------------------
  |  Branch (97:6): [True: 0, False: 5.65k]
  ------------------
   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|  5.65k|  return CURLE_OK;
  115|  5.65k|}
Curl_cwriter_write:
  131|  6.26k|{
  132|  6.26k|  if(!writer)
  ------------------
  |  Branch (132:6): [True: 0, False: 6.26k]
  ------------------
  133|      0|    return CURLE_WRITE_ERROR;
  134|  6.26k|  return writer->cwt->do_write(data, writer, type, buf, nbytes);
  135|  6.26k|}
Curl_cwriter_flush:
  139|  28.2k|{
  140|  28.2k|  if(!writer) {
  ------------------
  |  Branch (140:6): [True: 0, False: 28.2k]
  ------------------
  141|      0|    return CURLE_WRITE_ERROR;
  142|      0|  }
  143|  28.2k|  return writer->cwt->do_flush(data, writer);
  144|  28.2k|}
Curl_cwriter_def_init:
  148|  16.9k|{
  149|  16.9k|  (void)data;
  150|  16.9k|  (void)writer;
  151|  16.9k|  return CURLE_OK;
  152|  16.9k|}
Curl_cwriter_def_flush:
  163|  16.9k|{
  164|  16.9k|  return Curl_cwriter_flush(data, writer->next);
  165|  16.9k|}
Curl_cwriter_def_close:
  169|  16.9k|{
  170|  16.9k|  (void)data;
  171|  16.9k|  (void)writer;
  172|  16.9k|}
Curl_client_write:
  395|  1.28k|{
  396|  1.28k|  CURLcode result;
  397|       |
  398|       |  /* it is one of those, at least */
  399|  1.28k|  DEBUGASSERT(type &
  ------------------
  |  | 1077|  1.28k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (399:3): [True: 0, False: 1.28k]
  |  Branch (399:3): [True: 1.28k, False: 0]
  ------------------
  400|  1.28k|              (CLIENTWRITE_BODY | CLIENTWRITE_HEADER | CLIENTWRITE_INFO));
  401|       |  /* BODY is only BODY (with optional EOS) */
  402|  1.28k|  DEBUGASSERT(!(type & CLIENTWRITE_BODY) ||
  ------------------
  |  | 1077|  1.28k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (402:3): [True: 1.28k, False: 0]
  |  Branch (402:3): [True: 0, False: 0]
  |  Branch (402:3): [True: 1.28k, False: 0]
  |  Branch (402:3): [True: 0, False: 0]
  ------------------
  403|  1.28k|              ((type & ~(CLIENTWRITE_BODY | CLIENTWRITE_EOS)) == 0));
  404|       |  /* INFO is only INFO (with optional EOS) */
  405|  1.28k|  DEBUGASSERT(!(type & CLIENTWRITE_INFO) ||
  ------------------
  |  | 1077|  1.28k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (405:3): [True: 1.28k, False: 0]
  |  Branch (405:3): [True: 0, False: 0]
  |  Branch (405:3): [True: 1.28k, False: 0]
  |  Branch (405:3): [True: 0, False: 0]
  ------------------
  406|  1.28k|              ((type & ~(CLIENTWRITE_INFO | CLIENTWRITE_EOS)) == 0));
  407|       |
  408|  1.28k|  if(!data->req.writer_stack) {
  ------------------
  |  Branch (408:6): [True: 0, False: 1.28k]
  ------------------
  409|      0|    result = do_init_writer_stack(data);
  410|      0|    if(result)
  ------------------
  |  Branch (410:8): [True: 0, False: 0]
  ------------------
  411|      0|      return result;
  412|      0|    DEBUGASSERT(data->req.writer_stack);
  ------------------
  |  | 1077|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (412:5): [True: 0, False: 0]
  |  Branch (412:5): [True: 0, False: 0]
  ------------------
  413|      0|  }
  414|       |
  415|  1.28k|  result = Curl_cwriter_write(data, data->req.writer_stack, type, buf, len);
  416|  1.28k|  CURL_TRC_WRITE(data, "client_write(type=%x, len=%zu) -> %d",
  ------------------
  |  |  158|  1.28k|  do {                                                     \
  |  |  159|  1.28k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  1.28k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.56k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.28k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.28k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.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]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.28k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  1.28k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  1.28k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1.28k]
  |  |  ------------------
  ------------------
  417|  1.28k|                 (unsigned int)type, len, (int)result);
  418|  1.28k|  return result;
  419|  1.28k|}
Curl_client_flush:
  422|  5.64k|{
  423|  5.64k|  CURLcode result;
  424|       |
  425|  5.64k|  if(!data->req.writer_stack) {
  ------------------
  |  Branch (425:6): [True: 0, False: 5.64k]
  ------------------
  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|  5.64k|  result = Curl_cwriter_flush(data, data->req.writer_stack);
  433|  5.64k|  CURL_TRC_WRITE(data, "client_flush() -> %d", (int)result);
  ------------------
  |  |  158|  5.64k|  do {                                                     \
  |  |  159|  5.64k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  5.64k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  11.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 5.64k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  11.2k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  5.64k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  5.64k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  5.64k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 5.64k]
  |  |  ------------------
  ------------------
  434|  5.64k|  return result;
  435|  5.64k|}
Curl_cwriter_create:
  442|  28.2k|{
  443|  28.2k|  struct Curl_cwriter *writer = NULL;
  444|  28.2k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  445|  28.2k|  void *p;
  446|       |
  447|  28.2k|  DEBUGASSERT(cwt->cwriter_size >= sizeof(struct Curl_cwriter));
  ------------------
  |  | 1077|  28.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (447:3): [True: 0, False: 28.2k]
  |  Branch (447:3): [True: 28.2k, False: 0]
  ------------------
  448|  28.2k|  p = curlx_calloc(1, cwt->cwriter_size);
  ------------------
  |  | 1485|  28.2k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  449|  28.2k|  if(!p)
  ------------------
  |  Branch (449:6): [True: 0, False: 28.2k]
  ------------------
  450|      0|    goto out;
  451|       |
  452|  28.2k|  writer = (struct Curl_cwriter *)p;
  453|  28.2k|  writer->cwt = cwt;
  454|  28.2k|  writer->ctx = p;
  455|  28.2k|  writer->phase = phase;
  456|  28.2k|  result = cwt->do_init(data, writer);
  457|       |
  458|  28.2k|out:
  459|  28.2k|  *pwriter = result ? NULL : writer;
  ------------------
  |  Branch (459:14): [True: 0, False: 28.2k]
  ------------------
  460|  28.2k|  if(result)
  ------------------
  |  Branch (460:6): [True: 0, False: 28.2k]
  ------------------
  461|      0|    curlx_free(writer);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  462|  28.2k|  return result;
  463|  28.2k|}
Curl_cwriter_add:
  488|  22.6k|{
  489|  22.6k|  CURLcode result;
  490|  22.6k|  struct Curl_cwriter **anchor = &data->req.writer_stack;
  491|       |
  492|  22.6k|  if(!*anchor) {
  ------------------
  |  Branch (492:6): [True: 5.65k, False: 16.9k]
  ------------------
  493|  5.65k|    result = do_init_writer_stack(data);
  494|  5.65k|    if(result)
  ------------------
  |  Branch (494:8): [True: 0, False: 5.65k]
  ------------------
  495|      0|      return result;
  496|  5.65k|  }
  497|       |
  498|       |  /* Insert the writer as first in its phase.
  499|       |   * Skip existing writers of lower phases. */
  500|  28.2k|  while(*anchor && (*anchor)->phase < writer->phase)
  ------------------
  |  Branch (500:9): [True: 28.2k, False: 0]
  |  Branch (500:20): [True: 5.65k, False: 22.6k]
  ------------------
  501|  5.65k|    anchor = &((*anchor)->next);
  502|  22.6k|  writer->next = *anchor;
  503|  22.6k|  *anchor = writer;
  504|  22.6k|  return CURLE_OK;
  505|  22.6k|}
Curl_cwriter_get_by_name:
  509|  5.65k|{
  510|  5.65k|  struct Curl_cwriter *writer;
  511|  5.65k|  for(writer = data->req.writer_stack; writer; writer = writer->next) {
  ------------------
  |  Branch (511:40): [True: 0, False: 5.65k]
  ------------------
  512|      0|    if(!strcmp(name, writer->cwt->name))
  ------------------
  |  Branch (512:8): [True: 0, False: 0]
  ------------------
  513|      0|      return writer;
  514|      0|  }
  515|  5.65k|  return NULL;
  516|  5.65k|}
Curl_cwriter_get_by_type:
  520|  6.87k|{
  521|  6.87k|  struct Curl_cwriter *writer;
  522|  34.3k|  for(writer = data->req.writer_stack; writer; writer = writer->next) {
  ------------------
  |  Branch (522:40): [True: 34.3k, False: 3]
  ------------------
  523|  34.3k|    if(writer->cwt == cwt)
  ------------------
  |  Branch (523:8): [True: 6.87k, False: 27.4k]
  ------------------
  524|  6.87k|      return writer;
  525|  34.3k|  }
  526|      3|  return NULL;
  527|  6.87k|}
Curl_cwriter_is_content_decoding:
  530|  6.87k|{
  531|  6.87k|  struct Curl_cwriter *writer;
  532|  41.2k|  for(writer = data->req.writer_stack; writer; writer = writer->next) {
  ------------------
  |  Branch (532:40): [True: 34.3k, False: 6.87k]
  ------------------
  533|  34.3k|    if(writer->phase == CURL_CW_CONTENT_DECODE)
  ------------------
  |  Branch (533:8): [True: 0, False: 34.3k]
  ------------------
  534|      0|      return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  535|  34.3k|  }
  536|  6.87k|  return FALSE;
  ------------------
  |  | 1054|  6.87k|#define FALSE false
  ------------------
  537|  6.87k|}
Curl_cwriter_is_paused:
  540|  1.22k|{
  541|  1.22k|  return Curl_cw_out_is_paused(data);
  542|  1.22k|}
Curl_creader_def_init:
  574|  1.52k|{
  575|  1.52k|  (void)data;
  576|  1.52k|  (void)reader;
  577|  1.52k|  return CURLE_OK;
  578|  1.52k|}
Curl_creader_def_close:
  582|  1.52k|{
  583|  1.52k|  (void)data;
  584|  1.52k|  (void)reader;
  585|  1.52k|}
Curl_creader_create:
  963|  1.52k|{
  964|  1.52k|  struct Curl_creader *reader = NULL;
  965|  1.52k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  966|  1.52k|  void *p;
  967|       |
  968|  1.52k|  DEBUGASSERT(crt->creader_size >= sizeof(struct Curl_creader));
  ------------------
  |  | 1077|  1.52k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (968:3): [True: 0, False: 1.52k]
  |  Branch (968:3): [True: 1.52k, False: 0]
  ------------------
  969|  1.52k|  p = curlx_calloc(1, crt->creader_size);
  ------------------
  |  | 1485|  1.52k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  970|  1.52k|  if(!p)
  ------------------
  |  Branch (970:6): [True: 0, False: 1.52k]
  ------------------
  971|      0|    goto out;
  972|       |
  973|  1.52k|  reader = (struct Curl_creader *)p;
  974|  1.52k|  reader->crt = crt;
  975|  1.52k|  reader->ctx = p;
  976|  1.52k|  reader->phase = phase;
  977|  1.52k|  result = crt->do_init(data, reader);
  978|       |
  979|  1.52k|out:
  980|  1.52k|  *preader = result ? NULL : reader;
  ------------------
  |  Branch (980:14): [True: 0, False: 1.52k]
  ------------------
  981|  1.52k|  if(result)
  ------------------
  |  Branch (981:6): [True: 0, False: 1.52k]
  ------------------
  982|      0|    curlx_free(reader);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  983|  1.52k|  return result;
  984|  1.52k|}
Curl_creader_set_null:
 1311|  1.52k|{
 1312|  1.52k|  struct Curl_creader *r;
 1313|  1.52k|  CURLcode result;
 1314|       |
 1315|  1.52k|  result = Curl_creader_create(&r, data, &cr_null, CURL_CR_CLIENT);
 1316|  1.52k|  if(result)
  ------------------
  |  Branch (1316:6): [True: 0, False: 1.52k]
  ------------------
 1317|      0|    return result;
 1318|       |
 1319|  1.52k|  cl_reset_reader(data);
 1320|  1.52k|  return do_init_reader_stack(data, r);
 1321|  1.52k|}
sendf.c:cl_reset_reader:
   59|  33.5k|{
   60|  33.5k|  struct Curl_creader *reader = data->req.reader_stack;
   61|  33.5k|  data->req.reader_started = FALSE;
  ------------------
  |  | 1054|  33.5k|#define FALSE false
  ------------------
   62|  35.0k|  while(reader) {
  ------------------
  |  Branch (62:9): [True: 1.52k, False: 33.5k]
  ------------------
   63|  1.52k|    data->req.reader_stack = reader->next;
   64|  1.52k|    reader->crt->do_close(data, reader);
   65|  1.52k|    curlx_free(reader);
  ------------------
  |  | 1488|  1.52k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   66|  1.52k|    reader = data->req.reader_stack;
   67|  1.52k|  }
   68|  33.5k|}
sendf.c:cl_reset_writer:
   48|  32.0k|{
   49|  32.0k|  struct Curl_cwriter *writer = data->req.writer_stack;
   50|  60.3k|  while(writer) {
  ------------------
  |  Branch (50:9): [True: 28.2k, False: 32.0k]
  ------------------
   51|  28.2k|    data->req.writer_stack = writer->next;
   52|  28.2k|    writer->cwt->do_close(data, writer);
   53|  28.2k|    curlx_free(writer);
  ------------------
  |  | 1488|  28.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   54|  28.2k|    writer = data->req.writer_stack;
   55|  28.2k|  }
   56|  32.0k|}
sendf.c:do_init_writer_stack:
  344|  5.65k|{
  345|  5.65k|  struct Curl_cwriter *writer;
  346|  5.65k|  CURLcode result;
  347|       |
  348|  5.65k|  DEBUGASSERT(!data->req.writer_stack);
  ------------------
  |  | 1077|  5.65k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (348:3): [True: 0, False: 5.65k]
  |  Branch (348:3): [True: 5.65k, False: 0]
  ------------------
  349|  5.65k|  result = Curl_cwriter_create(&data->req.writer_stack,
  350|  5.65k|                               data, &Curl_cwt_out, CURL_CW_CLIENT);
  351|  5.65k|  if(result)
  ------------------
  |  Branch (351:6): [True: 0, False: 5.65k]
  ------------------
  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|  5.65k|  result = Curl_cwriter_create(&writer, data, &Curl_cwt_pause,
  358|  5.65k|                               CURL_CW_PROTOCOL);
  359|  5.65k|  if(!result) {
  ------------------
  |  Branch (359:6): [True: 5.65k, False: 0]
  ------------------
  360|  5.65k|    result = Curl_cwriter_add(data, writer);
  361|  5.65k|    if(result)
  ------------------
  |  Branch (361:8): [True: 0, False: 5.65k]
  ------------------
  362|      0|      Curl_cwriter_free(data, writer);
  363|  5.65k|  }
  364|  5.65k|  if(result)
  ------------------
  |  Branch (364:6): [True: 0, False: 5.65k]
  ------------------
  365|      0|    return result;
  366|       |
  367|  5.65k|  result = Curl_cwriter_create(&writer, data, &cw_download, CURL_CW_PROTOCOL);
  368|  5.65k|  if(!result) {
  ------------------
  |  Branch (368:6): [True: 5.65k, False: 0]
  ------------------
  369|  5.65k|    result = Curl_cwriter_add(data, writer);
  370|  5.65k|    if(result)
  ------------------
  |  Branch (370:8): [True: 0, False: 5.65k]
  ------------------
  371|      0|      Curl_cwriter_free(data, writer);
  372|  5.65k|  }
  373|  5.65k|  if(result)
  ------------------
  |  Branch (373:6): [True: 0, False: 5.65k]
  ------------------
  374|      0|    return result;
  375|       |
  376|  5.65k|  result = Curl_cwriter_create(&writer, data, &cw_raw, CURL_CW_RAW);
  377|  5.65k|  if(!result) {
  ------------------
  |  Branch (377:6): [True: 5.65k, False: 0]
  ------------------
  378|  5.65k|    result = Curl_cwriter_add(data, writer);
  379|  5.65k|    if(result)
  ------------------
  |  Branch (379:8): [True: 0, False: 5.65k]
  ------------------
  380|      0|      Curl_cwriter_free(data, writer);
  381|  5.65k|  }
  382|  5.65k|  if(result)
  ------------------
  |  Branch (382:6): [True: 0, False: 5.65k]
  ------------------
  383|      0|    return result;
  384|       |
  385|  5.65k|  return result;
  386|  5.65k|}
sendf.c:cw_download_write:
  194|  1.24k|{
  195|  1.24k|  struct cw_download_ctx *ctx = writer->ctx;
  196|  1.24k|  CURLcode result;
  197|  1.24k|  size_t nwrite, excess_len = 0;
  198|  1.24k|  bool is_connect = !!(type & CLIENTWRITE_CONNECT);
  ------------------
  |  |   46|  1.24k|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  199|       |
  200|  1.24k|  if(!ctx->started_response &&
  ------------------
  |  Branch (200:6): [True: 1.24k, False: 0]
  ------------------
  201|  1.24k|     !(type & CLIENTWRITE_CONNECT) &&
  ------------------
  |  |   46|  1.24k|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  |  Branch (201:6): [True: 0, False: 1.24k]
  ------------------
  202|      0|     (!(type & CLIENTWRITE_INFO) || data->req.upload_done)) {
  ------------------
  |  |   43|      0|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
  |  Branch (202:7): [True: 0, False: 0]
  |  Branch (202:37): [True: 0, False: 0]
  ------------------
  203|      0|    Curl_pgrsTime(data, TIMER_STARTTRANSFER);
  204|      0|    ctx->started_response = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  205|      0|  }
  206|       |
  207|  1.24k|  if(!(type & CLIENTWRITE_BODY)) {
  ------------------
  |  |   42|  1.24k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (207:6): [True: 1.24k, False: 0]
  ------------------
  208|  1.24k|    if(is_connect && data->set.suppress_connect_headers)
  ------------------
  |  Branch (208:8): [True: 1.24k, False: 0]
  |  Branch (208:22): [True: 23, False: 1.22k]
  ------------------
  209|     23|      return CURLE_OK;
  210|  1.22k|    result = Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  211|  1.22k|    CURL_TRC_WRITE(data, "download_write header(type=%x, blen=%zu) -> %d",
  ------------------
  |  |  158|  1.22k|  do {                                                     \
  |  |  159|  1.22k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  1.22k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.44k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.22k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.44k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.22k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  1.22k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  1.22k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1.22k]
  |  |  ------------------
  ------------------
  212|  1.22k|                   (unsigned int)type, nbytes, (int)result);
  213|  1.22k|    return result;
  214|  1.24k|  }
  215|       |
  216|      0|  if(!ctx->started_body &&
  ------------------
  |  Branch (216:6): [True: 0, False: 0]
  ------------------
  217|      0|     !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   43|      0|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
                   !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   46|      0|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  |  Branch (217:6): [True: 0, False: 0]
  ------------------
  218|      0|    Curl_rlimit_start(&data->progress.dl.rlimit, Curl_pgrs_now(data),
  219|      0|                      data->req.size);
  220|      0|    ctx->started_body = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  221|      0|  }
  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|      0|  if(data->req.no_body && nbytes > 0) {
  ------------------
  |  Branch (229:6): [True: 0, False: 0]
  |  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|      0|  nwrite = nbytes;
  246|      0|  if(data->req.maxdownload != -1) {
  ------------------
  |  Branch (246:6): [True: 0, False: 0]
  ------------------
  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|      0|  if(data->set.max_filesize && !data->req.ignorebody) {
  ------------------
  |  Branch (267:6): [True: 0, False: 0]
  |  Branch (267:32): [True: 0, False: 0]
  ------------------
  268|      0|    size_t wmax = get_max_body_write_len(data, data->set.max_filesize);
  269|      0|    if(nwrite > wmax) {
  ------------------
  |  Branch (269:8): [True: 0, False: 0]
  ------------------
  270|      0|      nwrite = wmax;
  271|      0|    }
  272|      0|  }
  273|       |
  274|      0|  if(!data->req.ignorebody && (nwrite || (type & CLIENTWRITE_EOS))) {
  ------------------
  |  |   49|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (274:6): [True: 0, False: 0]
  |  Branch (274:32): [True: 0, False: 0]
  |  Branch (274:42): [True: 0, False: 0]
  ------------------
  275|      0|    result = Curl_cwriter_write(data, writer->next, type, buf, nwrite);
  276|      0|    CURL_TRC_WRITE(data, "download_write body(type=%x, blen=%zu) -> %d",
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  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]
  |  |  ------------------
  ------------------
  277|      0|                   (unsigned int)type, nbytes, (int)result);
  278|      0|    if(result)
  ------------------
  |  Branch (278:8): [True: 0, False: 0]
  ------------------
  279|      0|      return result;
  280|      0|  }
  281|       |
  282|       |  /* Update stats, write and report progress */
  283|      0|  if(nwrite) {
  ------------------
  |  Branch (283:6): [True: 0, False: 0]
  ------------------
  284|      0|    data->req.bytecount += nwrite;
  285|      0|    Curl_pgrs_download_inc(data, nwrite);
  286|      0|  }
  287|       |
  288|      0|  if(excess_len) {
  ------------------
  |  Branch (288:6): [True: 0, False: 0]
  ------------------
  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|      0|  else if((nwrite < nbytes) && !data->req.ignorebody) {
  ------------------
  |  Branch (301:11): [True: 0, False: 0]
  |  Branch (301:32): [True: 0, False: 0]
  ------------------
  302|      0|    failf(data, "Exceeded the maximum allowed file size "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  303|      0|          "(%" FMT_OFF_T ") with %" FMT_OFF_T " bytes",
  304|      0|          data->set.max_filesize, data->req.bytecount);
  305|      0|    return CURLE_FILESIZE_EXCEEDED;
  306|      0|  }
  307|       |
  308|      0|  return CURLE_OK;
  309|      0|}
sendf.c:cw_raw_write:
  326|  1.28k|{
  327|  1.28k|  if(type & CLIENTWRITE_BODY && data->set.verbose && !data->req.ignorebody) {
  ------------------
  |  |   42|  2.56k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (327:6): [True: 0, False: 1.28k]
  |  Branch (327:33): [True: 0, False: 0]
  |  Branch (327:54): [True: 0, False: 0]
  ------------------
  328|      0|    Curl_debug(data, CURLINFO_DATA_IN, buf, nbytes);
  329|      0|  }
  330|  1.28k|  return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  331|  1.28k|}
sendf.c:do_init_reader_stack:
 1137|  1.52k|{
 1138|  1.52k|  CURLcode result = CURLE_OK;
 1139|  1.52k|  curl_off_t clen;
 1140|       |
 1141|  1.52k|  DEBUGASSERT(r);
  ------------------
  |  | 1077|  1.52k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1141:3): [True: 0, False: 1.52k]
  |  Branch (1141:3): [True: 1.52k, False: 0]
  ------------------
 1142|  1.52k|  DEBUGASSERT(r->crt);
  ------------------
  |  | 1077|  1.52k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1142:3): [True: 0, False: 1.52k]
  |  Branch (1142:3): [True: 1.52k, False: 0]
  ------------------
 1143|  1.52k|  DEBUGASSERT(r->phase == CURL_CR_CLIENT);
  ------------------
  |  | 1077|  1.52k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1143:3): [True: 0, False: 1.52k]
  |  Branch (1143:3): [True: 1.52k, False: 0]
  ------------------
 1144|  1.52k|  DEBUGASSERT(!data->req.reader_stack);
  ------------------
  |  | 1077|  1.52k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1144:3): [True: 0, False: 1.52k]
  |  Branch (1144:3): [True: 1.52k, False: 0]
  ------------------
 1145|       |
 1146|  1.52k|  data->req.reader_stack = r;
 1147|  1.52k|  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.52k|  if(clen && (data->set.crlf
  ------------------
  |  Branch (1150:6): [True: 0, False: 1.52k]
  |  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.52k|  return result;
 1161|  1.52k|}
sendf.c:cr_null_total_length:
 1289|  1.52k|{
 1290|       |  /* this reader changes length depending on input */
 1291|  1.52k|  (void)data;
 1292|  1.52k|  (void)reader;
 1293|  1.52k|  return 0;
 1294|  1.52k|}

Curl_setstropt:
   83|  94.2k|{
   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|  94.2k|  curlx_safefree(*charp);
  ------------------
  |  | 1332|  94.2k|  do {                      \
  |  | 1333|  94.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  94.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  94.2k|    (ptr) = NULL;           \
  |  | 1335|  94.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 94.2k]
  |  |  ------------------
  ------------------
   88|       |
   89|  94.2k|  if(s) {
  ------------------
  |  Branch (89:6): [True: 94.2k, False: 0]
  ------------------
   90|  94.2k|    if(strlen(s) > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  94.2k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (90:8): [True: 0, False: 94.2k]
  ------------------
   91|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
   92|       |
   93|  94.2k|    *charp = curlx_strdup(s);
  ------------------
  |  | 1482|  94.2k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
   94|  94.2k|    if(!*charp)
  ------------------
  |  Branch (94:8): [True: 0, False: 94.2k]
  ------------------
   95|      0|      return CURLE_OUT_OF_MEMORY;
   96|  94.2k|  }
   97|       |
   98|  94.2k|  return CURLE_OK;
   99|  94.2k|}
Curl_setopt_SSLVERSION:
  317|  48.1k|{
  318|       |  /*
  319|       |   * Set explicit SSL version to try to connect with, as some SSL
  320|       |   * implementations are lame.
  321|       |   */
  322|  48.1k|  {
  323|  48.1k|    long version, version_max;
  324|  48.1k|    struct ssl_primary_config *primary = &data->set.ssl.primary;
  325|  48.1k|#ifndef CURL_DISABLE_PROXY
  326|  48.1k|    if(option != CURLOPT_SSLVERSION)
  ------------------
  |  Branch (326:8): [True: 24.0k, False: 24.1k]
  ------------------
  327|  24.0k|      primary = &data->set.proxy_ssl.primary;
  328|       |#else
  329|       |    (void)option; /* unused */
  330|       |#endif
  331|  48.1k|    version = C_SSLVERSION_VALUE(arg);
  ------------------
  |  |  194|  48.1k|#define C_SSLVERSION_VALUE(x)     ((x) & 0xffff)
  ------------------
  332|  48.1k|    version_max = (long)C_SSLVERSION_MAX_VALUE(arg);
  ------------------
  |  |  195|  48.1k|#define C_SSLVERSION_MAX_VALUE(x) ((unsigned long)(x) & 0xffff0000)
  ------------------
  333|       |
  334|  48.1k|    if(version < CURL_SSLVERSION_DEFAULT ||
  ------------------
  |  | 2374|  96.2k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  |  Branch (334:8): [True: 0, False: 48.1k]
  ------------------
  335|  48.1k|       version == CURL_SSLVERSION_SSLv2 ||
  ------------------
  |  | 2376|  96.2k|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (335:8): [True: 1, False: 48.1k]
  ------------------
  336|  48.1k|       version == CURL_SSLVERSION_SSLv3 ||
  ------------------
  |  | 2377|  96.2k|#define CURL_SSLVERSION_SSLv3   3L
  ------------------
  |  Branch (336:8): [True: 1, False: 48.1k]
  ------------------
  337|  48.1k|       version >= CURL_SSLVERSION_LAST ||
  ------------------
  |  | 2383|  96.2k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  ------------------
  |  Branch (337:8): [True: 16, False: 48.0k]
  ------------------
  338|  48.0k|       version_max < CURL_SSLVERSION_MAX_NONE ||
  ------------------
  |  | 2385|  96.2k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (338:8): [True: 0, False: 48.0k]
  ------------------
  339|  48.0k|       version_max >= CURL_SSLVERSION_MAX_LAST)
  ------------------
  |  | 2393|  48.0k|#define CURL_SSLVERSION_MAX_LAST    (CURL_SSLVERSION_LAST    << 16)
  |  |  ------------------
  |  |  |  | 2383|  48.0k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  |  |  ------------------
  ------------------
  |  Branch (339:8): [True: 14, False: 48.0k]
  ------------------
  340|     32|      return CURLE_BAD_FUNCTION_ARGUMENT;
  341|  48.0k|    if(version == CURL_SSLVERSION_DEFAULT)
  ------------------
  |  | 2374|  48.0k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  |  Branch (341:8): [True: 47.9k, False: 82]
  ------------------
  342|  47.9k|      version = CURL_SSLVERSION_TLSv1_2;
  ------------------
  |  | 2380|  47.9k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  343|       |
  344|  48.0k|    primary->version = (unsigned char)version;
  345|  48.0k|    primary->version_max = (unsigned int)version_max;
  346|  48.0k|  }
  347|      0|  return CURLE_OK;
  348|  48.1k|}
Curl_vsetopt:
 2872|   218k|{
 2873|   218k|  if(option < CURLOPTTYPE_OBJECTPOINT)
  ------------------
  |  | 1114|   218k|#define CURLOPTTYPE_OBJECTPOINT   10000
  ------------------
  |  Branch (2873:6): [True: 31.2k, False: 187k]
  ------------------
 2874|  31.2k|    return setopt_long(data, option, va_arg(param, long));
 2875|   187k|  else if(option < CURLOPTTYPE_FUNCTIONPOINT) {
  ------------------
  |  | 1115|   187k|#define CURLOPTTYPE_FUNCTIONPOINT 20000
  ------------------
  |  Branch (2875:11): [True: 142k, False: 44.1k]
  ------------------
 2876|       |    /* unfortunately, different pointer types cannot be identified any other
 2877|       |       way than being listed explicitly */
 2878|   142k|    switch(option) {
 2879|  1.14k|    case CURLOPT_HTTPHEADER:
  ------------------
  |  Branch (2879:5): [True: 1.14k, False: 141k]
  ------------------
 2880|  1.14k|    case CURLOPT_QUOTE:
  ------------------
  |  Branch (2880:5): [True: 0, False: 142k]
  ------------------
 2881|  1.14k|    case CURLOPT_POSTQUOTE:
  ------------------
  |  Branch (2881:5): [True: 0, False: 142k]
  ------------------
 2882|  1.14k|    case CURLOPT_TELNETOPTIONS:
  ------------------
  |  Branch (2882:5): [True: 0, False: 142k]
  ------------------
 2883|  1.14k|    case CURLOPT_PREQUOTE:
  ------------------
  |  Branch (2883:5): [True: 0, False: 142k]
  ------------------
 2884|  1.14k|    case CURLOPT_HTTP200ALIASES:
  ------------------
  |  Branch (2884:5): [True: 0, False: 142k]
  ------------------
 2885|  1.16k|    case CURLOPT_MAIL_RCPT:
  ------------------
  |  Branch (2885:5): [True: 25, False: 142k]
  ------------------
 2886|  1.16k|    case CURLOPT_RESOLVE:
  ------------------
  |  Branch (2886:5): [True: 0, False: 142k]
  ------------------
 2887|  1.16k|    case CURLOPT_PROXYHEADER:
  ------------------
  |  Branch (2887:5): [True: 0, False: 142k]
  ------------------
 2888|  11.9k|    case CURLOPT_CONNECT_TO:
  ------------------
  |  Branch (2888:5): [True: 10.8k, False: 132k]
  ------------------
 2889|  11.9k|      return setopt_slist(data, option, va_arg(param, struct curl_slist *));
 2890|     55|    case CURLOPT_HTTPPOST:         /* curl_httppost * */
  ------------------
  |  Branch (2890:5): [True: 55, False: 142k]
  ------------------
 2891|    216|    case CURLOPT_MIMEPOST:         /* curl_mime * */
  ------------------
  |  Branch (2891:5): [True: 161, False: 142k]
  ------------------
 2892|    216|    case CURLOPT_STDERR:           /* FILE * */
  ------------------
  |  Branch (2892:5): [True: 0, False: 142k]
  ------------------
 2893|    891|    case CURLOPT_SHARE:            /* CURLSH * */
  ------------------
  |  Branch (2893:5): [True: 675, False: 142k]
  ------------------
 2894|    891|    case CURLOPT_CURLU:            /* CURLU * */
  ------------------
  |  Branch (2894:5): [True: 0, False: 142k]
  ------------------
 2895|    891|      return setopt_pointers(data, option, param);
 2896|      0|    case CURLOPT_STREAM_DEPENDS:   /* CURL * */
  ------------------
  |  Branch (2896:5): [True: 0, False: 142k]
  ------------------
 2897|      0|    case CURLOPT_STREAM_DEPENDS_E: /* CURL * */
  ------------------
  |  Branch (2897:5): [True: 0, False: 142k]
  ------------------
 2898|      0|      return CURLE_OK;
 2899|   130k|    default:
  ------------------
  |  Branch (2899:5): [True: 130k, False: 12.8k]
  ------------------
 2900|   130k|      break;
 2901|   142k|    }
 2902|       |    /* the char pointer options */
 2903|   130k|    return setopt_cptr(data, option, va_arg(param, char *));
 2904|   142k|  }
 2905|  44.1k|  else if(option < CURLOPTTYPE_OFF_T)
  ------------------
  |  | 1116|  44.1k|#define CURLOPTTYPE_OFF_T         30000
  ------------------
  |  Branch (2905:11): [True: 43.9k, False: 288]
  ------------------
 2906|  43.9k|    return setopt_func(data, option, param);
 2907|    288|  else if(option < CURLOPTTYPE_BLOB)
  ------------------
  |  | 1117|    288|#define CURLOPTTYPE_BLOB          40000
  ------------------
  |  Branch (2907:11): [True: 288, False: 0]
  ------------------
 2908|    288|    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|   218k|}
curl_easy_setopt:
 2922|   218k|{
 2923|   218k|  va_list arg;
 2924|   218k|  CURLcode result;
 2925|   218k|  struct Curl_easy *data = curl;
 2926|       |
 2927|   218k|  if(!data)
  ------------------
  |  Branch (2927:6): [True: 0, False: 218k]
  ------------------
 2928|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 2929|       |
 2930|   218k|  va_start(arg, option);
 2931|       |
 2932|   218k|  result = Curl_vsetopt(data, option, arg);
 2933|       |
 2934|   218k|  va_end(arg);
 2935|   218k|  if(result == CURLE_BAD_FUNCTION_ARGUMENT)
  ------------------
  |  Branch (2935:6): [True: 583, False: 217k]
  ------------------
 2936|    583|    failf(data, "setopt 0x%x got bad argument", (unsigned int)option);
  ------------------
  |  |   62|    583|#define failf Curl_failf
  ------------------
 2937|   218k|  return result;
 2938|   218k|}
setopt.c:setopt_long:
 1301|  31.2k|{
 1302|  31.2k|  typedef CURLcode (*setoptfunc)(struct Curl_easy *data,
 1303|  31.2k|                                 CURLoption option, long arg);
 1304|  31.2k|  static const setoptfunc setopt_call[] = {
 1305|  31.2k|    setopt_long_bool,
 1306|  31.2k|    setopt_long_net,
 1307|  31.2k|    setopt_long_http,
 1308|  31.2k|    setopt_long_proxy,
 1309|  31.2k|    setopt_long_ssl,
 1310|  31.2k|    setopt_long_proto,
 1311|  31.2k|    setopt_long_misc
 1312|  31.2k|  };
 1313|  31.2k|  size_t i;
 1314|       |
 1315|  72.7k|  for(i = 0; i < CURL_ARRAYSIZE(setopt_call); i++) {
  ------------------
  |  | 1299|  72.7k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (1315:14): [True: 72.7k, False: 6]
  ------------------
 1316|  72.7k|    CURLcode result = setopt_call[i](data, option, arg);
 1317|  72.7k|    if(result != CURLE_UNKNOWN_OPTION)
  ------------------
  |  Branch (1317:8): [True: 31.2k, False: 41.4k]
  ------------------
 1318|  31.2k|      return result;
 1319|  72.7k|  }
 1320|      6|  return CURLE_UNKNOWN_OPTION;
 1321|  31.2k|}
setopt.c:setopt_long_bool:
  404|  31.2k|{
  405|  31.2k|  bool enabled = !!arg;
  406|  31.2k|  int ok = 1;
  407|  31.2k|  struct UserDefined *s = &data->set;
  408|  31.2k|  switch(option) {
  409|      9|  case CURLOPT_FORBID_REUSE:
  ------------------
  |  Branch (409:3): [True: 9, False: 31.2k]
  ------------------
  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|      9|    s->reuse_forbid = enabled;
  415|      9|    break;
  416|      5|  case CURLOPT_FRESH_CONNECT:
  ------------------
  |  Branch (416:3): [True: 5, False: 31.2k]
  ------------------
  417|       |    /*
  418|       |     * This transfer shall not use a previously cached connection but
  419|       |     * should be made with a fresh new connect!
  420|       |     */
  421|      5|    s->reuse_fresh = enabled;
  422|      5|    break;
  423|      0|  case CURLOPT_VERBOSE:
  ------------------
  |  Branch (423:3): [True: 0, False: 31.2k]
  ------------------
  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|     39|  case CURLOPT_HEADER:
  ------------------
  |  Branch (430:3): [True: 39, False: 31.2k]
  ------------------
  431|       |    /*
  432|       |     * Set to include the header in the general data output stream.
  433|       |     */
  434|     39|    s->include_header = enabled;
  435|     39|    break;
  436|     27|  case CURLOPT_NOPROGRESS:
  ------------------
  |  Branch (436:3): [True: 27, False: 31.2k]
  ------------------
  437|       |    /*
  438|       |     * Shut off the internal supported progress meter
  439|       |     */
  440|     27|    data->progress.hide = enabled;
  441|     27|    break;
  442|      8|  case CURLOPT_NOBODY:
  ------------------
  |  Branch (442:3): [True: 8, False: 31.2k]
  ------------------
  443|       |    /*
  444|       |     * Do not include the body part in the output data stream.
  445|       |     */
  446|      8|    s->opt_no_body = enabled;
  447|      8|#ifndef CURL_DISABLE_HTTP
  448|      8|    if(s->opt_no_body)
  ------------------
  |  Branch (448:8): [True: 6, False: 2]
  ------------------
  449|       |      /* in HTTP lingo, no body means using the HEAD request... */
  450|      6|      s->method = HTTPREQ_HEAD;
  451|      2|    else if(s->method == HTTPREQ_HEAD)
  ------------------
  |  Branch (451:13): [True: 0, False: 2]
  ------------------
  452|      0|      s->method = HTTPREQ_GET;
  453|      8|#endif
  454|      8|    break;
  455|      3|  case CURLOPT_FAILONERROR:
  ------------------
  |  Branch (455:3): [True: 3, False: 31.2k]
  ------------------
  456|       |    /*
  457|       |     * Do not output the >=400 error code HTML-page, but instead only
  458|       |     * return error.
  459|       |     */
  460|      3|    s->http_fail_on_error = enabled;
  461|      3|    break;
  462|      4|  case CURLOPT_KEEP_SENDING_ON_ERROR:
  ------------------
  |  Branch (462:3): [True: 4, False: 31.2k]
  ------------------
  463|      4|    s->http_keep_sending_on_error = enabled;
  464|      4|    break;
  465|     35|  case CURLOPT_UPLOAD:
  ------------------
  |  Branch (465:3): [True: 35, False: 31.2k]
  ------------------
  466|     35|  case CURLOPT_PUT:
  ------------------
  |  Branch (466:3): [True: 0, False: 31.2k]
  ------------------
  467|       |    /*
  468|       |     * We want to send data to the remote host. If this is HTTP, that equals
  469|       |     * using the PUT request.
  470|       |     */
  471|     35|    if(enabled) {
  ------------------
  |  Branch (471:8): [True: 35, False: 0]
  ------------------
  472|       |      /* If this is HTTP, PUT is what's needed to "upload" */
  473|     35|      s->method = HTTPREQ_PUT;
  474|     35|      s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1054|     35|#define FALSE false
  ------------------
  475|     35|    }
  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|     35|    break;
  481|      2|  case CURLOPT_FILETIME:
  ------------------
  |  Branch (481:3): [True: 2, False: 31.2k]
  ------------------
  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|      2|  case CURLOPT_HTTP09_ALLOWED:
  ------------------
  |  Branch (489:3): [True: 2, False: 31.2k]
  ------------------
  490|      2|    s->http09_allowed = enabled;
  491|      2|    break;
  492|      0|#ifndef CURL_DISABLE_COOKIES
  493|      3|  case CURLOPT_COOKIESESSION:
  ------------------
  |  Branch (493:3): [True: 3, False: 31.2k]
  ------------------
  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|      3|    s->cookiesession = enabled;
  501|      3|    break;
  502|      0|#endif
  503|      4|  case CURLOPT_AUTOREFERER:
  ------------------
  |  Branch (503:3): [True: 4, False: 31.2k]
  ------------------
  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|      8|  case CURLOPT_TRANSFER_ENCODING:
  ------------------
  |  Branch (509:3): [True: 8, False: 31.2k]
  ------------------
  510|      8|    s->http_transfer_encoding = enabled;
  511|      8|    break;
  512|      7|  case CURLOPT_UNRESTRICTED_AUTH:
  ------------------
  |  Branch (512:3): [True: 7, False: 31.2k]
  ------------------
  513|       |    /*
  514|       |     * Send authentication (user+password) when following locations, even when
  515|       |     * hostname changed.
  516|       |     */
  517|      7|    s->allow_auth_to_other_hosts = enabled;
  518|      7|    break;
  519|      3|  case CURLOPT_HTTP_TRANSFER_DECODING:
  ------------------
  |  Branch (519:3): [True: 3, False: 31.2k]
  ------------------
  520|       |    /*
  521|       |     * disable libcurl transfer encoding is used
  522|       |     */
  523|      3|    s->http_te_skip = !enabled; /* reversed */
  524|      3|    break;
  525|      3|  case CURLOPT_HTTP_CONTENT_DECODING:
  ------------------
  |  Branch (525:3): [True: 3, False: 31.2k]
  ------------------
  526|       |    /*
  527|       |     * raw data passed to the application when content encoding is used
  528|       |     */
  529|      3|    s->http_ce_skip = !enabled; /* reversed */
  530|      3|    break;
  531|      4|  case CURLOPT_HTTPGET:
  ------------------
  |  Branch (531:3): [True: 4, False: 31.2k]
  ------------------
  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|     12|  case CURLOPT_POST:
  ------------------
  |  Branch (540:3): [True: 12, False: 31.2k]
  ------------------
  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|     12|    if(enabled) {
  ------------------
  |  Branch (544:8): [True: 11, False: 1]
  ------------------
  545|     11|      s->method = HTTPREQ_POST;
  546|     11|      s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1054|     11|#define FALSE false
  ------------------
  547|     11|    }
  548|      1|    else
  549|      1|      s->method = HTTPREQ_GET;
  550|     12|    break;
  551|      0|#endif /* !CURL_DISABLE_HTTP */
  552|      0|#ifndef CURL_DISABLE_PROXY
  553|      4|  case CURLOPT_HTTPPROXYTUNNEL:
  ------------------
  |  Branch (553:3): [True: 4, False: 31.2k]
  ------------------
  554|       |    /*
  555|       |     * Tunnel operations through the proxy instead of normal proxy use
  556|       |     */
  557|      4|    s->tunnel_thru_httpproxy = enabled;
  558|      4|    break;
  559|      3|  case CURLOPT_HAPROXYPROTOCOL:
  ------------------
  |  Branch (559:3): [True: 3, False: 31.2k]
  ------------------
  560|       |    /*
  561|       |     * Set to send the HAProxy Proxy Protocol header
  562|       |     */
  563|      3|    s->haproxyprotocol = enabled;
  564|      3|    break;
  565|      9|  case CURLOPT_PROXY_SSL_VERIFYPEER:
  ------------------
  |  Branch (565:3): [True: 9, False: 31.2k]
  ------------------
  566|       |    /*
  567|       |     * Enable peer SSL verifying for proxy.
  568|       |     */
  569|      9|    s->proxy_ssl.primary.verifypeer = enabled;
  570|       |
  571|       |    /* Update the current connection proxy_ssl_config. */
  572|      9|    Curl_ssl_conn_config_update(data, TRUE);
  ------------------
  |  | 1051|      9|#define TRUE true
  ------------------
  573|      9|    break;
  574|      7|  case CURLOPT_PROXY_SSL_VERIFYHOST:
  ------------------
  |  Branch (574:3): [True: 7, False: 31.2k]
  ------------------
  575|       |    /*
  576|       |     * Enable verification of the hostname in the peer certificate for proxy
  577|       |     */
  578|      7|    s->proxy_ssl.primary.verifyhost = enabled;
  579|      7|    ok = 2;
  580|       |    /* Update the current connection proxy_ssl_config. */
  581|      7|    Curl_ssl_conn_config_update(data, TRUE);
  ------------------
  |  | 1051|      7|#define TRUE true
  ------------------
  582|      7|    break;
  583|      6|  case CURLOPT_PROXY_TRANSFER_MODE:
  ------------------
  |  Branch (583:3): [True: 6, False: 31.2k]
  ------------------
  584|       |    /*
  585|       |     * set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy
  586|       |     */
  587|      6|    s->proxy_transfer_mode = enabled;
  588|      6|    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|      5|  case CURLOPT_DIRLISTONLY:
  ------------------
  |  Branch (599:3): [True: 5, False: 31.2k]
  ------------------
  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|      5|    s->list_only = enabled;
  605|      5|    break;
  606|      0|#endif
  607|      2|  case CURLOPT_APPEND:
  ------------------
  |  Branch (607:3): [True: 2, False: 31.2k]
  ------------------
  608|       |    /*
  609|       |     * We want to upload and append to an existing file. Used for FTP and
  610|       |     * SFTP.
  611|       |     */
  612|      2|    s->remote_append = enabled;
  613|      2|    break;
  614|      0|#ifndef CURL_DISABLE_FTP
  615|      2|  case CURLOPT_FTP_USE_EPRT:
  ------------------
  |  Branch (615:3): [True: 2, False: 31.2k]
  ------------------
  616|      2|    s->ftp_use_eprt = enabled;
  617|      2|    break;
  618|      4|  case CURLOPT_FTP_USE_EPSV:
  ------------------
  |  Branch (618:3): [True: 4, False: 31.2k]
  ------------------
  619|      4|    s->ftp_use_epsv = enabled;
  620|      4|    break;
  621|      3|  case CURLOPT_FTP_USE_PRET:
  ------------------
  |  Branch (621:3): [True: 3, False: 31.2k]
  ------------------
  622|      3|    s->ftp_use_pret = enabled;
  623|      3|    break;
  624|      2|  case CURLOPT_FTP_SKIP_PASV_IP:
  ------------------
  |  Branch (624:3): [True: 2, False: 31.2k]
  ------------------
  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: 31.2k]
  ------------------
  632|      6|    s->wildcard_enabled = enabled;
  633|      6|    break;
  634|      0|#endif
  635|      0|  case CURLOPT_CRLF:
  ------------------
  |  Branch (635:3): [True: 0, False: 31.2k]
  ------------------
  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|      2|  case CURLOPT_TFTP_NO_OPTIONS:
  ------------------
  |  Branch (642:3): [True: 2, False: 31.2k]
  ------------------
  643|       |    /*
  644|       |     * Option that prevents libcurl from sending TFTP option requests to the
  645|       |     * server.
  646|       |     */
  647|      2|    s->tftp_no_options = enabled;
  648|      2|    break;
  649|      0|#endif /* !CURL_DISABLE_TFTP */
  650|      2|  case CURLOPT_TRANSFERTEXT:
  ------------------
  |  Branch (650:3): [True: 2, False: 31.2k]
  ------------------
  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|      2|    s->prefer_ascii = enabled;
  658|      2|    break;
  659|    708|  case CURLOPT_SSL_VERIFYPEER:
  ------------------
  |  Branch (659:3): [True: 708, False: 30.5k]
  ------------------
  660|       |    /*
  661|       |     * Enable peer SSL verifying.
  662|       |     */
  663|    708|    s->ssl.primary.verifypeer = enabled;
  664|       |
  665|       |    /* Update the current connection ssl_config. */
  666|    708|    Curl_ssl_conn_config_update(data, FALSE);
  ------------------
  |  | 1054|    708|#define FALSE false
  ------------------
  667|    708|    break;
  668|      0|#ifndef CURL_DISABLE_DOH
  669|      2|  case CURLOPT_DOH_SSL_VERIFYPEER:
  ------------------
  |  Branch (669:3): [True: 2, False: 31.2k]
  ------------------
  670|       |    /*
  671|       |     * Enable peer SSL verifying for DoH.
  672|       |     */
  673|      2|    s->doh_verifypeer = enabled;
  674|      2|    break;
  675|      4|  case CURLOPT_DOH_SSL_VERIFYHOST:
  ------------------
  |  Branch (675:3): [True: 4, False: 31.2k]
  ------------------
  676|       |    /*
  677|       |     * Enable verification of the hostname in the peer certificate for DoH
  678|       |     */
  679|      4|    s->doh_verifyhost = enabled;
  680|      4|    ok = 2;
  681|      4|    break;
  682|      4|  case CURLOPT_DOH_SSL_VERIFYSTATUS:
  ------------------
  |  Branch (682:3): [True: 4, False: 31.2k]
  ------------------
  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|    684|  case CURLOPT_SSL_VERIFYHOST:
  ------------------
  |  Branch (693:3): [True: 684, False: 30.5k]
  ------------------
  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|    684|    s->ssl.primary.verifyhost = enabled;
  702|    684|    ok = 2;
  703|       |
  704|       |    /* Update the current connection ssl_config. */
  705|    684|    Curl_ssl_conn_config_update(data, FALSE);
  ------------------
  |  | 1054|    684|#define FALSE false
  ------------------
  706|    684|    break;
  707|    682|  case CURLOPT_SSL_VERIFYSTATUS:
  ------------------
  |  Branch (707:3): [True: 682, False: 30.5k]
  ------------------
  708|       |    /*
  709|       |     * Enable certificate status verifying.
  710|       |     */
  711|    682|    if(!Curl_ssl_cert_status_request())
  ------------------
  |  Branch (711:8): [True: 0, False: 682]
  ------------------
  712|      0|      return CURLE_NOT_BUILT_IN;
  713|       |
  714|    682|    s->ssl.primary.verifystatus = enabled;
  715|       |
  716|       |    /* Update the current connection ssl_config. */
  717|    682|    Curl_ssl_conn_config_update(data, FALSE);
  ------------------
  |  | 1054|    682|#define FALSE false
  ------------------
  718|    682|    break;
  719|      8|  case CURLOPT_CERTINFO:
  ------------------
  |  Branch (719:3): [True: 8, False: 31.2k]
  ------------------
  720|      8|#ifdef USE_SSL
  721|      8|    if(Curl_ssl_supports(data, SSLSUPP_CERTINFO))
  ------------------
  |  |   36|      8|#define SSLSUPP_CERTINFO     (1 << 1) /* supports CURLOPT_CERTINFO */
  ------------------
  |  Branch (721:8): [True: 8, False: 0]
  ------------------
  722|      8|      s->ssl.certinfo = enabled;
  723|      0|    else
  724|      0|#endif
  725|      0|      return CURLE_NOT_BUILT_IN;
  726|      8|    break;
  727|     23|  case CURLOPT_NOSIGNAL:
  ------------------
  |  Branch (727:3): [True: 23, False: 31.2k]
  ------------------
  728|       |    /*
  729|       |     * The application asks not to set any signal() or alarm() handlers,
  730|       |     * even when using a timeout.
  731|       |     */
  732|     23|    s->no_signal = enabled;
  733|     23|    break;
  734|      4|  case CURLOPT_TCP_NODELAY:
  ------------------
  |  Branch (734:3): [True: 4, False: 31.2k]
  ------------------
  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|      2|  case CURLOPT_IGNORE_CONTENT_LENGTH:
  ------------------
  |  Branch (741:3): [True: 2, False: 31.2k]
  ------------------
  742|      2|    s->ignorecl = enabled;
  743|      2|    break;
  744|      3|  case CURLOPT_SSL_SESSIONID_CACHE:
  ------------------
  |  Branch (744:3): [True: 3, False: 31.2k]
  ------------------
  745|      3|    s->ssl.primary.cache_session = enabled;
  746|      3|#ifndef CURL_DISABLE_PROXY
  747|      3|    s->proxy_ssl.primary.cache_session = s->ssl.primary.cache_session;
  748|      3|#endif
  749|      3|    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|      3|  case CURLOPT_MAIL_RCPT_ALLOWFAILS:
  ------------------
  |  Branch (756:3): [True: 3, False: 31.2k]
  ------------------
  757|       |    /* allow RCPT TO command to fail for some recipients */
  758|      3|    s->mail_rcpt_allowfails = enabled;
  759|      3|    break;
  760|      0|#endif /* !CURL_DISABLE_SMTP */
  761|      5|  case CURLOPT_SASL_IR:
  ------------------
  |  Branch (761:3): [True: 5, False: 31.2k]
  ------------------
  762|       |    /* Enable/disable SASL initial response */
  763|      5|    s->sasl_ir = enabled;
  764|      5|    break;
  765|     47|  case CURLOPT_TCP_KEEPALIVE:
  ------------------
  |  Branch (765:3): [True: 47, False: 31.2k]
  ------------------
  766|     47|    s->tcp_keepalive = enabled;
  767|     47|    break;
  768|      5|  case CURLOPT_TCP_FASTOPEN:
  ------------------
  |  Branch (768:3): [True: 5, False: 31.2k]
  ------------------
  769|      5|#if defined(CONNECT_DATA_IDEMPOTENT) || defined(MSG_FASTOPEN) || \
  770|      5|  defined(TCP_FASTOPEN_CONNECT)
  771|      5|    s->tcp_fastopen = enabled;
  772|      5|    break;
  773|       |#else
  774|       |    return CURLE_NOT_BUILT_IN;
  775|       |#endif
  776|     70|  case CURLOPT_SSL_ENABLE_ALPN:
  ------------------
  |  Branch (776:3): [True: 70, False: 31.1k]
  ------------------
  777|     70|    s->ssl_enable_alpn = enabled;
  778|     70|    break;
  779|      6|  case CURLOPT_PATH_AS_IS:
  ------------------
  |  Branch (779:3): [True: 6, False: 31.2k]
  ------------------
  780|      6|    s->path_as_is = enabled;
  781|      6|    break;
  782|    678|  case CURLOPT_PIPEWAIT:
  ------------------
  |  Branch (782:3): [True: 678, False: 30.5k]
  ------------------
  783|    678|    s->pipewait = enabled;
  784|    678|    break;
  785|      9|  case CURLOPT_SUPPRESS_CONNECT_HEADERS:
  ------------------
  |  Branch (785:3): [True: 9, False: 31.2k]
  ------------------
  786|      9|    s->suppress_connect_headers = enabled;
  787|      9|    break;
  788|      0|#ifndef CURL_DISABLE_SHUFFLE_DNS
  789|     13|  case CURLOPT_DNS_SHUFFLE_ADDRESSES:
  ------------------
  |  Branch (789:3): [True: 13, False: 31.2k]
  ------------------
  790|     13|    s->dns_shuffle_addresses = enabled;
  791|     13|    break;
  792|      0|#endif
  793|      9|  case CURLOPT_DISALLOW_USERNAME_IN_URL:
  ------------------
  |  Branch (793:3): [True: 9, False: 31.2k]
  ------------------
  794|      9|    s->disallow_username_in_url = enabled;
  795|      9|    break;
  796|     12|  case CURLOPT_QUICK_EXIT:
  ------------------
  |  Branch (796:3): [True: 12, False: 31.2k]
  ------------------
  797|     12|    s->quick_exit = enabled;
  798|     12|    break;
  799|  28.0k|  default:
  ------------------
  |  Branch (799:3): [True: 28.0k, False: 3.21k]
  ------------------
  800|  28.0k|    return CURLE_UNKNOWN_OPTION;
  801|  31.2k|  }
  802|  3.21k|  if((arg > ok) || (arg < 0))
  ------------------
  |  Branch (802:6): [True: 337, False: 2.87k]
  |  Branch (802:20): [True: 0, False: 2.87k]
  ------------------
  803|       |    /* reserve other values for future use */
  804|    337|    infof(data, "boolean setopt(%d) got unsupported argument %ld,"
  ------------------
  |  |  143|    337|  do {                               \
  |  |  144|    337|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    337|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 337, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 337]
  |  |  |  |  ------------------
  |  |  |  |  320|    337|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    337|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    337|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 337]
  |  |  ------------------
  ------------------
  805|  3.21k|          " treated as %d", (int)option, arg, enabled);
  806|       |
  807|  3.21k|  return CURLE_OK;
  808|  31.2k|}
setopt.c:setopt_long_net:
  823|  28.0k|{
  824|  28.0k|  CURLcode result = CURLE_OK;
  825|  28.0k|  struct UserDefined *s = &data->set;
  826|       |
  827|  28.0k|  switch(option) {
  828|     81|  case CURLOPT_DNS_CACHE_TIMEOUT:
  ------------------
  |  Branch (828:3): [True: 81, False: 27.9k]
  ------------------
  829|     81|    if(arg != -1)
  ------------------
  |  Branch (829:8): [True: 81, False: 0]
  ------------------
  830|     81|      return setopt_set_timeout_sec(&s->dns_cache_timeout_ms, arg);
  831|      0|    s->dns_cache_timeout_ms = -1;
  832|      0|    break;
  833|     58|  case CURLOPT_MAXCONNECTS:
  ------------------
  |  Branch (833:3): [True: 58, False: 27.9k]
  ------------------
  834|     58|    result = value_range(&arg, 0, 0, INT_MAX);
  835|     58|    if(!result)
  ------------------
  |  Branch (835:8): [True: 58, False: 0]
  ------------------
  836|     58|      s->maxconnects = arg ? (uint32_t)arg : DEFAULT_CONNCACHE_SIZE;
  ------------------
  |  |   38|      1|#define DEFAULT_CONNCACHE_SIZE 5
  ------------------
  |  Branch (836:24): [True: 57, False: 1]
  ------------------
  837|     58|    break;
  838|  10.8k|  case CURLOPT_SERVER_RESPONSE_TIMEOUT:
  ------------------
  |  Branch (838:3): [True: 10.8k, False: 17.2k]
  ------------------
  839|  10.8k|    return setopt_set_timeout_sec(&s->server_response_timeout, arg);
  840|     28|  case CURLOPT_SERVER_RESPONSE_TIMEOUT_MS:
  ------------------
  |  Branch (840:3): [True: 28, False: 28.0k]
  ------------------
  841|     28|    return setopt_set_timeout_ms(&s->server_response_timeout, arg);
  842|     30|  case CURLOPT_LOW_SPEED_LIMIT:
  ------------------
  |  Branch (842:3): [True: 30, False: 28.0k]
  ------------------
  843|     30|    if(arg < 0)
  ------------------
  |  Branch (843:8): [True: 0, False: 30]
  ------------------
  844|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  845|     30|    else
  846|     30|      s->low_speed_limit = arg;
  847|     30|    break;
  848|     49|  case CURLOPT_LOW_SPEED_TIME:
  ------------------
  |  Branch (848:3): [True: 49, False: 27.9k]
  ------------------
  849|     49|    result = value_range(&arg, 0, 0, USHRT_MAX);
  850|     49|    if(!result)
  ------------------
  |  Branch (850:8): [True: 49, False: 0]
  ------------------
  851|     49|      s->low_speed_time = (uint16_t)arg;
  852|     49|    break;
  853|     49|  case CURLOPT_PORT:
  ------------------
  |  Branch (853:3): [True: 49, False: 27.9k]
  ------------------
  854|     49|    if((arg < 0) || (arg > 65535))
  ------------------
  |  Branch (854:8): [True: 0, False: 49]
  |  Branch (854:21): [True: 32, False: 17]
  ------------------
  855|     32|      return CURLE_BAD_FUNCTION_ARGUMENT;
  856|     17|    s->use_port = (unsigned short)arg;
  857|     17|    break;
  858|      0|  case CURLOPT_TIMEOUT:
  ------------------
  |  Branch (858:3): [True: 0, False: 28.0k]
  ------------------
  859|      0|    return setopt_set_timeout_sec(&s->timeout, arg);
  860|  11.4k|  case CURLOPT_TIMEOUT_MS:
  ------------------
  |  Branch (860:3): [True: 11.4k, False: 16.5k]
  ------------------
  861|  11.4k|    return setopt_set_timeout_ms(&s->timeout, arg);
  862|    108|  case CURLOPT_CONNECTTIMEOUT:
  ------------------
  |  Branch (862:3): [True: 108, False: 27.9k]
  ------------------
  863|    108|    return setopt_set_timeout_sec(&s->connecttimeout, arg);
  864|    109|  case CURLOPT_CONNECTTIMEOUT_MS:
  ------------------
  |  Branch (864:3): [True: 109, False: 27.9k]
  ------------------
  865|    109|    return setopt_set_timeout_ms(&s->connecttimeout, arg);
  866|      0|#ifndef CURL_DISABLE_BINDLOCAL
  867|     47|  case CURLOPT_LOCALPORT:
  ------------------
  |  Branch (867:3): [True: 47, False: 27.9k]
  ------------------
  868|     47|    if((arg < 0) || (arg > 65535))
  ------------------
  |  Branch (868:8): [True: 0, False: 47]
  |  Branch (868:21): [True: 15, False: 32]
  ------------------
  869|     15|      return CURLE_BAD_FUNCTION_ARGUMENT;
  870|     32|    s->localport = curlx_sltous(arg);
  871|     32|    break;
  872|     65|  case CURLOPT_LOCALPORTRANGE:
  ------------------
  |  Branch (872:3): [True: 65, False: 27.9k]
  ------------------
  873|     65|    if((arg < 0) || (arg > 65535))
  ------------------
  |  Branch (873:8): [True: 0, False: 65]
  |  Branch (873:21): [True: 31, False: 34]
  ------------------
  874|     31|      return CURLE_BAD_FUNCTION_ARGUMENT;
  875|     34|    s->localportrange = curlx_sltous(arg);
  876|     34|    break;
  877|      0|#endif
  878|     57|  case CURLOPT_BUFFERSIZE:
  ------------------
  |  Branch (878:3): [True: 57, False: 27.9k]
  ------------------
  879|     57|    result = value_range(&arg, 0, READBUFFER_MIN, READBUFFER_MAX);
  ------------------
  |  |  121|     57|#define READBUFFER_MIN  1024
  ------------------
                  result = value_range(&arg, 0, READBUFFER_MIN, READBUFFER_MAX);
  ------------------
  |  |  120|     57|#define READBUFFER_MAX  CURL_MAX_READ_SIZE
  |  |  ------------------
  |  |  |  |  255|     57|#define CURL_MAX_READ_SIZE (10 * 1024 * 1024)
  |  |  ------------------
  ------------------
  880|     57|    if(!result)
  ------------------
  |  Branch (880:8): [True: 57, False: 0]
  ------------------
  881|     57|      s->buffer_size = (unsigned int)arg;
  882|     57|    break;
  883|     63|  case CURLOPT_UPLOAD_BUFFERSIZE:
  ------------------
  |  Branch (883:3): [True: 63, False: 27.9k]
  ------------------
  884|     63|    result = value_range(&arg, 0, UPLOADBUFFER_MIN, UPLOADBUFFER_MAX);
  ------------------
  |  |  133|     63|#define UPLOADBUFFER_MIN     CURL_MAX_WRITE_SIZE
  |  |  ------------------
  |  |  |  |  265|     63|#define CURL_MAX_WRITE_SIZE 16384
  |  |  ------------------
  ------------------
                  result = value_range(&arg, 0, UPLOADBUFFER_MIN, UPLOADBUFFER_MAX);
  ------------------
  |  |  132|     63|#define UPLOADBUFFER_MAX     (2 * 1024 * 1024)
  ------------------
  885|     63|    if(!result)
  ------------------
  |  Branch (885:8): [True: 63, False: 0]
  ------------------
  886|     63|      s->upload_buffer_size = (unsigned int)arg;
  887|     63|    break;
  888|     29|  case CURLOPT_MAXFILESIZE:
  ------------------
  |  Branch (888:3): [True: 29, False: 28.0k]
  ------------------
  889|     29|    if(arg < 0)
  ------------------
  |  Branch (889:8): [True: 0, False: 29]
  ------------------
  890|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  891|     29|    else
  892|     29|      s->max_filesize = arg;
  893|     29|    break;
  894|     43|  case CURLOPT_IPRESOLVE:
  ------------------
  |  Branch (894:3): [True: 43, False: 27.9k]
  ------------------
  895|     43|    if((arg < CURL_IPRESOLVE_WHATEVER) || (arg > CURL_IPRESOLVE_V6))
  ------------------
  |  | 2309|     43|#define CURL_IPRESOLVE_WHATEVER 0L /* default, uses addresses to all IP
  ------------------
                  if((arg < CURL_IPRESOLVE_WHATEVER) || (arg > CURL_IPRESOLVE_V6))
  ------------------
  |  | 2312|     43|#define CURL_IPRESOLVE_V6       2L /* uses only IPv6 addresses/connections */
  ------------------
  |  Branch (895:8): [True: 0, False: 43]
  |  Branch (895:43): [True: 31, False: 12]
  ------------------
  896|     31|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  897|     12|    else
  898|     12|      s->ipver = (unsigned char)arg;
  899|     43|    break;
  900|     37|  case CURLOPT_CONNECT_ONLY:
  ------------------
  |  Branch (900:3): [True: 37, False: 27.9k]
  ------------------
  901|     37|    if(arg < 0 || arg > 2)
  ------------------
  |  Branch (901:8): [True: 0, False: 37]
  |  Branch (901:19): [True: 33, False: 4]
  ------------------
  902|     33|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  903|      4|    else {
  904|      4|      s->connect_only = !!arg;
  905|      4|      s->connect_only_ws = (arg == 2);
  906|      4|    }
  907|     37|    break;
  908|      0|#ifdef USE_IPV6
  909|    138|  case CURLOPT_ADDRESS_SCOPE:
  ------------------
  |  Branch (909:3): [True: 138, False: 27.8k]
  ------------------
  910|    138|#if SIZEOF_LONG > 4
  911|    138|    if((unsigned long)arg > UINT_MAX)
  ------------------
  |  Branch (911:8): [True: 0, False: 138]
  ------------------
  912|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  913|    138|    else
  914|    138|#endif
  915|    138|    s->scope_id = (unsigned int)arg;
  916|    138|    break;
  917|      0|#endif
  918|     65|  case CURLOPT_TCP_KEEPIDLE:
  ------------------
  |  Branch (918:3): [True: 65, False: 27.9k]
  ------------------
  919|     65|    result = value_range(&arg, 0, 0, INT_MAX);
  920|     65|    if(!result)
  ------------------
  |  Branch (920:8): [True: 65, False: 0]
  ------------------
  921|     65|      s->tcp_keepidle = (int)arg;
  922|     65|    break;
  923|     85|  case CURLOPT_TCP_KEEPINTVL:
  ------------------
  |  Branch (923:3): [True: 85, False: 27.9k]
  ------------------
  924|     85|    result = value_range(&arg, 0, 0, INT_MAX);
  925|     85|    if(!result)
  ------------------
  |  Branch (925:8): [True: 85, False: 0]
  ------------------
  926|     85|      s->tcp_keepintvl = (int)arg;
  927|     85|    break;
  928|     55|  case CURLOPT_TCP_KEEPCNT:
  ------------------
  |  Branch (928:3): [True: 55, False: 27.9k]
  ------------------
  929|     55|    result = value_range(&arg, 0, 0, INT_MAX);
  930|     55|    if(!result)
  ------------------
  |  Branch (930:8): [True: 55, False: 0]
  ------------------
  931|     55|      s->tcp_keepcnt = (int)arg;
  932|     55|    break;
  933|     13|  case CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS:
  ------------------
  |  Branch (933:3): [True: 13, False: 28.0k]
  ------------------
  934|     13|    return setopt_set_timeout_ms(&s->happy_eyeballs_timeout, arg);
  935|     26|  case CURLOPT_UPKEEP_INTERVAL_MS:
  ------------------
  |  Branch (935:3): [True: 26, False: 28.0k]
  ------------------
  936|     26|    return setopt_set_timeout_ms(&s->upkeep_interval_ms, arg);
  937|     48|  case CURLOPT_MAXAGE_CONN:
  ------------------
  |  Branch (937:3): [True: 48, False: 27.9k]
  ------------------
  938|     48|    return setopt_set_timeout_sec(&s->conn_max_idle_ms, arg);
  939|     44|  case CURLOPT_MAXLIFETIME_CONN:
  ------------------
  |  Branch (939:3): [True: 44, False: 27.9k]
  ------------------
  940|     44|    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: 28.0k]
  ------------------
  942|       |    /* deprecated */
  943|      0|    break;
  944|  4.41k|  default:
  ------------------
  |  Branch (944:3): [True: 4.41k, False: 23.6k]
  ------------------
  945|  4.41k|    return CURLE_UNKNOWN_OPTION;
  946|  28.0k|  }
  947|    792|  return result;
  948|  28.0k|}
setopt.c:setopt_set_timeout_sec:
   55|  11.0k|{
   56|  11.0k|  if(secs < 0)
  ------------------
  |  Branch (56:6): [True: 0, False: 11.0k]
  ------------------
   57|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
   58|  11.0k|#if LONG_MAX > (TIMEDIFF_T_MAX / 1000)
   59|  11.0k|  if(secs > (TIMEDIFF_T_MAX / 1000)) {
  ------------------
  |  |   33|  11.0k|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  590|  11.0k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  |  Branch (59:6): [True: 0, False: 11.0k]
  ------------------
   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|  11.0k|#endif
   64|  11.0k|  *ptimeout_ms = (timediff_t)secs * 1000;
   65|  11.0k|  return CURLE_OK;
   66|  11.0k|}
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: 27, False: 753]
  ------------------
  815|     27|    *value = min;
  816|    753|  else if(*value > max)
  ------------------
  |  Branch (816:11): [True: 292, False: 461]
  ------------------
  817|    292|    *value = max;
  818|    780|  return CURLE_OK;
  819|    780|}
setopt.c:setopt_set_timeout_ms:
   69|  11.6k|{
   70|  11.6k|  if(ms < 0)
  ------------------
  |  Branch (70:6): [True: 0, False: 11.6k]
  ------------------
   71|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
   72|       |#if LONG_MAX > TIMEDIFF_T_MAX
   73|       |  if(ms > TIMEDIFF_T_MAX) {
   74|       |    *ptimeout_ms = TIMEDIFF_T_MAX;
   75|       |    return CURLE_OK;
   76|       |  }
   77|       |#endif
   78|  11.6k|  *ptimeout_ms = (timediff_t)ms;
   79|  11.6k|  return CURLE_OK;
   80|  11.6k|}
setopt.c:setopt_long_http:
 1060|  4.41k|{
 1061|  4.41k|#ifndef CURL_DISABLE_HTTP
 1062|  4.41k|  CURLcode result = CURLE_OK;
 1063|  4.41k|  struct UserDefined *s = &data->set;
 1064|       |
 1065|  4.41k|  switch(option) {
 1066|     31|  case CURLOPT_FOLLOWLOCATION:
  ------------------
  |  Branch (1066:3): [True: 31, False: 4.38k]
  ------------------
 1067|     31|    if((unsigned long)arg > 3)
  ------------------
  |  Branch (1067:8): [True: 27, False: 4]
  ------------------
 1068|     27|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1069|      4|    else
 1070|      4|      s->http_follow_mode = (unsigned char)arg;
 1071|     31|    break;
 1072|     55|  case CURLOPT_MAXREDIRS:
  ------------------
  |  Branch (1072:3): [True: 55, False: 4.36k]
  ------------------
 1073|     55|    result = value_range(&arg, -1, -1, 0x7fff);
 1074|     55|    if(!result)
  ------------------
  |  Branch (1074:8): [True: 55, False: 0]
  ------------------
 1075|     55|      s->maxredirs = (short)arg;
 1076|     55|    break;
 1077|     29|  case CURLOPT_POSTREDIR:
  ------------------
  |  Branch (1077:3): [True: 29, False: 4.38k]
  ------------------
 1078|     29|    if(arg < CURL_REDIR_GET_ALL)
  ------------------
  |  | 2409|     29|#define CURL_REDIR_GET_ALL  0L
  ------------------
  |  Branch (1078:8): [True: 0, False: 29]
  ------------------
 1079|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1080|     29|    else {
 1081|     29|      s->post301 = !!(arg & CURL_REDIR_POST_301);
  ------------------
  |  | 2410|     29|#define CURL_REDIR_POST_301 1L
  ------------------
 1082|     29|      s->post302 = !!(arg & CURL_REDIR_POST_302);
  ------------------
  |  | 2411|     29|#define CURL_REDIR_POST_302 2L
  ------------------
 1083|     29|      s->post303 = !!(arg & CURL_REDIR_POST_303);
  ------------------
  |  | 2412|     29|#define CURL_REDIR_POST_303 4L
  ------------------
 1084|     29|    }
 1085|     29|    break;
 1086|    214|  case CURLOPT_HEADEROPT:
  ------------------
  |  Branch (1086:3): [True: 214, False: 4.20k]
  ------------------
 1087|    214|    s->sep_headers = !!(arg & CURLHEADER_SEPARATE);
  ------------------
  |  | 1031|    214|#define CURLHEADER_SEPARATE (1L << 0)
  ------------------
 1088|    214|    break;
 1089|     79|  case CURLOPT_HTTPAUTH:
  ------------------
  |  Branch (1089:3): [True: 79, False: 4.33k]
  ------------------
 1090|     79|    return httpauth(data, FALSE, (unsigned long)arg);
  ------------------
  |  | 1054|     79|#define FALSE false
  ------------------
 1091|    721|  case CURLOPT_HTTP_VERSION:
  ------------------
  |  Branch (1091:3): [True: 721, False: 3.69k]
  ------------------
 1092|    721|    return setopt_HTTP_VERSION(data, arg);
 1093|     52|  case CURLOPT_EXPECT_100_TIMEOUT_MS:
  ------------------
  |  Branch (1093:3): [True: 52, False: 4.36k]
  ------------------
 1094|     52|    result = value_range(&arg, 0, 0, 0xffff);
 1095|     52|    if(!result)
  ------------------
  |  Branch (1095:8): [True: 52, False: 0]
  ------------------
 1096|     52|      s->expect_100_timeout = (unsigned short)arg;
 1097|     52|    break;
 1098|     38|  case CURLOPT_STREAM_WEIGHT:
  ------------------
  |  Branch (1098:3): [True: 38, False: 4.37k]
  ------------------
 1099|     38|#if defined(USE_HTTP2) || defined(USE_HTTP3)
 1100|     38|    if((arg >= 1) && (arg <= 256))
  ------------------
  |  Branch (1100:8): [True: 37, False: 1]
  |  Branch (1100:22): [True: 9, False: 28]
  ------------------
 1101|      9|      s->priority.weight = (int)arg;
 1102|     38|    break;
 1103|       |#else
 1104|       |    result = CURLE_NOT_BUILT_IN;
 1105|       |    break;
 1106|       |#endif
 1107|  3.19k|  default:
  ------------------
  |  Branch (1107:3): [True: 3.19k, False: 1.21k]
  ------------------
 1108|  3.19k|    return CURLE_UNKNOWN_OPTION;
 1109|  4.41k|  }
 1110|    419|  return result;
 1111|       |#else
 1112|       |  (void)data;
 1113|       |  (void)option;
 1114|       |  (void)arg;
 1115|       |  return CURLE_UNKNOWN_OPTION;
 1116|       |#endif
 1117|  4.41k|}
setopt.c:httpauth:
  239|    151|{
  240|    151|  if(auth != CURLAUTH_NONE) {
  ------------------
  |  |  830|    151|#define CURLAUTH_NONE         ((unsigned long)0)
  ------------------
  |  Branch (240:6): [True: 147, False: 4]
  ------------------
  241|    147|    int bitcheck = 0;
  242|    147|    bool authbits = FALSE;
  ------------------
  |  | 1054|    147|#define FALSE false
  ------------------
  243|    147|    if(auth & CURLAUTH_DIGEST_IE) {
  ------------------
  |  |  839|    147|#define CURLAUTH_DIGEST_IE    (((unsigned long)1) << 4)
  ------------------
  |  Branch (243:8): [True: 74, False: 73]
  ------------------
  244|     74|      auth |= CURLAUTH_DIGEST; /* set standard digest bit */
  ------------------
  |  |  832|     74|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  245|     74|      auth &= ~CURLAUTH_DIGEST_IE; /* drop the legacy bit */
  ------------------
  |  |  839|     74|#define CURLAUTH_DIGEST_IE    (((unsigned long)1) << 4)
  ------------------
  246|     74|    }
  247|       |
  248|       |    /* switch off bits we cannot support */
  249|    147|#ifndef USE_NTLM
  250|    147|    auth &= ~CURLAUTH_NTLM; /* no NTLM support */
  ------------------
  |  |  838|    147|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  251|    147|#endif
  252|    147|#ifndef USE_SPNEGO
  253|    147|    auth &= ~CURLAUTH_NEGOTIATE; /* no Negotiate (SPNEGO) auth without GSS-API
  ------------------
  |  |  833|    147|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  ------------------
  254|       |                                    or SSPI */
  255|    147|#endif
  256|       |
  257|       |    /* check if any auth bit lower than CURLAUTH_ONLY is still set */
  258|    829|    while(bitcheck < 31) {
  ------------------
  |  Branch (258:11): [True: 827, False: 2]
  ------------------
  259|    827|      if(auth & (1UL << bitcheck++)) {
  ------------------
  |  Branch (259:10): [True: 145, False: 682]
  ------------------
  260|    145|        authbits = TRUE;
  ------------------
  |  | 1051|    145|#define TRUE true
  ------------------
  261|    145|        break;
  262|    145|      }
  263|    827|    }
  264|    147|    if(!authbits)
  ------------------
  |  Branch (264:8): [True: 2, False: 145]
  ------------------
  265|      2|      return CURLE_NOT_BUILT_IN; /* no supported types left! */
  266|    147|  }
  267|    149|  if(proxy)
  ------------------
  |  Branch (267:6): [True: 71, False: 78]
  ------------------
  268|     71|    data->set.proxyauth = (uint32_t)auth;
  269|     78|  else
  270|     78|    data->set.httpauth = (uint32_t)auth;
  271|    149|  return CURLE_OK;
  272|    151|}
setopt.c:setopt_HTTP_VERSION:
  277|    721|{
  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|    721|  switch(arg) {
  283|      1|  case CURL_HTTP_VERSION_NONE:
  ------------------
  |  | 2318|      1|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  |  Branch (283:3): [True: 1, False: 720]
  ------------------
  284|       |    /* accepted */
  285|      1|    break;
  286|      3|  case CURL_HTTP_VERSION_1_0:
  ------------------
  |  | 2321|      3|#define CURL_HTTP_VERSION_1_0   1L /* please use HTTP 1.0 in the request */
  ------------------
  |  Branch (286:3): [True: 3, False: 718]
  ------------------
  287|     10|  case CURL_HTTP_VERSION_1_1:
  ------------------
  |  | 2322|     10|#define CURL_HTTP_VERSION_1_1   2L /* please use HTTP 1.1 in the request */
  ------------------
  |  Branch (287:3): [True: 7, False: 714]
  ------------------
  288|       |    /* accepted */
  289|     10|    break;
  290|      0|#ifdef USE_HTTP2
  291|      1|  case CURL_HTTP_VERSION_2_0:
  ------------------
  |  | 2323|      1|#define CURL_HTTP_VERSION_2_0   3L /* please use HTTP 2 in the request */
  ------------------
  |  Branch (291:3): [True: 1, False: 720]
  ------------------
  292|    679|  case CURL_HTTP_VERSION_2TLS:
  ------------------
  |  | 2324|    679|#define CURL_HTTP_VERSION_2TLS  4L /* use version 2 for HTTPS, version 1.1 for
  ------------------
  |  Branch (292:3): [True: 678, False: 43]
  ------------------
  293|    682|  case CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE:
  ------------------
  |  | 2326|    682|#define CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 5L /* please use HTTP 2 without
  ------------------
  |  Branch (293:3): [True: 3, False: 718]
  ------------------
  294|       |    /* accepted */
  295|    682|    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|     28|  default:
  ------------------
  |  Branch (303:3): [True: 28, False: 693]
  ------------------
  304|       |    /* not accepted */
  305|     28|    if(arg < CURL_HTTP_VERSION_NONE)
  ------------------
  |  | 2318|     28|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  |  Branch (305:8): [True: 0, False: 28]
  ------------------
  306|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
  307|     28|    return CURLE_UNSUPPORTED_PROTOCOL;
  308|    721|  }
  309|    693|  data->set.httpwant = (unsigned char)arg;
  310|    693|  return CURLE_OK;
  311|    721|}
setopt.c:setopt_long_proxy:
 1015|  3.19k|{
 1016|  3.19k|  struct UserDefined *s = &data->set;
 1017|       |
 1018|  3.19k|  switch(option) {
 1019|     64|  case CURLOPT_PROXYPORT:
  ------------------
  |  Branch (1019:3): [True: 64, False: 3.13k]
  ------------------
 1020|     64|    if((arg < 0) || (arg > UINT16_MAX))
  ------------------
  |  Branch (1020:8): [True: 0, False: 64]
  |  Branch (1020:21): [True: 30, False: 34]
  ------------------
 1021|     30|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1022|     34|    if(arg != s->proxyport)
  ------------------
  |  Branch (1022:8): [True: 33, False: 1]
  ------------------
 1023|     33|      changeproxy(data);
 1024|     34|    s->proxyport = (uint16_t)arg;
 1025|     34|    break;
 1026|     72|  case CURLOPT_PROXYAUTH:
  ------------------
  |  Branch (1026:3): [True: 72, False: 3.12k]
  ------------------
 1027|     72|    return httpauth(data, TRUE, (unsigned long)arg);
  ------------------
  |  | 1051|     72|#define TRUE true
  ------------------
 1028|     96|  case CURLOPT_PROXYTYPE:
  ------------------
  |  Branch (1028:3): [True: 96, False: 3.10k]
  ------------------
 1029|     96|    if((arg < CURLPROXY_HTTP) || (arg > CURLPROXY_HTTPS3))
  ------------------
  |  |  790|     96|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
                  if((arg < CURLPROXY_HTTP) || (arg > CURLPROXY_HTTPS3))
  ------------------
  |  |  805|     96|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (1029:8): [True: 0, False: 96]
  |  Branch (1029:34): [True: 34, False: 62]
  ------------------
 1030|     34|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1031|     62|#ifndef USE_PROXY_HTTP3
 1032|     62|    if(arg == CURLPROXY_HTTPS3)
  ------------------
  |  |  805|     62|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (1032:8): [True: 1, False: 61]
  ------------------
 1033|      1|      return CURLE_NOT_BUILT_IN;
 1034|     61|#endif
 1035|     61|    s->proxytype = (unsigned char)arg;
 1036|     61|    break;
 1037|     27|  case CURLOPT_SOCKS5_AUTH:
  ------------------
  |  Branch (1037:3): [True: 27, False: 3.16k]
  ------------------
 1038|     27|    if(arg & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
  ------------------
  |  |  831|     27|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
                  if(arg & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
  ------------------
  |  |  837|     27|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|     27|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  |  Branch (1038:8): [True: 25, False: 2]
  ------------------
 1039|     25|      return CURLE_NOT_BUILT_IN;
 1040|      2|    s->socks5auth = (unsigned char)arg;
 1041|      2|    break;
 1042|  2.93k|  default:
  ------------------
  |  Branch (1042:3): [True: 2.93k, False: 259]
  ------------------
 1043|  2.93k|    return CURLE_UNKNOWN_OPTION;
 1044|  3.19k|  }
 1045|     97|  return CURLE_OK;
 1046|  3.19k|}
setopt.c:changeproxy:
 1008|  2.29k|{
 1009|  2.29k|  Curl_auth_digest_cleanup(&data->state.proxydigest);
 1010|  2.29k|  memset(&data->state.authproxy, 0, sizeof(data->state.authproxy));
 1011|  2.29k|}
setopt.c:setopt_long_ssl:
  952|  2.93k|{
  953|  2.93k|#ifdef USE_SSL
  954|  2.93k|  CURLcode result = CURLE_OK;
  955|  2.93k|  struct UserDefined *s = &data->set;
  956|  2.93k|  switch(option) {
  957|     56|  case CURLOPT_CA_CACHE_TIMEOUT:
  ------------------
  |  Branch (957:3): [True: 56, False: 2.88k]
  ------------------
  958|     56|    if(Curl_ssl_supports(data, SSLSUPP_CA_CACHE)) {
  ------------------
  |  |   43|     56|#define SSLSUPP_CA_CACHE     (1 << 8)
  ------------------
  |  Branch (958:8): [True: 56, False: 0]
  ------------------
  959|     56|      result = value_range(&arg, -1, -1, INT_MAX);
  960|     56|      if(!result)
  ------------------
  |  Branch (960:10): [True: 56, False: 0]
  ------------------
  961|     56|        s->general_ssl.ca_cache_timeout = (int)arg;
  962|     56|    }
  963|      0|    else
  964|      0|      result = CURLE_NOT_BUILT_IN;
  965|     56|    break;
  966|    112|  case CURLOPT_SSLVERSION:
  ------------------
  |  Branch (966:3): [True: 112, False: 2.82k]
  ------------------
  967|    112|#ifndef CURL_DISABLE_PROXY
  968|    133|  case CURLOPT_PROXY_SSLVERSION:
  ------------------
  |  Branch (968:3): [True: 21, False: 2.91k]
  ------------------
  969|    133|#endif
  970|    133|    return Curl_setopt_SSLVERSION(data, option, arg);
  971|      1|  case CURLOPT_SSL_FALSESTART:
  ------------------
  |  Branch (971:3): [True: 1, False: 2.93k]
  ------------------
  972|      1|    result = CURLE_NOT_BUILT_IN;
  973|      1|    break;
  974|     40|  case CURLOPT_USE_SSL:
  ------------------
  |  Branch (974:3): [True: 40, False: 2.89k]
  ------------------
  975|     40|    if((arg < CURLUSESSL_NONE) || (arg >= CURLUSESSL_LAST))
  ------------------
  |  |  924|     40|#define CURLUSESSL_NONE    0L /* do not attempt to use SSL */
  ------------------
  |  Branch (975:8): [True: 0, False: 40]
  |  Branch (975:35): [True: 36, False: 4]
  ------------------
  976|     36|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  977|      4|    else
  978|      4|      s->use_ssl = (unsigned char)arg;
  979|     40|    break;
  980|    679|  case CURLOPT_SSL_OPTIONS:
  ------------------
  |  Branch (980:3): [True: 679, False: 2.25k]
  ------------------
  981|    679|    s->ssl.primary.ssl_options = (unsigned char)(arg & 0xff);
  982|    679|    break;
  983|      0|#ifndef CURL_DISABLE_PROXY
  984|      4|  case CURLOPT_PROXY_SSL_OPTIONS:
  ------------------
  |  Branch (984:3): [True: 4, False: 2.93k]
  ------------------
  985|      4|    s->proxy_ssl.primary.ssl_options = (unsigned char)(arg & 0xff);
  986|      4|    break;
  987|      0|#endif
  988|      0|  case CURLOPT_SSL_ENABLE_NPN:
  ------------------
  |  Branch (988:3): [True: 0, False: 2.93k]
  ------------------
  989|      0|    break;
  990|      4|  case CURLOPT_SSLENGINE_DEFAULT:
  ------------------
  |  Branch (990:3): [True: 4, False: 2.93k]
  ------------------
  991|      4|    curlx_safefree(s->str[STRING_SSL_ENGINE]);
  ------------------
  |  | 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]
  |  |  ------------------
  ------------------
  992|      4|    result = Curl_ssl_set_engine_default(data);
  993|      4|    break;
  994|  2.02k|  default:
  ------------------
  |  Branch (994:3): [True: 2.02k, False: 917]
  ------------------
  995|  2.02k|    return CURLE_UNKNOWN_OPTION;
  996|  2.93k|  }
  997|    784|  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.93k|}
setopt.c:setopt_long_proto:
 1121|  2.02k|{
 1122|  2.02k|  CURLcode result = CURLE_OK;
 1123|  2.02k|  struct UserDefined *s = &data->set;
 1124|       |
 1125|  2.02k|  switch(option) {
 1126|      0|#ifndef CURL_DISABLE_TFTP
 1127|     56|  case CURLOPT_TFTP_BLKSIZE:
  ------------------
  |  Branch (1127:3): [True: 56, False: 1.96k]
  ------------------
 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|     40|  case CURLOPT_NETRC:
  ------------------
  |  Branch (1134:3): [True: 40, False: 1.98k]
  ------------------
 1135|     40|    if((arg < CURL_NETRC_IGNORED) || (arg >= CURL_NETRC_LAST))
  ------------------
  |  | 2361|     40|#define CURL_NETRC_IGNORED  0L /* The .netrc is never read.
  ------------------
  |  Branch (1135:8): [True: 0, False: 40]
  |  Branch (1135:38): [True: 31, False: 9]
  ------------------
 1136|     31|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1137|      9|    else
 1138|      9|      s->use_netrc = (unsigned char)arg;
 1139|     40|    break;
 1140|      0|#endif
 1141|      0|#ifndef CURL_DISABLE_FTP
 1142|     39|  case CURLOPT_FTP_FILEMETHOD:
  ------------------
  |  Branch (1142:3): [True: 39, False: 1.98k]
  ------------------
 1143|     39|    if((arg < CURLFTPMETHOD_DEFAULT) || (arg >= CURLFTPMETHOD_LAST))
  ------------------
  |  | 1019|     39|#define CURLFTPMETHOD_DEFAULT   0L /* let libcurl pick */
  ------------------
  |  Branch (1143:8): [True: 0, False: 39]
  |  Branch (1143:41): [True: 37, False: 2]
  ------------------
 1144|     37|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1145|      2|    else
 1146|      2|      s->ftp_filemethod = (unsigned char)arg;
 1147|     39|    break;
 1148|     40|  case CURLOPT_FTP_SSL_CCC:
  ------------------
  |  Branch (1148:3): [True: 40, False: 1.98k]
  ------------------
 1149|     40|    if((arg < CURLFTPSSL_CCC_NONE) || (arg >= CURLFTPSSL_CCC_LAST))
  ------------------
  |  |  989|     40|#define CURLFTPSSL_CCC_NONE    0L /* do not send CCC */
  ------------------
  |  Branch (1149:8): [True: 0, False: 40]
  |  Branch (1149:39): [True: 35, False: 5]
  ------------------
 1150|     35|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1151|      5|    else
 1152|      5|      s->ftp_ccc = (unsigned char)arg;
 1153|     40|    break;
 1154|     36|  case CURLOPT_FTPSSLAUTH:
  ------------------
  |  Branch (1154:3): [True: 36, False: 1.98k]
  ------------------
 1155|     36|    if((arg < CURLFTPAUTH_DEFAULT) || (arg >= CURLFTPAUTH_LAST))
  ------------------
  |  |  998|     36|#define CURLFTPAUTH_DEFAULT 0L /* let libcurl decide */
  ------------------
  |  Branch (1155:8): [True: 0, False: 36]
  |  Branch (1155:39): [True: 33, False: 3]
  ------------------
 1156|     33|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1157|      3|    else
 1158|      3|      s->ftpsslauth = (unsigned char)arg;
 1159|     36|    break;
 1160|     33|  case CURLOPT_ACCEPTTIMEOUT_MS:
  ------------------
  |  Branch (1160:3): [True: 33, False: 1.98k]
  ------------------
 1161|     33|    return setopt_set_timeout_ms(&s->accepttimeout, arg);
 1162|      0|#endif
 1163|      0|#if !defined(CURL_DISABLE_FTP) || defined(USE_SSH)
 1164|     25|  case CURLOPT_FTP_CREATE_MISSING_DIRS:
  ------------------
  |  Branch (1164:3): [True: 25, False: 1.99k]
  ------------------
 1165|     25|    if((arg < CURLFTP_CREATE_DIR_NONE) || (arg > CURLFTP_CREATE_DIR_RETRY))
  ------------------
  |  | 1007|     25|#define CURLFTP_CREATE_DIR_NONE  0L /* do NOT create missing dirs! */
  ------------------
                  if((arg < CURLFTP_CREATE_DIR_NONE) || (arg > CURLFTP_CREATE_DIR_RETRY))
  ------------------
  |  | 1011|     25|#define CURLFTP_CREATE_DIR_RETRY 2L /* (FTP only) if CWD fails, try MKD and
  ------------------
  |  Branch (1165:8): [True: 0, False: 25]
  |  Branch (1165:43): [True: 21, False: 4]
  ------------------
 1166|     21|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1167|      4|    else
 1168|      4|      s->ftp_create_missing_dirs = (unsigned char)arg;
 1169|     25|    break;
 1170|     43|  case CURLOPT_NEW_FILE_PERMS:
  ------------------
  |  Branch (1170:3): [True: 43, False: 1.97k]
  ------------------
 1171|     43|    if((arg < 0) || (arg > 0777))
  ------------------
  |  Branch (1171:8): [True: 0, False: 43]
  |  Branch (1171:21): [True: 38, False: 5]
  ------------------
 1172|     38|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1173|      5|    else
 1174|      5|      s->new_file_perms = (unsigned int)arg;
 1175|     43|    break;
 1176|      0|#endif
 1177|      0|#ifndef CURL_DISABLE_RTSP
 1178|     41|  case CURLOPT_RTSP_REQUEST:
  ------------------
  |  Branch (1178:3): [True: 41, False: 1.97k]
  ------------------
 1179|     41|    return setopt_RTSP_REQUEST(data, arg);
 1180|     67|  case CURLOPT_RTSP_CLIENT_CSEQ:
  ------------------
  |  Branch (1180:3): [True: 67, False: 1.95k]
  ------------------
 1181|     67|    result = value_range(&arg, 0, 0, INT_MAX);
 1182|     67|    if(!result)
  ------------------
  |  Branch (1182:8): [True: 67, False: 0]
  ------------------
 1183|     67|      data->state.rtsp_next_client_CSeq = (uint32_t)arg;
 1184|     67|    break;
 1185|     62|  case CURLOPT_RTSP_SERVER_CSEQ:
  ------------------
  |  Branch (1185:3): [True: 62, False: 1.95k]
  ------------------
 1186|     62|    result = value_range(&arg, 0, 0, INT_MAX);
 1187|     62|    if(!result)
  ------------------
  |  Branch (1187:8): [True: 62, False: 0]
  ------------------
 1188|     62|      data->state.rtsp_next_server_CSeq = (uint32_t)arg;
 1189|     62|    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|    675|  case CURLOPT_PROTOCOLS:
  ------------------
  |  Branch (1202:3): [True: 675, False: 1.34k]
  ------------------
 1203|    675|    s->allowed_protocols = (curl_prot_t)arg;
 1204|    675|    break;
 1205|      0|  case CURLOPT_REDIR_PROTOCOLS:
  ------------------
  |  Branch (1205:3): [True: 0, False: 2.02k]
  ------------------
 1206|      0|    s->redir_protocols = (curl_prot_t)arg;
 1207|      0|    break;
 1208|      0|#ifndef CURL_DISABLE_WEBSOCKETS
 1209|     10|  case CURLOPT_WS_OPTIONS:
  ------------------
  |  Branch (1209:3): [True: 10, False: 2.01k]
  ------------------
 1210|     10|    s->ws_raw_mode = (bool)(arg & CURLWS_RAW_MODE);
  ------------------
  |  |   89|     10|#define CURLWS_RAW_MODE   (1L << 0)
  ------------------
 1211|     10|    s->ws_no_auto_pong = (bool)(arg & CURLWS_NOAUTOPONG);
  ------------------
  |  |   90|     10|#define CURLWS_NOAUTOPONG (1L << 1)
  ------------------
 1212|     10|    break;
 1213|      0|#endif
 1214|    853|  default:
  ------------------
  |  Branch (1214:3): [True: 853, False: 1.16k]
  ------------------
 1215|    853|    return CURLE_UNKNOWN_OPTION;
 1216|  2.02k|  }
 1217|  1.09k|  return result;
 1218|  2.02k|}
setopt.c:setopt_RTSP_REQUEST:
  353|     41|{
  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|     41|  Curl_RtspReq rtspreq = RTSPREQ_NONE;
  359|     41|  switch(arg) {
  360|      1|  case CURL_RTSPREQ_OPTIONS:
  ------------------
  |  | 2347|      1|#define CURL_RTSPREQ_OPTIONS       1L
  ------------------
  |  Branch (360:3): [True: 1, False: 40]
  ------------------
  361|      1|    rtspreq = RTSPREQ_OPTIONS;
  362|      1|    break;
  363|      0|  case CURL_RTSPREQ_DESCRIBE:
  ------------------
  |  | 2348|      0|#define CURL_RTSPREQ_DESCRIBE      2L
  ------------------
  |  Branch (363:3): [True: 0, False: 41]
  ------------------
  364|      0|    rtspreq = RTSPREQ_DESCRIBE;
  365|      0|    break;
  366|      1|  case CURL_RTSPREQ_ANNOUNCE:
  ------------------
  |  | 2349|      1|#define CURL_RTSPREQ_ANNOUNCE      3L
  ------------------
  |  Branch (366:3): [True: 1, False: 40]
  ------------------
  367|      1|    rtspreq = RTSPREQ_ANNOUNCE;
  368|      1|    break;
  369|      0|  case CURL_RTSPREQ_SETUP:
  ------------------
  |  | 2350|      0|#define CURL_RTSPREQ_SETUP         4L
  ------------------
  |  Branch (369:3): [True: 0, False: 41]
  ------------------
  370|      0|    rtspreq = RTSPREQ_SETUP;
  371|      0|    break;
  372|      0|  case CURL_RTSPREQ_PLAY:
  ------------------
  |  | 2351|      0|#define CURL_RTSPREQ_PLAY          5L
  ------------------
  |  Branch (372:3): [True: 0, False: 41]
  ------------------
  373|      0|    rtspreq = RTSPREQ_PLAY;
  374|      0|    break;
  375|      0|  case CURL_RTSPREQ_PAUSE:
  ------------------
  |  | 2352|      0|#define CURL_RTSPREQ_PAUSE         6L
  ------------------
  |  Branch (375:3): [True: 0, False: 41]
  ------------------
  376|      0|    rtspreq = RTSPREQ_PAUSE;
  377|      0|    break;
  378|      1|  case CURL_RTSPREQ_TEARDOWN:
  ------------------
  |  | 2353|      1|#define CURL_RTSPREQ_TEARDOWN      7L
  ------------------
  |  Branch (378:3): [True: 1, False: 40]
  ------------------
  379|      1|    rtspreq = RTSPREQ_TEARDOWN;
  380|      1|    break;
  381|      4|  case CURL_RTSPREQ_GET_PARAMETER:
  ------------------
  |  | 2354|      4|#define CURL_RTSPREQ_GET_PARAMETER 8L
  ------------------
  |  Branch (381:3): [True: 4, False: 37]
  ------------------
  382|      4|    rtspreq = RTSPREQ_GET_PARAMETER;
  383|      4|    break;
  384|      1|  case CURL_RTSPREQ_SET_PARAMETER:
  ------------------
  |  | 2355|      1|#define CURL_RTSPREQ_SET_PARAMETER 9L
  ------------------
  |  Branch (384:3): [True: 1, False: 40]
  ------------------
  385|      1|    rtspreq = RTSPREQ_SET_PARAMETER;
  386|      1|    break;
  387|      1|  case CURL_RTSPREQ_RECORD:
  ------------------
  |  | 2356|      1|#define CURL_RTSPREQ_RECORD        10L
  ------------------
  |  Branch (387:3): [True: 1, False: 40]
  ------------------
  388|      1|    rtspreq = RTSPREQ_RECORD;
  389|      1|    break;
  390|      3|  case CURL_RTSPREQ_RECEIVE:
  ------------------
  |  | 2357|      3|#define CURL_RTSPREQ_RECEIVE       11L
  ------------------
  |  Branch (390:3): [True: 3, False: 38]
  ------------------
  391|      3|    rtspreq = RTSPREQ_RECEIVE;
  392|      3|    break;
  393|     29|  default:
  ------------------
  |  Branch (393:3): [True: 29, False: 12]
  ------------------
  394|     29|    return CURLE_BAD_FUNCTION_ARGUMENT;
  395|     41|  }
  396|       |
  397|     12|  data->set.rtspreq = rtspreq;
  398|     12|  return CURLE_OK;
  399|     41|}
setopt.c:setopt_long_misc:
 1222|    853|{
 1223|    853|  struct UserDefined *s = &data->set;
 1224|       |
 1225|    853|  switch(option) {
 1226|     47|  case CURLOPT_TIMECONDITION:
  ------------------
  |  Branch (1226:3): [True: 47, False: 806]
  ------------------
 1227|     47|    if((arg < CURL_TIMECOND_NONE) || (arg >= CURL_TIMECOND_LAST))
  ------------------
  |  | 2416|     47|#define CURL_TIMECOND_NONE         0L
  ------------------
  |  Branch (1227:8): [True: 0, False: 47]
  |  Branch (1227:38): [True: 39, False: 8]
  ------------------
 1228|     39|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1229|      8|    s->timecondition = (unsigned char)arg;
 1230|      8|    break;
 1231|      5|  case CURLOPT_TIMEVALUE:
  ------------------
  |  Branch (1231:3): [True: 5, False: 848]
  ------------------
 1232|      5|    s->timevalue = (time_t)arg;
 1233|      5|    break;
 1234|    675|  case CURLOPT_POSTFIELDSIZE:
  ------------------
  |  Branch (1234:3): [True: 675, False: 178]
  ------------------
 1235|    675|    if(arg < -1)
  ------------------
  |  Branch (1235:8): [True: 0, False: 675]
  ------------------
 1236|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1237|    675|    if(s->postfieldsize < arg &&
  ------------------
  |  Branch (1237:8): [True: 675, False: 0]
  ------------------
 1238|    675|       s->postfields == s->str[STRING_COPYPOSTFIELDS]) {
  ------------------
  |  Branch (1238:8): [True: 0, False: 675]
  ------------------
 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|    675|    s->postfieldsize = arg;
 1243|    675|    break;
 1244|      0|  case CURLOPT_INFILESIZE:
  ------------------
  |  Branch (1244:3): [True: 0, False: 853]
  ------------------
 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|     66|  case CURLOPT_RESUME_FROM:
  ------------------
  |  Branch (1249:3): [True: 66, False: 787]
  ------------------
 1250|     66|    if(arg < -1)
  ------------------
  |  Branch (1250:8): [True: 0, False: 66]
  ------------------
 1251|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1252|     66|    s->set_resume_from = arg;
 1253|     66|    break;
 1254|      0|  case CURLOPT_UPLOAD_FLAGS:
  ------------------
  |  Branch (1254:3): [True: 0, False: 853]
  ------------------
 1255|      0|    s->upload_flags = (unsigned char)arg;
 1256|      0|    break;
 1257|      0|#ifndef CURL_DISABLE_MIME
 1258|      7|  case CURLOPT_MIME_OPTIONS:
  ------------------
  |  Branch (1258:3): [True: 7, False: 846]
  ------------------
 1259|      7|    s->mime_formescape = !!(arg & CURLMIMEOPT_FORMESCAPE);
  ------------------
  |  | 2441|      7|#define CURLMIMEOPT_FORMESCAPE (1L << 0) /* Use backslash-escaping for forms */
  ------------------
 1260|      7|    break;
 1261|      0|#endif
 1262|      0|#ifndef CURL_DISABLE_HSTS
 1263|      9|  case CURLOPT_HSTS_CTRL:
  ------------------
  |  Branch (1263:3): [True: 9, False: 844]
  ------------------
 1264|      9|    if(arg & CURLHSTS_ENABLE) {
  ------------------
  |  | 1073|      9|#define CURLHSTS_ENABLE       (1L << 0)
  ------------------
  |  Branch (1264:8): [True: 6, False: 3]
  ------------------
 1265|      6|      if(!data->hsts) {
  ------------------
  |  Branch (1265:10): [True: 6, False: 0]
  ------------------
 1266|      6|        data->hsts = Curl_hsts_init();
 1267|      6|        if(!data->hsts)
  ------------------
  |  Branch (1267:12): [True: 0, False: 6]
  ------------------
 1268|      0|          return CURLE_OUT_OF_MEMORY;
 1269|      6|      }
 1270|      6|    }
 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|      9|    break;
 1282|      9|#endif
 1283|      9|#ifndef CURL_DISABLE_ALTSVC
 1284|     38|  case CURLOPT_ALTSVC_CTRL:
  ------------------
  |  Branch (1284:3): [True: 38, False: 815]
  ------------------
 1285|     38|    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|      6|  default:
  ------------------
  |  Branch (1293:3): [True: 6, False: 847]
  ------------------
 1294|      6|    return CURLE_UNKNOWN_OPTION;
 1295|    853|  }
 1296|    770|  return CURLE_OK;
 1297|    853|}
setopt.c:setopt_slist:
 1325|  11.9k|{
 1326|  11.9k|  CURLcode result = CURLE_OK;
 1327|  11.9k|  struct UserDefined *s = &data->set;
 1328|  11.9k|  switch(option) {
 1329|      0|#ifndef CURL_DISABLE_PROXY
 1330|      0|  case CURLOPT_PROXYHEADER:
  ------------------
  |  Branch (1330:3): [True: 0, False: 11.9k]
  ------------------
 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: 11.9k]
  ------------------
 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: 11.9k]
  ------------------
 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: 11.9k]
  ------------------
 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: 11.9k]
  ------------------
 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: 11.9k]
  ------------------
 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|  1.14k|  case CURLOPT_HTTPHEADER:
  ------------------
  |  Branch (1390:3): [True: 1.14k, False: 10.8k]
  ------------------
 1391|       |    /*
 1392|       |     * Set a list with HTTP headers to use (or replace internals with)
 1393|       |     */
 1394|  1.14k|    s->headers = slist;
 1395|  1.14k|    break;
 1396|      0|#endif
 1397|      0|#ifndef CURL_DISABLE_TELNET
 1398|      0|  case CURLOPT_TELNETOPTIONS:
  ------------------
  |  Branch (1398:3): [True: 0, False: 11.9k]
  ------------------
 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|     25|  case CURLOPT_MAIL_RCPT:
  ------------------
  |  Branch (1406:3): [True: 25, False: 11.9k]
  ------------------
 1407|       |    /* Set the list of mail recipients */
 1408|     25|    s->mail_rcpt = slist;
 1409|     25|    break;
 1410|      0|#endif
 1411|  10.8k|  case CURLOPT_CONNECT_TO:
  ------------------
  |  Branch (1411:3): [True: 10.8k, False: 1.16k]
  ------------------
 1412|  10.8k|    s->connect_to = slist;
 1413|  10.8k|    break;
 1414|      0|  default:
  ------------------
  |  Branch (1414:3): [True: 0, False: 11.9k]
  ------------------
 1415|      0|    return CURLE_UNKNOWN_OPTION;
 1416|  11.9k|  }
 1417|  11.9k|  return result;
 1418|  11.9k|}
setopt.c:setopt_pointers:
 1475|    891|{
 1476|    891|  CURLcode result = CURLE_OK;
 1477|    891|  struct UserDefined *s = &data->set;
 1478|    891|  switch(option) {
 1479|      0|  case CURLOPT_CURLU:
  ------------------
  |  Branch (1479:3): [True: 0, False: 891]
  ------------------
 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|     55|  case CURLOPT_HTTPPOST:
  ------------------
  |  Branch (1489:3): [True: 55, False: 836]
  ------------------
 1490|       |    /*
 1491|       |     * Set to make us do HTTP POST. Legacy API-style.
 1492|       |     */
 1493|     55|    s->httppost = va_arg(param, struct curl_httppost *);
 1494|     55|    s->method = HTTPREQ_POST_FORM;
 1495|     55|    s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1054|     55|#define FALSE false
  ------------------
 1496|     55|    Curl_mime_cleanpart(data->state.formp);
 1497|     55|    curlx_safefree(data->state.formp);
  ------------------
  |  | 1332|     55|  do {                      \
  |  | 1333|     55|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|     55|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|     55|    (ptr) = NULL;           \
  |  | 1335|     55|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 55]
  |  |  ------------------
  ------------------
 1498|     55|    data->state.mimepost = NULL;
 1499|     55|    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|    161|  case CURLOPT_MIMEPOST:
  ------------------
  |  Branch (1505:3): [True: 161, False: 730]
  ------------------
 1506|    161|    result = setopt_mimepost(data, va_arg(param, curl_mime *));
 1507|    161|    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: 891]
  ------------------
 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|    675|  case CURLOPT_SHARE:
  ------------------
  |  Branch (1519:3): [True: 675, False: 216]
  ------------------
 1520|    675|    return setopt_share(data, va_arg(param, struct Curl_share *));
 1521|       |
 1522|      0|  default:
  ------------------
  |  Branch (1522:3): [True: 0, False: 891]
  ------------------
 1523|      0|    return CURLE_UNKNOWN_OPTION;
 1524|    891|  }
 1525|    216|  return result;
 1526|    891|}
setopt.c:setopt_mimepost:
 1424|    161|{
 1425|       |  /*
 1426|       |   * Set to make us do MIME POST
 1427|       |   */
 1428|    161|  CURLcode result;
 1429|    161|  struct UserDefined *s = &data->set;
 1430|    161|  if(!s->mimepostp) {
  ------------------
  |  Branch (1430:6): [True: 161, False: 0]
  ------------------
 1431|    161|    s->mimepostp = curlx_malloc(sizeof(*s->mimepostp));
  ------------------
  |  | 1483|    161|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1432|    161|    if(!s->mimepostp)
  ------------------
  |  Branch (1432:8): [True: 0, False: 161]
  ------------------
 1433|      0|      return CURLE_OUT_OF_MEMORY;
 1434|    161|    Curl_mime_initpart(s->mimepostp);
 1435|    161|  }
 1436|       |
 1437|    161|  result = Curl_mime_set_subparts(s->mimepostp, mimep, FALSE);
  ------------------
  |  | 1054|    161|#define FALSE false
  ------------------
 1438|    161|  if(!result) {
  ------------------
  |  Branch (1438:6): [True: 161, False: 0]
  ------------------
 1439|    161|    s->method = HTTPREQ_POST_MIME;
 1440|    161|    s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1054|    161|#define FALSE false
  ------------------
 1441|    161|#ifndef CURL_DISABLE_FORM_API
 1442|    161|    Curl_mime_cleanpart(data->state.formp);
 1443|    161|    curlx_safefree(data->state.formp);
  ------------------
  |  | 1332|    161|  do {                      \
  |  | 1333|    161|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|    161|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|    161|    (ptr) = NULL;           \
  |  | 1335|    161|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 161]
  |  |  ------------------
  ------------------
 1444|       |    data->state.mimepost = NULL;
 1445|    161|#endif
 1446|    161|  }
 1447|    161|  return result;
 1448|    161|}
setopt.c:setopt_share:
 1453|    675|{
 1454|    675|  CURLcode result;
 1455|       |
 1456|    675|  if(data->conn) {
  ------------------
  |  Branch (1456:6): [True: 0, False: 675]
  ------------------
 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|    675|  else {
 1463|       |    /* disconnect from old share, if any and possible */
 1464|    675|    result = Curl_share_easy_unlink(data);
 1465|    675|    if(!result && GOOD_SHARE_HANDLE(set))
  ------------------
  |  |   38|    675|#define GOOD_SHARE_HANDLE(x) ((x) && (x)->magic == CURL_GOOD_SHARE)
  |  |  ------------------
  |  |  |  |   37|      0|#define CURL_GOOD_SHARE 0x7e117a1e
  |  |  ------------------
  |  |  |  Branch (38:31): [True: 0, False: 675]
  |  |  |  Branch (38:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1465:8): [True: 675, False: 0]
  ------------------
 1466|       |      /* use new share if it set */
 1467|      0|      result = Curl_share_easy_link(data, set);
 1468|    675|  }
 1469|    675|  return result;
 1470|    675|}
setopt.c:setopt_cptr:
 2484|   130k|{
 2485|   130k|  typedef CURLcode (*ptrfunc)(struct Curl_easy *data, CURLoption option,
 2486|   130k|                              char *ptr);
 2487|   130k|  static const ptrfunc setopt_call[] = {
 2488|   130k|#ifndef CURL_DISABLE_PROXY
 2489|   130k|    setopt_cptr_proxy,
 2490|   130k|#endif
 2491|   130k|#if defined(USE_SSL) || defined(USE_SSH)
 2492|   130k|    setopt_cptr_ssl,
 2493|   130k|#endif
 2494|       |#ifdef USE_SSH
 2495|       |    setopt_cptr_ssh,
 2496|       |#endif
 2497|   130k|#ifndef CURL_DISABLE_FTP
 2498|   130k|    setopt_cptr_ftp,
 2499|   130k|#endif
 2500|   130k|#if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_MQTT)
 2501|   130k|    setopt_cptr_http_mqtt,
 2502|   130k|#endif
 2503|   130k|    setopt_cptr_net,
 2504|   130k|    setopt_cptr_misc,
 2505|   130k|  };
 2506|   130k|  size_t i;
 2507|       |
 2508|   649k|  for(i = 0; i < CURL_ARRAYSIZE(setopt_call); i++) {
  ------------------
  |  | 1299|   649k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (2508:14): [True: 649k, False: 13]
  ------------------
 2509|   649k|    CURLcode result = setopt_call[i](data, option, ptr);
 2510|   649k|    if(result != CURLE_UNKNOWN_OPTION)
  ------------------
  |  Branch (2510:8): [True: 129k, False: 519k]
  ------------------
 2511|   129k|      return result;
 2512|   649k|  }
 2513|     13|  return CURLE_UNKNOWN_OPTION;
 2514|   130k|}
setopt.c:setopt_cptr_proxy:
 1634|   130k|{
 1635|   130k|  CURLcode result = CURLE_OK;
 1636|   130k|  struct UserDefined *s = &data->set;
 1637|   130k|  switch(option) {
 1638|    143|  case CURLOPT_PROXYUSERPWD: {
  ------------------
  |  Branch (1638:3): [True: 143, False: 129k]
  ------------------
 1639|       |    /*
 1640|       |     * user:password needed to use the proxy
 1641|       |     */
 1642|    143|    char *u = NULL;
 1643|    143|    char *p = NULL;
 1644|    143|    result = setstropt_userpwd(ptr, &u, &p);
 1645|       |
 1646|       |    /* URL decode the components */
 1647|    143|    if(!result) {
  ------------------
  |  Branch (1647:8): [True: 143, False: 0]
  ------------------
 1648|    143|      curlx_safefree(s->str[STRING_PROXYUSERNAME]);
  ------------------
  |  | 1332|    143|  do {                      \
  |  | 1333|    143|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|    143|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|    143|    (ptr) = NULL;           \
  |  | 1335|    143|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 143]
  |  |  ------------------
  ------------------
 1649|    143|      curlx_safefree(s->str[STRING_PROXYPASSWORD]);
  ------------------
  |  | 1332|    143|  do {                      \
  |  | 1333|    143|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|    143|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|    143|    (ptr) = NULL;           \
  |  | 1335|    143|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 143]
  |  |  ------------------
  ------------------
 1650|    143|      if(u)
  ------------------
  |  Branch (1650:10): [True: 143, False: 0]
  ------------------
 1651|    143|        result = Curl_urldecode(u, 0, &s->str[STRING_PROXYUSERNAME], NULL,
 1652|    143|                                REJECT_ZERO);
 1653|    143|    }
 1654|    143|    if(!result && p)
  ------------------
  |  Branch (1654:8): [True: 141, False: 2]
  |  Branch (1654:19): [True: 34, False: 107]
  ------------------
 1655|     34|      result = Curl_urldecode(p, 0, &s->str[STRING_PROXYPASSWORD], NULL,
 1656|     34|                              REJECT_ZERO);
 1657|    143|    curlx_free(u);
  ------------------
  |  | 1488|    143|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1658|    143|    curlx_free(p);
  ------------------
  |  | 1488|    143|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1659|    143|    break;
 1660|      0|  }
 1661|      4|  case CURLOPT_PROXYUSERNAME:
  ------------------
  |  Branch (1661:3): [True: 4, False: 129k]
  ------------------
 1662|       |    /*
 1663|       |     * authentication username to use in the operation
 1664|       |     */
 1665|      4|    return Curl_setstropt(&s->str[STRING_PROXYUSERNAME], ptr);
 1666|       |
 1667|     19|  case CURLOPT_PROXYPASSWORD:
  ------------------
  |  Branch (1667:3): [True: 19, False: 129k]
  ------------------
 1668|       |    /*
 1669|       |     * authentication password to use in the operation
 1670|       |     */
 1671|     19|    return Curl_setstropt(&s->str[STRING_PROXYPASSWORD], ptr);
 1672|       |
 1673|    253|  case CURLOPT_NOPROXY:
  ------------------
  |  Branch (1673:3): [True: 253, False: 129k]
  ------------------
 1674|       |    /*
 1675|       |     * proxy exception list
 1676|       |     */
 1677|    253|    return Curl_setstropt(&s->str[STRING_NOPROXY], ptr);
 1678|     15|  case CURLOPT_PROXY_SSLCERT:
  ------------------
  |  Branch (1678:3): [True: 15, False: 129k]
  ------------------
 1679|       |    /*
 1680|       |     * String that holds filename of the SSL certificate to use for proxy
 1681|       |     */
 1682|     15|    return Curl_setstropt(&s->str[STRING_CERT_PROXY], ptr);
 1683|     10|  case CURLOPT_PROXY_SSLCERTTYPE:
  ------------------
  |  Branch (1683:3): [True: 10, False: 129k]
  ------------------
 1684|       |    /*
 1685|       |     * String that holds file type of the SSL certificate to use for proxy
 1686|       |     */
 1687|     10|    return Curl_setstropt(&s->str[STRING_CERT_TYPE_PROXY], ptr);
 1688|     15|  case CURLOPT_PROXY_SSLKEY:
  ------------------
  |  Branch (1688:3): [True: 15, False: 129k]
  ------------------
 1689|       |    /*
 1690|       |     * String that holds filename of the SSL key to use for proxy
 1691|       |     */
 1692|     15|    return Curl_setstropt(&s->str[STRING_KEY_PROXY], ptr);
 1693|     18|  case CURLOPT_PROXY_KEYPASSWD:
  ------------------
  |  Branch (1693:3): [True: 18, False: 129k]
  ------------------
 1694|       |    /*
 1695|       |     * String that holds the SSL private key password for proxy.
 1696|       |     */
 1697|     18|    return Curl_setstropt(&s->str[STRING_KEY_PASSWD_PROXY], ptr);
 1698|      8|  case CURLOPT_PROXY_SSLKEYTYPE:
  ------------------
  |  Branch (1698:3): [True: 8, False: 129k]
  ------------------
 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: 129k]
  ------------------
 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|     17|  case CURLOPT_PROXY_TLS13_CIPHERS:
  ------------------
  |  Branch (1710:3): [True: 17, False: 129k]
  ------------------
 1711|     17|    if(Curl_ssl_supports(data, SSLSUPP_TLS13_CIPHERSUITES))
  ------------------
  |  |   40|     17|#define SSLSUPP_TLS13_CIPHERSUITES (1 << 5) /* supports TLS 1.3 ciphersuites */
  ------------------
  |  Branch (1711:8): [True: 17, False: 0]
  ------------------
 1712|       |      /* set preferred list of TLS 1.3 cipher suites for proxy */
 1713|     17|      return Curl_setstropt(&s->str[STRING_SSL_CIPHER13_LIST_PROXY], ptr);
 1714|      0|    else
 1715|      0|      return CURLE_NOT_BUILT_IN;
 1716|  2.25k|  case CURLOPT_PROXY:
  ------------------
  |  Branch (1716:3): [True: 2.25k, False: 127k]
  ------------------
 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.25k|    return setproxy(data, ptr);
 1728|    416|  case CURLOPT_PRE_PROXY:
  ------------------
  |  Branch (1728:3): [True: 416, False: 129k]
  ------------------
 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|    416|    return Curl_setstropt(&s->str[STRING_PRE_PROXY], ptr);
 1736|      0|  case CURLOPT_SOCKS5_GSSAPI_SERVICE:
  ------------------
  |  Branch (1736:3): [True: 0, False: 130k]
  ------------------
 1737|     19|  case CURLOPT_PROXY_SERVICE_NAME:
  ------------------
  |  Branch (1737:3): [True: 19, False: 129k]
  ------------------
 1738|       |    /*
 1739|       |     * Set proxy authentication service name for Kerberos 5 and SPNEGO
 1740|       |     */
 1741|     19|    return Curl_setstropt(&s->str[STRING_PROXY_SERVICE_NAME], ptr);
 1742|     25|  case CURLOPT_PROXY_PINNEDPUBLICKEY:
  ------------------
  |  Branch (1742:3): [True: 25, False: 129k]
  ------------------
 1743|       |    /*
 1744|       |     * Set pinned public key for SSL connection.
 1745|       |     * Specify filename of the public key in DER format.
 1746|       |     */
 1747|     25|#ifdef USE_SSL
 1748|     25|    if(Curl_ssl_supports(data, SSLSUPP_PINNEDPUBKEY))
  ------------------
  |  |   37|     25|#define SSLSUPP_PINNEDPUBKEY (1 << 2) /* supports CURLOPT_PINNEDPUBLICKEY */
  ------------------
  |  Branch (1748:8): [True: 25, False: 0]
  ------------------
 1749|     25|      return Curl_setstropt(&s->str[STRING_SSL_PINNEDPUBLICKEY_PROXY], ptr);
 1750|      0|#endif
 1751|      0|    return CURLE_NOT_BUILT_IN;
 1752|       |
 1753|      9|  case CURLOPT_HAPROXY_CLIENT_IP:
  ------------------
  |  Branch (1753:3): [True: 9, False: 129k]
  ------------------
 1754|       |    /*
 1755|       |     * Set the client IP to send through HAProxy PROXY protocol
 1756|       |     */
 1757|      9|    result = Curl_setstropt(&s->str[STRING_HAPROXY_CLIENT_IP], ptr);
 1758|       |
 1759|       |    /* enable the HAProxy protocol if an IP is provided */
 1760|      9|    s->haproxyprotocol = !!s->str[STRING_HAPROXY_CLIENT_IP];
 1761|      9|    break;
 1762|     10|  case CURLOPT_PROXY_CAINFO:
  ------------------
  |  Branch (1762:3): [True: 10, False: 129k]
  ------------------
 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|     13|  case CURLOPT_PROXY_CRLFILE:
  ------------------
  |  Branch (1770:3): [True: 13, False: 129k]
  ------------------
 1771|       |    /*
 1772|       |     * Set CRL file info for SSL connection for proxy. Specify filename of the
 1773|       |     * CRL to check certificates revocation
 1774|       |     */
 1775|     13|    if(Curl_ssl_supports(data, SSLSUPP_CRLFILE))
  ------------------
  |  |   48|     13|#define SSLSUPP_CRLFILE      (1 << 13) /* supports CURLOPT_CRLFILE */
  ------------------
  |  Branch (1775:8): [True: 13, False: 0]
  ------------------
 1776|     13|      return Curl_setstropt(&s->str[STRING_SSL_CRLFILE_PROXY], ptr);
 1777|      0|    return CURLE_NOT_BUILT_IN;
 1778|     13|  case CURLOPT_PROXY_ISSUERCERT:
  ------------------
  |  Branch (1778:3): [True: 13, False: 129k]
  ------------------
 1779|       |    /*
 1780|       |     * Set Issuer certificate file to check certificates issuer
 1781|       |     */
 1782|     13|    if(Curl_ssl_supports(data, SSLSUPP_ISSUERCERT))
  ------------------
  |  |   46|     13|#define SSLSUPP_ISSUERCERT   (1 << 11) /* supports CURLOPT_ISSUERCERT */
  ------------------
  |  Branch (1782:8): [True: 13, False: 0]
  ------------------
 1783|     13|      return Curl_setstropt(&s->str[STRING_SSL_ISSUERCERT_PROXY], ptr);
 1784|      0|    return CURLE_NOT_BUILT_IN;
 1785|     17|  case CURLOPT_PROXY_CAPATH:
  ------------------
  |  Branch (1785:3): [True: 17, False: 129k]
  ------------------
 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|     17|#ifdef USE_SSL
 1791|     17|    if(Curl_ssl_supports(data, SSLSUPP_CA_PATH)) {
  ------------------
  |  |   35|     17|#define SSLSUPP_CA_PATH      (1 << 0) /* supports CAPATH */
  ------------------
  |  Branch (1791:8): [True: 17, False: 0]
  ------------------
 1792|       |      /* This does not work on Windows. */
 1793|     17|      result = Curl_setstropt(&s->str[STRING_SSL_CAPATH_PROXY], ptr);
 1794|     17|      s->proxy_ssl.custom_capath = !!s->str[STRING_SSL_CAPATH_PROXY];
 1795|     17|      return result;
 1796|     17|    }
 1797|      0|#endif
 1798|      0|    return CURLE_NOT_BUILT_IN;
 1799|   126k|  default:
  ------------------
  |  Branch (1799:3): [True: 126k, False: 3.29k]
  ------------------
 1800|   126k|    return CURLE_UNKNOWN_OPTION;
 1801|   130k|  }
 1802|    152|  return result;
 1803|   130k|}
setopt.c:setstropt_userpwd:
  134|    226|{
  135|    226|  char *user = NULL;
  136|    226|  char *passwd = NULL;
  137|       |
  138|    226|  DEBUGASSERT(userp);
  ------------------
  |  | 1077|    226|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (138:3): [True: 0, False: 226]
  |  Branch (138:3): [True: 226, False: 0]
  ------------------
  139|    226|  DEBUGASSERT(passwdp);
  ------------------
  |  | 1077|    226|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (139:3): [True: 0, False: 226]
  |  Branch (139:3): [True: 226, 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|    226|  if(option) {
  ------------------
  |  Branch (143:6): [True: 226, False: 0]
  ------------------
  144|    226|    size_t len = strlen(option);
  145|    226|    CURLcode result;
  146|    226|    if(len > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|    226|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (146:8): [True: 0, False: 226]
  ------------------
  147|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
  148|       |
  149|    226|    result = Curl_parse_login_details(option, len, &user, &passwd, NULL);
  150|    226|    if(result)
  ------------------
  |  Branch (150:8): [True: 0, False: 226]
  ------------------
  151|      0|      return result;
  152|    226|  }
  153|       |
  154|    226|  curlx_free(*userp);
  ------------------
  |  | 1488|    226|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  155|    226|  *userp = user;
  156|       |
  157|    226|  curlx_free(*passwdp);
  ------------------
  |  | 1488|    226|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  158|    226|  *passwdp = passwd;
  159|       |
  160|    226|  return CURLE_OK;
  161|    226|}
setopt.c:setproxy:
 1622|  2.25k|{
 1623|  2.25k|  if((data->set.str[STRING_PROXY] && proxy) &&
  ------------------
  |  Branch (1623:7): [True: 0, False: 2.25k]
  |  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.25k|  changeproxy(data);
 1629|  2.25k|  return Curl_setstropt(&data->set.str[STRING_PROXY], proxy);
 1630|  2.25k|}
setopt.c:setopt_cptr_ssl:
 1887|   126k|{
 1888|   126k|  CURLcode result = CURLE_OK;
 1889|   126k|  struct UserDefined *s = &data->set;
 1890|       |
 1891|   126k|  switch(option) {
 1892|     25|  case CURLOPT_KEYPASSWD:
  ------------------
  |  Branch (1892:3): [True: 25, False: 126k]
  ------------------
 1893|       |    /*
 1894|       |     * String that holds the SSL or SSH private key password.
 1895|       |     */
 1896|     25|    result = Curl_setstropt(&s->str[STRING_KEY_PASSWD], ptr);
 1897|     25|    break;
 1898|      0|#ifdef USE_SSL
 1899|    859|  case CURLOPT_CAINFO:
  ------------------
  |  Branch (1899:3): [True: 859, False: 125k]
  ------------------
 1900|       |    /*
 1901|       |     * Set CA info for SSL connection. Specify filename of the CA certificate
 1902|       |     */
 1903|    859|    result = Curl_setstropt(&s->str[STRING_SSL_CAFILE], ptr);
 1904|    859|    s->ssl.custom_cafile = !!s->str[STRING_SSL_CAFILE];
 1905|    859|    return result;
 1906|    824|  case CURLOPT_CAPATH:
  ------------------
  |  Branch (1906:3): [True: 824, False: 125k]
  ------------------
 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|    824|    if(Curl_ssl_supports(data, SSLSUPP_CA_PATH)) {
  ------------------
  |  |   35|    824|#define SSLSUPP_CA_PATH      (1 << 0) /* supports CAPATH */
  ------------------
  |  Branch (1911:8): [True: 824, False: 0]
  ------------------
 1912|       |      /* This does not work on Windows. */
 1913|    824|      result = Curl_setstropt(&s->str[STRING_SSL_CAPATH], ptr);
 1914|    824|      s->ssl.custom_capath = !!s->str[STRING_SSL_CAPATH];
 1915|    824|      return result;
 1916|    824|    }
 1917|      0|    return CURLE_NOT_BUILT_IN;
 1918|  11.4k|  case CURLOPT_CRLFILE:
  ------------------
  |  Branch (1918:3): [True: 11.4k, False: 115k]
  ------------------
 1919|       |    /*
 1920|       |     * Set CRL file info for SSL connection. Specify filename of the CRL
 1921|       |     * to check certificates revocation
 1922|       |     */
 1923|  11.4k|    if(Curl_ssl_supports(data, SSLSUPP_CRLFILE))
  ------------------
  |  |   48|  11.4k|#define SSLSUPP_CRLFILE      (1 << 13) /* supports CURLOPT_CRLFILE */
  ------------------
  |  Branch (1923:8): [True: 11.4k, False: 0]
  ------------------
 1924|  11.4k|      return Curl_setstropt(&s->str[STRING_SSL_CRLFILE], ptr);
 1925|      0|    return CURLE_NOT_BUILT_IN;
 1926|    810|  case CURLOPT_SSL_CIPHER_LIST:
  ------------------
  |  Branch (1926:3): [True: 810, False: 125k]
  ------------------
 1927|    810|    if(Curl_ssl_supports(data, SSLSUPP_CIPHER_LIST))
  ------------------
  |  |   44|    810|#define SSLSUPP_CIPHER_LIST  (1 << 9) /* supports TLS 1.0-1.2 ciphersuites */
  ------------------
  |  Branch (1927:8): [True: 810, False: 0]
  ------------------
 1928|       |      /* set a list of cipher we want to use in the SSL connection */
 1929|    810|      return Curl_setstropt(&s->str[STRING_SSL_CIPHER_LIST], ptr);
 1930|      0|    else
 1931|      0|      return CURLE_NOT_BUILT_IN;
 1932|    127|  case CURLOPT_TLS13_CIPHERS:
  ------------------
  |  Branch (1932:3): [True: 127, False: 126k]
  ------------------
 1933|    127|    if(Curl_ssl_supports(data, SSLSUPP_TLS13_CIPHERSUITES))
  ------------------
  |  |   40|    127|#define SSLSUPP_TLS13_CIPHERSUITES (1 << 5) /* supports TLS 1.3 ciphersuites */
  ------------------
  |  Branch (1933:8): [True: 127, False: 0]
  ------------------
 1934|       |      /* set preferred list of TLS 1.3 cipher suites */
 1935|    127|      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: 126k]
  ------------------
 1939|      0|    break;
 1940|      0|  case CURLOPT_EGDSOCKET:
  ------------------
  |  Branch (1940:3): [True: 0, False: 126k]
  ------------------
 1941|      0|    break;
 1942|      0|  case CURLOPT_SSL_CTX_DATA:
  ------------------
  |  Branch (1942:3): [True: 0, False: 126k]
  ------------------
 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|     20|  case CURLOPT_SSLCERT:
  ------------------
  |  Branch (1952:3): [True: 20, False: 126k]
  ------------------
 1953|       |    /*
 1954|       |     * String that holds filename of the SSL certificate to use
 1955|       |     */
 1956|     20|    return Curl_setstropt(&s->str[STRING_CERT], ptr);
 1957|     23|  case CURLOPT_SSLCERTTYPE:
  ------------------
  |  Branch (1957:3): [True: 23, False: 126k]
  ------------------
 1958|       |    /*
 1959|       |     * String that holds file type of the SSL certificate to use
 1960|       |     */
 1961|     23|    return Curl_setstropt(&s->str[STRING_CERT_TYPE], ptr);
 1962|     12|  case CURLOPT_SSLKEY:
  ------------------
  |  Branch (1962:3): [True: 12, False: 126k]
  ------------------
 1963|       |    /*
 1964|       |     * String that holds filename of the SSL key to use
 1965|       |     */
 1966|     12|    return Curl_setstropt(&s->str[STRING_KEY], ptr);
 1967|     19|  case CURLOPT_SSLKEYTYPE:
  ------------------
  |  Branch (1967:3): [True: 19, False: 126k]
  ------------------
 1968|       |    /*
 1969|       |     * String that holds file type of the SSL key to use
 1970|       |     */
 1971|     19|    return Curl_setstropt(&s->str[STRING_KEY_TYPE], ptr);
 1972|    772|  case CURLOPT_SSLENGINE:
  ------------------
  |  Branch (1972:3): [True: 772, False: 125k]
  ------------------
 1973|       |    /*
 1974|       |     * String that holds the SSL crypto engine.
 1975|       |     */
 1976|    772|    if(ptr && ptr[0]) {
  ------------------
  |  Branch (1976:8): [True: 772, False: 0]
  |  Branch (1976:15): [True: 769, False: 3]
  ------------------
 1977|    769|      result = Curl_setstropt(&s->str[STRING_SSL_ENGINE], ptr);
 1978|    769|      if(!result) {
  ------------------
  |  Branch (1978:10): [True: 769, False: 0]
  ------------------
 1979|    769|        result = Curl_ssl_set_engine(data, ptr);
 1980|    769|      }
 1981|    769|    }
 1982|    772|    break;
 1983|     15|  case CURLOPT_ISSUERCERT:
  ------------------
  |  Branch (1983:3): [True: 15, False: 126k]
  ------------------
 1984|       |    /*
 1985|       |     * Set Issuer certificate file
 1986|       |     * to check certificates issuer
 1987|       |     */
 1988|     15|    if(Curl_ssl_supports(data, SSLSUPP_ISSUERCERT))
  ------------------
  |  |   46|     15|#define SSLSUPP_ISSUERCERT   (1 << 11) /* supports CURLOPT_ISSUERCERT */
  ------------------
  |  Branch (1988:8): [True: 15, False: 0]
  ------------------
 1989|     15|      return Curl_setstropt(&s->str[STRING_SSL_ISSUERCERT], ptr);
 1990|      0|    return CURLE_NOT_BUILT_IN;
 1991|    524|  case CURLOPT_SSL_EC_CURVES:
  ------------------
  |  Branch (1991:3): [True: 524, False: 126k]
  ------------------
 1992|       |    /*
 1993|       |     * Set accepted curves in SSL connection setup.
 1994|       |     * Specify colon-delimited list of curve algorithm names.
 1995|       |     */
 1996|    524|    if(Curl_ssl_supports(data, SSLSUPP_SSL_EC_CURVES))
  ------------------
  |  |   47|    524|#define SSLSUPP_SSL_EC_CURVES (1 << 12) /* supports CURLOPT_SSL_EC_CURVES */
  ------------------
  |  Branch (1996:8): [True: 524, False: 0]
  ------------------
 1997|    524|      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: 126k]
  ------------------
 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|     15|  case CURLOPT_PINNEDPUBLICKEY:
  ------------------
  |  Branch (2007:3): [True: 15, False: 126k]
  ------------------
 2008|       |    /*
 2009|       |     * Set pinned public key for SSL connection.
 2010|       |     * Specify filename of the public key in DER format.
 2011|       |     */
 2012|     15|    if(Curl_ssl_supports(data, SSLSUPP_PINNEDPUBKEY))
  ------------------
  |  |   37|     15|#define SSLSUPP_PINNEDPUBKEY (1 << 2) /* supports CURLOPT_PINNEDPUBLICKEY */
  ------------------
  |  Branch (2012:8): [True: 15, False: 0]
  ------------------
 2013|     15|      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: 126k]
  ------------------
 2016|      1|    return setopt_ech(data, ptr);
  ------------------
  |  | 1880|      1|#define setopt_ech(x,y) CURLE_NOT_BUILT_IN
  ------------------
 2017|      0|#endif
 2018|   111k|  default:
  ------------------
  |  Branch (2018:3): [True: 111k, False: 15.5k]
  ------------------
 2019|   111k|    return CURLE_UNKNOWN_OPTION;
 2020|   126k|  }
 2021|    797|  return result;
 2022|   126k|}
setopt.c:setopt_cptr_ftp:
 2198|   111k|{
 2199|   111k|  CURLcode result = CURLE_OK;
 2200|   111k|  struct UserDefined *s = &data->set;
 2201|   111k|  switch(option) {
 2202|     12|  case CURLOPT_FTPPORT:
  ------------------
  |  Branch (2202:3): [True: 12, False: 111k]
  ------------------
 2203|       |    /*
 2204|       |     * Use FTP PORT, this also specifies which IP address to use
 2205|       |     */
 2206|     12|    result = Curl_setstropt(&s->str[STRING_FTPPORT], ptr);
 2207|     12|    s->ftp_use_port = !!(s->str[STRING_FTPPORT]);
 2208|     12|    break;
 2209|       |
 2210|     82|  case CURLOPT_FTP_ACCOUNT:
  ------------------
  |  Branch (2210:3): [True: 82, False: 111k]
  ------------------
 2211|     82|    return Curl_setstropt(&s->str[STRING_FTP_ACCOUNT], ptr);
 2212|       |
 2213|      7|  case CURLOPT_FTP_ALTERNATIVE_TO_USER:
  ------------------
  |  Branch (2213:3): [True: 7, False: 111k]
  ------------------
 2214|      7|    return Curl_setstropt(&s->str[STRING_FTP_ALTERNATIVE_TO_USER], ptr);
 2215|       |
 2216|      1|  case CURLOPT_KRBLEVEL:
  ------------------
  |  Branch (2216:3): [True: 1, False: 111k]
  ------------------
 2217|      1|    return CURLE_NOT_BUILT_IN; /* removed in 8.17.0 */
 2218|      0|  case CURLOPT_CHUNK_DATA:
  ------------------
  |  Branch (2218:3): [True: 0, False: 111k]
  ------------------
 2219|      0|    s->wildcardptr = ptr;
 2220|      0|    break;
 2221|      0|  case CURLOPT_FNMATCH_DATA:
  ------------------
  |  Branch (2221:3): [True: 0, False: 111k]
  ------------------
 2222|      0|    s->fnmatch_data = ptr;
 2223|      0|    break;
 2224|   111k|  default:
  ------------------
  |  Branch (2224:3): [True: 111k, False: 102]
  ------------------
 2225|   111k|    return CURLE_UNKNOWN_OPTION;
 2226|   111k|  }
 2227|     12|  return result;
 2228|   111k|}
setopt.c:setopt_cptr_http_mqtt:
 2028|   111k|{
 2029|   111k|  CURLcode result = CURLE_OK;
 2030|   111k|  struct UserDefined *s = &data->set;
 2031|       |
 2032|   111k|  switch(option) {
 2033|      0|  case CURLOPT_COPYPOSTFIELDS:
  ------------------
  |  Branch (2033:3): [True: 0, False: 111k]
  ------------------
 2034|      0|    return setopt_copypostfields(ptr, s);
 2035|       |
 2036|    705|  case CURLOPT_POSTFIELDS:
  ------------------
  |  Branch (2036:3): [True: 705, False: 110k]
  ------------------
 2037|       |    /*
 2038|       |     * Like above, but use static data instead of copying it.
 2039|       |     */
 2040|    705|    s->postfields = ptr;
 2041|       |    /* Release old copied data. */
 2042|    705|    curlx_safefree(s->str[STRING_COPYPOSTFIELDS]);
  ------------------
  |  | 1332|    705|  do {                      \
  |  | 1333|    705|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|    705|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|    705|    (ptr) = NULL;           \
  |  | 1335|    705|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 705]
  |  |  ------------------
  ------------------
 2043|    705|    s->method = HTTPREQ_POST;
 2044|    705|    break;
 2045|       |
 2046|      0|#ifndef CURL_DISABLE_HTTP
 2047|      0|  case CURLOPT_TRAILERDATA:
  ------------------
  |  Branch (2047:3): [True: 0, False: 111k]
  ------------------
 2048|      0|    s->trailer_data = ptr;
 2049|      0|    break;
 2050|     19|  case CURLOPT_ACCEPT_ENCODING:
  ------------------
  |  Branch (2050:3): [True: 19, False: 111k]
  ------------------
 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|     19|    if(ptr && !*ptr) {
  ------------------
  |  Branch (2060:8): [True: 19, False: 0]
  |  Branch (2060:15): [True: 14, False: 5]
  ------------------
 2061|     14|      ptr = Curl_get_content_encodings();
 2062|     14|      if(ptr) {
  ------------------
  |  Branch (2062:10): [True: 14, False: 0]
  ------------------
 2063|     14|        curlx_free(s->str[STRING_ENCODING]);
  ------------------
  |  | 1488|     14|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2064|     14|        s->str[STRING_ENCODING] = ptr;
 2065|     14|      }
 2066|      0|      else
 2067|      0|        result = CURLE_OUT_OF_MEMORY;
 2068|     14|      return result;
 2069|     14|    }
 2070|      5|    return Curl_setstropt(&s->str[STRING_ENCODING], ptr);
 2071|       |
 2072|      0|#ifndef CURL_DISABLE_AWS
 2073|  1.12k|  case CURLOPT_AWS_SIGV4:
  ------------------
  |  Branch (2073:3): [True: 1.12k, False: 109k]
  ------------------
 2074|       |    /*
 2075|       |     * String that is merged to some authentication
 2076|       |     * parameters are used by the algorithm.
 2077|       |     */
 2078|  1.12k|    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|  1.12k|    if(s->str[STRING_AWS_SIGV4])
  ------------------
  |  Branch (2082:8): [True: 1.12k, False: 0]
  ------------------
 2083|  1.12k|      s->httpauth = CURLAUTH_AWS_SIGV4;
  ------------------
  |  |  845|  1.12k|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
 2084|  1.12k|    break;
 2085|      0|#endif
 2086|     10|  case CURLOPT_REFERER:
  ------------------
  |  Branch (2086:3): [True: 10, False: 111k]
  ------------------
 2087|       |    /*
 2088|       |     * String to set in the HTTP Referer: field.
 2089|       |     */
 2090|     10|    Curl_bufref_free(&data->state.referer);
 2091|     10|    result = Curl_setstropt(&s->str[STRING_SET_REFERER], ptr);
 2092|     10|    break;
 2093|       |
 2094|     14|  case CURLOPT_USERAGENT:
  ------------------
  |  Branch (2094:3): [True: 14, False: 111k]
  ------------------
 2095|       |    /*
 2096|       |     * String to use in the HTTP User-Agent field
 2097|       |     */
 2098|     14|    return Curl_setstropt(&s->str[STRING_USERAGENT], ptr);
 2099|       |
 2100|      0|#ifndef CURL_DISABLE_COOKIES
 2101|     23|  case CURLOPT_COOKIE:
  ------------------
  |  Branch (2101:3): [True: 23, False: 111k]
  ------------------
 2102|       |    /*
 2103|       |     * Cookie string to send to the remote server in the request.
 2104|       |     */
 2105|     23|    return Curl_setstropt(&s->str[STRING_COOKIE], ptr);
 2106|       |
 2107|  10.8k|  case CURLOPT_COOKIEFILE:
  ------------------
  |  Branch (2107:3): [True: 10.8k, False: 100k]
  ------------------
 2108|  10.8k|    return cookiefile(data, ptr);
 2109|       |
 2110|  10.8k|  case CURLOPT_COOKIEJAR:
  ------------------
  |  Branch (2110:3): [True: 10.8k, False: 100k]
  ------------------
 2111|       |    /*
 2112|       |     * Set cookie filename to dump all cookies to when we are done.
 2113|       |     */
 2114|  10.8k|    result = Curl_setstropt(&s->str[STRING_COOKIEJAR], ptr);
 2115|  10.8k|    if(!result) {
  ------------------
  |  Branch (2115:8): [True: 10.8k, False: 0]
  ------------------
 2116|       |      /*
 2117|       |       * Activate the cookie parser. This may or may not already
 2118|       |       * have been made.
 2119|       |       */
 2120|  10.8k|      if(!data->cookies)
  ------------------
  |  Branch (2120:10): [True: 9.04k, False: 1.76k]
  ------------------
 2121|  9.04k|        data->cookies = Curl_cookie_init();
 2122|  10.8k|      if(!data->cookies)
  ------------------
  |  Branch (2122:10): [True: 0, False: 10.8k]
  ------------------
 2123|      0|        result = CURLE_OUT_OF_MEMORY;
 2124|  10.8k|      else
 2125|  10.8k|        data->state.cookie_engine = TRUE;
  ------------------
  |  | 1051|  10.8k|#define TRUE true
  ------------------
 2126|  10.8k|    }
 2127|  10.8k|    break;
 2128|       |
 2129|  1.81k|  case CURLOPT_COOKIELIST:
  ------------------
  |  Branch (2129:3): [True: 1.81k, False: 109k]
  ------------------
 2130|  1.81k|    return cookielist(data, ptr);
 2131|      0|#endif /* !CURL_DISABLE_COOKIES */
 2132|       |
 2133|      0|#endif /* !CURL_DISABLE_HTTP */
 2134|  85.7k|  default:
  ------------------
  |  Branch (2134:3): [True: 85.7k, False: 25.3k]
  ------------------
 2135|  85.7k|    return CURLE_UNKNOWN_OPTION;
 2136|   111k|  }
 2137|  12.6k|  return result;
 2138|   111k|}
setopt.c:cookiefile:
 1583|  10.8k|{
 1584|       |  /*
 1585|       |   * Set cookie file to read and parse. Can be used multiple times.
 1586|       |   */
 1587|  10.8k|  if(ptr) {
  ------------------
  |  Branch (1587:6): [True: 10.8k, False: 0]
  ------------------
 1588|  10.8k|    struct curl_slist *cl;
 1589|       |    /* general protection against mistakes and abuse */
 1590|  10.8k|    if(strlen(ptr) > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  10.8k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (1590:8): [True: 0, False: 10.8k]
  ------------------
 1591|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1592|       |    /* append the cookie filename to the list of filenames, and deal with
 1593|       |       them later */
 1594|  10.8k|    cl = curl_slist_append(data->state.cookielist, ptr);
 1595|  10.8k|    if(!cl) {
  ------------------
  |  Branch (1595:8): [True: 0, False: 10.8k]
  ------------------
 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|  10.8k|    data->state.cookielist = cl; /* store the list for later use */
 1601|  10.8k|  }
 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|  10.8k|  return CURLE_OK;
 1617|  10.8k|}
setopt.c:cookielist:
 1530|  1.81k|{
 1531|  1.81k|  CURLcode result = CURLE_OK;
 1532|  1.81k|  if(!ptr)
  ------------------
  |  Branch (1532:6): [True: 0, False: 1.81k]
  ------------------
 1533|      0|    return CURLE_OK;
 1534|       |
 1535|  1.81k|  if(curl_strequal(ptr, "ALL")) {
  ------------------
  |  Branch (1535:6): [True: 1, False: 1.81k]
  ------------------
 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.81k|  else if(curl_strequal(ptr, "SESS")) {
  ------------------
  |  Branch (1541:11): [True: 1, False: 1.81k]
  ------------------
 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.81k|  else if(curl_strequal(ptr, "FLUSH")) {
  ------------------
  |  Branch (1547:11): [True: 1, False: 1.81k]
  ------------------
 1548|       |    /* flush cookies to file, takes care of the locking */
 1549|      1|    Curl_flush_cookies(data, FALSE);
  ------------------
  |  | 1054|      1|#define FALSE false
  ------------------
 1550|      1|  }
 1551|  1.81k|  else if(curl_strequal(ptr, "RELOAD")) {
  ------------------
  |  Branch (1551:11): [True: 2, False: 1.81k]
  ------------------
 1552|       |    /* reload cookies from file */
 1553|      2|    return Curl_cookie_loadfiles(data);
 1554|      2|  }
 1555|  1.81k|  else {
 1556|  1.81k|    if(!data->cookies) {
  ------------------
  |  Branch (1556:8): [True: 1.81k, False: 0]
  ------------------
 1557|       |      /* if cookie engine was not running, activate it */
 1558|  1.81k|      data->cookies = Curl_cookie_init();
 1559|  1.81k|      if(!data->cookies)
  ------------------
  |  Branch (1559:10): [True: 0, False: 1.81k]
  ------------------
 1560|      0|        return CURLE_OUT_OF_MEMORY;
 1561|  1.81k|      data->state.cookie_engine = TRUE;
  ------------------
  |  | 1051|  1.81k|#define TRUE true
  ------------------
 1562|  1.81k|    }
 1563|       |
 1564|       |    /* general protection against mistakes and abuse */
 1565|  1.81k|    if(strlen(ptr) > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  1.81k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (1565:8): [True: 0, False: 1.81k]
  ------------------
 1566|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1567|       |
 1568|  1.81k|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1569|  1.81k|    if(checkprefix("Set-Cookie:", ptr))
  ------------------
  |  |   33|  1.81k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  1.81k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1.08k, False: 726]
  |  |  ------------------
  ------------------
 1570|       |      /* HTTP Header format line */
 1571|  1.08k|      result = Curl_cookie_add(data, data->cookies, TRUE, FALSE, ptr + 11,
  ------------------
  |  | 1051|  1.08k|#define TRUE true
  ------------------
                    result = Curl_cookie_add(data, data->cookies, TRUE, FALSE, ptr + 11,
  ------------------
  |  | 1054|  1.08k|#define FALSE false
  ------------------
 1572|  1.08k|                               NULL, NULL, TRUE);
  ------------------
  |  | 1051|  1.08k|#define TRUE true
  ------------------
 1573|    726|    else
 1574|       |      /* Netscape format line */
 1575|    726|      result = Curl_cookie_add(data, data->cookies, FALSE, FALSE, ptr, NULL,
  ------------------
  |  | 1054|    726|#define FALSE false
  ------------------
                    result = Curl_cookie_add(data, data->cookies, FALSE, FALSE, ptr, NULL,
  ------------------
  |  | 1054|    726|#define FALSE false
  ------------------
 1576|    726|                               NULL, TRUE);
  ------------------
  |  | 1051|    726|#define TRUE true
  ------------------
 1577|  1.81k|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1578|  1.81k|  }
 1579|  1.81k|  return result;
 1580|  1.81k|}
setopt.c:setopt_cptr_net:
 2233|  85.7k|{
 2234|  85.7k|  struct UserDefined *s = &data->set;
 2235|  85.7k|  switch(option) {
 2236|    253|  case CURLOPT_INTERFACE:
  ------------------
  |  Branch (2236:3): [True: 253, False: 85.5k]
  ------------------
 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|    253|    return setstropt_interface(ptr,
 2242|    253|                               &s->str[STRING_DEVICE],
 2243|    253|                               &s->str[STRING_INTERFACE],
 2244|    253|                               &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|     16|  case CURLOPT_UNIX_SOCKET_PATH:
  ------------------
  |  Branch (2259:3): [True: 16, False: 85.7k]
  ------------------
 2260|     16|    s->abstract_unix_socket = FALSE;
  ------------------
  |  | 1054|     16|#define FALSE false
  ------------------
 2261|     16|    return Curl_setstropt(&s->str[STRING_UNIX_SOCKET_PATH], ptr);
 2262|       |
 2263|     23|  case CURLOPT_ABSTRACT_UNIX_SOCKET:
  ------------------
  |  Branch (2263:3): [True: 23, False: 85.7k]
  ------------------
 2264|     23|    s->abstract_unix_socket = TRUE;
  ------------------
  |  | 1051|     23|#define TRUE true
  ------------------
 2265|     23|    return Curl_setstropt(&s->str[STRING_UNIX_SOCKET_PATH], ptr);
 2266|      0|#endif
 2267|      0|#ifndef CURL_DISABLE_DOH
 2268|    365|  case CURLOPT_DOH_URL:
  ------------------
  |  Branch (2268:3): [True: 365, False: 85.3k]
  ------------------
 2269|    365|    {
 2270|    365|      CURLcode result = Curl_setstropt(&s->str[STRING_DOH], ptr);
 2271|    365|      s->doh = !!(s->str[STRING_DOH]);
 2272|    365|      return result;
 2273|      0|    }
 2274|      0|#endif
 2275|  85.0k|  default:
  ------------------
  |  Branch (2275:3): [True: 85.0k, False: 657]
  ------------------
 2276|  85.0k|    return CURLE_UNKNOWN_OPTION;
 2277|  85.7k|  }
 2278|  85.7k|}
setopt.c:setstropt_interface:
  165|    253|{
  166|    253|  char *dev = NULL;
  167|    253|  char *iface = NULL;
  168|    253|  char *host = NULL;
  169|    253|  CURLcode result;
  170|       |
  171|    253|  DEBUGASSERT(devp);
  ------------------
  |  | 1077|    253|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (171:3): [True: 0, False: 253]
  |  Branch (171:3): [True: 253, False: 0]
  ------------------
  172|    253|  DEBUGASSERT(ifacep);
  ------------------
  |  | 1077|    253|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (172:3): [True: 0, False: 253]
  |  Branch (172:3): [True: 253, False: 0]
  ------------------
  173|    253|  DEBUGASSERT(hostp);
  ------------------
  |  | 1077|    253|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (173:3): [True: 0, False: 253]
  |  Branch (173:3): [True: 253, False: 0]
  ------------------
  174|       |
  175|    253|  if(option) {
  ------------------
  |  Branch (175:6): [True: 253, False: 0]
  ------------------
  176|       |    /* Parse the interface details if set, otherwise clear them all */
  177|    253|    result = Curl_parse_interface(option, &dev, &iface, &host);
  178|    253|    if(result)
  ------------------
  |  Branch (178:8): [True: 6, False: 247]
  ------------------
  179|      6|      return result;
  180|    253|  }
  181|    247|  curlx_free(*devp);
  ------------------
  |  | 1488|    247|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  182|    247|  *devp = dev;
  183|       |
  184|    247|  curlx_free(*ifacep);
  ------------------
  |  | 1488|    247|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  185|    247|  *ifacep = iface;
  186|       |
  187|    247|  curlx_free(*hostp);
  ------------------
  |  | 1488|    247|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  188|    247|  *hostp = host;
  189|       |
  190|    247|  return CURLE_OK;
  191|    253|}
setopt.c:setopt_cptr_misc:
 2282|  85.0k|{
 2283|  85.0k|  CURLcode result = CURLE_OK;
 2284|  85.0k|  struct UserDefined *s = &data->set;
 2285|       |
 2286|  85.0k|  switch(option) {
 2287|     21|  case CURLOPT_REQUEST_TARGET:
  ------------------
  |  Branch (2287:3): [True: 21, False: 85.0k]
  ------------------
 2288|     21|    return Curl_setstropt(&s->str[STRING_TARGET], ptr);
 2289|      0|#ifndef CURL_DISABLE_NETRC
 2290|  10.8k|  case CURLOPT_NETRC_FILE:
  ------------------
  |  Branch (2290:3): [True: 10.8k, False: 74.2k]
  ------------------
 2291|  10.8k|    return Curl_setstropt(&s->str[STRING_NETRC_FILE], ptr);
 2292|      0|#endif
 2293|      6|  case CURLOPT_CUSTOMREQUEST:
  ------------------
  |  Branch (2293:3): [True: 6, False: 85.0k]
  ------------------
 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|     21|  case CURLOPT_SERVICE_NAME:
  ------------------
  |  Branch (2299:3): [True: 21, False: 85.0k]
  ------------------
 2300|     21|    return Curl_setstropt(&s->str[STRING_SERVICE_NAME], ptr);
 2301|       |
 2302|      0|  case CURLOPT_HEADERDATA:
  ------------------
  |  Branch (2302:3): [True: 0, False: 85.0k]
  ------------------
 2303|      0|    s->writeheader = ptr;
 2304|      0|    break;
 2305|  10.8k|  case CURLOPT_READDATA:
  ------------------
  |  Branch (2305:3): [True: 10.8k, False: 74.2k]
  ------------------
 2306|  10.8k|    s->in_set = ptr;
 2307|  10.8k|    break;
 2308|  11.4k|  case CURLOPT_WRITEDATA:
  ------------------
  |  Branch (2308:3): [True: 11.4k, False: 73.6k]
  ------------------
 2309|  11.4k|    s->out = ptr;
 2310|  11.4k|    break;
 2311|      0|  case CURLOPT_DEBUGDATA:
  ------------------
  |  Branch (2311:3): [True: 0, False: 85.0k]
  ------------------
 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: 85.0k]
  ------------------
 2315|      0|    s->progress_client = ptr;
 2316|      0|    break;
 2317|      0|  case CURLOPT_SEEKDATA:
  ------------------
  |  Branch (2317:3): [True: 0, False: 85.0k]
  ------------------
 2318|      0|    s->seek_client = ptr;
 2319|      0|    break;
 2320|      0|  case CURLOPT_IOCTLDATA:
  ------------------
  |  Branch (2320:3): [True: 0, False: 85.0k]
  ------------------
 2321|      0|    s->ioctl_client = ptr;
 2322|      0|    break;
 2323|      0|  case CURLOPT_SOCKOPTDATA:
  ------------------
  |  Branch (2323:3): [True: 0, False: 85.0k]
  ------------------
 2324|      0|    s->sockopt_client = ptr;
 2325|      0|    break;
 2326|  10.8k|  case CURLOPT_OPENSOCKETDATA:
  ------------------
  |  Branch (2326:3): [True: 10.8k, False: 74.2k]
  ------------------
 2327|  10.8k|    s->opensocket_client = ptr;
 2328|  10.8k|    break;
 2329|      0|  case CURLOPT_RESOLVER_START_DATA:
  ------------------
  |  Branch (2329:3): [True: 0, False: 85.0k]
  ------------------
 2330|      0|    s->resolver_start_client = ptr;
 2331|      0|    break;
 2332|      0|  case CURLOPT_CLOSESOCKETDATA:
  ------------------
  |  Branch (2332:3): [True: 0, False: 85.0k]
  ------------------
 2333|      0|    s->closesocket_client = ptr;
 2334|      0|    break;
 2335|      0|  case CURLOPT_PREREQDATA:
  ------------------
  |  Branch (2335:3): [True: 0, False: 85.0k]
  ------------------
 2336|      0|    s->prereq_userp = ptr;
 2337|      0|    break;
 2338|      0|  case CURLOPT_ERRORBUFFER:
  ------------------
  |  Branch (2338:3): [True: 0, False: 85.0k]
  ------------------
 2339|      0|    s->errorbuffer = ptr;
 2340|      0|    break;
 2341|  7.56k|  case CURLOPT_URL:
  ------------------
  |  Branch (2341:3): [True: 7.56k, False: 77.5k]
  ------------------
 2342|  7.56k|    result = Curl_setstropt(&s->str[STRING_SET_URL], ptr);
 2343|  7.56k|    Curl_bufref_set(&data->state.url, s->str[STRING_SET_URL], 0, NULL);
 2344|  7.56k|    break;
 2345|       |
 2346|     83|  case CURLOPT_USERPWD:
  ------------------
  |  Branch (2346:3): [True: 83, False: 85.0k]
  ------------------
 2347|     83|    return setstropt_userpwd(ptr, &s->str[STRING_USERNAME],
 2348|     83|                             &s->str[STRING_PASSWORD]);
 2349|       |
 2350|     26|  case CURLOPT_USERNAME:
  ------------------
  |  Branch (2350:3): [True: 26, False: 85.0k]
  ------------------
 2351|     26|    return Curl_setstropt(&s->str[STRING_USERNAME], ptr);
 2352|       |
 2353|    108|  case CURLOPT_PASSWORD:
  ------------------
  |  Branch (2353:3): [True: 108, False: 84.9k]
  ------------------
 2354|    108|    return Curl_setstropt(&s->str[STRING_PASSWORD], ptr);
 2355|       |
 2356|     11|  case CURLOPT_LOGIN_OPTIONS:
  ------------------
  |  Branch (2356:3): [True: 11, False: 85.0k]
  ------------------
 2357|     11|    return Curl_setstropt(&s->str[STRING_OPTIONS], ptr);
 2358|       |
 2359|     18|  case CURLOPT_XOAUTH2_BEARER:
  ------------------
  |  Branch (2359:3): [True: 18, False: 85.0k]
  ------------------
 2360|     18|    return Curl_setstropt(&s->str[STRING_BEARER], ptr);
 2361|     20|  case CURLOPT_RANGE:
  ------------------
  |  Branch (2361:3): [True: 20, False: 85.0k]
  ------------------
 2362|     20|    return Curl_setstropt(&s->str[STRING_SET_RANGE], ptr);
 2363|      0|  case CURLOPT_PRIVATE:
  ------------------
  |  Branch (2363:3): [True: 0, False: 85.0k]
  ------------------
 2364|      0|    s->private_data = ptr;
 2365|      0|    break;
 2366|  10.8k|  case CURLOPT_PROTOCOLS_STR:
  ------------------
  |  Branch (2366:3): [True: 10.8k, False: 74.2k]
  ------------------
 2367|  10.8k|    if(ptr) {
  ------------------
  |  Branch (2367:8): [True: 10.8k, False: 0]
  ------------------
 2368|  10.8k|      curl_prot_t protos;
 2369|  10.8k|      result = protocol2num(ptr, &protos);
 2370|  10.8k|      if(!result)
  ------------------
  |  Branch (2370:10): [True: 10.8k, False: 0]
  ------------------
 2371|  10.8k|        s->allowed_protocols = protos;
 2372|  10.8k|    }
 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|  10.8k|    break;
 2377|     37|  case CURLOPT_REDIR_PROTOCOLS_STR:
  ------------------
  |  Branch (2377:3): [True: 37, False: 85.0k]
  ------------------
 2378|     37|    if(ptr) {
  ------------------
  |  Branch (2378:8): [True: 37, False: 0]
  ------------------
 2379|     37|      curl_prot_t protos;
 2380|     37|      result = protocol2num(ptr, &protos);
 2381|     37|      if(!result)
  ------------------
  |  Branch (2381:10): [True: 9, False: 28]
  ------------------
 2382|      9|        s->redir_protocols = protos;
 2383|     37|    }
 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|     37|    break;
 2388|    747|  case CURLOPT_DEFAULT_PROTOCOL:
  ------------------
  |  Branch (2388:3): [True: 747, False: 84.3k]
  ------------------
 2389|       |    /* Set the protocol to use when the URL does not include any protocol */
 2390|    747|    return Curl_setstropt(&s->str[STRING_DEFAULT_PROTOCOL], ptr);
 2391|      0|#ifndef CURL_DISABLE_SMTP
 2392|     15|  case CURLOPT_MAIL_FROM:
  ------------------
  |  Branch (2392:3): [True: 15, False: 85.0k]
  ------------------
 2393|       |    /* Set the SMTP mail originator */
 2394|     15|    return Curl_setstropt(&s->str[STRING_MAIL_FROM], ptr);
 2395|      4|  case CURLOPT_MAIL_AUTH:
  ------------------
  |  Branch (2395:3): [True: 4, False: 85.0k]
  ------------------
 2396|       |    /* Set the SMTP auth originator */
 2397|      4|    return Curl_setstropt(&s->str[STRING_MAIL_AUTH], ptr);
 2398|      0|#endif
 2399|     29|  case CURLOPT_SASL_AUTHZID:
  ------------------
  |  Branch (2399:3): [True: 29, False: 85.0k]
  ------------------
 2400|       |    /* Authorization identity (identity to act as) */
 2401|     29|    return Curl_setstropt(&s->str[STRING_SASL_AUTHZID], ptr);
 2402|      0|#ifndef CURL_DISABLE_RTSP
 2403|     12|  case CURLOPT_RTSP_SESSION_ID:
  ------------------
  |  Branch (2403:3): [True: 12, False: 85.0k]
  ------------------
 2404|     12|    return Curl_setstropt(&s->str[STRING_RTSP_SESSION_ID], ptr);
 2405|      7|  case CURLOPT_RTSP_STREAM_URI:
  ------------------
  |  Branch (2405:3): [True: 7, False: 85.0k]
  ------------------
 2406|      7|    return Curl_setstropt(&s->str[STRING_RTSP_STREAM_URI], ptr);
 2407|     11|  case CURLOPT_RTSP_TRANSPORT:
  ------------------
  |  Branch (2407:3): [True: 11, False: 85.0k]
  ------------------
 2408|     11|    return Curl_setstropt(&s->str[STRING_RTSP_TRANSPORT], ptr);
 2409|      0|  case CURLOPT_INTERLEAVEDATA:
  ------------------
  |  Branch (2409:3): [True: 0, False: 85.0k]
  ------------------
 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: 85.0k]
  ------------------
 2414|      4|  case CURLOPT_TLSAUTH_PASSWORD:
  ------------------
  |  Branch (2414:3): [True: 3, False: 85.0k]
  ------------------
 2415|      5|  case CURLOPT_TLSAUTH_TYPE:
  ------------------
  |  Branch (2415:3): [True: 1, False: 85.0k]
  ------------------
 2416|      7|  case CURLOPT_PROXY_TLSAUTH_USERNAME:
  ------------------
  |  Branch (2416:3): [True: 2, False: 85.0k]
  ------------------
 2417|      8|  case CURLOPT_PROXY_TLSAUTH_PASSWORD:
  ------------------
  |  Branch (2417:3): [True: 1, False: 85.0k]
  ------------------
 2418|      9|  case CURLOPT_PROXY_TLSAUTH_TYPE:
  ------------------
  |  Branch (2418:3): [True: 1, False: 85.0k]
  ------------------
 2419|      9|    return CURLE_NOT_BUILT_IN;
 2420|      0|#ifndef CURL_DISABLE_HSTS
 2421|      0|  case CURLOPT_HSTSREADDATA:
  ------------------
  |  Branch (2421:3): [True: 0, False: 85.0k]
  ------------------
 2422|      0|    s->hsts_read_userp = ptr;
 2423|      0|    break;
 2424|      0|  case CURLOPT_HSTSWRITEDATA:
  ------------------
  |  Branch (2424:3): [True: 0, False: 85.0k]
  ------------------
 2425|      0|    s->hsts_write_userp = ptr;
 2426|      0|    break;
 2427|  10.8k|  case CURLOPT_HSTS: {
  ------------------
  |  Branch (2427:3): [True: 10.8k, False: 74.2k]
  ------------------
 2428|  10.8k|    struct curl_slist *h;
 2429|  10.8k|    if(!data->hsts) {
  ------------------
  |  Branch (2429:8): [True: 10.8k, False: 4]
  ------------------
 2430|  10.8k|      data->hsts = Curl_hsts_init();
 2431|  10.8k|      if(!data->hsts)
  ------------------
  |  Branch (2431:10): [True: 0, False: 10.8k]
  ------------------
 2432|      0|        return CURLE_OUT_OF_MEMORY;
 2433|  10.8k|    }
 2434|  10.8k|    if(ptr) {
  ------------------
  |  Branch (2434:8): [True: 10.8k, False: 0]
  ------------------
 2435|  10.8k|      result = Curl_setstropt(&s->str[STRING_HSTS], ptr);
 2436|  10.8k|      if(result)
  ------------------
  |  Branch (2436:10): [True: 0, False: 10.8k]
  ------------------
 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|  10.8k|      h = curl_slist_append(data->state.hstslist, ptr);
 2442|  10.8k|      if(!h) {
  ------------------
  |  Branch (2442:10): [True: 0, False: 10.8k]
  ------------------
 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|  10.8k|      data->state.hstslist = h; /* store the list for later use */
 2448|  10.8k|    }
 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|  10.8k|    break;
 2458|  10.8k|  }
 2459|  10.8k|#endif /* !CURL_DISABLE_HSTS */
 2460|  10.8k|#ifndef CURL_DISABLE_ALTSVC
 2461|  10.8k|  case CURLOPT_ALTSVC:
  ------------------
  |  Branch (2461:3): [True: 10.8k, False: 74.2k]
  ------------------
 2462|  10.8k|    if(!data->asi) {
  ------------------
  |  Branch (2462:8): [True: 10.7k, False: 31]
  ------------------
 2463|  10.7k|      data->asi = Curl_altsvc_init();
 2464|  10.7k|      if(!data->asi)
  ------------------
  |  Branch (2464:10): [True: 0, False: 10.7k]
  ------------------
 2465|      0|        return CURLE_OUT_OF_MEMORY;
 2466|  10.7k|    }
 2467|  10.8k|    result = Curl_setstropt(&s->str[STRING_ALTSVC], ptr);
 2468|  10.8k|    if(result)
  ------------------
  |  Branch (2468:8): [True: 0, False: 10.8k]
  ------------------
 2469|      0|      break;
 2470|  10.8k|    if(ptr)
  ------------------
  |  Branch (2470:8): [True: 10.8k, False: 0]
  ------------------
 2471|  10.8k|      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: 85.0k]
  ------------------
 2475|      0|    return setopt_ech(data, ptr);
  ------------------
  |  | 1880|      0|#define setopt_ech(x,y) CURLE_NOT_BUILT_IN
  ------------------
 2476|     13|  default:
  ------------------
  |  Branch (2476:3): [True: 13, False: 85.0k]
  ------------------
 2477|     13|    return CURLE_UNKNOWN_OPTION;
 2478|  85.0k|  }
 2479|  62.3k|  return result;
 2480|  85.0k|}
setopt.c:protocol2num:
  199|  10.8k|{
  200|       |  /*
  201|       |   * We are asked to cherry-pick protocols, so play it safe and disallow all
  202|       |   * protocols to start with, and re-add the wanted ones back in.
  203|       |   */
  204|  10.8k|  *val = 0;
  205|       |
  206|  10.8k|  if(!str)
  ------------------
  |  Branch (206:6): [True: 0, False: 10.8k]
  ------------------
  207|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  208|       |
  209|  10.8k|  if(curl_strequal(str, "all")) {
  ------------------
  |  Branch (209:6): [True: 2, False: 10.8k]
  ------------------
  210|      2|    *val = ~(curl_prot_t)0;
  211|      2|    return CURLE_OK;
  212|      2|  }
  213|       |
  214|  11.1k|  do {
  215|  11.1k|    const char *token = str;
  216|  11.1k|    size_t tlen;
  217|       |
  218|  11.1k|    str = strchr(str, ',');
  219|  11.1k|    tlen = str ? (size_t)(str - token) : strlen(token);
  ------------------
  |  Branch (219:12): [True: 348, False: 10.8k]
  ------------------
  220|  11.1k|    if(tlen) {
  ------------------
  |  Branch (220:8): [True: 10.9k, False: 248]
  ------------------
  221|  10.9k|      const struct Curl_scheme *h = Curl_getn_scheme(token, tlen);
  222|       |
  223|  10.9k|      if(!h || !h->run)
  ------------------
  |  Branch (223:10): [True: 16, False: 10.9k]
  |  Branch (223:16): [True: 1, False: 10.9k]
  ------------------
  224|     17|        return CURLE_UNSUPPORTED_PROTOCOL;
  225|       |
  226|  10.9k|      *val |= h->protocol;
  227|  10.9k|    }
  228|  11.1k|  } while(str && str++);
  ------------------
  |  Branch (228:11): [True: 346, False: 10.8k]
  |  Branch (228:18): [True: 346, False: 0]
  ------------------
  229|       |
  230|  10.8k|  if(!*val)
  ------------------
  |  Branch (230:6): [True: 11, False: 10.8k]
  ------------------
  231|       |    /* no protocol listed */
  232|     11|    return CURLE_BAD_FUNCTION_ARGUMENT;
  233|  10.8k|  return CURLE_OK;
  234|  10.8k|}
setopt.c:setopt_func:
 2518|  43.9k|{
 2519|  43.9k|  struct UserDefined *s = &data->set;
 2520|  43.9k|  switch(option) {
 2521|      0|  case CURLOPT_PROGRESSFUNCTION:
  ------------------
  |  Branch (2521:3): [True: 0, False: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 2553|       |    /*
 2554|       |     * Set header write callback
 2555|       |     */
 2556|      0|    s->fwrite_header = va_arg(param, curl_write_callback);
 2557|      0|    break;
 2558|  11.4k|  case CURLOPT_WRITEFUNCTION:
  ------------------
  |  Branch (2558:3): [True: 11.4k, False: 32.4k]
  ------------------
 2559|       |    /*
 2560|       |     * Set data write callback
 2561|       |     */
 2562|  11.4k|    s->fwrite_func = va_arg(param, curl_write_callback);
 2563|  11.4k|    if(!s->fwrite_func)
  ------------------
  |  Branch (2563:8): [True: 0, False: 11.4k]
  ------------------
 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|  11.4k|#if defined(__clang__) && __clang_major__ >= 16
 2571|  11.4k|#pragma clang diagnostic pop
 2572|  11.4k|#endif
 2573|  11.4k|    break;
 2574|  10.8k|  case CURLOPT_READFUNCTION:
  ------------------
  |  Branch (2574:3): [True: 10.8k, False: 33.0k]
  ------------------
 2575|       |    /*
 2576|       |     * Read data callback
 2577|       |     */
 2578|  10.8k|    s->fread_func_set = va_arg(param, curl_read_callback);
 2579|  10.8k|    if(!s->fread_func_set) {
  ------------------
  |  Branch (2579:8): [True: 0, False: 10.8k]
  ------------------
 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|  10.8k|    else
 2592|  10.8k|      s->is_fread_set = 1;
 2593|  10.8k|    break;
 2594|      0|  case CURLOPT_SEEKFUNCTION:
  ------------------
  |  Branch (2594:3): [True: 0, False: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 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|  10.8k|  case CURLOPT_SOCKOPTFUNCTION:
  ------------------
  |  Branch (2619:3): [True: 10.8k, False: 33.0k]
  ------------------
 2620|       |    /*
 2621|       |     * socket callback function: called after socket() but before connect()
 2622|       |     */
 2623|  10.8k|    s->fsockopt = va_arg(param, curl_sockopt_callback);
 2624|  10.8k|    break;
 2625|       |
 2626|  10.8k|  case CURLOPT_OPENSOCKETFUNCTION:
  ------------------
  |  Branch (2626:3): [True: 10.8k, False: 33.0k]
  ------------------
 2627|       |    /*
 2628|       |     * open/create socket callback function: called instead of socket(),
 2629|       |     * before connect()
 2630|       |     */
 2631|  10.8k|    s->fopensocket = va_arg(param, curl_opensocket_callback);
 2632|  10.8k|    break;
 2633|       |
 2634|      0|  case CURLOPT_CLOSESOCKETFUNCTION:
  ------------------
  |  Branch (2634:3): [True: 0, False: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 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: 43.9k]
  ------------------
 2697|      0|    s->fprereq = va_arg(param, curl_prereq_callback);
 2698|      0|    break;
 2699|      0|  default:
  ------------------
  |  Branch (2699:3): [True: 0, False: 43.9k]
  ------------------
 2700|      0|    return CURLE_UNKNOWN_OPTION;
 2701|  43.9k|  }
 2702|  43.9k|  return CURLE_OK;
 2703|  43.9k|}
setopt.c:setopt_offt:
 2707|    288|{
 2708|    288|  struct UserDefined *s = &data->set;
 2709|    288|  switch(option) {
 2710|      3|  case CURLOPT_TIMEVALUE_LARGE:
  ------------------
  |  Branch (2710:3): [True: 3, False: 285]
  ------------------
 2711|       |    /*
 2712|       |     * This is the value to compare with the remote document with the
 2713|       |     * method set with CURLOPT_TIMECONDITION
 2714|       |     */
 2715|      3|    s->timevalue = (time_t)offt;
 2716|      3|    break;
 2717|       |
 2718|       |    /* MQTT "borrows" some of the HTTP options */
 2719|      0|  case CURLOPT_POSTFIELDSIZE_LARGE:
  ------------------
  |  Branch (2719:3): [True: 0, False: 288]
  ------------------
 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|     35|  case CURLOPT_INFILESIZE_LARGE:
  ------------------
  |  Branch (2735:3): [True: 35, False: 253]
  ------------------
 2736|       |    /*
 2737|       |     * If known, this should inform curl about the file size of the
 2738|       |     * to-be-uploaded file.
 2739|       |     */
 2740|     35|    if(offt < -1)
  ------------------
  |  Branch (2740:8): [True: 0, False: 35]
  ------------------
 2741|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2742|     35|    s->filesize = offt;
 2743|     35|    break;
 2744|     81|  case CURLOPT_MAX_SEND_SPEED_LARGE:
  ------------------
  |  Branch (2744:3): [True: 81, False: 207]
  ------------------
 2745|       |    /*
 2746|       |     * When transfer uploads are faster than CURLOPT_MAX_SEND_SPEED_LARGE
 2747|       |     * bytes per second the transfer is throttled..
 2748|       |     */
 2749|     81|    if(offt < 0)
  ------------------
  |  Branch (2749:8): [True: 0, False: 81]
  ------------------
 2750|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2751|     81|    s->max_send_speed = offt;
 2752|       |    /* use minimal burst rate of 32k. some protocol batch IO */
 2753|     81|    Curl_rlimit_init(&data->progress.ul.rlimit, offt,
 2754|     81|                     CURLMAX(offt, (32 * 1024)),
  ------------------
  |  | 1291|     81|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 60, False: 21]
  |  |  ------------------
  ------------------
 2755|     81|                     Curl_pgrs_now(data));
 2756|     81|    break;
 2757|     68|  case CURLOPT_MAX_RECV_SPEED_LARGE:
  ------------------
  |  Branch (2757:3): [True: 68, False: 220]
  ------------------
 2758|       |    /*
 2759|       |     * When receiving data faster than CURLOPT_MAX_RECV_SPEED_LARGE bytes per
 2760|       |     * second the transfer is throttled..
 2761|       |     */
 2762|     68|    if(offt < 0)
  ------------------
  |  Branch (2762:8): [True: 0, False: 68]
  ------------------
 2763|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2764|     68|    s->max_recv_speed = offt;
 2765|       |    /* use minimal burst rate of 32k. some protocol batch IO */
 2766|     68|    Curl_rlimit_init(&data->progress.dl.rlimit, offt,
 2767|     68|                     CURLMAX(offt, (32 * 1024)),
  ------------------
  |  | 1291|     68|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1291:24): [True: 47, False: 21]
  |  |  ------------------
  ------------------
 2768|     68|                     Curl_pgrs_now(data));
 2769|     68|    break;
 2770|     63|  case CURLOPT_RESUME_FROM_LARGE:
  ------------------
  |  Branch (2770:3): [True: 63, False: 225]
  ------------------
 2771|       |    /*
 2772|       |     * Resume transfer at the given file position
 2773|       |     */
 2774|     63|    if(offt < -1)
  ------------------
  |  Branch (2774:8): [True: 0, False: 63]
  ------------------
 2775|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2776|     63|    s->set_resume_from = offt;
 2777|     63|    break;
 2778|     38|  case CURLOPT_MAXFILESIZE_LARGE:
  ------------------
  |  Branch (2778:3): [True: 38, False: 250]
  ------------------
 2779|       |    /*
 2780|       |     * Set the maximum size of a file to download.
 2781|       |     */
 2782|     38|    if(offt < 0)
  ------------------
  |  Branch (2782:8): [True: 0, False: 38]
  ------------------
 2783|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2784|     38|    s->max_filesize = offt;
 2785|     38|    break;
 2786|       |
 2787|      0|  default:
  ------------------
  |  Branch (2787:3): [True: 0, False: 288]
  ------------------
 2788|      0|    return CURLE_UNKNOWN_OPTION;
 2789|    288|  }
 2790|    288|  return CURLE_OK;
 2791|    288|}

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

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

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

Curl_wakeup_init:
  277|  10.8k|{
  278|  10.8k|#ifdef USE_EVENTFD
  279|  10.8k|  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|  10.8k|}
Curl_wakeup_signal:
  304|    456|{
  305|    456|  int sockerr = 0;
  306|    456|#ifdef USE_EVENTFD
  307|    456|  const uint64_t buf[1] = { 1 };
  308|       |#else
  309|       |  const char buf[1] = { 1 };
  310|       |#endif
  311|       |
  312|    456|  while(1) {
  ------------------
  |  Branch (312:9): [True: 456, Folded]
  ------------------
  313|    456|    sockerr = 0;
  314|    456|    if(wakeup_write(socks[1], buf, sizeof(buf)) < 0) {
  ------------------
  |  |  291|    456|#define wakeup_write        write
  ------------------
  |  Branch (314:8): [True: 0, False: 456]
  ------------------
  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|    456|    break;
  324|    456|  }
  325|    456|  return sockerr;
  326|    456|}
Curl_wakeup_consume:
  329|  11.9k|{
  330|  11.9k|  char buf[64];
  331|  11.9k|  ssize_t rc;
  332|  11.9k|  CURLcode result = CURLE_OK;
  333|       |
  334|  12.1k|  do {
  335|  12.1k|    rc = wakeup_read(socks[0], buf, sizeof(buf));
  ------------------
  |  |  292|  12.1k|#define wakeup_read         read
  ------------------
  336|  12.1k|    if(!rc)
  ------------------
  |  Branch (336:8): [True: 0, False: 12.1k]
  ------------------
  337|      0|      break;
  338|  12.1k|    else if(rc < 0) {
  ------------------
  |  Branch (338:13): [True: 11.9k, False: 143]
  ------------------
  339|  11.9k|      int sockerr = SOCKERRNO;
  ------------------
  |  | 1091|  11.9k|#define SOCKERRNO         errno
  ------------------
  340|  11.9k|#ifndef USE_WINSOCK
  341|  11.9k|      if(sockerr == SOCKEINTR)
  ------------------
  |  | 1125|  11.9k|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (341:10): [True: 0, False: 11.9k]
  ------------------
  342|      0|        continue;
  343|  11.9k|#endif
  344|  11.9k|      if(SOCK_EAGAIN(sockerr))
  ------------------
  |  | 1142|  11.9k|#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)
  |  |  ------------------
  |  |  |  | 1133|  11.9k|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  |  |  ------------------
  |  |  |  Branch (1142:24): [True: 11.9k, False: 0]
  |  |  ------------------
  ------------------
  345|  11.9k|        break;
  346|      0|      result = CURLE_READ_ERROR;
  347|      0|      break;
  348|  11.9k|    }
  349|  12.1k|  } while(all);
  ------------------
  |  Branch (349:11): [True: 143, False: 0]
  ------------------
  350|  11.9k|  return result;
  351|  11.9k|}
Curl_wakeup_destroy:
  354|  10.8k|{
  355|       |#ifndef USE_EVENTFD
  356|       |  if(socks[1] != CURL_SOCKET_BAD)
  357|       |    wakeup_close(socks[1]);
  358|       |#endif
  359|  10.8k|  if(socks[0] != CURL_SOCKET_BAD)
  ------------------
  |  |  145|  10.8k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (359:6): [True: 10.8k, False: 0]
  ------------------
  360|  10.8k|    wakeup_close(socks[0]);
  ------------------
  |  |  293|  10.8k|#define wakeup_close        close
  ------------------
  361|  10.8k|  socks[0] = socks[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  10.8k|#define CURL_SOCKET_BAD (-1)
  ------------------
  362|  10.8k|}
socketpair.c:wakeup_eventfd:
   39|  10.8k|{
   40|  10.8k|  int efd = eventfd(0, nonblocking ? EFD_CLOEXEC | EFD_NONBLOCK : EFD_CLOEXEC);
  ------------------
  |  Branch (40:24): [True: 10.8k, False: 0]
  ------------------
   41|  10.8k|  if(efd == -1) {
  ------------------
  |  Branch (41:6): [True: 0, False: 10.8k]
  ------------------
   42|      0|    socks[0] = socks[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
   43|      0|    return -1;
   44|      0|  }
   45|  10.8k|  socks[0] = socks[1] = efd;
   46|  10.8k|  return 0;
   47|  10.8k|}

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

Curl_splay:
   43|  11.5k|{
   44|  11.5k|  struct Curl_tree N, *l, *r, *y;
   45|       |
   46|  11.5k|  if(!t)
  ------------------
  |  Branch (46:6): [True: 0, False: 11.5k]
  ------------------
   47|      0|    return NULL;
   48|  11.5k|  N.smaller = N.larger = NULL;
   49|  11.5k|  l = r = &N;
   50|       |
   51|  12.3k|  for(;;) {
   52|  12.3k|    timediff_t comp = splay_compare(pkey, &t->key);
  ------------------
  |  |   35|  12.3k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
   53|  12.3k|    if(comp < 0) {
  ------------------
  |  Branch (53:8): [True: 1.84k, False: 10.5k]
  ------------------
   54|  1.84k|      if(!t->smaller)
  ------------------
  |  Branch (54:10): [True: 1.44k, False: 401]
  ------------------
   55|  1.44k|        break;
   56|    401|      if(splay_compare(pkey, &t->smaller->key) < 0) {
  ------------------
  |  |   35|    401|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (56:10): [True: 389, False: 12]
  ------------------
   57|    389|        y = t->smaller;                           /* rotate smaller */
   58|    389|        t->smaller = y->larger;
   59|    389|        y->larger = t;
   60|    389|        t = y;
   61|    389|        if(!t->smaller)
  ------------------
  |  Branch (61:12): [True: 28, False: 361]
  ------------------
   62|     28|          break;
   63|    389|      }
   64|    373|      r->smaller = t;                               /* link smaller */
   65|    373|      r = t;
   66|    373|      t = t->smaller;
   67|    373|    }
   68|  10.5k|    else if(comp > 0) {
  ------------------
  |  Branch (68:13): [True: 2.48k, False: 8.06k]
  ------------------
   69|  2.48k|      if(!t->larger)
  ------------------
  |  Branch (69:10): [True: 1.88k, False: 603]
  ------------------
   70|  1.88k|        break;
   71|    603|      if(splay_compare(pkey, &t->larger->key) > 0) {
  ------------------
  |  |   35|    603|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (71:10): [True: 335, False: 268]
  ------------------
   72|    335|        y = t->larger;                          /* rotate larger */
   73|    335|        t->larger = y->smaller;
   74|    335|        y->smaller = t;
   75|    335|        t = y;
   76|    335|        if(!t->larger)
  ------------------
  |  Branch (76:12): [True: 176, False: 159]
  ------------------
   77|    176|          break;
   78|    335|      }
   79|    427|      l->larger = t;                              /* link larger */
   80|    427|      l = t;
   81|    427|      t = t->larger;
   82|    427|    }
   83|  8.06k|    else
   84|  8.06k|      break;
   85|  12.3k|  }
   86|       |
   87|  11.5k|  l->larger = t->smaller;                                /* assemble */
   88|  11.5k|  r->smaller = t->larger;
   89|  11.5k|  t->smaller = N.larger;
   90|  11.5k|  t->larger = N.smaller;
   91|       |
   92|  11.5k|  return t;
   93|  11.5k|}
Curl_splayinsert:
  107|  8.06k|{
  108|  8.06k|  DEBUGASSERT(node);
  ------------------
  |  | 1077|  8.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (108:3): [True: 0, False: 8.06k]
  |  Branch (108:3): [True: 8.06k, False: 0]
  ------------------
  109|       |
  110|  8.06k|  if(t) {
  ------------------
  |  Branch (110:6): [True: 1.03k, False: 7.03k]
  ------------------
  111|  1.03k|    t = Curl_splay(pkey, t);
  112|  1.03k|    DEBUGASSERT(t);
  ------------------
  |  | 1077|  1.03k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (112:5): [True: 0, False: 1.03k]
  |  Branch (112:5): [True: 1.03k, False: 0]
  ------------------
  113|  1.03k|    if(splay_compare(pkey, &t->key) == 0) {
  ------------------
  |  |   35|  1.03k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (113:8): [True: 1, False: 1.03k]
  ------------------
  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|      1|      node->key = SPLAY_SUBNODE; /* identify this node as a subnode */
  119|      1|      node->samen = t;
  120|      1|      node->samep = t->samep;
  121|      1|      t->samep->samen = node;
  122|      1|      t->samep = node;
  123|       |
  124|      1|      return t; /* the root node always stays the same */
  125|      1|    }
  126|  1.03k|  }
  127|       |
  128|  8.06k|  if(!t) {
  ------------------
  |  Branch (128:6): [True: 7.03k, False: 1.03k]
  ------------------
  129|  7.03k|    node->smaller = node->larger = NULL;
  130|  7.03k|  }
  131|  1.03k|  else if(splay_compare(pkey, &t->key) < 0) {
  ------------------
  |  |   35|  1.03k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (131:11): [True: 2, False: 1.02k]
  ------------------
  132|      2|    node->smaller = t->smaller;
  133|      2|    node->larger = t;
  134|      2|    t->smaller = NULL;
  135|      2|  }
  136|  1.02k|  else {
  137|  1.02k|    node->larger = t->larger;
  138|  1.02k|    node->smaller = t;
  139|  1.02k|    t->larger = NULL;
  140|  1.02k|  }
  141|  8.06k|  node->key = *pkey;
  142|       |
  143|       |  /* no identical nodes (yet), we are the only one in the list of nodes */
  144|  8.06k|  node->samen = node;
  145|  8.06k|  node->samep = node;
  146|  8.06k|  return node;
  147|  8.06k|}
Curl_splaygetbest:
  155|  1.47k|{
  156|  1.47k|  static const struct curltime tv_zero = { 0, 0 };
  157|  1.47k|  struct Curl_tree *x;
  158|       |
  159|  1.47k|  if(!t) {
  ------------------
  |  Branch (159:6): [True: 0, False: 1.47k]
  ------------------
  160|      0|    *removed = NULL; /* none removed since there was no root */
  161|      0|    return NULL;
  162|      0|  }
  163|       |
  164|       |  /* find smallest */
  165|  1.47k|  t = Curl_splay(&tv_zero, t);
  166|  1.47k|  DEBUGASSERT(t);
  ------------------
  |  | 1077|  1.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 1.47k]
  |  Branch (166:3): [True: 1.47k, False: 0]
  ------------------
  167|  1.47k|  if(splay_compare(pkey, &t->key) < 0) {
  ------------------
  |  |   35|  1.47k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (167:6): [True: 1.47k, False: 0]
  ------------------
  168|       |    /* even the smallest is too big */
  169|  1.47k|    *removed = NULL;
  170|  1.47k|    return t;
  171|  1.47k|  }
  172|       |
  173|       |  /* FIRST! Check if there is a list with identical keys */
  174|      0|  x = t->samen;
  175|      0|  if(x != t) {
  ------------------
  |  Branch (175:6): [True: 0, False: 0]
  ------------------
  176|       |    /* there is, pick one from the list */
  177|       |
  178|       |    /* 'x' is the new root node */
  179|       |
  180|      0|    x->key = t->key;
  181|      0|    x->larger = t->larger;
  182|      0|    x->smaller = t->smaller;
  183|      0|    x->samep = t->samep;
  184|      0|    t->samep->samen = x;
  185|       |
  186|      0|    *removed = t;
  187|      0|    return x; /* new root */
  188|      0|  }
  189|       |
  190|       |  /* we splayed the tree to the smallest element, there is no smaller */
  191|      0|  x = t->larger;
  192|      0|  *removed = t;
  193|       |
  194|      0|  return x;
  195|      0|}
Curl_splayremove:
  211|  8.06k|{
  212|  8.06k|  struct Curl_tree *x;
  213|       |
  214|  8.06k|  if(!t)
  ------------------
  |  Branch (214:6): [True: 0, False: 8.06k]
  ------------------
  215|      0|    return 1;
  216|       |
  217|  8.06k|  DEBUGASSERT(removenode);
  ------------------
  |  | 1077|  8.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (217:3): [True: 0, False: 8.06k]
  |  Branch (217:3): [True: 8.06k, False: 0]
  ------------------
  218|       |
  219|  8.06k|  if(splay_compare(&SPLAY_SUBNODE, &removenode->key) == 0) {
  ------------------
  |  |   35|  8.06k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (219:6): [True: 1, False: 8.06k]
  ------------------
  220|       |    /* It is a subnode within a 'same' linked list and thus we can unlink it
  221|       |       easily. */
  222|      1|    DEBUGASSERT(removenode->samen != removenode);
  ------------------
  |  | 1077|      1|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (222:5): [True: 0, False: 1]
  |  Branch (222:5): [True: 1, False: 0]
  ------------------
  223|      1|    if(removenode->samen == removenode)
  ------------------
  |  Branch (223:8): [True: 0, False: 1]
  ------------------
  224|       |      /* A non-subnode should never be set to SPLAY_SUBNODE */
  225|      0|      return 3;
  226|       |
  227|      1|    removenode->samep->samen = removenode->samen;
  228|      1|    removenode->samen->samep = removenode->samep;
  229|       |
  230|       |    /* Ensures that double-remove gets caught. */
  231|      1|    removenode->samen = removenode;
  232|       |
  233|      1|    *newroot = t; /* return the same root */
  234|      1|    return 0;
  235|      1|  }
  236|       |
  237|  8.06k|  t = Curl_splay(&removenode->key, t);
  238|  8.06k|  DEBUGASSERT(t);
  ------------------
  |  | 1077|  8.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (238:3): [True: 0, False: 8.06k]
  |  Branch (238:3): [True: 8.06k, 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|  8.06k|  DEBUGASSERT(t == removenode);
  ------------------
  |  | 1077|  8.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:3): [True: 0, False: 8.06k]
  |  Branch (247:3): [True: 8.06k, False: 0]
  ------------------
  248|  8.06k|  if(t != removenode)
  ------------------
  |  Branch (248:6): [True: 0, False: 8.06k]
  ------------------
  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|  8.06k|  x = t->samen;
  254|  8.06k|  if(x != t) {
  ------------------
  |  Branch (254:6): [True: 0, False: 8.06k]
  ------------------
  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|  8.06k|  else {
  265|       |    /* Remove the root node */
  266|  8.06k|    if(!t->smaller)
  ------------------
  |  Branch (266:8): [True: 7.03k, False: 1.02k]
  ------------------
  267|  7.03k|      x = t->larger;
  268|  1.02k|    else {
  269|  1.02k|      x = Curl_splay(&removenode->key, t->smaller);
  270|  1.02k|      DEBUGASSERT(x);
  ------------------
  |  | 1077|  1.02k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (270:7): [True: 0, False: 1.02k]
  |  Branch (270:7): [True: 1.02k, False: 0]
  ------------------
  271|  1.02k|      x->larger = t->larger;
  272|  1.02k|    }
  273|  8.06k|  }
  274|       |
  275|  8.06k|  *newroot = x; /* store new root pointer */
  276|       |
  277|  8.06k|  return 0;
  278|  8.06k|}
Curl_splayset:
  282|  8.06k|{
  283|  8.06k|  DEBUGASSERT(node);
  ------------------
  |  | 1077|  8.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (283:3): [True: 0, False: 8.06k]
  |  Branch (283:3): [True: 8.06k, False: 0]
  ------------------
  284|  8.06k|  node->ptr = payload;
  285|  8.06k|}

Curl_raw_toupper:
   75|  1.82M|{
   76|  1.82M|  return (char)touppermap[(unsigned char)in];
   77|  1.82M|}
Curl_raw_tolower:
   82|   668k|{
   83|   668k|  return (char)tolowermap[(unsigned char)in];
   84|   668k|}
Curl_strntoupper:
   92|  3.09k|{
   93|  3.09k|  if(n < 1)
  ------------------
  |  Branch (93:6): [True: 0, False: 3.09k]
  ------------------
   94|      0|    return;
   95|       |
   96|  9.70k|  do {
   97|  9.70k|    *dest++ = Curl_raw_toupper(*src);
   98|  9.70k|  } while(*src++ && --n);
  ------------------
  |  Branch (98:11): [True: 9.70k, False: 0]
  |  Branch (98:21): [True: 6.61k, False: 3.09k]
  ------------------
   99|  3.09k|}
Curl_strntolower:
  107|  64.6k|{
  108|  64.6k|  if(n < 1)
  ------------------
  |  Branch (108:6): [True: 320, False: 64.2k]
  ------------------
  109|    320|    return;
  110|       |
  111|   478k|  do {
  112|   478k|    *dest++ = Curl_raw_tolower(*src);
  113|   478k|  } while(*src++ && --n);
  ------------------
  |  Branch (113:11): [True: 478k, False: 0]
  |  Branch (113:21): [True: 414k, False: 64.2k]
  ------------------
  114|  64.2k|}
Curl_safecmp:
  120|  2.17k|{
  121|  2.17k|  if(a && b)
  ------------------
  |  Branch (121:6): [True: 0, False: 2.17k]
  |  Branch (121:11): [True: 0, False: 0]
  ------------------
  122|      0|    return !strcmp(a, b);
  123|  2.17k|  return !a && !b;
  ------------------
  |  Branch (123:10): [True: 2.17k, False: 0]
  |  Branch (123:16): [True: 0, False: 2.17k]
  ------------------
  124|  2.17k|}
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|     34|    while(1) {
  ------------------
  |  Branch (136:11): [True: 34, Folded]
  ------------------
  137|     34|      match |= a[i] ^ b[i];
  138|     34|      if(!a[i] || !b[i])
  ------------------
  |  Branch (138:10): [True: 20, False: 14]
  |  Branch (138:19): [True: 0, False: 14]
  ------------------
  139|     20|        break;
  140|     14|      i++;
  141|     14|    }
  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|  48.7k|{
   78|  48.7k|  if(s1 && s2)
  ------------------
  |  Branch (78:6): [True: 48.4k, False: 250]
  |  Branch (78:12): [True: 44.9k, False: 3.51k]
  ------------------
   79|       |    /* both pointers point to something then compare them */
   80|  44.9k|    return casecompare(s1, s2);
   81|       |
   82|       |  /* if both pointers are NULL then treat them as equal */
   83|  3.76k|  return NULL == s1 && NULL == s2;
  ------------------
  |  Branch (83:10): [True: 250, False: 3.51k]
  |  Branch (83:24): [True: 250, False: 0]
  ------------------
   84|  48.7k|}
curl_strnequal:
   88|   468k|{
   89|   468k|  if(s1 && s2)
  ------------------
  |  Branch (89:6): [True: 468k, False: 0]
  |  Branch (89:12): [True: 468k, False: 0]
  ------------------
   90|       |    /* both pointers point to something then compare them */
   91|   468k|    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|   468k|}
strequal.c:casecompare:
   36|  44.9k|{
   37|  59.8k|  while(*first) {
  ------------------
  |  Branch (37:9): [True: 58.4k, False: 1.40k]
  ------------------
   38|  58.4k|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (38:8): [True: 43.5k, False: 14.8k]
  ------------------
   39|       |      /* get out of the loop as soon as they do not match */
   40|  43.5k|      return 0;
   41|  14.8k|    first++;
   42|  14.8k|    second++;
   43|  14.8k|  }
   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.40k|  return !*first == !*second;
   49|  44.9k|}
strequal.c:ncasecompare:
   52|   468k|{
   53|   769k|  while(*first && max) {
  ------------------
  |  Branch (53:9): [True: 725k, False: 44.3k]
  |  Branch (53:19): [True: 707k, False: 18.0k]
  ------------------
   54|   707k|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (54:8): [True: 405k, False: 301k]
  ------------------
   55|   405k|      return 0;
   56|   301k|    max--;
   57|   301k|    first++;
   58|   301k|    second++;
   59|   301k|  }
   60|  62.4k|  if(max == 0)
  ------------------
  |  Branch (60:6): [True: 56.3k, False: 6.09k]
  ------------------
   61|  56.3k|    return 1; /* they are equal this far */
   62|       |
   63|  6.09k|  return Curl_raw_toupper(*first) == Curl_raw_toupper(*second);
   64|  62.4k|}

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

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

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

Curl_checkheaders:
   88|  5.17k|{
   89|  5.17k|  struct curl_slist *head;
   90|  5.17k|  DEBUGASSERT(thislen);
  ------------------
  |  | 1077|  5.17k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (90:3): [True: 0, False: 5.17k]
  |  Branch (90:3): [True: 5.17k, False: 0]
  ------------------
   91|  5.17k|  DEBUGASSERT(thisheader[thislen - 1] != ':');
  ------------------
  |  | 1077|  5.17k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (91:3): [True: 0, False: 5.17k]
  |  Branch (91:3): [True: 5.17k, False: 0]
  ------------------
   92|       |
   93|   183k|  for(head = data->set.headers; head; head = head->next) {
  ------------------
  |  Branch (93:33): [True: 178k, False: 5.15k]
  ------------------
   94|   178k|    if(curl_strnequal(head->data, thisheader, thislen) &&
  ------------------
  |  Branch (94:8): [True: 155, False: 178k]
  ------------------
   95|    155|       Curl_headersep(head->data[thislen]))
  ------------------
  |  |   26|    155|#define Curl_headersep(x) ((((x) == ':') || ((x) == ';')))
  |  |  ------------------
  |  |  |  Branch (26:29): [True: 26, False: 129]
  |  |  |  Branch (26:45): [True: 2, False: 127]
  |  |  ------------------
  ------------------
   96|     28|      return head->data;
   97|   178k|  }
   98|       |
   99|  5.15k|  return NULL;
  100|  5.17k|}
Curl_init_CONNECT:
  434|  7.71k|{
  435|  7.71k|  data->state.fread_func = data->set.fread_func_set;
  436|  7.71k|  data->state.in = data->set.in_set;
  437|  7.71k|  data->state.upload = (data->state.httpreq == HTTPREQ_PUT);
  438|  7.71k|}
Curl_pretransfer:
  446|  11.4k|{
  447|  11.4k|  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|  11.4k|  data->state.retrycount = 0;
  456|       |
  457|  11.4k|  if(!data->set.str[STRING_SET_URL] && !data->set.uh) {
  ------------------
  |  Branch (457:6): [True: 3.94k, False: 7.53k]
  |  Branch (457:40): [True: 3.94k, False: 0]
  ------------------
  458|       |    /* we cannot do anything without URL */
  459|  3.94k|    failf(data, "No URL set");
  ------------------
  |  |   62|  3.94k|#define failf Curl_failf
  ------------------
  460|  3.94k|    return CURLE_URL_MALFORMAT;
  461|  3.94k|  }
  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|  7.53k|  if(data->set.uh) {
  ------------------
  |  Branch (465:6): [True: 0, False: 7.53k]
  ------------------
  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|  7.53k|  Curl_bufref_set(&data->state.url, data->set.str[STRING_SET_URL], 0, NULL);
  479|       |
  480|  7.53k|  if(data->set.postfields && data->set.set_resume_from) {
  ------------------
  |  Branch (480:6): [True: 703, False: 6.83k]
  |  Branch (480:30): [True: 22, False: 681]
  ------------------
  481|       |    /* we cannot */
  482|     22|    failf(data, "cannot mix POSTFIELDS with RESUME_FROM");
  ------------------
  |  |   62|     22|#define failf Curl_failf
  ------------------
  483|     22|    return CURLE_BAD_FUNCTION_ARGUMENT;
  484|     22|  }
  485|       |
  486|  7.51k|  data->state.prefer_ascii = data->set.prefer_ascii;
  487|  7.51k|#ifdef CURL_LIST_ONLY_PROTOCOL
  488|  7.51k|  data->state.list_only = data->set.list_only;
  489|  7.51k|#endif
  490|  7.51k|  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|  7.51k|  Curl_peer_unlink(&data->state.initial_origin);
  495|  7.51k|  Curl_peer_unlink(&data->state.origin);
  496|  7.51k|  data->state.requests = 0;
  497|  7.51k|  data->state.followlocation = 0; /* reset the location-follow counter */
  498|  7.51k|  data->state.this_is_a_follow = FALSE; /* reset this */
  ------------------
  |  | 1054|  7.51k|#define FALSE false
  ------------------
  499|  7.51k|  data->state.http_ignorecustom = FALSE; /* use custom HTTP method */
  ------------------
  |  | 1054|  7.51k|#define FALSE false
  ------------------
  500|  7.51k|  data->state.errorbuf = FALSE; /* no error has occurred */
  ------------------
  |  | 1054|  7.51k|#define FALSE false
  ------------------
  501|  7.51k|#ifndef CURL_DISABLE_HTTP
  502|  7.51k|  Curl_http_neg_init(data, &data->state.http_neg);
  503|  7.51k|#endif
  504|  7.51k|  data->state.authproblem = FALSE;
  ------------------
  |  | 1054|  7.51k|#define FALSE false
  ------------------
  505|  7.51k|  data->state.authhost.want = data->set.httpauth;
  506|  7.51k|  data->state.authproxy.want = data->set.proxyauth;
  507|  7.51k|  curlx_safefree(data->info.wouldredirect);
  ------------------
  |  | 1332|  7.51k|  do {                      \
  |  | 1333|  7.51k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  7.51k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.51k|    (ptr) = NULL;           \
  |  | 1335|  7.51k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.51k]
  |  |  ------------------
  ------------------
  508|  7.51k|  Curl_data_priority_clear_state(data);
  509|  7.51k|  if(data->set.http_auto_referer)
  ------------------
  |  Branch (509:6): [True: 2, False: 7.51k]
  ------------------
  510|      2|    Curl_bufref_free(&data->state.referer);
  511|  7.51k|  if(data->set.str[STRING_SET_REFERER])
  ------------------
  |  Branch (511:6): [True: 5, False: 7.51k]
  ------------------
  512|      5|    Curl_bufref_set(&data->state.referer, data->set.str[STRING_SET_REFERER],
  513|      5|                    0, NULL);
  514|  7.51k|  else
  515|  7.51k|    Curl_bufref_free(&data->state.referer);
  516|       |
  517|  7.51k|  if(data->state.httpreq == HTTPREQ_PUT)
  ------------------
  |  Branch (517:6): [True: 6, False: 7.51k]
  ------------------
  518|      6|    data->state.infilesize = data->set.filesize;
  519|  7.51k|  else if((data->state.httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (519:11): [True: 758, False: 6.75k]
  ------------------
  520|    758|          (data->state.httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (520:11): [True: 755, False: 3]
  ------------------
  521|    755|    data->state.infilesize = data->set.postfieldsize;
  522|    755|    if(data->set.postfields && (data->state.infilesize == -1))
  ------------------
  |  Branch (522:8): [True: 681, False: 74]
  |  Branch (522:32): [True: 6, False: 675]
  ------------------
  523|      6|      data->state.infilesize = (curl_off_t)strlen(data->set.postfields);
  524|    755|  }
  525|  6.75k|  else
  526|  6.75k|    data->state.infilesize = 0;
  527|       |
  528|       |  /* If there is a list of cookie files to read, do it now! */
  529|  7.51k|  result = Curl_cookie_loadfiles(data);
  530|  7.51k|  if(!result)
  ------------------
  |  Branch (530:6): [True: 7.51k, False: 0]
  ------------------
  531|  7.51k|    Curl_cookie_run(data); /* activate */
  532|       |
  533|       |  /* If there is a list of host pairs to deal with */
  534|  7.51k|  if(!result && data->state.resolve)
  ------------------
  |  Branch (534:6): [True: 7.51k, False: 0]
  |  Branch (534:17): [True: 0, False: 7.51k]
  ------------------
  535|      0|    result = Curl_loadhostpairs(data);
  536|       |
  537|  7.51k|  if(!result)
  ------------------
  |  Branch (537:6): [True: 7.51k, False: 0]
  ------------------
  538|       |    /* If there is a list of hsts files to read */
  539|  7.51k|    result = Curl_hsts_loadfiles(data);
  540|       |
  541|  7.51k|  if(!result) {
  ------------------
  |  Branch (541:6): [True: 7.51k, False: 0]
  ------------------
  542|       |    /* Allow data->set.use_port to set which port to use. This needs to be
  543|       |     * disabled for example when we follow Location: headers to URLs using
  544|       |     * different ports! */
  545|  7.51k|    data->state.allow_port = TRUE;
  ------------------
  |  | 1051|  7.51k|#define TRUE true
  ------------------
  546|       |
  547|       |#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(MSG_NOSIGNAL)
  548|       |    /*************************************************************
  549|       |     * Tell signal handler to ignore SIGPIPE
  550|       |     *************************************************************/
  551|       |    if(!data->set.no_signal)
  552|       |      data->state.prev_signal = signal(SIGPIPE, SIG_IGN);
  553|       |#endif
  554|       |
  555|  7.51k|    Curl_initinfo(data); /* reset session-specific information "variables" */
  556|  7.51k|    Curl_pgrsResetTransferSizes(data);
  557|  7.51k|    Curl_pgrsStartNow(data);
  558|       |
  559|       |    /* In case the handle is reused and an authentication method was picked
  560|       |       in the session we need to make sure we only use the one(s) we now
  561|       |       consider to be fine */
  562|  7.51k|    data->state.authhost.picked &= data->state.authhost.want;
  563|  7.51k|    data->state.authproxy.picked &= data->state.authproxy.want;
  564|       |
  565|  7.51k|#ifndef CURL_DISABLE_FTP
  566|  7.51k|    data->state.wildcardmatch = data->set.wildcard_enabled;
  567|  7.51k|    if(data->state.wildcardmatch) {
  ------------------
  |  Branch (567:8): [True: 4, False: 7.51k]
  ------------------
  568|      4|      struct WildcardData *wc;
  569|      4|      if(!data->wildcard) {
  ------------------
  |  Branch (569:10): [True: 4, False: 0]
  ------------------
  570|      4|        data->wildcard = curlx_calloc(1, sizeof(struct WildcardData));
  ------------------
  |  | 1485|      4|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  571|      4|        if(!data->wildcard)
  ------------------
  |  Branch (571:12): [True: 0, False: 4]
  ------------------
  572|      0|          return CURLE_OUT_OF_MEMORY;
  573|      4|      }
  574|      4|      wc = data->wildcard;
  575|      4|      if(wc->state < CURLWC_INIT) {
  ------------------
  |  Branch (575:10): [True: 4, False: 0]
  ------------------
  576|      4|        if(wc->ftpwc)
  ------------------
  |  Branch (576:12): [True: 0, False: 4]
  ------------------
  577|      0|          wc->dtor(wc->ftpwc);
  578|      4|        curlx_safefree(wc->pattern);
  ------------------
  |  | 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]
  |  |  ------------------
  ------------------
  579|      4|        curlx_safefree(wc->path);
  ------------------
  |  | 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]
  |  |  ------------------
  ------------------
  580|      4|        Curl_wildcard_init(wc); /* init wildcard structures */
  581|      4|      }
  582|      4|    }
  583|  7.51k|#endif
  584|  7.51k|    result = Curl_hsts_loadcb(data, data->hsts);
  585|  7.51k|  }
  586|       |
  587|       |  /*
  588|       |   * Set user-agent. Used for HTTP, but since we can attempt to tunnel
  589|       |   * anything through an HTTP proxy we cannot limit this based on protocol.
  590|       |   */
  591|  7.51k|  if(!result && data->set.str[STRING_USERAGENT]) {
  ------------------
  |  Branch (591:6): [True: 7.51k, False: 0]
  |  Branch (591:17): [True: 11, False: 7.50k]
  ------------------
  592|     11|    curlx_free(data->state.aptr.uagent);
  ------------------
  |  | 1488|     11|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  593|     11|    data->state.aptr.uagent =
  594|     11|      curl_maprintf("User-Agent: %s\r\n", data->set.str[STRING_USERAGENT]);
  595|     11|    if(!data->state.aptr.uagent)
  ------------------
  |  Branch (595:8): [True: 0, False: 11]
  ------------------
  596|      0|      return CURLE_OUT_OF_MEMORY;
  597|     11|  }
  598|       |
  599|  7.51k|  data->req.headerbytecount = 0;
  600|  7.51k|  Curl_headers_cleanup(data);
  601|  7.51k|  return result;
  602|  7.51k|}
Curl_xfer_write_done:
  803|  5.65k|{
  804|  5.65k|  (void)premature;
  805|  5.65k|  return Curl_cw_out_done(data);
  806|  5.65k|}
Curl_xfer_recv_is_paused:
  878|  8.90k|{
  879|  8.90k|  return Curl_rlimit_is_blocked(&data->progress.dl.rlimit);
  880|  8.90k|}

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

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

Curl_freeset:
  150|  23.9k|{
  151|       |  /* Free all dynamic strings stored in the data->set substructure. */
  152|  23.9k|  enum dupstring i;
  153|  23.9k|  enum dupblob j;
  154|       |
  155|  1.72M|  for(i = (enum dupstring)0; i < STRING_LAST; i++) {
  ------------------
  |  Branch (155:30): [True: 1.70M, False: 23.9k]
  ------------------
  156|  1.70M|    curlx_safefree(data->set.str[i]);
  ------------------
  |  | 1332|  1.70M|  do {                      \
  |  | 1333|  1.70M|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  1.70M|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  1.70M|    (ptr) = NULL;           \
  |  | 1335|  1.70M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 1.70M]
  |  |  ------------------
  ------------------
  157|  1.70M|  }
  158|       |
  159|   215k|  for(j = (enum dupblob)0; j < BLOB_LAST; j++) {
  ------------------
  |  Branch (159:28): [True: 191k, False: 23.9k]
  ------------------
  160|   191k|    curlx_safefree(data->set.blobs[j]);
  ------------------
  |  | 1332|   191k|  do {                      \
  |  | 1333|   191k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|   191k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|   191k|    (ptr) = NULL;           \
  |  | 1335|   191k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 191k]
  |  |  ------------------
  ------------------
  161|   191k|  }
  162|       |
  163|  23.9k|  Curl_bufref_free(&data->state.referer);
  164|  23.9k|  Curl_bufref_free(&data->state.url);
  165|       |
  166|  23.9k|#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
  167|  23.9k|  Curl_mime_cleanpart(data->set.mimepostp);
  168|  23.9k|  curlx_safefree(data->set.mimepostp);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  169|  23.9k|#endif
  170|       |
  171|  23.9k|#ifndef CURL_DISABLE_COOKIES
  172|  23.9k|  curl_slist_free_all(data->state.cookielist);
  173|       |  data->state.cookielist = NULL;
  174|  23.9k|#endif
  175|  23.9k|}
Curl_close:
  196|  23.9k|{
  197|  23.9k|  struct Curl_easy *data;
  198|       |
  199|  23.9k|  if(!datap || !*datap)
  ------------------
  |  Branch (199:6): [True: 0, False: 23.9k]
  |  Branch (199:16): [True: 8, False: 23.9k]
  ------------------
  200|      8|    return CURLE_OK;
  201|       |
  202|  23.9k|  data = *datap;
  203|  23.9k|  *datap = NULL;
  204|       |
  205|  23.9k|  if(!data->state.internal && data->multi) {
  ------------------
  |  Branch (205:6): [True: 12.5k, False: 11.4k]
  |  Branch (205:31): [True: 0, False: 12.5k]
  ------------------
  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|  23.9k|  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|  23.9k|    Curl_detach_connection(data);
  215|  23.9k|    if(!data->state.internal && data->multi_easy) {
  ------------------
  |  Branch (215:8): [True: 12.5k, False: 11.4k]
  |  Branch (215:33): [True: 0, False: 12.5k]
  ------------------
  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|  23.9k|  }
  222|  23.9k|  DEBUGASSERT(!data->conn || data->state.internal);
  ------------------
  |  | 1077|  23.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (222:3): [True: 23.9k, False: 0]
  |  Branch (222:3): [True: 0, False: 0]
  |  Branch (222:3): [True: 23.9k, False: 0]
  |  Branch (222:3): [True: 0, False: 0]
  ------------------
  223|       |
  224|  23.9k|  Curl_expire_clear(data); /* shut off any timers left */
  225|       |
  226|  23.9k|  if(data->state.rangestringalloc)
  ------------------
  |  Branch (226:6): [True: 43, False: 23.9k]
  ------------------
  227|     43|    curlx_free(data->state.range);
  ------------------
  |  | 1488|     43|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  228|       |
  229|       |  /* release any resolve information this transfer kept */
  230|  23.9k|  Curl_resolv_destroy_all(data);
  231|       |
  232|  23.9k|  data->set.verbose = FALSE; /* no more calls to DEBUGFUNCTION */
  ------------------
  |  | 1054|  23.9k|#define FALSE false
  ------------------
  233|  23.9k|  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|  23.9k|  Curl_req_free(&data->req, data);
  240|       |
  241|       |  /* Close down all open SSL info and sessions */
  242|  23.9k|  Curl_ssl_close_all(data);
  243|  23.9k|  Curl_peer_unlink(&data->state.origin);
  244|  23.9k|  Curl_peer_unlink(&data->state.initial_origin);
  245|  23.9k|  Curl_ssl_free_certinfo(data);
  246|       |
  247|  23.9k|  Curl_bufref_free(&data->state.referer);
  248|       |
  249|  23.9k|  up_free(data);
  250|  23.9k|  curlx_dyn_free(&data->state.headerb);
  251|  23.9k|  Curl_flush_cookies(data, TRUE);
  ------------------
  |  | 1051|  23.9k|#define TRUE true
  ------------------
  252|  23.9k|#ifndef CURL_DISABLE_ALTSVC
  253|  23.9k|  Curl_altsvc_save(data, data->asi, data->set.str[STRING_ALTSVC]);
  254|  23.9k|  Curl_altsvc_cleanup(&data->asi);
  255|  23.9k|#endif
  256|  23.9k|#ifndef CURL_DISABLE_HSTS
  257|  23.9k|  Curl_hsts_save(data, data->hsts, data->set.str[STRING_HSTS]);
  258|  23.9k|  if(!data->share || !data->share->hsts)
  ------------------
  |  Branch (258:6): [True: 23.9k, False: 0]
  |  Branch (258:22): [True: 0, False: 0]
  ------------------
  259|  23.9k|    Curl_hsts_cleanup(&data->hsts);
  260|  23.9k|  curl_slist_free_all(data->state.hstslist); /* clean up list */
  261|  23.9k|#endif
  262|  23.9k|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_DIGEST_AUTH)
  263|  23.9k|  Curl_http_auth_cleanup_digest(data);
  264|  23.9k|#endif
  265|  23.9k|  curlx_safefree(data->state.most_recent_ftp_entrypath);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  266|  23.9k|  curlx_safefree(data->info.contenttype);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  267|  23.9k|  curlx_safefree(data->info.wouldredirect);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  268|       |
  269|       |  /* No longer a dirty share, if it exists */
  270|  23.9k|  if(Curl_share_easy_unlink(data))
  ------------------
  |  Branch (270:6): [True: 0, False: 23.9k]
  ------------------
  271|  23.9k|    DEBUGASSERT(0);
  ------------------
  |  | 1077|  23.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (271:5): [Folded, False: 0]
  |  Branch (271:5): [Folded, False: 0]
  ------------------
  272|       |
  273|  23.9k|  Curl_hash_destroy(&data->meta_hash);
  274|  23.9k|  Curl_creds_unlink(&data->state.creds);
  275|  23.9k|  curlx_safefree(data->state.aptr.uagent);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  276|  23.9k|  curlx_safefree(data->state.aptr.accept_encoding);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  277|  23.9k|  curlx_safefree(data->state.aptr.rangeline);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  278|  23.9k|  curlx_safefree(data->state.aptr.ref);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  279|  23.9k|  curlx_safefree(data->state.aptr.host);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  280|  23.9k|#ifndef CURL_DISABLE_COOKIES
  281|  23.9k|  curlx_safefree(data->req.cookiehost);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  282|  23.9k|#endif
  283|  23.9k|#ifndef CURL_DISABLE_RTSP
  284|  23.9k|  curlx_safefree(data->state.aptr.rtsp_transport);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  285|  23.9k|#endif
  286|       |
  287|  23.9k|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_FORM_API)
  288|  23.9k|  Curl_mime_cleanpart(data->state.formp);
  289|  23.9k|  curlx_safefree(data->state.formp);
  ------------------
  |  | 1332|  23.9k|  do {                      \
  |  | 1333|  23.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  23.9k|    (ptr) = NULL;           \
  |  | 1335|  23.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 23.9k]
  |  |  ------------------
  ------------------
  290|  23.9k|#endif
  291|       |
  292|       |  /* destruct wildcard structures if it is needed */
  293|  23.9k|  Curl_wildcard_dtor(&data->wildcard);
  294|  23.9k|  Curl_freeset(data);
  295|  23.9k|  Curl_headers_cleanup(data);
  296|  23.9k|  Curl_netrc_cleanup(&data->state.netrc);
  297|  23.9k|#ifndef CURL_DISABLE_DIGEST_AUTH
  298|  23.9k|  curlx_free(data->state.envproxy);
  ------------------
  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  299|  23.9k|#endif
  300|  23.9k|  Curl_ssl_config_cleanup(&data->set.ssl.primary);
  301|  23.9k|#ifndef CURL_DISABLE_PROXY
  302|  23.9k|  Curl_ssl_config_cleanup(&data->set.proxy_ssl.primary);
  303|  23.9k|#endif
  304|  23.9k|  curlx_free(data);
  ------------------
  |  | 1488|  23.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  305|  23.9k|  return CURLE_OK;
  306|  23.9k|}
Curl_init_userdefined:
  313|  23.9k|{
  314|  23.9k|  struct UserDefined *set = &data->set;
  315|       |
  316|  23.9k|  set->out = stdout;  /* default output to stdout */
  317|  23.9k|  set->in_set = stdin;  /* default input from stdin */
  318|  23.9k|  set->err = stderr;  /* default stderr to stderr */
  319|       |
  320|  23.9k|#if defined(__clang__) && __clang_major__ >= 16
  321|  23.9k|#pragma clang diagnostic push
  322|  23.9k|#pragma clang diagnostic ignored "-Wcast-function-type-strict"
  323|  23.9k|#endif
  324|       |  /* use fwrite as default function to store output */
  325|  23.9k|  set->fwrite_func = (curl_write_callback)fwrite;
  326|       |
  327|       |  /* use fread as default function to read input */
  328|  23.9k|  set->fread_func_set = (curl_read_callback)fread;
  329|  23.9k|#if defined(__clang__) && __clang_major__ >= 16
  330|  23.9k|#pragma clang diagnostic pop
  331|  23.9k|#endif
  332|  23.9k|  set->is_fread_set = 0;
  333|       |
  334|  23.9k|  set->seek_client = ZERO_NULL;
  ------------------
  |  | 1160|  23.9k|#define ZERO_NULL 0
  ------------------
  335|       |
  336|  23.9k|  set->filesize = -1;        /* we do not know the size */
  337|  23.9k|  set->postfieldsize = -1;   /* unknown size */
  338|  23.9k|  set->maxredirs = 30;       /* sensible default */
  339|       |
  340|  23.9k|  set->method = HTTPREQ_GET; /* Default HTTP request */
  341|  23.9k|#ifndef CURL_DISABLE_RTSP
  342|  23.9k|  set->rtspreq = RTSPREQ_OPTIONS; /* Default RTSP request */
  343|  23.9k|#endif
  344|  23.9k|#ifndef CURL_DISABLE_FTP
  345|  23.9k|  set->ftp_use_epsv = TRUE;   /* FTP defaults to EPSV operations */
  ------------------
  |  | 1051|  23.9k|#define TRUE true
  ------------------
  346|  23.9k|  set->ftp_use_eprt = TRUE;   /* FTP defaults to EPRT operations */
  ------------------
  |  | 1051|  23.9k|#define TRUE true
  ------------------
  347|  23.9k|  set->ftp_use_pret = FALSE;  /* mainly useful for drftpd servers */
  ------------------
  |  | 1054|  23.9k|#define FALSE false
  ------------------
  348|  23.9k|  set->ftp_filemethod = FTPFILE_MULTICWD;
  349|  23.9k|  set->ftp_skip_ip = TRUE;    /* skip PASV IP by default */
  ------------------
  |  | 1051|  23.9k|#define TRUE true
  ------------------
  350|  23.9k|#endif
  351|  23.9k|  set->dns_cache_timeout_ms = 60000; /* Timeout every 60 seconds by default */
  352|       |
  353|       |  /* Timeout every 24 hours by default */
  354|  23.9k|  set->general_ssl.ca_cache_timeout = 24 * 60 * 60;
  355|       |
  356|  23.9k|  set->httpauth = CURLAUTH_BASIC;  /* defaults to basic */
  ------------------
  |  |  831|  23.9k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  357|       |
  358|  23.9k|  Curl_ssl_config_init(&data->set.ssl.primary);
  359|  23.9k|#ifndef CURL_DISABLE_PROXY
  360|  23.9k|  Curl_ssl_config_init(&data->set.proxy_ssl.primary);
  361|  23.9k|  set->proxyport = 0;
  362|  23.9k|  set->proxytype = CURLPROXY_HTTP; /* defaults to HTTP proxy */
  ------------------
  |  |  790|  23.9k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  363|  23.9k|  set->proxyauth = CURLAUTH_BASIC; /* defaults to basic */
  ------------------
  |  |  831|  23.9k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  364|       |  /* SOCKS5 proxy auth defaults to username/password + GSS-API */
  365|  23.9k|  set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  831|  23.9k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
                set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  837|  23.9k|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|  23.9k|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  366|  23.9k|#endif
  367|       |
  368|  23.9k|#ifndef CURL_DISABLE_DOH
  369|  23.9k|  set->doh_verifyhost = TRUE;
  ------------------
  |  | 1051|  23.9k|#define TRUE true
  ------------------
  370|  23.9k|  set->doh_verifypeer = TRUE;
  ------------------
  |  | 1051|  23.9k|#define TRUE true
  ------------------
  371|  23.9k|#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|  23.9k|  set->new_file_perms = 0644;    /* Default permissions */
  379|  23.9k|  set->allowed_protocols = (curl_prot_t)CURLPROTO_64ALL;
  ------------------
  |  |   68|  23.9k|#define CURLPROTO_64ALL ((uint64_t)0xffffffffffffffff)
  ------------------
  380|  23.9k|  set->redir_protocols = CURLPROTO_REDIR;
  ------------------
  |  |   71|  23.9k|#define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1078|  23.9k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1079|  23.9k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1080|  23.9k|#define CURLPROTO_FTP     (1L << 2)
  |  |  ------------------
  |  |   72|  23.9k|                         CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1081|  23.9k|#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|  23.9k|#ifdef USE_SSL
  392|  23.9k|  Curl_setopt_SSLVERSION(data, CURLOPT_SSLVERSION, CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2374|  23.9k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  393|  23.9k|#ifndef CURL_DISABLE_PROXY
  394|  23.9k|  Curl_setopt_SSLVERSION(data, CURLOPT_PROXY_SSLVERSION,
  395|  23.9k|                         CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2374|  23.9k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  396|  23.9k|#endif
  397|  23.9k|#endif
  398|  23.9k|#ifndef CURL_DISABLE_FTP
  399|  23.9k|  set->wildcard_enabled = FALSE;
  ------------------
  |  | 1054|  23.9k|#define FALSE false
  ------------------
  400|  23.9k|  set->chunk_bgn = ZERO_NULL;
  ------------------
  |  | 1160|  23.9k|#define ZERO_NULL 0
  ------------------
  401|  23.9k|  set->chunk_end = ZERO_NULL;
  ------------------
  |  | 1160|  23.9k|#define ZERO_NULL 0
  ------------------
  402|  23.9k|  set->fnmatch = ZERO_NULL;
  ------------------
  |  | 1160|  23.9k|#define ZERO_NULL 0
  ------------------
  403|  23.9k|#endif
  404|  23.9k|  set->tcp_keepalive = FALSE;
  ------------------
  |  | 1054|  23.9k|#define FALSE false
  ------------------
  405|  23.9k|  set->tcp_keepintvl = 60;
  406|  23.9k|  set->tcp_keepidle = 60;
  407|  23.9k|  set->tcp_keepcnt = 9;
  408|  23.9k|  set->tcp_fastopen = FALSE;
  ------------------
  |  | 1054|  23.9k|#define FALSE false
  ------------------
  409|  23.9k|  set->tcp_nodelay = TRUE;
  ------------------
  |  | 1051|  23.9k|#define TRUE true
  ------------------
  410|  23.9k|  set->ssl_enable_alpn = TRUE;
  ------------------
  |  | 1051|  23.9k|#define TRUE true
  ------------------
  411|  23.9k|  set->expect_100_timeout = 1000L; /* Wait for a second by default. */
  412|  23.9k|  set->sep_headers = TRUE; /* separated header lists by default */
  ------------------
  |  | 1051|  23.9k|#define TRUE true
  ------------------
  413|  23.9k|  set->buffer_size = READBUFFER_SIZE;
  ------------------
  |  |  119|  23.9k|#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE
  |  |  ------------------
  |  |  |  |  265|  23.9k|#define CURL_MAX_WRITE_SIZE 16384
  |  |  ------------------
  ------------------
  414|  23.9k|  set->upload_buffer_size = UPLOADBUFFER_DEFAULT;
  ------------------
  |  |  131|  23.9k|#define UPLOADBUFFER_DEFAULT 65536
  ------------------
  415|  23.9k|  set->upload_flags = CURLULFLAG_SEEN;
  ------------------
  |  | 1044|  23.9k|#define CURLULFLAG_SEEN     (1L << 4)
  ------------------
  416|  23.9k|  set->happy_eyeballs_timeout = CURL_HET_DEFAULT;
  ------------------
  |  |  969|  23.9k|#define CURL_HET_DEFAULT 200L
  ------------------
  417|  23.9k|  set->upkeep_interval_ms = CURL_UPKEEP_INTERVAL_DEFAULT;
  ------------------
  |  |  972|  23.9k|#define CURL_UPKEEP_INTERVAL_DEFAULT 60000L
  ------------------
  418|  23.9k|  set->maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */
  ------------------
  |  |   38|  23.9k|#define DEFAULT_CONNCACHE_SIZE 5
  ------------------
  419|  23.9k|  set->conn_max_idle_ms = 118 * 1000;
  420|  23.9k|  set->conn_max_age_ms = 24 * 3600 * 1000;
  421|  23.9k|  set->http09_allowed = FALSE;
  ------------------
  |  | 1054|  23.9k|#define FALSE false
  ------------------
  422|  23.9k|  set->httpwant = CURL_HTTP_VERSION_NONE;
  ------------------
  |  | 2318|  23.9k|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  423|  23.9k|#if defined(USE_HTTP2) || defined(USE_HTTP3)
  424|  23.9k|  memset(&set->priority, 0, sizeof(set->priority));
  425|  23.9k|#endif
  426|  23.9k|  set->quick_exit = 0L;
  427|  23.9k|#ifndef CURL_DISABLE_WEBSOCKETS
  428|  23.9k|  set->ws_raw_mode = FALSE;
  ------------------
  |  | 1054|  23.9k|#define FALSE false
  ------------------
  429|       |  set->ws_no_auto_pong = FALSE;
  ------------------
  |  | 1054|  23.9k|#define FALSE false
  ------------------
  430|  23.9k|#endif
  431|  23.9k|}
Curl_open:
  453|  23.9k|{
  454|  23.9k|  struct Curl_easy *data;
  455|       |
  456|       |  /* simple start-up: alloc the struct, init it with zeroes and return */
  457|  23.9k|  data = curlx_calloc(1, sizeof(struct Curl_easy));
  ------------------
  |  | 1485|  23.9k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  458|  23.9k|  if(!data) {
  ------------------
  |  Branch (458:6): [True: 0, False: 23.9k]
  ------------------
  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|  23.9k|  data->magic = CURLEASY_MAGIC_NUMBER;
  ------------------
  |  |  135|  23.9k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  ------------------
  465|       |  /* most recent connection is not yet defined */
  466|  23.9k|  data->state.lastconnect_id = -1;
  467|  23.9k|  data->state.recent_conn_id = -1;
  468|       |  /* and not assigned an id yet */
  469|  23.9k|  data->id = -1;
  470|  23.9k|  data->mid = UINT32_MAX;
  471|  23.9k|  data->master_mid = UINT32_MAX;
  472|  23.9k|  data->progress.hide = TRUE;
  ------------------
  |  | 1051|  23.9k|#define TRUE true
  ------------------
  473|  23.9k|  data->state.current_speed = -1; /* init to negative == impossible */
  474|       |
  475|  23.9k|  Curl_hash_init(&data->meta_hash, 23,
  476|  23.9k|                 Curl_hash_str, curlx_str_key_compare, easy_meta_freeentry);
  477|  23.9k|  curlx_dyn_init(&data->state.headerb, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  23.9k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  478|  23.9k|  Curl_bufref_init(&data->state.url);
  479|  23.9k|  Curl_bufref_init(&data->state.referer);
  480|  23.9k|  Curl_req_init(&data->req);
  481|  23.9k|  Curl_initinfo(data);
  482|  23.9k|#ifndef CURL_DISABLE_HTTP
  483|  23.9k|  Curl_llist_init(&data->state.httphdrs, NULL);
  484|  23.9k|#endif
  485|  23.9k|  Curl_netrc_init(&data->state.netrc);
  486|  23.9k|  Curl_init_userdefined(data);
  487|       |
  488|  23.9k|  *curl = data;
  489|  23.9k|  return CURLE_OK;
  490|  23.9k|}
Curl_conn_free:
  493|  6.61k|{
  494|  6.61k|  size_t i;
  495|       |
  496|  6.61k|  DEBUGASSERT(conn);
  ------------------
  |  | 1077|  6.61k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (496:3): [True: 0, False: 6.61k]
  |  Branch (496:3): [True: 6.61k, False: 0]
  ------------------
  497|       |
  498|  6.61k|  if(conn->scheme && conn->scheme->run->disconnect &&
  ------------------
  |  Branch (498:6): [True: 5.86k, False: 743]
  |  Branch (498:22): [True: 0, False: 5.86k]
  ------------------
  499|      0|     !conn->bits.shutdown_handler)
  ------------------
  |  Branch (499:6): [True: 0, False: 0]
  ------------------
  500|      0|    conn->scheme->run->disconnect(data, conn, TRUE);
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  501|       |
  502|  19.8k|  for(i = 0; i < CURL_ARRAYSIZE(conn->cfilter); ++i) {
  ------------------
  |  | 1299|  19.8k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (502:14): [True: 13.2k, False: 6.61k]
  ------------------
  503|  13.2k|    Curl_conn_cf_discard_all(data, conn, (int)i);
  504|  13.2k|  }
  505|       |
  506|  6.61k|#ifndef CURL_DISABLE_PROXY
  507|  6.61k|  Curl_peer_unlink(&conn->http_proxy.peer);
  508|  6.61k|  Curl_peer_unlink(&conn->socks_proxy.peer);
  509|  6.61k|  Curl_creds_unlink(&conn->http_proxy.creds);
  510|  6.61k|  Curl_creds_unlink(&conn->socks_proxy.creds);
  511|  6.61k|#endif
  512|  6.61k|  Curl_creds_unlink(&conn->creds);
  513|  6.61k|  Curl_peer_unlink(&conn->creds_origin);
  514|  6.61k|  curlx_safefree(conn->options);
  ------------------
  |  | 1332|  6.61k|  do {                      \
  |  | 1333|  6.61k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  6.61k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  6.61k|    (ptr) = NULL;           \
  |  | 1335|  6.61k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 6.61k]
  |  |  ------------------
  ------------------
  515|  6.61k|  curlx_safefree(conn->localdev);
  ------------------
  |  | 1332|  6.61k|  do {                      \
  |  | 1333|  6.61k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  6.61k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  6.61k|    (ptr) = NULL;           \
  |  | 1335|  6.61k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 6.61k]
  |  |  ------------------
  ------------------
  516|  6.61k|  Curl_ssl_conn_config_cleanup(conn);
  517|       |
  518|  6.61k|  curlx_safefree(conn->destination);
  ------------------
  |  | 1332|  6.61k|  do {                      \
  |  | 1333|  6.61k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  6.61k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  6.61k|    (ptr) = NULL;           \
  |  | 1335|  6.61k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 6.61k]
  |  |  ------------------
  ------------------
  519|  6.61k|  Curl_hash_destroy(&conn->meta_hash);
  520|  6.61k|  Curl_peer_unlink(&conn->origin);
  521|  6.61k|  Curl_peer_unlink(&conn->via_peer);
  522|  6.61k|  Curl_peer_unlink(&conn->origin2);
  523|  6.61k|  Curl_peer_unlink(&conn->via_peer2);
  524|       |
  525|  6.61k|  curlx_free(conn); /* free all the connection oriented data */
  ------------------
  |  | 1488|  6.61k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  526|  6.61k|}
Curl_uc_to_curlcode:
 1353|    754|{
 1354|    754|  switch(uc) {
 1355|    753|  default:
  ------------------
  |  Branch (1355:3): [True: 753, False: 1]
  ------------------
 1356|    753|    return CURLE_URL_MALFORMAT;
 1357|      0|  case CURLUE_UNSUPPORTED_SCHEME:
  ------------------
  |  Branch (1357:3): [True: 0, False: 754]
  ------------------
 1358|      0|    return CURLE_UNSUPPORTED_PROTOCOL;
 1359|      0|  case CURLUE_OUT_OF_MEMORY:
  ------------------
  |  Branch (1359:3): [True: 0, False: 754]
  ------------------
 1360|      0|    return CURLE_OUT_OF_MEMORY;
 1361|      1|  case CURLUE_USER_NOT_ALLOWED:
  ------------------
  |  Branch (1361:3): [True: 1, False: 753]
  ------------------
 1362|      1|    return CURLE_LOGIN_DENIED;
 1363|    754|  }
 1364|    754|}
Curl_parse_login_details:
 1758|  1.93k|{
 1759|  1.93k|  char *ubuf = NULL;
 1760|  1.93k|  char *pbuf = NULL;
 1761|  1.93k|  const char *psep = NULL;
 1762|  1.93k|  const char *osep = NULL;
 1763|  1.93k|  size_t ulen;
 1764|  1.93k|  size_t plen;
 1765|  1.93k|  size_t olen;
 1766|       |
 1767|  1.93k|  DEBUGASSERT(userp);
  ------------------
  |  | 1077|  1.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1767:3): [True: 0, False: 1.93k]
  |  Branch (1767:3): [True: 1.93k, False: 0]
  ------------------
 1768|  1.93k|  DEBUGASSERT(passwdp);
  ------------------
  |  | 1077|  1.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1768:3): [True: 0, False: 1.93k]
  |  Branch (1768:3): [True: 1.93k, False: 0]
  ------------------
 1769|       |
 1770|       |  /* Attempt to find the password separator */
 1771|  1.93k|  psep = memchr(login, ':', len);
 1772|       |
 1773|       |  /* Attempt to find the options separator */
 1774|  1.93k|  if(optionsp)
  ------------------
  |  Branch (1774:6): [True: 14, False: 1.92k]
  ------------------
 1775|     14|    osep = memchr(login, ';', len);
 1776|       |
 1777|       |  /* Calculate the portion lengths */
 1778|  1.93k|  ulen = (psep ?
  ------------------
  |  Branch (1778:11): [True: 531, False: 1.40k]
  ------------------
 1779|    531|          (size_t)(osep && psep > osep ? osep - login : psep - login) :
  ------------------
  |  Branch (1779:20): [True: 6, False: 525]
  |  Branch (1779:28): [True: 3, False: 3]
  ------------------
 1780|  1.93k|          (osep ? (size_t)(osep - login) : len));
  ------------------
  |  Branch (1780:12): [True: 7, False: 1.40k]
  ------------------
 1781|  1.93k|  plen = (psep ?
  ------------------
  |  Branch (1781:11): [True: 531, False: 1.40k]
  ------------------
 1782|    531|          (osep && osep > psep ? (size_t)(osep - psep) :
  ------------------
  |  Branch (1782:12): [True: 6, False: 525]
  |  Branch (1782:20): [True: 3, False: 3]
  ------------------
 1783|  1.40k|           (size_t)(login + len - psep)) - 1 : 0);
 1784|  1.93k|  olen = (osep ?
  ------------------
  |  Branch (1784:11): [True: 13, False: 1.92k]
  ------------------
 1785|     13|          (psep && psep > osep ? (size_t)(psep - osep) :
  ------------------
  |  Branch (1785:12): [True: 6, False: 7]
  |  Branch (1785:20): [True: 3, False: 3]
  ------------------
 1786|  1.92k|           (size_t)(login + len - osep)) - 1 : 0);
 1787|       |
 1788|       |  /* Clone the user portion buffer, which can be zero length */
 1789|  1.93k|  ubuf = curlx_memdup0(login, ulen);
 1790|  1.93k|  if(!ubuf)
  ------------------
  |  Branch (1790:6): [True: 0, False: 1.93k]
  ------------------
 1791|      0|    goto error;
 1792|       |
 1793|       |  /* Clone the password portion buffer */
 1794|  1.93k|  if(psep) {
  ------------------
  |  Branch (1794:6): [True: 531, False: 1.40k]
  ------------------
 1795|    531|    pbuf = curlx_memdup0(&psep[1], plen);
 1796|    531|    if(!pbuf)
  ------------------
  |  Branch (1796:8): [True: 0, False: 531]
  ------------------
 1797|      0|      goto error;
 1798|    531|  }
 1799|       |
 1800|       |  /* Allocate the options portion buffer */
 1801|  1.93k|  if(optionsp) {
  ------------------
  |  Branch (1801:6): [True: 14, False: 1.92k]
  ------------------
 1802|     14|    char *obuf = NULL;
 1803|     14|    if(olen) {
  ------------------
  |  Branch (1803:8): [True: 4, False: 10]
  ------------------
 1804|      4|      obuf = curlx_memdup0(&osep[1], olen);
 1805|      4|      if(!obuf)
  ------------------
  |  Branch (1805:10): [True: 0, False: 4]
  ------------------
 1806|      0|        goto error;
 1807|      4|    }
 1808|     14|    *optionsp = obuf;
 1809|     14|  }
 1810|  1.93k|  *userp = ubuf;
 1811|  1.93k|  *passwdp = pbuf;
 1812|  1.93k|  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|  1.93k|}
Curl_connect:
 2536|  7.54k|{
 2537|  7.54k|  CURLcode result;
 2538|  7.54k|  struct connectdata *conn = NULL;
 2539|       |
 2540|  7.54k|  *pconnected = FALSE;
  ------------------
  |  | 1054|  7.54k|#define FALSE false
  ------------------
 2541|       |
 2542|       |  /* Set the request to virgin state based on transfer settings */
 2543|  7.54k|  Curl_req_hard_reset(&data->req, data);
 2544|       |  /* Determine the origin of the transfer and what credentials to use */
 2545|  7.54k|  result = url_set_data_origin_and_creds(data);
 2546|  7.54k|  if(result)
  ------------------
  |  Branch (2546:6): [True: 930, False: 6.61k]
  ------------------
 2547|    930|    goto out;
 2548|  6.61k|  if(!data->state.origin) { /* just make really sure */
  ------------------
  |  Branch (2548:6): [True: 0, False: 6.61k]
  ------------------
 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|  6.61k|  result = url_find_or_create_conn(data);
 2556|  6.61k|  conn = data->conn;
 2557|  6.61k|  if(result)
  ------------------
  |  Branch (2557:6): [True: 960, False: 5.65k]
  ------------------
 2558|    960|    goto out;
 2559|  5.65k|  if(!data->conn) { /* just make really sure */
  ------------------
  |  Branch (2559:6): [True: 0, False: 5.65k]
  ------------------
 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|  5.65k|  Curl_pgrsTime(data, TIMER_POSTQUEUE);
 2566|  5.65k|  if(conn->bits.reuse) {
  ------------------
  |  Branch (2566:6): [True: 0, False: 5.65k]
  ------------------
 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|  5.65k|  else if(conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|  5.65k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (2571:11): [True: 0, False: 5.65k]
  ------------------
 2572|      0|    Curl_pgrsTime(data, TIMER_NAMELOOKUP);
 2573|      0|    *pconnected = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2574|      0|  }
 2575|  5.65k|  else {
 2576|  5.65k|    result = Curl_conn_setup(data, conn, FIRSTSOCKET, CURL_CF_SSL_DEFAULT);
  ------------------
  |  |  245|  5.65k|#define FIRSTSOCKET     0
  ------------------
                  result = Curl_conn_setup(data, conn, FIRSTSOCKET, CURL_CF_SSL_DEFAULT);
  ------------------
  |  |  359|  5.65k|#define CURL_CF_SSL_DEFAULT  (-1)
  ------------------
 2577|  5.65k|    if(!result)
  ------------------
  |  Branch (2577:8): [True: 5.65k, False: 0]
  ------------------
 2578|  5.65k|      result = Curl_headers_init(data);
 2579|  5.65k|    CURL_TRC_M(data, "Curl_conn_setup() -> %d", (int)result);
  ------------------
  |  |  148|  5.65k|  do {                                   \
  |  |  149|  5.65k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  5.65k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  5.65k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  11.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 5.65k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 5.65k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  11.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  5.65k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  5.65k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  5.65k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 5.65k]
  |  |  ------------------
  ------------------
 2580|  5.65k|  }
 2581|       |
 2582|  7.54k|out:
 2583|  7.54k|  if(result == CURLE_NO_CONNECTION_AVAILABLE)
  ------------------
  |  Branch (2583:6): [True: 202, False: 7.33k]
  ------------------
 2584|  7.54k|    DEBUGASSERT(!conn);
  ------------------
  |  | 1077|  7.54k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2584:5): [True: 0, False: 202]
  |  Branch (2584:5): [True: 202, False: 0]
  ------------------
 2585|       |
 2586|  7.54k|  if(result && conn) {
  ------------------
  |  Branch (2586:6): [True: 1.89k, False: 5.65k]
  |  Branch (2586:16): [True: 0, False: 1.89k]
  ------------------
 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|  7.54k|  return result;
 2594|  7.54k|}
Curl_init_do:
 2607|  5.65k|{
 2608|  5.65k|  CURLcode result;
 2609|       |
 2610|  5.65k|  if(conn) {
  ------------------
  |  Branch (2610:6): [True: 5.65k, False: 0]
  ------------------
 2611|  5.65k|    conn->bits.do_more = FALSE; /* by default there is no curl_do_more() to
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
 2612|       |                                   use */
 2613|       |    /* if the protocol used does not support wildcards, switch it off */
 2614|  5.65k|    if(data->state.wildcardmatch &&
  ------------------
  |  Branch (2614:8): [True: 3, False: 5.64k]
  ------------------
 2615|      3|       !(conn->scheme->flags & PROTOPT_WILDCARD))
  ------------------
  |  |  231|      3|#define PROTOPT_WILDCARD (1 << 12)  /* protocol supports wildcard matching */
  ------------------
  |  Branch (2615:8): [True: 3, False: 0]
  ------------------
 2616|      3|      data->state.wildcardmatch = FALSE;
  ------------------
  |  | 1054|      3|#define FALSE false
  ------------------
 2617|  5.65k|  }
 2618|       |
 2619|  5.65k|  data->state.done = FALSE; /* *_done() is not called yet */
  ------------------
  |  | 1054|  5.65k|#define FALSE false
  ------------------
 2620|       |
 2621|  5.65k|  data->req.no_body = data->set.opt_no_body;
 2622|  5.65k|  if(data->req.no_body)
  ------------------
  |  Branch (2622:6): [True: 2, False: 5.64k]
  ------------------
 2623|       |    /* in HTTP lingo, no body means using the HEAD request... */
 2624|      2|    data->state.httpreq = HTTPREQ_HEAD;
 2625|       |
 2626|  5.65k|  result = Curl_req_start(&data->req, data);
 2627|  5.65k|  if(!result) {
  ------------------
  |  Branch (2627:6): [True: 5.65k, False: 0]
  ------------------
 2628|  5.65k|    Curl_pgrsReset(data);
 2629|  5.65k|  }
 2630|  5.65k|  return result;
 2631|  5.65k|}
Curl_data_priority_clear_state:
 2636|  7.51k|{
 2637|  7.51k|  memset(&data->state.priority, 0, sizeof(data->state.priority));
 2638|  7.51k|}
Curl_conn_meta_remove:
 2654|  5.65k|{
 2655|  5.65k|  Curl_hash_delete(&conn->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  862|  5.65k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 2656|  5.65k|}
Curl_1st_fatal:
 2664|  5.65k|{
 2665|  5.65k|  if(r1 && (r1 != CURLE_AGAIN))
  ------------------
  |  Branch (2665:6): [True: 5.13k, False: 512]
  |  Branch (2665:12): [True: 5.13k, False: 0]
  ------------------
 2666|  5.13k|    return r1;
 2667|    512|  if(r2 && (r2 != CURLE_AGAIN))
  ------------------
  |  Branch (2667:6): [True: 0, False: 512]
  |  Branch (2667:12): [True: 0, False: 0]
  ------------------
 2668|      0|    return r2;
 2669|    512|  return r1;
 2670|    512|}
url.c:up_free:
  179|  31.5k|{
  180|  31.5k|  struct urlpieces *up = &data->state.up;
  181|  31.5k|  curlx_safefree(up->options);
  ------------------
  |  | 1332|  31.5k|  do {                      \
  |  | 1333|  31.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  31.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  31.5k|    (ptr) = NULL;           \
  |  | 1335|  31.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 31.5k]
  |  |  ------------------
  ------------------
  182|  31.5k|  curlx_safefree(up->path);
  ------------------
  |  | 1332|  31.5k|  do {                      \
  |  | 1333|  31.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  31.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  31.5k|    (ptr) = NULL;           \
  |  | 1335|  31.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 31.5k]
  |  |  ------------------
  ------------------
  183|  31.5k|  curlx_safefree(up->query);
  ------------------
  |  | 1332|  31.5k|  do {                      \
  |  | 1333|  31.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  31.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  31.5k|    (ptr) = NULL;           \
  |  | 1335|  31.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 31.5k]
  |  |  ------------------
  ------------------
  184|  31.5k|  curl_url_cleanup(data->state.uh);
  185|       |  data->state.uh = NULL;
  186|  31.5k|}
url.c:url_set_data_origin_and_creds:
 2218|  7.54k|{
 2219|  7.54k|  CURLcode result = CURLE_OK;
 2220|  7.54k|  CURLU *uh;
 2221|  7.54k|  CURLUcode uc;
 2222|  7.54k|  bool use_set_uh = (data->set.uh && !data->state.this_is_a_follow);
  ------------------
  |  Branch (2222:22): [True: 0, False: 7.54k]
  |  Branch (2222:38): [True: 0, False: 0]
  ------------------
 2223|  7.54k|  uint16_t port_override = data->state.allow_port ? data->set.use_port : 0;
  ------------------
  |  Branch (2223:28): [True: 7.54k, False: 0]
  ------------------
 2224|  7.54k|  uint32_t scope_id = 0;
 2225|       |
 2226|       |  /*************************************************************
 2227|       |   * Check input data
 2228|       |   *************************************************************/
 2229|  7.54k|  if(!Curl_bufref_ptr(&data->state.url)) {
  ------------------
  |  Branch (2229:6): [True: 0, False: 7.54k]
  ------------------
 2230|      0|    result = CURLE_URL_MALFORMAT;
 2231|      0|    goto out;
 2232|      0|  }
 2233|       |
 2234|  7.54k|  up_free(data); /* cleanup previous leftovers first */
 2235|       |
 2236|       |  /* parse the URL */
 2237|  7.54k|  if(use_set_uh)
  ------------------
  |  Branch (2237:6): [True: 0, False: 7.54k]
  ------------------
 2238|      0|    uh = data->state.uh = curl_url_dup(data->set.uh);
 2239|  7.54k|  else
 2240|  7.54k|    uh = data->state.uh = curl_url();
 2241|  7.54k|  if(!uh) {
  ------------------
  |  Branch (2241:6): [True: 0, False: 7.54k]
  ------------------
 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|  7.54k|  if(data->set.str[STRING_DEFAULT_PROTOCOL] &&
  ------------------
  |  Branch (2248:6): [True: 758, False: 6.78k]
  ------------------
 2249|    758|     !Curl_is_absolute_url(Curl_bufref_ptr(&data->state.url), NULL, 0, TRUE)) {
  ------------------
  |  | 1051|    758|#define TRUE true
  ------------------
  |  Branch (2249:6): [True: 640, False: 118]
  ------------------
 2250|    640|    char *url = curl_maprintf("%s://%s",
 2251|    640|                              data->set.str[STRING_DEFAULT_PROTOCOL],
 2252|    640|                              Curl_bufref_ptr(&data->state.url));
 2253|    640|    if(!url) {
  ------------------
  |  Branch (2253:8): [True: 0, False: 640]
  ------------------
 2254|      0|      result = CURLE_OUT_OF_MEMORY;
 2255|      0|      goto out;
 2256|      0|    }
 2257|    640|    Curl_bufref_set(&data->state.url, url, 0, curl_free);
 2258|    640|  }
 2259|       |
 2260|  7.54k|  if(!use_set_uh) {
  ------------------
  |  Branch (2260:6): [True: 7.54k, False: 0]
  ------------------
 2261|  7.54k|    char *newurl;
 2262|  7.54k|    uc = curl_url_set(uh, CURLUPART_URL, Curl_bufref_ptr(&data->state.url),
 2263|  7.54k|                      (unsigned int)(CURLU_GUESS_SCHEME |
  ------------------
  |  |   96|  7.54k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 2264|  7.54k|                       CURLU_NON_SUPPORT_SCHEME |
  ------------------
  |  |   90|  7.54k|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
 2265|  7.54k|                       (data->set.disallow_username_in_url ?
  ------------------
  |  Branch (2265:25): [True: 5, False: 7.53k]
  ------------------
 2266|  7.53k|                        CURLU_DISALLOW_USER : 0) |
  ------------------
  |  |   92|      5|#define CURLU_DISALLOW_USER (1 << 5)      /* no user+password allowed */
  ------------------
 2267|  7.54k|                       (data->set.path_as_is ? CURLU_PATH_AS_IS : 0)));
  ------------------
  |  |   91|      3|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (2267:25): [True: 3, False: 7.53k]
  ------------------
 2268|  7.54k|    if(uc) {
  ------------------
  |  Branch (2268:8): [True: 752, False: 6.78k]
  ------------------
 2269|    752|      failf(data, "URL rejected: %s", curl_url_strerror(uc));
  ------------------
  |  |   62|    752|#define failf Curl_failf
  ------------------
 2270|    752|      result = Curl_uc_to_curlcode(uc);
 2271|    752|      goto out;
 2272|    752|    }
 2273|       |
 2274|       |    /* after it was parsed, get the generated normalized version */
 2275|  6.78k|    uc = curl_url_get(uh, CURLUPART_URL, &newurl, CURLU_GET_EMPTY);
  ------------------
  |  |  102|  6.78k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 2276|  6.78k|    if(uc) {
  ------------------
  |  Branch (2276:8): [True: 0, False: 6.78k]
  ------------------
 2277|      0|      result = Curl_uc_to_curlcode(uc);
 2278|      0|      goto out;
 2279|      0|    }
 2280|  6.78k|    Curl_bufref_set(&data->state.url, newurl, 0, curl_free);
 2281|  6.78k|  }
 2282|       |
 2283|  6.78k|#ifdef USE_IPV6
 2284|  6.78k|  scope_id = data->set.scope_id;
 2285|  6.78k|#endif
 2286|       |
 2287|       |  /* `uh` is now as the connection should use it, probably. */
 2288|  6.78k|  result = Curl_peer_from_url(uh, data, port_override, scope_id,
 2289|  6.78k|                              &data->state.origin);
 2290|  6.78k|  if(result)
  ------------------
  |  Branch (2290:6): [True: 169, False: 6.62k]
  ------------------
 2291|    169|    goto out;
 2292|       |  /* The origin might get changed when HSTS applies */
 2293|  6.62k|  result = hsts_upgrade(data, uh, port_override, scope_id);
 2294|  6.62k|  if(result)
  ------------------
  |  Branch (2294:6): [True: 0, False: 6.62k]
  ------------------
 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|  6.62k|  if(!data->state.initial_origin)
  ------------------
  |  Branch (2299:6): [True: 6.59k, False: 24]
  ------------------
 2300|  6.59k|    Curl_peer_link(&data->state.initial_origin, data->state.origin);
 2301|       |
 2302|  6.62k|  uc = curl_url_get(uh, CURLUPART_PATH, &data->state.up.path, CURLU_URLENCODE);
  ------------------
  |  |   94|  6.62k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 2303|  6.62k|  if(uc) {
  ------------------
  |  Branch (2303:6): [True: 0, False: 6.62k]
  ------------------
 2304|      0|    result = Curl_uc_to_curlcode(uc);
 2305|      0|    goto out;
 2306|      0|  }
 2307|  6.62k|  uc = curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query,
 2308|  6.62k|                    CURLU_GET_EMPTY);
  ------------------
  |  |  102|  6.62k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 2309|  6.62k|  if(uc && (uc != CURLUE_NO_QUERY)) {
  ------------------
  |  Branch (2309:6): [True: 6.07k, False: 546]
  |  Branch (2309:12): [True: 0, False: 6.07k]
  ------------------
 2310|      0|    result = CURLE_OUT_OF_MEMORY;
 2311|      0|    goto out;
 2312|      0|  }
 2313|       |
 2314|  6.62k|  uc = curl_url_get(uh, CURLUPART_OPTIONS, &data->state.up.options,
 2315|  6.62k|                    CURLU_URLDECODE);
  ------------------
  |  |   93|  6.62k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 2316|  6.62k|  if(uc && (uc != CURLUE_NO_OPTIONS)) {
  ------------------
  |  Branch (2316:6): [True: 6.61k, False: 1]
  |  Branch (2316:12): [True: 0, False: 6.61k]
  ------------------
 2317|      0|    result = Curl_uc_to_curlcode(uc);
 2318|      0|    goto out;
 2319|      0|  }
 2320|       |
 2321|  6.62k|  result = url_set_data_creds(data, uh);
 2322|  6.62k|  if(result)
  ------------------
  |  Branch (2322:6): [True: 9, False: 6.61k]
  ------------------
 2323|      9|    goto out;
 2324|       |
 2325|  7.54k|out:
 2326|  7.54k|  return result;
 2327|  6.62k|}
url.c:hsts_upgrade:
 1371|  6.62k|{
 1372|       |  /* HSTS upgrade */
 1373|  6.62k|  if(data->hsts && (data->state.origin->scheme == &Curl_scheme_http) &&
  ------------------
  |  Branch (1373:6): [True: 6.11k, False: 501]
  |  Branch (1373:20): [True: 678, False: 5.44k]
  ------------------
 1374|    678|     Curl_hsts_applies(data->hsts, data->state.origin)) {
  ------------------
  |  Branch (1374:6): [True: 0, False: 678]
  ------------------
 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|  6.62k|  return CURLE_OK;
 1396|  6.62k|}
url.c:url_set_data_creds:
 1523|  6.62k|{
 1524|  6.62k|  struct Curl_creds *newcreds = NULL;
 1525|  6.62k|  CURLcode result = CURLE_OK;
 1526|       |
 1527|  6.62k|  if((data->set.str[STRING_USERNAME] ||
  ------------------
  |  Branch (1527:7): [True: 79, False: 6.54k]
  ------------------
 1528|  6.54k|      data->set.str[STRING_PASSWORD] ||
  ------------------
  |  Branch (1528:7): [True: 80, False: 6.46k]
  ------------------
 1529|  6.46k|      data->set.str[STRING_BEARER] ||
  ------------------
  |  Branch (1529:7): [True: 11, False: 6.45k]
  ------------------
 1530|  6.45k|      data->set.str[STRING_SASL_AUTHZID] ||
  ------------------
  |  Branch (1530:7): [True: 15, False: 6.43k]
  ------------------
 1531|  6.43k|      data->set.str[STRING_SERVICE_NAME]) &&
  ------------------
  |  Branch (1531:7): [True: 4, False: 6.43k]
  ------------------
 1532|    189|     Curl_auth_allowed_to_origin(data, data->state.origin)) {
  ------------------
  |  Branch (1532:6): [True: 189, False: 0]
  ------------------
 1533|    189|    result = Curl_creds_create(data->set.str[STRING_USERNAME],
 1534|    189|                               data->set.str[STRING_PASSWORD],
 1535|    189|                               data->set.str[STRING_BEARER],
 1536|    189|                               data->set.str[STRING_SASL_AUTHZID],
 1537|    189|                               data->set.str[STRING_SERVICE_NAME],
 1538|    189|                               CREDS_OPTION, &newcreds);
  ------------------
  |  |   31|    189|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
 1539|    189|    if(result)
  ------------------
  |  Branch (1539:8): [True: 0, False: 189]
  ------------------
 1540|      0|      goto out;
 1541|    189|    if(newcreds &&
  ------------------
  |  Branch (1541:8): [True: 183, False: 6]
  ------------------
 1542|    183|       !(data->state.origin->scheme->flags & PROTOPT_USERPWDCTRL) &&
  ------------------
  |  |  232|    183|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
  |  Branch (1542:8): [True: 16, False: 167]
  ------------------
 1543|     16|       (str_has_ctrl(Curl_creds_user(newcreds)) ||
  ------------------
  |  |   80|     16|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (80:43): [True: 16, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1543:9): [True: 3, False: 13]
  ------------------
 1544|     13|        str_has_ctrl(Curl_creds_passwd(newcreds)))) {
  ------------------
  |  |   81|     13|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 13, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1544:9): [True: 3, False: 10]
  ------------------
 1545|       |      /* if the protocol cannot handle control codes in credentials, make
 1546|       |         sure there are none */
 1547|      6|      failf(data, "control code detected in credentials");
  ------------------
  |  |   62|      6|#define failf Curl_failf
  ------------------
 1548|      6|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1549|      6|      goto out;
 1550|      6|    }
 1551|    189|  }
 1552|       |
 1553|       |  /* Extract credentials from the URL only if there are none OR
 1554|       |   * if no CURLOPT_USER was set. */
 1555|  6.61k|  if(!newcreds || !Curl_creds_has_user(newcreds)) {
  ------------------
  |  |   74|    177|#define Curl_creds_has_user(c)           ((c) && (c)->user[0])
  |  |  ------------------
  |  |  |  Branch (74:43): [True: 177, False: 0]
  |  |  |  Branch (74:50): [True: 71, False: 106]
  |  |  ------------------
  ------------------
  |  Branch (1555:6): [True: 6.43k, False: 177]
  ------------------
 1556|  6.54k|    char *user = NULL;
 1557|  6.54k|    char *passwd = NULL;
 1558|  6.54k|    char *udecoded = NULL;
 1559|  6.54k|    char *pdecoded = NULL;
 1560|  6.54k|    CURLUcode uc;
 1561|       |
 1562|  6.54k|    uc = curl_url_get(uh, CURLUPART_USER, &user, 0);
 1563|  6.54k|    if(uc && (uc != CURLUE_NO_USER))
  ------------------
  |  Branch (1563:8): [True: 6.32k, False: 222]
  |  Branch (1563:14): [True: 0, False: 6.32k]
  ------------------
 1564|      0|      result = Curl_uc_to_curlcode(uc);
 1565|  6.54k|    if(!result) {
  ------------------
  |  Branch (1565:8): [True: 6.54k, False: 0]
  ------------------
 1566|  6.54k|      uc = curl_url_get(uh, CURLUPART_PASSWORD, &passwd, 0);
 1567|  6.54k|      if(uc && (uc != CURLUE_NO_PASSWORD))
  ------------------
  |  Branch (1567:10): [True: 6.48k, False: 58]
  |  Branch (1567:16): [True: 0, False: 6.48k]
  ------------------
 1568|      0|        result = Curl_uc_to_curlcode(uc);
 1569|  6.54k|    }
 1570|  6.54k|    if(!result && user) {
  ------------------
  |  Branch (1570:8): [True: 6.54k, False: 0]
  |  Branch (1570:19): [True: 222, False: 6.32k]
  ------------------
 1571|    222|      result = Curl_urldecode(user, 0, &udecoded, NULL,
 1572|    222|                              (data->state.origin->scheme->flags &
  ------------------
  |  Branch (1572:31): [True: 221, False: 1]
  ------------------
 1573|    222|                               PROTOPT_USERPWDCTRL) ?
  ------------------
  |  |  232|    222|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
 1574|    221|                              REJECT_ZERO : REJECT_CTRL);
 1575|    222|    }
 1576|  6.54k|    if(!result && passwd) {
  ------------------
  |  Branch (1576:8): [True: 6.54k, False: 3]
  |  Branch (1576:19): [True: 58, False: 6.48k]
  ------------------
 1577|     58|      result = Curl_urldecode(passwd, 0, &pdecoded, NULL,
 1578|     58|                              (data->state.origin->scheme->flags &
  ------------------
  |  Branch (1578:31): [True: 58, False: 0]
  ------------------
 1579|     58|                               PROTOPT_USERPWDCTRL) ?
  ------------------
  |  |  232|     58|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
 1580|     58|                              REJECT_ZERO : REJECT_CTRL);
 1581|     58|    }
 1582|  6.54k|    if(!result)
  ------------------
  |  Branch (1582:8): [True: 6.54k, False: 3]
  ------------------
 1583|  6.54k|      result = Curl_creds_merge(udecoded, pdecoded, newcreds,
 1584|  6.54k|                                CREDS_URL, &newcreds);
  ------------------
  |  |   30|  6.54k|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
 1585|       |
 1586|  6.54k|    curlx_free(udecoded);
  ------------------
  |  | 1488|  6.54k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1587|  6.54k|    curlx_free(pdecoded);
  ------------------
  |  | 1488|  6.54k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1588|  6.54k|    curlx_free(passwd);
  ------------------
  |  | 1488|  6.54k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1589|  6.54k|    curlx_free(user);
  ------------------
  |  | 1488|  6.54k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1590|  6.54k|    if(result) {
  ------------------
  |  Branch (1590:8): [True: 3, False: 6.54k]
  ------------------
 1591|      3|      failf(data, "error extracting credentials from URL");
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
 1592|      3|      goto out;
 1593|      3|    }
 1594|  6.54k|  }
 1595|       |
 1596|  6.61k|#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|  6.61k|  result = url_set_data_creds_netrc(data, &newcreds);
 1600|  6.61k|#endif /* CURL_DISABLE_NETRC */
 1601|       |
 1602|  6.62k|out:
 1603|  6.62k|  if(!result && !Curl_creds_equal(data->state.creds, newcreds)) {
  ------------------
  |  Branch (1603:6): [True: 6.61k, False: 9]
  |  Branch (1603:17): [True: 389, False: 6.22k]
  ------------------
 1604|       |    /* Do we have more things to trigger on credentials change? */
 1605|    389|    Curl_creds_link(&data->state.creds, newcreds);
 1606|    389|  }
 1607|  6.62k|  Curl_creds_unlink(&newcreds);
 1608|  6.62k|  return result;
 1609|  6.61k|}
url.c:str_has_ctrl:
 1402|     29|{
 1403|     29|  if(input) {
  ------------------
  |  Branch (1403:6): [True: 29, False: 0]
  ------------------
 1404|     29|    const unsigned char *str = (const unsigned char *)input;
 1405|    449|    while(*str) {
  ------------------
  |  Branch (1405:11): [True: 426, False: 23]
  ------------------
 1406|    426|      if(*str < 0x20)
  ------------------
  |  Branch (1406:10): [True: 6, False: 420]
  ------------------
 1407|      6|        return TRUE;
  ------------------
  |  | 1051|      6|#define TRUE true
  ------------------
 1408|    420|      str++;
 1409|    420|    }
 1410|     29|  }
 1411|     23|  return FALSE;
  ------------------
  |  | 1054|     23|#define FALSE false
  ------------------
 1412|     29|}
url.c:url_set_data_creds_netrc:
 1421|  6.61k|{
 1422|  6.61k|  struct Curl_creds *ncreds_out = NULL;
 1423|  6.61k|  CURLcode result = CURLE_OK;
 1424|       |
 1425|  6.61k|  if(data->set.use_netrc) { /* not CURL_NETRC_IGNORED */
  ------------------
  |  Branch (1425:6): [True: 7, False: 6.60k]
  ------------------
 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|  6.60k|#ifdef CURLVERBOSE
 1513|  6.60k|  Curl_creds_trace(data, data->state.creds, "transfer credentials");
 1514|  6.60k|#endif
 1515|       |
 1516|  6.61k|out:
 1517|  6.61k|  Curl_creds_unlink(&ncreds_out);
 1518|  6.61k|  return result;
 1519|  6.60k|}
url.c:url_find_or_create_conn:
 2338|  6.61k|{
 2339|  6.61k|  struct connectdata *needle = NULL;
 2340|  6.61k|  bool waitpipe = FALSE;
  ------------------
  |  | 1054|  6.61k|#define FALSE false
  ------------------
 2341|  6.61k|  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|  6.61k|  result = url_create_needle(data, &needle);
 2347|  6.61k|  if(result)
  ------------------
  |  Branch (2347:6): [True: 758, False: 5.85k]
  ------------------
 2348|    758|    goto out;
 2349|  5.85k|  DEBUGASSERT(needle);
  ------------------
  |  | 1077|  5.85k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2349:3): [True: 0, False: 5.85k]
  |  Branch (2349:3): [True: 5.85k, False: 0]
  ------------------
 2350|       |
 2351|       |  /***********************************************************************
 2352|       |   * file: is a special case in that it does not need a network connection
 2353|       |   ***********************************************************************/
 2354|  5.85k|#ifndef CURL_DISABLE_FILE
 2355|  5.85k|  if(needle->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|  5.85k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (2355:6): [True: 0, False: 5.85k]
  ------------------
 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|  5.85k|#endif
 2388|       |
 2389|       |  /* Complete the easy's SSL configuration for connection cache matching */
 2390|  5.85k|  result = Curl_ssl_easy_config_complete(data, needle->origin);
 2391|  5.85k|  if(result)
  ------------------
  |  Branch (2391:6): [True: 0, False: 5.85k]
  ------------------
 2392|      0|    goto out;
 2393|       |
 2394|       |  /* Get rid of any dead connections so limit are easier kept. */
 2395|  5.85k|  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|  5.85k|  if((!data->set.reuse_fresh || data->state.followlocation) &&
  ------------------
  |  Branch (2403:7): [True: 5.85k, False: 2]
  |  Branch (2403:33): [True: 0, False: 2]
  ------------------
 2404|  5.85k|     !data->set.connect_only) {
  ------------------
  |  Branch (2404:6): [True: 5.85k, False: 1]
  ------------------
 2405|       |    /* Ok, try to find and attach an existing one */
 2406|  5.85k|    url_attach_existing(data, needle, &waitpipe);
 2407|  5.85k|  }
 2408|       |
 2409|  5.85k|  if(data->conn) {
  ------------------
  |  Branch (2409:6): [True: 0, False: 5.85k]
  ------------------
 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|  5.85k|  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|  5.85k|    if(waitpipe) {
  ------------------
  |  Branch (2439:8): [True: 202, False: 5.65k]
  ------------------
 2440|       |      /* There is a connection that *might* become usable for multiplexing
 2441|       |         "soon", and we wait for that */
 2442|    202|      infof(data, "Waiting on connection to negotiate possible multiplexing.");
  ------------------
  |  |  143|    202|  do {                               \
  |  |  144|    202|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    202|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 202, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 202]
  |  |  |  |  ------------------
  |  |  |  |  320|    202|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    202|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    202|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 202]
  |  |  ------------------
  ------------------
 2443|    202|      result = CURLE_NO_CONNECTION_AVAILABLE;
 2444|    202|      goto out;
 2445|    202|    }
 2446|  5.65k|    else {
 2447|  5.65k|      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: 5.65k]
  ------------------
 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: 5.65k]
  ------------------
 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|  5.65k|      default:
  ------------------
  |  Branch (2463:7): [True: 5.65k, False: 0]
  ------------------
 2464|  5.65k|        break;
 2465|  5.65k|      }
 2466|  5.65k|    }
 2467|       |
 2468|       |    /* Convert needle into a full connection by filling in all the
 2469|       |     * remaining parts like the cloned SSL configuration. */
 2470|  5.65k|    result = Curl_ssl_conn_config_init(data, needle);
 2471|  5.65k|    if(result) {
  ------------------
  |  Branch (2471:8): [True: 0, False: 5.65k]
  ------------------
 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|  5.65k|    Curl_attach_connection(data, needle);
 2477|  5.65k|    needle = NULL;
 2478|       |
 2479|  5.65k|    result = Curl_cpool_add(data, data->conn);
 2480|  5.65k|    if(result)
  ------------------
  |  Branch (2480:8): [True: 0, False: 5.65k]
  ------------------
 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|  5.65k|  }
 2502|       |
 2503|       |  /* Setup and init stuff before DO starts, in preparing for the transfer. */
 2504|  5.65k|  result = Curl_init_do(data, data->conn);
 2505|  5.65k|  if(result)
  ------------------
  |  Branch (2505:6): [True: 0, False: 5.65k]
  ------------------
 2506|      0|    goto out;
 2507|       |
 2508|       |  /* Setup whatever necessary for a resumed transfer */
 2509|  5.65k|  result = setup_range(data);
 2510|  5.65k|  if(result)
  ------------------
  |  Branch (2510:6): [True: 0, False: 5.65k]
  ------------------
 2511|      0|    goto out;
 2512|       |
 2513|       |  /* persist the scheme and handler the transfer is using */
 2514|  5.65k|  data->info.conn_scheme = data->conn->scheme->name;
 2515|       |  /* conn_protocol can only provide "old" protocols */
 2516|  5.65k|  data->info.conn_protocol = (data->conn->scheme->protocol) & CURLPROTO_MASK;
  ------------------
  |  |   79|  5.65k|#define CURLPROTO_MASK   0x3fffffff
  ------------------
 2517|  5.65k|  data->info.used_proxy =
 2518|       |#ifdef CURL_DISABLE_PROXY
 2519|       |    0
 2520|       |#else
 2521|  5.65k|    (data->conn->socks_proxy.peer || data->conn->http_proxy.peer)
  ------------------
  |  Branch (2521:6): [True: 429, False: 5.22k]
  |  Branch (2521:38): [True: 2.12k, False: 3.09k]
  ------------------
 2522|  5.65k|#endif
 2523|  5.65k|    ;
 2524|       |
 2525|       |  /* Lastly, inform connection filters that a new transfer is attached */
 2526|  5.65k|  result = Curl_conn_ev_data_setup(data);
 2527|       |
 2528|  6.61k|out:
 2529|  6.61k|  if(needle)
  ------------------
  |  Branch (2529:6): [True: 202, False: 6.40k]
  ------------------
 2530|    202|    Curl_conn_free(data, needle);
 2531|  6.61k|  DEBUGASSERT(result || data->conn);
  ------------------
  |  | 1077|  6.61k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2531:3): [True: 6.61k, False: 0]
  |  Branch (2531:3): [True: 0, False: 0]
  |  Branch (2531:3): [True: 960, False: 5.65k]
  |  Branch (2531:3): [True: 5.65k, False: 0]
  ------------------
 2532|  6.61k|  return result;
 2533|  6.61k|}
url.c:url_create_needle:
 2097|  6.61k|{
 2098|  6.61k|  struct connectdata *needle = NULL;
 2099|  6.61k|  CURLcode result = CURLE_OK;
 2100|  6.61k|  bool network_scheme = TRUE; /* almost all are */
  ------------------
  |  | 1051|  6.61k|#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|  6.61k|  needle = allocate_conn(data);
 2107|  6.61k|  if(!needle) {
  ------------------
  |  Branch (2107:6): [True: 0, False: 6.61k]
  ------------------
 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|  6.61k|  Curl_hash_init(&needle->meta_hash, 23,
 2114|  6.61k|                 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|  6.61k|  result = url_set_conn_origin_etc(data, needle);
 2121|  6.61k|  if(result)
  ------------------
  |  Branch (2121:6): [True: 743, False: 5.86k]
  ------------------
 2122|    743|    goto out;
 2123|       |
 2124|  5.86k|  DEBUGASSERT(needle->origin);
  ------------------
  |  | 1077|  5.86k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2124:3): [True: 0, False: 5.86k]
  |  Branch (2124:3): [True: 5.86k, False: 0]
  ------------------
 2125|  5.86k|  network_scheme = !(needle->origin->scheme->flags & PROTOPT_NONETWORK);
  ------------------
  |  |  215|  5.86k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
 2126|       |
 2127|  5.86k|#ifdef USE_UNIX_SOCKETS
 2128|       |  /*************************************************************
 2129|       |   * Set UDS first. It overrides "via_peer" and proxy settings.
 2130|       |   *************************************************************/
 2131|  5.86k|  if(network_scheme && data->set.str[STRING_UNIX_SOCKET_PATH]) {
  ------------------
  |  Branch (2131:6): [True: 5.86k, False: 0]
  |  Branch (2131:24): [True: 22, False: 5.84k]
  ------------------
 2132|     22|    result = Curl_peer_uds_create(needle->origin->scheme,
 2133|     22|                                  data->set.str[STRING_UNIX_SOCKET_PATH],
 2134|     22|                                  (bool)data->set.abstract_unix_socket,
 2135|     22|                                  &needle->via_peer);
 2136|     22|    if(result)
  ------------------
  |  Branch (2136:8): [True: 1, False: 21]
  ------------------
 2137|      1|      goto out;
 2138|     22|  }
 2139|  5.86k|#endif /* USE_UNIX_SOCKETS */
 2140|       |
 2141|  5.86k|  if(network_scheme && !needle->via_peer) {
  ------------------
  |  Branch (2141:6): [True: 5.86k, False: 0]
  |  Branch (2141:24): [True: 5.84k, False: 21]
  ------------------
 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|  5.84k|    result = url_set_conn_peer(data, needle);
 2148|  5.84k|    if(result)
  ------------------
  |  Branch (2148:8): [True: 0, False: 5.84k]
  ------------------
 2149|      0|      goto out;
 2150|  5.84k|  }
 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|  5.86k|  if(Curl_peer_equal(needle->origin, needle->via_peer)) {
  ------------------
  |  Branch (2157:6): [True: 0, False: 5.86k]
  ------------------
 2158|      0|    Curl_peer_unlink(&needle->via_peer);
 2159|      0|  }
 2160|       |
 2161|  5.86k|#ifndef CURL_DISABLE_PROXY
 2162|       |  /* Going via a unix socket ignores any proxy settings */
 2163|  5.86k|  if(network_scheme &&
  ------------------
  |  Branch (2163:6): [True: 5.86k, False: 0]
  ------------------
 2164|  5.86k|     (!needle->via_peer || !needle->via_peer->unix_socket)) {
  ------------------
  |  Branch (2164:7): [True: 481, False: 5.38k]
  |  Branch (2164:28): [True: 5.36k, False: 21]
  ------------------
 2165|  5.84k|    result = Curl_proxy_init_conn(data, needle);
 2166|  5.84k|    if(result)
  ------------------
  |  Branch (2166:8): [True: 14, False: 5.83k]
  ------------------
 2167|     14|      goto out;
 2168|  5.84k|  }
 2169|  5.85k|#endif /* CURL_DISABLE_PROXY */
 2170|       |
 2171|  5.85k|  result = url_set_conn_login(data, needle); /* default credentials */
 2172|  5.85k|  if(result)
  ------------------
  |  Branch (2172:6): [True: 0, False: 5.85k]
  ------------------
 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|  5.85k|  result = setup_connection_internals(data, needle);
 2180|  5.85k|  if(result)
  ------------------
  |  Branch (2180:6): [True: 0, False: 5.85k]
  ------------------
 2181|      0|    goto out;
 2182|       |
 2183|  5.85k|  if(needle->scheme->flags & PROTOPT_ALPN) {
  ------------------
  |  |  223|  5.85k|#define PROTOPT_ALPN (1 << 8) /* set ALPN for this */
  ------------------
  |  Branch (2183:6): [True: 5.82k, False: 25]
  ------------------
 2184|       |    /* The protocol wants it, so set the bits if enabled in the easy handle
 2185|       |       (default) */
 2186|  5.82k|    if(data->set.ssl_enable_alpn)
  ------------------
  |  Branch (2186:8): [True: 5.76k, False: 60]
  ------------------
 2187|  5.76k|      needle->bits.tls_enable_alpn = TRUE;
  ------------------
  |  | 1051|  5.76k|#define TRUE true
  ------------------
 2188|  5.82k|  }
 2189|       |
 2190|  5.85k|  if(network_scheme) {
  ------------------
  |  Branch (2190:6): [True: 5.85k, False: 0]
  ------------------
 2191|       |    /* Setup callbacks for network connections */
 2192|  5.85k|    needle->recv[FIRSTSOCKET] = Curl_cf_recv;
  ------------------
  |  |  245|  5.85k|#define FIRSTSOCKET     0
  ------------------
 2193|  5.85k|    needle->send[FIRSTSOCKET] = Curl_cf_send;
  ------------------
  |  |  245|  5.85k|#define FIRSTSOCKET     0
  ------------------
 2194|  5.85k|    needle->recv[SECONDARYSOCKET] = Curl_cf_recv;
  ------------------
  |  |  246|  5.85k|#define SECONDARYSOCKET 1
  ------------------
 2195|  5.85k|    needle->send[SECONDARYSOCKET] = Curl_cf_send;
  ------------------
  |  |  246|  5.85k|#define SECONDARYSOCKET 1
  ------------------
 2196|  5.85k|    needle->bits.tcp_fastopen = data->set.tcp_fastopen;
 2197|  5.85k|#ifdef USE_UNIX_SOCKETS
 2198|  5.85k|    if(Curl_conn_get_first_peer(needle, FIRSTSOCKET)->unix_socket)
  ------------------
  |  |  245|  5.85k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2198:8): [True: 23, False: 5.83k]
  ------------------
 2199|     23|      needle->transport_wanted = TRNSPRT_UNIX;
  ------------------
  |  |  252|     23|#define TRNSPRT_UNIX 6
  ------------------
 2200|  5.85k|#endif
 2201|  5.85k|  }
 2202|       |
 2203|  6.61k|out:
 2204|  6.61k|  if(!result) {
  ------------------
  |  Branch (2204:6): [True: 5.85k, False: 758]
  ------------------
 2205|  5.85k|    DEBUGASSERT(needle);
  ------------------
  |  | 1077|  5.85k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2205:5): [True: 0, False: 5.85k]
  |  Branch (2205:5): [True: 5.85k, False: 0]
  ------------------
 2206|  5.85k|    DEBUGASSERT(needle->origin);
  ------------------
  |  | 1077|  5.85k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2206:5): [True: 0, False: 5.85k]
  |  Branch (2206:5): [True: 5.85k, False: 0]
  ------------------
 2207|  5.85k|    *pneedle = needle;
 2208|  5.85k|  }
 2209|    758|  else {
 2210|    758|    *pneedle = NULL;
 2211|    758|    if(needle)
  ------------------
  |  Branch (2211:8): [True: 758, False: 0]
  ------------------
 2212|    758|      Curl_conn_free(data, needle);
 2213|    758|  }
 2214|  6.61k|  return result;
 2215|  6.61k|}
url.c:allocate_conn:
 1275|  6.61k|{
 1276|  6.61k|  struct connectdata *conn = curlx_calloc(1, sizeof(struct connectdata));
  ------------------
  |  | 1485|  6.61k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1277|  6.61k|  if(!conn)
  ------------------
  |  Branch (1277:6): [True: 0, False: 6.61k]
  ------------------
 1278|      0|    return NULL;
 1279|       |
 1280|       |  /* and we setup a few fields in case we end up actually using this struct */
 1281|       |
 1282|  6.61k|  conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;     /* no file descriptor */
  ------------------
  |  |  245|  6.61k|#define FIRSTSOCKET     0
  ------------------
                conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;     /* no file descriptor */
  ------------------
  |  |  145|  6.61k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1283|  6.61k|  conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
  ------------------
  |  |  246|  6.61k|#define SECONDARYSOCKET 1
  ------------------
                conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
  ------------------
  |  |  145|  6.61k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1284|  6.61k|  conn->recv_idx = 0; /* default for receiving transfer data */
 1285|  6.61k|  conn->send_idx = 0; /* default for sending transfer data */
 1286|  6.61k|  conn->connection_id = -1;    /* no ID */
 1287|  6.61k|  conn->attached_xfers = 0;
 1288|       |
 1289|       |  /* Store creation time to help future close decision making */
 1290|  6.61k|  conn->created = *Curl_pgrs_now(data);
 1291|       |
 1292|       |  /* Store current time to give a baseline to keepalive connection times. */
 1293|  6.61k|  conn->keepalive = conn->created;
 1294|       |
 1295|  6.61k|#ifndef CURL_DISABLE_FTP
 1296|  6.61k|  conn->bits.ftp_use_epsv = data->set.ftp_use_epsv;
 1297|  6.61k|  conn->bits.ftp_use_eprt = data->set.ftp_use_eprt;
 1298|  6.61k|#endif
 1299|  6.61k|  conn->ip_version = data->set.ipver;
 1300|  6.61k|  conn->bits.connect_only = (bool)data->set.connect_only;
 1301|  6.61k|  conn->transport_wanted = TRNSPRT_TCP; /* most of them are TCP streams */
  ------------------
  |  |  249|  6.61k|#define TRNSPRT_TCP  3
  ------------------
 1302|       |
 1303|       |  /* Store the local bind parameters that will be used for this connection */
 1304|  6.61k|  if(data->set.str[STRING_DEVICE]) {
  ------------------
  |  Branch (1304:6): [True: 133, False: 6.47k]
  ------------------
 1305|    133|    conn->localdev = curlx_strdup(data->set.str[STRING_DEVICE]);
  ------------------
  |  | 1482|    133|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1306|    133|    if(!conn->localdev)
  ------------------
  |  Branch (1306:8): [True: 0, False: 133]
  ------------------
 1307|      0|      goto error;
 1308|    133|  }
 1309|  6.61k|#ifndef CURL_DISABLE_BINDLOCAL
 1310|  6.61k|  conn->localportrange = data->set.localportrange;
 1311|  6.61k|  conn->localport = data->set.localport;
 1312|  6.61k|#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|  6.61k|  conn->fclosesocket = data->set.fclosesocket;
 1317|  6.61k|  conn->closesocket_client = data->set.closesocket_client;
 1318|  6.61k|  conn->lastused = conn->created;
 1319|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
 1320|       |  conn->gssapi_delegation = data->set.gssapi_delegation;
 1321|       |#endif
 1322|  6.61k|  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|  6.61k|}
url.c:url_set_conn_origin_etc:
 1613|  6.61k|{
 1614|  6.61k|  CURLcode result = CURLE_OK;
 1615|       |
 1616|  6.61k|  Curl_peer_link(&conn->origin, data->state.origin);
 1617|       |
 1618|       |  /* set the connection scheme */
 1619|  6.61k|  result = url_set_conn_scheme(data, conn, conn->origin->scheme);
 1620|  6.61k|  if(result)
  ------------------
  |  Branch (1620:6): [True: 743, False: 5.86k]
  ------------------
 1621|    743|    goto out;
 1622|       |
 1623|       |  /* set the connection options */
 1624|  5.86k|  if(data->set.str[STRING_OPTIONS]) {
  ------------------
  |  Branch (1624:6): [True: 7, False: 5.86k]
  ------------------
 1625|      7|    conn->options = curlx_strdup(data->set.str[STRING_OPTIONS]);
  ------------------
  |  | 1482|      7|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1626|      7|    if(!conn->options) {
  ------------------
  |  Branch (1626:8): [True: 0, False: 7]
  ------------------
 1627|      0|      result = CURLE_OUT_OF_MEMORY;
 1628|      0|      goto out;
 1629|      0|    }
 1630|      7|  }
 1631|  5.86k|  else if(data->state.up.options) {
  ------------------
  |  Branch (1631:11): [True: 0, False: 5.86k]
  ------------------
 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|  5.86k|#ifdef USE_IPV6
 1640|  5.86k|  conn->scope_id = data->set.scope_id ?
  ------------------
  |  Branch (1640:20): [True: 92, False: 5.77k]
  ------------------
 1641|  5.77k|                   data->set.scope_id : data->state.origin->scopeid;
 1642|  5.86k|#endif
 1643|       |
 1644|  6.61k|out:
 1645|  6.61k|  return result;
 1646|  5.86k|}
url.c:url_set_conn_scheme:
 1333|  6.61k|{
 1334|       |  /* URL scheme is usable for connection when it is
 1335|       |   * - allowed
 1336|       |   * - not from a redirect or an allowed redirect protocol */
 1337|  6.61k|  if(scheme->run &&
  ------------------
  |  Branch (1337:6): [True: 6.60k, False: 4]
  ------------------
 1338|  6.60k|     (data->set.allowed_protocols & scheme->protocol) &&
  ------------------
  |  Branch (1338:6): [True: 5.86k, False: 739]
  ------------------
 1339|  5.86k|     (!data->state.this_is_a_follow ||
  ------------------
  |  Branch (1339:7): [True: 5.86k, False: 0]
  ------------------
 1340|  5.86k|       (data->set.redir_protocols & scheme->protocol))) {
  ------------------
  |  Branch (1340:8): [True: 0, False: 0]
  ------------------
 1341|  5.86k|    conn->scheme = conn->given = scheme;
 1342|  5.86k|    return CURLE_OK;
 1343|  5.86k|  }
 1344|    743|  if(scheme->flags & PROTOPT_NO_TRANSFER)
  ------------------
  |  |  239|    743|#define PROTOPT_NO_TRANSFER (1 << 17) /* this protocol is not for transfers */
  ------------------
  |  Branch (1344:6): [True: 0, False: 743]
  ------------------
 1345|      0|    failf(data, "Protocol \"%s\" is not for transfers", scheme->name);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1346|    743|  else
 1347|    743|    failf(data, "Protocol \"%s\" is disabled%s", scheme->name,
  ------------------
  |  |   62|    743|#define failf Curl_failf
  ------------------
 1348|    743|          data->state.this_is_a_follow ? " (in redirect)" : "");
  ------------------
  |  Branch (1348:11): [True: 0, False: 743]
  ------------------
 1349|    743|  return CURLE_UNSUPPORTED_PROTOCOL;
 1350|  6.61k|}
url.c:url_set_conn_peer:
 1912|  5.84k|{
 1913|  5.84k|  CURLcode result = CURLE_OK;
 1914|  5.84k|  struct Curl_peer *origin = conn->origin;
 1915|  5.84k|  struct Curl_peer *via_peer = NULL;
 1916|  5.84k|  struct curl_slist *conn_to_entry = data->set.connect_to;
 1917|       |
 1918|  5.84k|  DEBUGASSERT(!conn->via_peer);
  ------------------
  |  | 1077|  5.84k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1918:3): [True: 0, False: 5.84k]
  |  Branch (1918:3): [True: 5.84k, False: 0]
  ------------------
 1919|  5.84k|  Curl_peer_unlink(&conn->via_peer);
 1920|       |
 1921|  11.2k|  while(conn_to_entry && !via_peer) {
  ------------------
  |  Branch (1921:9): [True: 5.36k, False: 5.84k]
  |  Branch (1921:26): [True: 5.36k, False: 0]
  ------------------
 1922|  5.36k|    result = parse_connect_to_string(data, origin, conn_to_entry->data,
 1923|  5.36k|                                     &via_peer);
 1924|  5.36k|    if(result)
  ------------------
  |  Branch (1924:8): [True: 0, False: 5.36k]
  ------------------
 1925|      0|      return result;
 1926|  5.36k|    conn_to_entry = conn_to_entry->next;
 1927|  5.36k|  }
 1928|       |
 1929|  5.84k|#ifndef CURL_DISABLE_ALTSVC
 1930|  5.84k|  if(data->asi && !via_peer &&
  ------------------
  |  Branch (1930:6): [True: 5.36k, False: 481]
  |  Branch (1930:19): [True: 0, False: 5.36k]
  ------------------
 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|  5.84k|#endif
 2041|       |
 2042|  5.84k|  if(via_peer)
  ------------------
  |  Branch (2042:6): [True: 5.36k, False: 481]
  ------------------
 2043|  5.36k|    conn->via_peer = via_peer;
 2044|       |
 2045|  5.84k|  return result;
 2046|  5.84k|}
url.c:parse_connect_to_string:
 1852|  5.36k|{
 1853|  5.36k|  CURLcode result = CURLE_OK;
 1854|  5.36k|  const char *ptr = conn_to_line;
 1855|  5.36k|  bool host_match = FALSE;
  ------------------
  |  | 1054|  5.36k|#define FALSE false
  ------------------
 1856|  5.36k|  bool port_match = FALSE;
  ------------------
  |  | 1054|  5.36k|#define FALSE false
  ------------------
 1857|       |
 1858|  5.36k|  *pvia_dest = NULL;
 1859|       |
 1860|  5.36k|  if(*ptr == ':') {
  ------------------
  |  Branch (1860:6): [True: 5.36k, False: 0]
  ------------------
 1861|       |    /* an empty hostname always matches */
 1862|  5.36k|    host_match = TRUE;
  ------------------
  |  | 1051|  5.36k|#define TRUE true
  ------------------
 1863|  5.36k|    ptr++;
 1864|  5.36k|  }
 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|  5.36k|  if(host_match) {
  ------------------
  |  Branch (1881:6): [True: 5.36k, False: 0]
  ------------------
 1882|  5.36k|    if(*ptr == ':') {
  ------------------
  |  Branch (1882:8): [True: 5.36k, False: 0]
  ------------------
 1883|       |      /* an empty port always matches */
 1884|  5.36k|      port_match = TRUE;
  ------------------
  |  | 1051|  5.36k|#define TRUE true
  ------------------
 1885|  5.36k|      ptr++;
 1886|  5.36k|    }
 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|  5.36k|  }
 1900|       |
 1901|  5.36k|  if(host_match && port_match && ptr && *ptr)
  ------------------
  |  Branch (1901:6): [True: 5.36k, False: 0]
  |  Branch (1901:20): [True: 5.36k, False: 0]
  |  Branch (1901:34): [True: 5.36k, False: 0]
  |  Branch (1901:41): [True: 5.36k, False: 0]
  ------------------
 1902|  5.36k|    result = Curl_peer_from_connect_to(data, dest, ptr, pvia_dest);
 1903|       |
 1904|  5.36k|  return result;
 1905|  5.36k|}
url.c:url_set_conn_login:
 1824|  5.85k|{
 1825|       |  /* If our protocol needs a password and we have none, use the defaults */
 1826|  5.85k|  if((conn->scheme->flags & PROTOPT_NEEDSPWD) && !conn->creds) {
  ------------------
  |  |  216|  5.85k|#define PROTOPT_NEEDSPWD (1 << 5)  /* needs a password, and if none is set it
  ------------------
  |  Branch (1826:6): [True: 0, False: 5.85k]
  |  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|  5.85k|  else if(!(conn->scheme->flags & PROTOPT_CREDSPERREQUEST)) {
  ------------------
  |  |  220|  5.85k|#define PROTOPT_CREDSPERREQUEST (1 << 7) /* requires login credentials per
  ------------------
  |  Branch (1834:11): [True: 0, False: 5.85k]
  ------------------
 1835|       |    /* for protocols that do not handle credentials per request,
 1836|       |     * the connection credentials are set by the initial transfer. */
 1837|      0|    Curl_peer_link(&conn->creds_origin, data->state.origin);
 1838|      0|    Curl_creds_link(&conn->creds, data->state.creds);
 1839|      0|  }
 1840|       |
 1841|  5.85k|  return CURLE_OK;
 1842|  5.85k|}
url.c:setup_connection_internals:
 1690|  5.85k|{
 1691|  5.85k|  struct Curl_peer *peer = NULL;
 1692|  5.85k|  CURLcode result;
 1693|       |
 1694|  5.85k|  if(conn->scheme->run->setup_connection) {
  ------------------
  |  Branch (1694:6): [True: 5.85k, False: 0]
  ------------------
 1695|  5.85k|    result = conn->scheme->run->setup_connection(data, conn);
 1696|  5.85k|    if(result)
  ------------------
  |  Branch (1696:8): [True: 0, False: 5.85k]
  ------------------
 1697|      0|      return result;
 1698|  5.85k|  }
 1699|       |
 1700|       |  /* Now create the destination name */
 1701|  5.85k|  peer = Curl_conn_get_destination(conn, FIRSTSOCKET);
  ------------------
  |  |  245|  5.85k|#define FIRSTSOCKET     0
  ------------------
 1702|  5.85k|  if(!peer)
  ------------------
  |  Branch (1702:6): [True: 0, False: 5.85k]
  ------------------
 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|  5.85k|  if(peer->ipv6)
  ------------------
  |  Branch (1707:6): [True: 38, False: 5.81k]
  ------------------
 1708|     38|    if(peer->scopeid)
  ------------------
  |  Branch (1708:8): [True: 10, False: 28]
  ------------------
 1709|     10|      conn->destination = curl_maprintf("[%s%%%u]:%u",
 1710|     10|        peer->hostname, peer->scopeid, peer->port);
 1711|     28|    else
 1712|     28|      conn->destination = curl_maprintf("[%s]:%u",
 1713|     28|        peer->hostname, peer->port);
 1714|  5.81k|  else
 1715|  5.81k|    conn->destination = curl_maprintf("%s:%u", peer->hostname, peer->port);
 1716|  5.85k|  if(!conn->destination)
  ------------------
  |  Branch (1716:6): [True: 0, False: 5.85k]
  ------------------
 1717|      0|    return CURLE_OUT_OF_MEMORY;
 1718|       |
 1719|  5.85k|  Curl_strntolower(conn->destination, conn->destination,
 1720|  5.85k|                   strlen(conn->destination));
 1721|       |
 1722|  5.85k|  return CURLE_OK;
 1723|  5.85k|}
url.c:setup_range:
 1653|  5.65k|{
 1654|  5.65k|  struct UrlState *s = &data->state;
 1655|  5.65k|  s->resume_from = data->set.set_resume_from;
 1656|  5.65k|  if(s->resume_from || data->set.str[STRING_SET_RANGE]) {
  ------------------
  |  Branch (1656:6): [True: 37, False: 5.61k]
  |  Branch (1656:24): [True: 6, False: 5.60k]
  ------------------
 1657|     43|    if(s->rangestringalloc)
  ------------------
  |  Branch (1657:8): [True: 0, False: 43]
  ------------------
 1658|      0|      curlx_free(s->range);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1659|       |
 1660|     43|    if(s->resume_from)
  ------------------
  |  Branch (1660:8): [True: 37, False: 6]
  ------------------
 1661|     37|      s->range = curl_maprintf("%" FMT_OFF_T "-", s->resume_from);
 1662|      6|    else
 1663|      6|      s->range = curlx_strdup(data->set.str[STRING_SET_RANGE]);
  ------------------
  |  | 1482|      6|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1664|       |
 1665|     43|    if(!s->range)
  ------------------
  |  Branch (1665:8): [True: 0, False: 43]
  ------------------
 1666|      0|      return CURLE_OUT_OF_MEMORY;
 1667|       |
 1668|     43|    s->rangestringalloc = TRUE;
  ------------------
  |  | 1051|     43|#define TRUE true
  ------------------
 1669|       |
 1670|       |    /* tell ourselves to fetch this range */
 1671|     43|    s->use_range = TRUE;        /* enable range download */
  ------------------
  |  | 1051|     43|#define TRUE true
  ------------------
 1672|     43|  }
 1673|  5.60k|  else
 1674|  5.60k|    s->use_range = FALSE; /* disable range download */
  ------------------
  |  | 1054|  5.60k|#define FALSE false
  ------------------
 1675|       |
 1676|  5.65k|  return CURLE_OK;
 1677|  5.65k|}
url.c:url_attach_existing:
 1223|  5.85k|{
 1224|  5.85k|  struct url_conn_match match;
 1225|  5.85k|  bool success;
 1226|       |
 1227|  5.85k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1077|  5.85k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1227:3): [True: 0, False: 5.85k]
  |  Branch (1227:3): [True: 5.85k, False: 0]
  ------------------
 1228|  5.85k|  memset(&match, 0, sizeof(match));
 1229|  5.85k|  match.data = data;
 1230|  5.85k|  match.needle = needle;
 1231|  5.85k|  match.now = *Curl_pgrs_now(data);
 1232|  5.85k|  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|  5.85k|  match.require_tls = data->set.use_ssl >= CURLUSESSL_CONTROL;
  ------------------
  |  |  926|  5.85k|#define CURLUSESSL_CONTROL 2L /* SSL for the control connection or fail */
  ------------------
 1258|  5.85k|  match.may_tls = data->set.use_ssl > CURLUSESSL_NONE;
  ------------------
  |  |  924|  5.85k|#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|  5.85k|  success = Curl_cpool_find(data, needle->destination,
 1263|  5.85k|                            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|  5.85k|  *waitpipe = (bool)match.wait_pipe;
 1268|  5.85k|  return success;
 1269|  5.85k|}
url.c:xfer_may_multiplex:
  536|  5.85k|{
  537|  5.85k|#ifndef CURL_DISABLE_HTTP
  538|       |  /* If an HTTP protocol and multiplexing is enabled */
  539|  5.85k|  if((conn->scheme->protocol & PROTO_FAMILY_HTTP) &&
  ------------------
  |  |   84|  5.85k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|  5.85k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|  5.85k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  5.85k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  5.85k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  5.85k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (539:6): [True: 5.85k, False: 0]
  ------------------
  540|  5.85k|     (!conn->bits.protoconnstart || !conn->bits.close)) {
  ------------------
  |  Branch (540:7): [True: 5.85k, False: 0]
  |  Branch (540:37): [True: 0, False: 0]
  ------------------
  541|       |
  542|  5.85k|    if(Curl_multiplex_wanted(data->multi) &&
  ------------------
  |  Branch (542:8): [True: 5.85k, False: 0]
  ------------------
  543|  5.85k|       (data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)))
  ------------------
  |  |   41|  5.85k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                     (data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)))
  ------------------
  |  |   42|  5.85k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (543:8): [True: 5.84k, False: 8]
  ------------------
  544|       |      /* allows HTTP/2 or newer */
  545|  5.84k|      return TRUE;
  ------------------
  |  | 1051|  5.84k|#define TRUE true
  ------------------
  546|  5.85k|  }
  547|       |#else
  548|       |  (void)data;
  549|       |  (void)conn;
  550|       |#endif
  551|      8|  return FALSE;
  ------------------
  |  | 1054|      8|#define FALSE false
  ------------------
  552|  5.85k|}
url.c:url_match_conn:
 1125|    202|{
 1126|    202|  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|    202|  if(!url_match_connect_config(conn, m))
  ------------------
  |  Branch (1130:6): [True: 0, False: 202]
  ------------------
 1131|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1132|       |
 1133|       |  /* match for destination and protocol? */
 1134|    202|  if(!url_match_destination(conn, m))
  ------------------
  |  Branch (1134:6): [True: 0, False: 202]
  ------------------
 1135|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
 1136|       |
 1137|    202|  if(!url_match_fully_connected(conn, m))
  ------------------
  |  Branch (1137:6): [True: 202, False: 0]
  ------------------
 1138|    202|    return FALSE;
  ------------------
  |  | 1054|    202|#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|    202|{
  714|       |  /* connect-only or to-be-closed connections will not be reused */
  715|    202|  if(conn->bits.connect_only || conn->bits.close || conn->bits.no_reuse)
  ------------------
  |  Branch (715:6): [True: 0, False: 202]
  |  Branch (715:33): [True: 0, False: 202]
  |  Branch (715:53): [True: 0, False: 202]
  ------------------
  716|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  717|       |
  718|       |  /* ip_version must match */
  719|    202|  if(m->data->set.ipver != CURL_IPRESOLVE_WHATEVER &&
  ------------------
  |  | 2309|    404|#define CURL_IPRESOLVE_WHATEVER 0L /* default, uses addresses to all IP
  ------------------
  |  Branch (719:6): [True: 0, False: 202]
  ------------------
  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|    202|  if(m->needle->localdev || m->needle->localport) {
  ------------------
  |  Branch (723:6): [True: 0, False: 202]
  |  Branch (723:29): [True: 0, False: 202]
  ------------------
  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|    202|  if(!m->needle->via_peer != !conn->via_peer)
  ------------------
  |  Branch (742:6): [True: 0, False: 202]
  ------------------
  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|    202|  return TRUE;
  ------------------
  |  | 1051|    202|#define TRUE true
  ------------------
  748|    202|}
url.c:url_match_destination:
  973|    202|{
  974|       |  /* Different connect-to peers never match */
  975|    202|  if(!Curl_peer_same_destination(m->needle->via_peer, conn->via_peer))
  ------------------
  |  Branch (975:6): [True: 0, False: 202]
  ------------------
  976|      0|    return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  977|       |
  978|    202|  if(m->needle->origin->scheme != conn->origin->scheme) {
  ------------------
  |  Branch (978:6): [True: 0, False: 202]
  ------------------
  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|    202|  return Curl_peer_same_destination(m->needle->origin, conn->origin);
  990|    202|}
url.c:url_match_fully_connected:
  752|    202|{
  753|    202|  if(!Curl_conn_is_connected(conn, FIRSTSOCKET) ||
  ------------------
  |  |  245|    202|#define FIRSTSOCKET     0
  ------------------
  |  Branch (753:6): [True: 202, False: 0]
  ------------------
  754|    202|     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|    202|    if(m->may_multiplex) {
  ------------------
  |  Branch (757:8): [True: 202, False: 0]
  ------------------
  758|    202|      m->seen_pending_conn = TRUE;
  ------------------
  |  | 1051|    202|#define TRUE true
  ------------------
  759|       |      /* Do not pick a connection that has not connected yet */
  760|    202|      infof(m->data, "Connection #%" FMT_OFF_T
  ------------------
  |  |  143|    202|  do {                               \
  |  |  144|    202|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    202|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 202, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 202]
  |  |  |  |  ------------------
  |  |  |  |  320|    202|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    202|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    202|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 202]
  |  |  ------------------
  ------------------
  761|    202|            " is not open enough, cannot reuse", conn->connection_id);
  762|    202|    }
  763|       |    /* Do not pick a connection that has not connected yet */
  764|    202|    return FALSE;
  ------------------
  |  | 1054|    202|#define FALSE false
  ------------------
  765|    202|  }
  766|      0|  return TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
  767|    202|}
url.c:url_match_result:
 1188|  5.85k|{
 1189|  5.85k|  struct url_conn_match *match = userdata;
 1190|  5.85k|  if(match->found) {
  ------------------
  |  Branch (1190:6): [True: 0, False: 5.85k]
  ------------------
 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|  5.85k|  else if(match->seen_single_use_conn && !match->seen_multiplex_conn) {
  ------------------
  |  Branch (1196:11): [True: 0, False: 5.85k]
  |  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|  5.85k|  else if(match->seen_pending_conn && match->data->set.pipewait) {
  ------------------
  |  Branch (1202:11): [True: 202, False: 5.64k]
  |  Branch (1202:39): [True: 202, False: 0]
  ------------------
 1203|    202|    infof(match->data,
  ------------------
  |  |  143|    202|  do {                               \
  |  |  144|    202|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    202|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 202, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 202]
  |  |  |  |  ------------------
  |  |  |  |  320|    202|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    202|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    202|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 202]
  |  |  ------------------
  ------------------
 1204|    202|          "Found pending candidate for reuse and CURLOPT_PIPEWAIT is set");
 1205|    202|    match->wait_pipe = TRUE;
  ------------------
  |  | 1051|    202|#define TRUE true
  ------------------
 1206|    202|  }
 1207|  5.85k|  match->force_reuse = FALSE;
  ------------------
  |  | 1054|  5.85k|#define FALSE false
  ------------------
 1208|       |  return FALSE;
  ------------------
  |  | 1054|  5.85k|#define FALSE false
  ------------------
 1209|  5.85k|}

urlencode_str:
  132|  6.62k|{
  133|       |  /* we must add this with whitespace-replacing */
  134|  6.62k|  const unsigned char *iptr;
  135|  6.62k|  const unsigned char *host_sep = (const unsigned char *)url;
  136|  6.62k|  CURLcode result = CURLE_OK;
  137|       |
  138|  6.62k|  DEBUGASSERT((query >= QUERY_NO) && (query <= QUERY_YES));
  ------------------
  |  | 1077|  6.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (138:3): [True: 0, False: 6.62k]
  |  Branch (138:3): [True: 0, False: 0]
  |  Branch (138:3): [True: 6.62k, False: 0]
  |  Branch (138:3): [True: 6.62k, False: 0]
  ------------------
  139|       |
  140|  6.62k|  if(!relative) {
  ------------------
  |  Branch (140:6): [True: 0, False: 6.62k]
  ------------------
  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|  10.5M|  for(iptr = host_sep; len && !result; iptr++, len--) {
  ------------------
  |  Branch (150:24): [True: 10.5M, False: 6.62k]
  |  Branch (150:31): [True: 10.5M, False: 0]
  ------------------
  151|  10.5M|    if(*iptr == ' ') {
  ------------------
  |  Branch (151:8): [True: 0, False: 10.5M]
  ------------------
  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|  10.5M|    else if((*iptr < ' ') || (*iptr >= 0x7f)) {
  ------------------
  |  Branch (157:13): [True: 0, False: 10.5M]
  |  Branch (157:30): [True: 2.36M, False: 8.16M]
  ------------------
  158|  2.36M|      unsigned char out[3] = { '%' };
  159|  2.36M|      Curl_hexbyte(&out[1], *iptr);
  160|  2.36M|      result = curlx_dyn_addn(o, out, 3);
  161|  2.36M|    }
  162|  8.16M|    else if(*iptr == '%' && (len >= 3) &&
  ------------------
  |  Branch (162:13): [True: 3.52M, False: 4.63M]
  |  Branch (162:29): [True: 3.52M, False: 113]
  ------------------
  163|  3.52M|            ISXDIGIT(iptr[1]) && ISXDIGIT(iptr[2]) &&
  ------------------
  |  |   39|  11.6M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  7.05M|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 51.4k, False: 3.47M]
  |  |  |  |  |  Branch (44:38): [True: 6.94k, False: 44.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  7.04M|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 28.0k, False: 3.49M]
  |  |  |  |  |  Branch (27:43): [True: 6.93k, False: 21.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  3.51M|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 35.1k, False: 3.47M]
  |  |  |  |  |  Branch (28:43): [True: 9.45k, False: 25.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          ISXDIGIT(iptr[1]) && ISXDIGIT(iptr[2]) &&
  ------------------
  |  |   39|  8.18M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  46.6k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 16.1k, False: 7.16k]
  |  |  |  |  |  Branch (44:38): [True: 2.28k, False: 13.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  44.3k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 7.22k, False: 13.8k]
  |  |  |  |  |  Branch (27:43): [True: 2.08k, False: 5.13k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  18.9k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 11.2k, False: 7.69k]
  |  |  |  |  |  Branch (28:43): [True: 2.42k, False: 8.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  164|  6.80k|            (ISLOWER(iptr[1]) || ISLOWER(iptr[2]))) {
  ------------------
  |  |   43|  13.6k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 1.51k, False: 5.29k]
  |  |  |  Branch (43:38): [True: 1.51k, False: 0]
  |  |  ------------------
  ------------------
                          (ISLOWER(iptr[1]) || ISLOWER(iptr[2]))) {
  ------------------
  |  |   43|  5.29k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 1.62k, False: 3.66k]
  |  |  |  Branch (43:38): [True: 1.62k, False: 0]
  |  |  ------------------
  ------------------
  165|       |      /* uppercase it */
  166|  3.13k|      unsigned char hex = (unsigned char)((curlx_hexval(iptr[1]) << 4) |
  ------------------
  |  |  112|  3.13k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  167|  3.13k|                                          curlx_hexval(iptr[2]));
  ------------------
  |  |  112|  3.13k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  168|  3.13k|      unsigned char out[3] = { '%' };
  169|  3.13k|      Curl_hexbyte(&out[1], hex);
  170|  3.13k|      result = curlx_dyn_addn(o, out, 3);
  171|  3.13k|      iptr += 2;
  172|  3.13k|      len -= 2;
  173|  3.13k|    }
  174|  8.15M|    else {
  175|  8.15M|      result = curlx_dyn_addn(o, iptr, 1);
  176|  8.15M|      if(*iptr == '?' && (query == QUERY_NOT_YET))
  ------------------
  |  |   53|      0|#define QUERY_NOT_YET 3 /* allow to change to query */
  ------------------
  |  Branch (176:10): [True: 0, False: 8.15M]
  |  Branch (176:26): [True: 0, False: 0]
  ------------------
  177|      0|        query = QUERY_YES;
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
  178|  8.15M|    }
  179|  10.5M|  }
  180|       |
  181|  6.62k|  if(result)
  ------------------
  |  Branch (181:6): [True: 0, False: 6.62k]
  ------------------
  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|  6.62k|  return CURLUE_OK;
  184|  6.62k|}
Curl_is_absolute_url:
  196|  20.4k|{
  197|  20.4k|  size_t i = 0;
  198|  20.4k|  DEBUGASSERT(!buf || (buflen > MAX_SCHEME_LEN));
  ------------------
  |  | 1077|  20.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (198:3): [True: 20.4k, False: 0]
  |  Branch (198:3): [True: 0, False: 0]
  |  Branch (198:3): [True: 10.6k, False: 9.84k]
  |  Branch (198:3): [True: 9.84k, False: 0]
  ------------------
  199|  20.4k|  (void)buflen; /* only used in debug-builds */
  200|  20.4k|  if(buf)
  ------------------
  |  Branch (200:6): [True: 9.84k, False: 10.6k]
  ------------------
  201|  9.84k|    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|  20.4k|  if(ISALPHA(url[0]))
  ------------------
  |  |   38|  20.4k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  40.9k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 3.80k, False: 16.6k]
  |  |  |  |  |  Branch (43:38): [True: 3.73k, False: 74]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  16.7k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 12.9k, False: 3.79k]
  |  |  |  |  |  Branch (42:38): [True: 12.5k, False: 408]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  207|  75.1k|    for(i = 1; i < MAX_SCHEME_LEN; ++i) {
  ------------------
  |  |   55|  75.1k|#define MAX_SCHEME_LEN 40
  ------------------
  |  Branch (207:16): [True: 75.1k, False: 36]
  ------------------
  208|  75.1k|      char s = url[i];
  209|  75.1k|      if(s && (ISALNUM(s) || (s == '+') || (s == '-') || (s == '.'))) {
  ------------------
  |  |   41|   148k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   44|   148k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 72.7k, False: 1.72k]
  |  |  |  |  |  Branch (44:38): [True: 769, False: 71.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|   148k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 29.4k, False: 44.2k]
  |  |  |  |  |  Branch (43:38): [True: 29.4k, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  44.2k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 27.7k, False: 16.5k]
  |  |  |  |  |  Branch (42:38): [True: 27.7k, False: 32]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (209:10): [True: 74.4k, False: 692]
  |  Branch (209:30): [True: 271, False: 16.2k]
  |  Branch (209:44): [True: 365, False: 15.8k]
  |  Branch (209:58): [True: 341, False: 15.5k]
  ------------------
  210|       |        /* RFC 3986 3.1 explains:
  211|       |           scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
  212|       |        */
  213|  58.9k|      }
  214|  16.2k|      else {
  215|  16.2k|        break;
  216|  16.2k|      }
  217|  75.1k|    }
  218|  20.4k|  if(i && (url[i] == ':') && ((url[i + 1] == '/') || !guess_scheme)) {
  ------------------
  |  Branch (218:6): [True: 16.2k, False: 4.19k]
  |  Branch (218:11): [True: 13.7k, False: 2.57k]
  |  Branch (218:31): [True: 13.3k, False: 319]
  |  Branch (218:54): [True: 0, False: 319]
  ------------------
  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|  13.3k|    size_t len = i;
  225|  13.3k|    if(buf) {
  ------------------
  |  Branch (225:8): [True: 6.62k, False: 6.76k]
  ------------------
  226|  6.62k|      Curl_strntolower(buf, url, i);
  227|  6.62k|      buf[i] = 0;
  228|  6.62k|    }
  229|  13.3k|    return len;
  230|  13.3k|  }
  231|  7.09k|  return 0;
  232|  20.4k|}
Curl_junkscan:
  236|  9.87k|{
  237|  9.87k|  size_t n = strlen(url);
  238|  9.87k|  size_t i;
  239|  9.87k|  unsigned char control;
  240|  9.87k|  const unsigned char *p = (const unsigned char *)url;
  241|  9.87k|  if(n > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  9.87k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (241:6): [True: 0, False: 9.87k]
  ------------------
  242|      0|    return CURLUE_MALFORMED_INPUT;
  243|       |
  244|  9.87k|  control = allowspace ? 0x1f : 0x20;
  ------------------
  |  Branch (244:13): [True: 0, False: 9.87k]
  ------------------
  245|  28.7M|  for(i = 0; i < n; i++) {
  ------------------
  |  Branch (245:14): [True: 28.7M, False: 9.84k]
  ------------------
  246|  28.7M|    if(p[i] <= control || p[i] == 127)
  ------------------
  |  Branch (246:8): [True: 29, False: 28.7M]
  |  Branch (246:27): [True: 4, False: 28.7M]
  ------------------
  247|     33|      return CURLUE_MALFORMED_INPUT;
  248|  28.7M|  }
  249|  9.84k|  *urllen = n;
  250|  9.84k|  return CURLUE_OK;
  251|  9.87k|}
parse_hostname_login:
  271|  9.68k|{
  272|  9.68k|  CURLUcode ures = CURLUE_OK;
  273|  9.68k|  CURLcode result;
  274|  9.68k|  char *userp = NULL;
  275|  9.68k|  char *passwdp = NULL;
  276|  9.68k|  char *optionsp = NULL;
  277|  9.68k|  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|  9.68k|  const char *ptr;
  287|       |
  288|  9.68k|  DEBUGASSERT(login);
  ------------------
  |  | 1077|  9.68k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (288:3): [True: 0, False: 9.68k]
  |  Branch (288:3): [True: 9.68k, False: 0]
  ------------------
  289|       |
  290|  9.68k|  *hostname_offset = 0;
  291|  9.68k|  ptr = memchr(login, '@', len);
  292|  9.68k|  if(!ptr)
  ------------------
  |  Branch (292:6): [True: 7.97k, False: 1.71k]
  ------------------
  293|  7.97k|    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.71k|  ptr++;
  299|       |
  300|       |  /* if this is a known scheme, get some details */
  301|  1.71k|  if(u->scheme)
  ------------------
  |  Branch (301:6): [True: 229, False: 1.48k]
  ------------------
  302|    229|    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.71k|  result = Curl_parse_login_details(login, ptr - login - 1,
  307|  1.71k|                                    &userp, &passwdp,
  308|  1.71k|                                    (h && (h->flags & PROTOPT_URLOPTIONS)) ?
  ------------------
  |  |  225|    209|#define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo
  ------------------
  |  Branch (308:38): [True: 209, False: 1.50k]
  |  Branch (308:43): [True: 14, False: 195]
  ------------------
  309|  1.71k|                                    &optionsp : NULL);
  310|  1.71k|  if(result) {
  ------------------
  |  Branch (310:6): [True: 0, False: 1.71k]
  ------------------
  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.71k|  if(userp) {
  ------------------
  |  Branch (317:6): [True: 1.71k, False: 0]
  ------------------
  318|  1.71k|    if(flags & CURLU_DISALLOW_USER) {
  ------------------
  |  |   92|  1.71k|#define CURLU_DISALLOW_USER (1 << 5)      /* no user+password allowed */
  ------------------
  |  Branch (318:8): [True: 1, False: 1.71k]
  ------------------
  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.71k|    curlx_free(u->user);
  ------------------
  |  | 1488|  1.71k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  324|  1.71k|    u->user = userp;
  325|  1.71k|  }
  326|       |
  327|  1.71k|  if(passwdp) {
  ------------------
  |  Branch (327:6): [True: 467, False: 1.24k]
  ------------------
  328|    467|    curlx_free(u->password);
  ------------------
  |  | 1488|    467|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  329|    467|    u->password = passwdp;
  330|    467|  }
  331|       |
  332|  1.71k|  if(optionsp) {
  ------------------
  |  Branch (332:6): [True: 4, False: 1.70k]
  ------------------
  333|      4|    curlx_free(u->options);
  ------------------
  |  | 1488|      4|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  334|      4|    u->options = optionsp;
  335|      4|  }
  336|       |
  337|       |  /* the hostname starts at this offset */
  338|  1.71k|  *hostname_offset = ptr - login;
  339|  1.71k|  return CURLUE_OK;
  340|       |
  341|  7.97k|out:
  342|       |
  343|  7.97k|  curlx_free(userp);
  ------------------
  |  | 1488|  7.97k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  344|  7.97k|  curlx_free(passwdp);
  ------------------
  |  | 1488|  7.97k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  345|  7.97k|  curlx_free(optionsp);
  ------------------
  |  | 1488|  7.97k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  346|  7.97k|  curlx_safefree(u->user);
  ------------------
  |  | 1332|  7.97k|  do {                      \
  |  | 1333|  7.97k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  7.97k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.97k|    (ptr) = NULL;           \
  |  | 1335|  7.97k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.97k]
  |  |  ------------------
  ------------------
  347|  7.97k|  curlx_safefree(u->password);
  ------------------
  |  | 1332|  7.97k|  do {                      \
  |  | 1333|  7.97k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  7.97k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.97k|    (ptr) = NULL;           \
  |  | 1335|  7.97k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.97k]
  |  |  ------------------
  ------------------
  348|  7.97k|  curlx_safefree(u->options);
  ------------------
  |  | 1332|  7.97k|  do {                      \
  |  | 1333|  7.97k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  7.97k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.97k|    (ptr) = NULL;           \
  |  | 1335|  7.97k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.97k]
  |  |  ------------------
  ------------------
  349|       |
  350|  7.97k|  return ures;
  351|  1.71k|}
parse_port:
  358|  9.68k|{
  359|  9.68k|  const char *portptr;
  360|  9.68k|  const char *hostname = curlx_dyn_ptr(host);
  361|       |  /*
  362|       |   * Find the end of an IPv6 address on the ']' ending bracket.
  363|       |   */
  364|  9.68k|  u->portnum = 0;
  365|  9.68k|  u->port_present = FALSE;
  ------------------
  |  | 1054|  9.68k|#define FALSE false
  ------------------
  366|  9.68k|  if(hostname[0] == '[') {
  ------------------
  |  Branch (366:6): [True: 250, False: 9.43k]
  ------------------
  367|    250|    portptr = strchr(hostname, ']');
  368|    250|    if(!portptr)
  ------------------
  |  Branch (368:8): [True: 7, False: 243]
  ------------------
  369|      7|      return CURLUE_BAD_IPV6;
  370|    243|    portptr++;
  371|       |    /* this is a RFC2732-style specified IP-address */
  372|    243|    if(*portptr) {
  ------------------
  |  Branch (372:8): [True: 14, False: 229]
  ------------------
  373|     14|      if(*portptr != ':')
  ------------------
  |  Branch (373:10): [True: 9, False: 5]
  ------------------
  374|      9|        return CURLUE_BAD_PORT_NUMBER;
  375|     14|    }
  376|    229|    else
  377|    229|      portptr = NULL;
  378|    243|  }
  379|  9.43k|  else
  380|  9.43k|    portptr = strchr(hostname, ':');
  381|       |
  382|  9.67k|  if(portptr) {
  ------------------
  |  Branch (382:6): [True: 253, False: 9.41k]
  ------------------
  383|    253|    curl_off_t port;
  384|    253|    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|    253|    curlx_dyn_setlen(host, keep);
  394|    253|    portptr++;
  395|    253|    if(!*portptr)
  ------------------
  |  Branch (395:8): [True: 149, False: 104]
  ------------------
  396|    149|      return has_scheme ? CURLUE_OK : CURLUE_BAD_PORT_NUMBER;
  ------------------
  |  Branch (396:14): [True: 101, False: 48]
  ------------------
  397|       |
  398|    104|    if(curlx_str_number(&portptr, &port, 0xffff) || *portptr)
  ------------------
  |  Branch (398:8): [True: 28, False: 76]
  |  Branch (398:53): [True: 6, False: 70]
  ------------------
  399|     34|      return CURLUE_BAD_PORT_NUMBER;
  400|       |
  401|     70|    u->portnum = (uint16_t)port;
  402|     70|    u->port_present = TRUE;
  ------------------
  |  | 1051|     70|#define TRUE true
  ------------------
  403|     70|  }
  404|       |
  405|  9.48k|  return CURLUE_OK;
  406|  9.67k|}
ipv6_parse:
  417|    268|{
  418|    268|  size_t len;
  419|    268|  DEBUGASSERT(*hostname == '[');
  ------------------
  |  | 1077|    268|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (419:3): [True: 0, False: 268]
  |  Branch (419:3): [True: 268, False: 0]
  ------------------
  420|    268|  if(hlen < 4) /* '[::]' is the shortest possible valid string */
  ------------------
  |  Branch (420:6): [True: 5, False: 263]
  ------------------
  421|      5|    return CURLUE_BAD_IPV6;
  422|    263|  hostname++;
  423|    263|  hlen -= 2;
  424|       |
  425|       |  /* only valid IPv6 letters are ok */
  426|    263|  len = strspn(hostname, "0123456789abcdefABCDEF:.");
  427|       |
  428|    263|  if(hlen != len) {
  ------------------
  |  Branch (428:6): [True: 90, False: 173]
  ------------------
  429|     90|    hlen = len;
  430|     90|    if(hostname[len] == '%') {
  ------------------
  |  Branch (430:8): [True: 86, False: 4]
  ------------------
  431|       |      /* this could now be '%[zone id]' */
  432|     86|      char zoneid[MAX_ZONEID_LEN];
  433|     86|      int i = 0;
  434|     86|      char *h = &hostname[len + 1];
  435|       |      /* pass '25' if present and is a URL encoded percent sign */
  436|     86|      if(!strncmp(h, "25", 2) && h[2] && (h[2] != ']'))
  ------------------
  |  Branch (436:10): [True: 6, False: 80]
  |  Branch (436:34): [True: 3, False: 3]
  |  Branch (436:42): [True: 3, False: 0]
  ------------------
  437|      3|        h += 2;
  438|    691|      while(*h && (*h != ']') && (i < (MAX_ZONEID_LEN - 1)))
  ------------------
  |  |   56|    628|#define MAX_ZONEID_LEN 16
  ------------------
  |  Branch (438:13): [True: 680, False: 11]
  |  Branch (438:19): [True: 628, False: 52]
  |  Branch (438:34): [True: 605, False: 23]
  ------------------
  439|    605|        zoneid[i++] = *h++;
  440|     86|      if(!i || (']' != *h))
  ------------------
  |  Branch (440:10): [True: 3, False: 83]
  |  Branch (440:16): [True: 34, False: 49]
  ------------------
  441|     37|        return CURLUE_BAD_IPV6;
  442|     49|      zoneid[i] = 0;
  443|     49|      u->zoneid = curlx_strdup(zoneid);
  ------------------
  |  | 1482|     49|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  444|     49|      if(!u->zoneid)
  ------------------
  |  Branch (444:10): [True: 0, False: 49]
  ------------------
  445|      0|        return CURLUE_OUT_OF_MEMORY;
  446|     49|      hostname[len] = ']'; /* insert end bracket */
  447|     49|      hostname[len + 1] = 0; /* terminate the hostname */
  448|     49|    }
  449|      4|    else
  450|      4|      return CURLUE_BAD_IPV6;
  451|       |    /* hostname is fine */
  452|     90|  }
  453|       |
  454|       |  /* Normalize the IPv6 address */
  455|    222|  {
  456|    222|    char dest[16]; /* fits a binary IPv6 address */
  457|    222|    hostname[hlen] = 0; /* end the address there */
  458|    222|    if(curlx_inet_pton(AF_INET6, hostname, dest) != 1)
  ------------------
  |  Branch (458:8): [True: 36, False: 186]
  ------------------
  459|     36|      return CURLUE_BAD_IPV6;
  460|    186|    if(curlx_inet_ntop(AF_INET6, dest, hostname, hlen + 1)) {
  ------------------
  |  Branch (460:8): [True: 171, False: 15]
  ------------------
  461|    171|      hlen = strlen(hostname); /* might be shorter now */
  462|    171|      hostname[hlen + 1] = 0;
  463|    171|    }
  464|    186|    hostname[hlen] = ']'; /* restore ending bracket */
  465|    186|  }
  466|      0|  return CURLUE_OK;
  467|    222|}
ipv4_normalize:
  515|  9.55k|{
  516|  9.55k|  bool done = FALSE;
  ------------------
  |  | 1054|  9.55k|#define FALSE false
  ------------------
  517|  9.55k|  int n = 0;
  518|  9.55k|  const char *c = curlx_dyn_ptr(host);
  519|  9.55k|  unsigned int parts[4] = { 0, 0, 0, 0 };
  520|  9.55k|  CURLcode result = CURLE_OK;
  521|       |
  522|  9.55k|  if(*c == '[')
  ------------------
  |  Branch (522:6): [True: 268, False: 9.28k]
  ------------------
  523|    268|    return HOST_IPV6;
  ------------------
  |  |   50|    268|#define HOST_IPV6    3
  ------------------
  524|       |
  525|  16.4k|  while(!done) {
  ------------------
  |  Branch (525:9): [True: 10.3k, False: 6.11k]
  ------------------
  526|  10.3k|    int rc;
  527|  10.3k|    curl_off_t l;
  528|  10.3k|    if(*c == '0') {
  ------------------
  |  Branch (528:8): [True: 2.37k, False: 7.98k]
  ------------------
  529|  2.37k|      if(Curl_raw_tolower(c[1]) == 'x') {
  ------------------
  |  Branch (529:10): [True: 39, False: 2.33k]
  ------------------
  530|     39|        c += 2; /* skip the prefix */
  531|     39|        rc = curlx_str_hex(&c, &l, UINT_MAX);
  532|     39|        if(rc)
  ------------------
  |  Branch (532:12): [True: 9, False: 30]
  ------------------
  533|      9|          return HOST_NAME;
  ------------------
  |  |   48|      9|#define HOST_NAME    1
  ------------------
  534|     39|      }
  535|  2.33k|      else
  536|  2.33k|        rc = curlx_str_octal(&c, &l, UINT_MAX);
  537|  2.37k|    }
  538|  7.98k|    else
  539|  7.98k|      rc = curlx_str_number(&c, &l, UINT_MAX);
  540|       |
  541|  10.3k|    if(rc) {
  ------------------
  |  Branch (541:8): [True: 3.05k, False: 7.29k]
  ------------------
  542|  3.05k|      if(!n || (rc != STRE_NO_NUM) || *c)
  ------------------
  |  |   36|     89|#define STRE_NO_NUM   8
  ------------------
  |  Branch (542:10): [True: 2.96k, False: 89]
  |  Branch (542:16): [True: 9, False: 80]
  |  Branch (542:39): [True: 41, False: 39]
  ------------------
  543|  3.01k|        return HOST_NAME;
  ------------------
  |  |   48|  3.01k|#define HOST_NAME    1
  ------------------
  544|     39|      n--;
  545|     39|    }
  546|  7.29k|    else
  547|  7.29k|      parts[n] = (unsigned int)l;
  548|       |
  549|  7.33k|    switch(*c) {
  550|  1.10k|    case '.':
  ------------------
  |  Branch (550:5): [True: 1.10k, False: 6.22k]
  ------------------
  551|  1.10k|      if(n == 3) {
  ------------------
  |  Branch (551:10): [True: 35, False: 1.07k]
  ------------------
  552|     35|        if(c[1])
  ------------------
  |  Branch (552:12): [True: 15, False: 20]
  ------------------
  553|       |          /* something follows this dot */
  554|     15|          return HOST_NAME;
  ------------------
  |  |   48|     15|#define HOST_NAME    1
  ------------------
  555|     20|        done = TRUE;
  ------------------
  |  | 1051|     20|#define TRUE true
  ------------------
  556|     20|      }
  557|  1.07k|      else {
  558|  1.07k|        n++;
  559|  1.07k|        c++;
  560|  1.07k|      }
  561|  1.09k|      break;
  562|       |
  563|  6.09k|    case '\0':
  ------------------
  |  Branch (563:5): [True: 6.09k, False: 1.24k]
  ------------------
  564|  6.09k|      done = TRUE;
  ------------------
  |  | 1051|  6.09k|#define TRUE true
  ------------------
  565|  6.09k|      break;
  566|       |
  567|    134|    default:
  ------------------
  |  Branch (567:5): [True: 134, False: 7.20k]
  ------------------
  568|    134|      return HOST_NAME;
  ------------------
  |  |   48|    134|#define HOST_NAME    1
  ------------------
  569|  7.33k|    }
  570|  7.33k|  }
  571|       |
  572|  6.11k|  switch(n) {
  ------------------
  |  Branch (572:10): [True: 6.11k, False: 0]
  ------------------
  573|  5.69k|  case 0: /* a -- 32 bits */
  ------------------
  |  Branch (573:3): [True: 5.69k, False: 419]
  ------------------
  574|  5.69k|    curlx_dyn_reset(host);
  575|       |
  576|  5.69k|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  577|  5.69k|                            (parts[0] >> 24),
  578|  5.69k|                            ((parts[0] >> 16) & 0xff),
  579|  5.69k|                            ((parts[0] >> 8) & 0xff),
  580|  5.69k|                            (parts[0] & 0xff));
  581|  5.69k|    break;
  582|    106|  case 1: /* a.b -- 8.24 bits */
  ------------------
  |  Branch (582:3): [True: 106, False: 6.00k]
  ------------------
  583|    106|    if((parts[0] > 0xff) || (parts[1] > 0xffffff))
  ------------------
  |  Branch (583:8): [True: 47, False: 59]
  |  Branch (583:29): [True: 18, False: 41]
  ------------------
  584|     65|      return HOST_NAME;
  ------------------
  |  |   48|     65|#define HOST_NAME    1
  ------------------
  585|     41|    curlx_dyn_reset(host);
  586|     41|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  587|     41|                            parts[0],
  588|     41|                            ((parts[1] >> 16) & 0xff),
  589|     41|                            ((parts[1] >> 8) & 0xff),
  590|     41|                            (parts[1] & 0xff));
  591|     41|    break;
  592|    130|  case 2: /* a.b.c -- 8.8.16 bits */
  ------------------
  |  Branch (592:3): [True: 130, False: 5.98k]
  ------------------
  593|    130|    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xffff))
  ------------------
  |  Branch (593:8): [True: 36, False: 94]
  |  Branch (593:29): [True: 47, False: 47]
  |  Branch (593:50): [True: 25, False: 22]
  ------------------
  594|    108|      return HOST_NAME;
  ------------------
  |  |   48|    108|#define HOST_NAME    1
  ------------------
  595|     22|    curlx_dyn_reset(host);
  596|     22|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  597|     22|                            parts[0],
  598|     22|                            parts[1],
  599|     22|                            ((parts[2] >> 8) & 0xff),
  600|     22|                            (parts[2] & 0xff));
  601|     22|    break;
  602|    183|  case 3: /* a.b.c.d -- 8.8.8.8 bits */
  ------------------
  |  Branch (602:3): [True: 183, False: 5.93k]
  ------------------
  603|    183|    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff) ||
  ------------------
  |  Branch (603:8): [True: 36, False: 147]
  |  Branch (603:29): [True: 40, False: 107]
  |  Branch (603:50): [True: 42, False: 65]
  ------------------
  604|     65|       (parts[3] > 0xff))
  ------------------
  |  Branch (604:8): [True: 39, False: 26]
  ------------------
  605|    157|      return HOST_NAME;
  ------------------
  |  |   48|    157|#define HOST_NAME    1
  ------------------
  606|     26|    curlx_dyn_reset(host);
  607|     26|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  608|     26|                            parts[0],
  609|     26|                            parts[1],
  610|     26|                            parts[2],
  611|     26|                            parts[3]);
  612|     26|    break;
  613|  6.11k|  }
  614|  5.78k|  if(result)
  ------------------
  |  Branch (614:6): [True: 0, False: 5.78k]
  ------------------
  615|      0|    return HOST_ERROR;
  ------------------
  |  |   47|      0|#define HOST_ERROR   (-1) /* out of memory */
  ------------------
  616|  5.78k|  return HOST_IPV4;
  ------------------
  |  |   49|  5.78k|#define HOST_IPV4    2
  ------------------
  617|  5.78k|}
dedotdotify:
  761|  1.01k|{
  762|  1.01k|  struct dynbuf out;
  763|  1.01k|  CURLcode result = CURLE_OK;
  764|       |
  765|       |  /* variables for leading dot checks */
  766|  1.01k|  const char *dinput = input;
  767|  1.01k|  size_t dlen = clen;
  768|       |
  769|  1.01k|  *outp = NULL;
  770|       |  /* a single byte path cannot be cleaned up */
  771|  1.01k|  if(clen < 2)
  ------------------
  |  Branch (771:6): [True: 9, False: 1.01k]
  ------------------
  772|      9|    return 0;
  773|       |
  774|  1.01k|  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.01k|  if(is_dot(&dinput, &dlen)) {
  ------------------
  |  Branch (778:6): [True: 0, False: 1.01k]
  ------------------
  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|  12.8M|  while(clen && !result) { /* until end of path content */
  ------------------
  |  Branch (799:9): [True: 12.8M, False: 959]
  |  Branch (799:17): [True: 12.8M, False: 0]
  ------------------
  800|  12.8M|    if(ISSLASH(*input)) {
  ------------------
  |  |  742|  12.8M|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (742:20): [True: 4.98M, False: 7.88M]
  |  |  ------------------
  ------------------
  801|  4.98M|      const char *p = &input[1];
  802|  4.98M|      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.98M|      if(is_dot(&p, &blen)) {
  ------------------
  |  Branch (806:10): [True: 19.8k, False: 4.96M]
  ------------------
  807|  19.8k|        if(!blen) { /* /. */
  ------------------
  |  Branch (807:12): [True: 25, False: 19.8k]
  ------------------
  808|     25|          result = curlx_dyn_addn(&out, "/", 1);
  809|     25|          break;
  810|     25|        }
  811|  19.8k|        else if(ISSLASH(*p)) { /* /./ */
  ------------------
  |  |  742|  19.8k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (742:20): [True: 4.04k, False: 15.8k]
  |  |  ------------------
  ------------------
  812|  4.04k|          input = p;
  813|  4.04k|          clen = blen;
  814|  4.04k|          continue;
  815|  4.04k|        }
  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|  15.8k|        else if(is_dot(&p, &blen) && (ISSLASH(*p) || !blen)) {
  ------------------
  |  |  742|  27.5k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (742:20): [True: 11.3k, False: 2.45k]
  |  |  ------------------
  ------------------
  |  Branch (821:17): [True: 13.7k, False: 2.06k]
  |  Branch (821:54): [True: 26, False: 2.42k]
  ------------------
  822|       |          /* remove the last segment from the output buffer */
  823|  11.3k|          size_t len = curlx_dyn_len(&out);
  824|  11.3k|          if(len) {
  ------------------
  |  Branch (824:14): [True: 5.64k, False: 5.68k]
  ------------------
  825|  5.64k|            const char *ptr = curlx_dyn_ptr(&out);
  826|  5.64k|            const char *last = memrchr(ptr, '/', len);
  827|  5.64k|            if(last)
  ------------------
  |  Branch (827:16): [True: 5.64k, False: 0]
  ------------------
  828|       |              /* trim the output at the slash */
  829|  5.64k|              curlx_dyn_setlen(&out, last - ptr);
  830|  5.64k|          }
  831|       |
  832|  11.3k|          if(blen) { /* /../ */
  ------------------
  |  Branch (832:14): [True: 11.3k, False: 26]
  ------------------
  833|  11.3k|            input = p;
  834|  11.3k|            clen = blen;
  835|  11.3k|            continue;
  836|  11.3k|          }
  837|     26|          result = curlx_dyn_addn(&out, "/", 1);
  838|     26|          break;
  839|  11.3k|        }
  840|  19.8k|      }
  841|  4.98M|    }
  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|  12.8M|    result = curlx_dyn_addn(&out, input, 1);
  849|  12.8M|    input++;
  850|  12.8M|    clen--;
  851|  12.8M|  }
  852|  1.01k|end:
  853|  1.01k|  if(!result) {
  ------------------
  |  Branch (853:6): [True: 1.01k, False: 0]
  ------------------
  854|  1.01k|    if(curlx_dyn_len(&out))
  ------------------
  |  Branch (854:8): [True: 1.01k, False: 0]
  ------------------
  855|  1.01k|      *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.01k|  }
  862|  1.01k|  return result ? 1 : 0; /* success */
  ------------------
  |  Branch (862:10): [True: 0, False: 1.01k]
  ------------------
  863|  1.01k|}
parse_file:
  872|    101|{
  873|    101|  const char *path;
  874|    101|  size_t pathlen;
  875|       |
  876|    101|  *pathp = NULL;
  877|    101|  *pathlenp = 0;
  878|    101|  if(urllen <= 6)
  ------------------
  |  Branch (878:6): [True: 3, False: 98]
  ------------------
  879|       |    /* file:/ is not enough to actually be a complete file: URL */
  880|      3|    return CURLUE_BAD_FILE_URL;
  881|       |
  882|       |  /* path has been allocated large enough to hold this */
  883|     98|  path = &url[5];
  884|     98|  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|     98|  if(path[0] != '/')
  ------------------
  |  Branch (889:6): [True: 0, False: 98]
  ------------------
  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|     98|  if(path[1] == '/') {
  ------------------
  |  Branch (898:6): [True: 38, False: 60]
  ------------------
  899|       |    /* swallow the two slashes */
  900|     38|    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|     38|    if(ptr[0] != '/' && !STARTS_WITH_URL_DRIVE_PREFIX(ptr)) {
  ------------------
  |  |   49|     35|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 11, False: 24]
  |  |  |  Branch (49:25): [True: 8, False: 3]
  |  |  ------------------
  |  |   50|     35|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 22, False: 5]
  |  |  |  Branch (50:25): [True: 19, False: 3]
  |  |  ------------------
  |  |   51|     35|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 3, False: 24]
  |  |  |  Branch (51:24): [True: 11, False: 13]
  |  |  ------------------
  |  |   52|     35|   ((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0))
  |  |  ------------------
  |  |  |  Branch (52:5): [True: 3, False: 11]
  |  |  |  Branch (52:24): [True: 3, False: 8]
  |  |  |  Branch (52:44): [True: 4, False: 4]
  |  |  ------------------
  ------------------
  |  Branch (918:8): [True: 35, False: 3]
  ------------------
  919|       |      /* the URL includes a hostname, it must match "localhost" or
  920|       |         "127.0.0.1" to be valid */
  921|     25|      if(checkprefix("localhost/", ptr) ||
  ------------------
  |  |   33|     50|#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]
  |  |  ------------------
  ------------------
  922|     24|         checkprefix("127.0.0.1/", ptr)) {
  ------------------
  |  |   33|     24|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|     24|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 23]
  |  |  ------------------
  ------------------
  923|      2|        ptr += 9; /* now points to the slash after the host */
  924|      2|      }
  925|     23|      else
  926|       |        /* Invalid file://hostname/, expected localhost or 127.0.0.1 or
  927|       |           none */
  928|     23|        return CURLUE_BAD_FILE_URL;
  929|     25|    }
  930|       |
  931|     15|    path = ptr;
  932|     15|    pathlen = urllen - (ptr - url);
  933|     15|  }
  934|       |
  935|     75|#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|     75|  if(('/' == path[0] && STARTS_WITH_URL_DRIVE_PREFIX(&path[1])) ||
  ------------------
  |  |   49|     65|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 20, False: 45]
  |  |  |  Branch (49:25): [True: 17, False: 3]
  |  |  ------------------
  |  |   50|     65|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 12, False: 36]
  |  |  |  Branch (50:25): [True: 9, False: 3]
  |  |  ------------------
  |  |   51|     65|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 7, False: 19]
  |  |  |  Branch (51:24): [True: 5, False: 14]
  |  |  ------------------
  |  |   52|     65|   ((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0))
  |  |  ------------------
  |  |  |  Branch (52:5): [True: 3, False: 9]
  |  |  |  Branch (52:24): [True: 3, False: 6]
  |  |  |  Branch (52:44): [True: 3, False: 3]
  |  |  ------------------
  ------------------
  |  Branch (938:7): [True: 65, False: 10]
  ------------------
  939|     66|     STARTS_WITH_URL_DRIVE_PREFIX(path)) {
  ------------------
  |  |   49|     66|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 6, False: 60]
  |  |  |  Branch (49:25): [True: 6, False: 0]
  |  |  ------------------
  |  |   50|     66|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 4, False: 56]
  |  |  |  Branch (50:25): [True: 4, False: 0]
  |  |  ------------------
  |  |   51|     66|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 3, False: 7]
  |  |  |  Branch (51:24): [True: 7, False: 0]
  |  |  ------------------
  |  |   52|     66|   ((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|     19|    return CURLUE_BAD_FILE_URL;
  942|     19|  }
  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|     56|  u->scheme = curlx_strdup("file");
  ------------------
  |  | 1482|     56|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  952|     56|  if(!u->scheme)
  ------------------
  |  Branch (952:6): [True: 0, False: 56]
  ------------------
  953|      0|    return CURLUE_OUT_OF_MEMORY;
  954|       |
  955|     56|  *pathp = path;
  956|     56|  *pathlenp = pathlen;
  957|     56|  return CURLUE_OK;
  958|     56|}
curl_url:
 1318|  10.1k|{
 1319|  10.1k|  return curlx_calloc(1, sizeof(struct Curl_URL));
  ------------------
  |  | 1485|  10.1k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1320|  10.1k|}
curl_url_cleanup:
 1323|  34.1k|{
 1324|  34.1k|  if(u) {
  ------------------
  |  Branch (1324:6): [True: 10.1k, False: 23.9k]
  ------------------
 1325|  10.1k|    free_urlhandle(u);
 1326|  10.1k|    curlx_free(u);
  ------------------
  |  | 1488|  10.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1327|  10.1k|  }
 1328|  34.1k|}
curl_url_get:
 1585|  81.6k|{
 1586|  81.6k|  const char *ptr;
 1587|  81.6k|  CURLUcode ifmissing = CURLUE_UNKNOWN_PART;
 1588|  81.6k|  char portbuf[7];
 1589|  81.6k|  bool plusdecode = FALSE;
  ------------------
  |  | 1054|  81.6k|#define FALSE false
  ------------------
 1590|  81.6k|  if(!u)
  ------------------
  |  Branch (1590:6): [True: 0, False: 81.6k]
  ------------------
 1591|      0|    return CURLUE_BAD_HANDLE;
 1592|  81.6k|  if(!part)
  ------------------
  |  Branch (1592:6): [True: 0, False: 81.6k]
  ------------------
 1593|      0|    return CURLUE_BAD_PARTPOINTER;
 1594|  81.6k|  *part = NULL;
 1595|       |
 1596|  81.6k|  switch(what) {
 1597|  12.0k|  case CURLUPART_SCHEME:
  ------------------
  |  Branch (1597:3): [True: 12.0k, False: 69.6k]
  ------------------
 1598|  12.0k|    ptr = u->scheme;
 1599|  12.0k|    ifmissing = CURLUE_NO_SCHEME;
 1600|  12.0k|    flags &= ~U_CURLU_URLDECODE; /* never for schemes */
  ------------------
  |  |   63|  12.0k|#define U_CURLU_URLDECODE  (unsigned int)CURLU_URLDECODE
  |  |  ------------------
  |  |  |  |   93|  12.0k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  |  |  ------------------
  ------------------
 1601|  12.0k|    if((flags & CURLU_NO_GUESS_SCHEME) && u->guessed_scheme)
  ------------------
  |  |  105|  12.0k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  |  Branch (1601:8): [True: 5.23k, False: 6.78k]
  |  Branch (1601:43): [True: 4.40k, False: 831]
  ------------------
 1602|  4.40k|      return CURLUE_NO_SCHEME;
 1603|  7.62k|    break;
 1604|  9.15k|  case CURLUPART_USER:
  ------------------
  |  Branch (1604:3): [True: 9.15k, False: 72.4k]
  ------------------
 1605|  9.15k|    ptr = u->user;
 1606|  9.15k|    ifmissing = CURLUE_NO_USER;
 1607|  9.15k|    break;
 1608|  9.15k|  case CURLUPART_PASSWORD:
  ------------------
  |  Branch (1608:3): [True: 9.15k, False: 72.5k]
  ------------------
 1609|  9.15k|    ptr = u->password;
 1610|  9.15k|    ifmissing = CURLUE_NO_PASSWORD;
 1611|  9.15k|    break;
 1612|  6.62k|  case CURLUPART_OPTIONS:
  ------------------
  |  Branch (1612:3): [True: 6.62k, False: 75.0k]
  ------------------
 1613|  6.62k|    ptr = u->options;
 1614|  6.62k|    ifmissing = CURLUE_NO_OPTIONS;
 1615|  6.62k|    break;
 1616|  9.36k|  case CURLUPART_HOST:
  ------------------
  |  Branch (1616:3): [True: 9.36k, False: 72.2k]
  ------------------
 1617|  9.36k|    ptr = u->host;
 1618|  9.36k|    ifmissing = CURLUE_NO_HOST;
 1619|  9.36k|    break;
 1620|  9.13k|  case CURLUPART_ZONEID:
  ------------------
  |  Branch (1620:3): [True: 9.13k, False: 72.5k]
  ------------------
 1621|  9.13k|    ptr = u->zoneid;
 1622|  9.13k|    ifmissing = CURLUE_NO_ZONEID;
 1623|  9.13k|    break;
 1624|  2.61k|  case CURLUPART_PORT:
  ------------------
  |  Branch (1624:3): [True: 2.61k, False: 79.0k]
  ------------------
 1625|  2.61k|    ptr = NULL;
 1626|  2.61k|    ifmissing = CURLUE_NO_PORT;
 1627|  2.61k|    flags &= ~U_CURLU_URLDECODE; /* never for port */
  ------------------
  |  |   63|  2.61k|#define U_CURLU_URLDECODE  (unsigned int)CURLU_URLDECODE
  |  |  ------------------
  |  |  |  |   93|  2.61k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  |  |  ------------------
  ------------------
 1628|  2.61k|    if(u->port_present) {
  ------------------
  |  Branch (1628:8): [True: 16, False: 2.60k]
  ------------------
 1629|     16|      const struct Curl_scheme *h = u->scheme ?
  ------------------
  |  Branch (1629:37): [True: 16, False: 0]
  ------------------
 1630|     16|                                    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|     16|      if(h && (h->defport == u->portnum) &&
  ------------------
  |  Branch (1633:10): [True: 16, False: 0]
  |  Branch (1633:15): [True: 1, False: 15]
  ------------------
 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|     15|      else {
 1638|     15|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", u->portnum);
 1639|     15|        ptr = portbuf;
 1640|     15|      }
 1641|     16|    }
 1642|  2.60k|    else if((flags & CURLU_DEFAULT_PORT) && u->scheme) {
  ------------------
  |  |   84|  2.60k|#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
  ------------------
  |  Branch (1642:13): [True: 0, False: 2.60k]
  |  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.61k|    break;
 1652|  6.66k|  case CURLUPART_PATH:
  ------------------
  |  Branch (1652:3): [True: 6.66k, False: 74.9k]
  ------------------
 1653|  6.66k|    ptr = u->path;
 1654|  6.66k|    if(!ptr)
  ------------------
  |  Branch (1654:8): [True: 5.98k, False: 675]
  ------------------
 1655|  5.98k|      ptr = "/";
 1656|  6.66k|    break;
 1657|  6.62k|  case CURLUPART_QUERY:
  ------------------
  |  Branch (1657:3): [True: 6.62k, False: 75.0k]
  ------------------
 1658|  6.62k|    ptr = u->query;
 1659|  6.62k|    ifmissing = CURLUE_NO_QUERY;
 1660|  6.62k|    plusdecode = flags & CURLU_URLDECODE;
  ------------------
  |  |   93|  6.62k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 1661|  6.62k|    if(ptr && !ptr[0] && !(flags & CURLU_GET_EMPTY))
  ------------------
  |  |  102|     59|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1661:8): [True: 546, False: 6.07k]
  |  Branch (1661:15): [True: 59, False: 487]
  |  Branch (1661:26): [True: 0, False: 59]
  ------------------
 1662|       |      /* there was a blank query and the user do not ask for it */
 1663|      0|      ptr = NULL;
 1664|  6.62k|    break;
 1665|      0|  case CURLUPART_FRAGMENT:
  ------------------
  |  Branch (1665:3): [True: 0, False: 81.6k]
  ------------------
 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|  10.3k|  case CURLUPART_URL:
  ------------------
  |  Branch (1672:3): [True: 10.3k, False: 71.3k]
  ------------------
 1673|  10.3k|    return urlget_url(u, part, flags);
 1674|      0|  default:
  ------------------
  |  Branch (1674:3): [True: 0, False: 81.6k]
  ------------------
 1675|      0|    ptr = NULL;
 1676|      0|    break;
 1677|  81.6k|  }
 1678|  66.9k|  if(ptr)
  ------------------
  |  Branch (1678:6): [True: 26.2k, False: 40.6k]
  ------------------
 1679|  26.2k|    return urlget_format(u, what, ptr, part, plusdecode, flags);
 1680|       |
 1681|  40.6k|  return ifmissing;
 1682|  66.9k|}
curl_url_set:
 1975|  10.1k|{
 1976|  10.1k|  char **storep = NULL;
 1977|  10.1k|  bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
  ------------------
  |  |   94|  10.1k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1977:20): [True: 0, False: 10.1k]
  ------------------
 1978|  10.1k|  bool plusencode = FALSE;
  ------------------
  |  | 1054|  10.1k|#define FALSE false
  ------------------
 1979|  10.1k|  bool pathmode = FALSE;
  ------------------
  |  | 1054|  10.1k|#define FALSE false
  ------------------
 1980|  10.1k|  bool leadingslash = FALSE;
  ------------------
  |  | 1054|  10.1k|#define FALSE false
  ------------------
 1981|  10.1k|  bool appendquery = FALSE;
  ------------------
  |  | 1054|  10.1k|#define FALSE false
  ------------------
 1982|  10.1k|  bool equalsencode = FALSE;
  ------------------
  |  | 1054|  10.1k|#define FALSE false
  ------------------
 1983|  10.1k|  size_t nalloc;
 1984|       |
 1985|  10.1k|  if(!u)
  ------------------
  |  Branch (1985:6): [True: 0, False: 10.1k]
  ------------------
 1986|      0|    return CURLUE_BAD_HANDLE;
 1987|  10.1k|  if(!part)
  ------------------
  |  Branch (1987:6): [True: 0, False: 10.1k]
  ------------------
 1988|       |    /* setting a part to NULL clears it */
 1989|      0|    return urlset_clear(u, what);
 1990|       |
 1991|  10.1k|  nalloc = strlen(part);
 1992|  10.1k|  if(nalloc > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  10.1k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (1992:6): [True: 0, False: 10.1k]
  ------------------
 1993|       |    /* excessive input length */
 1994|      0|    return CURLUE_MALFORMED_INPUT;
 1995|       |
 1996|  10.1k|  switch(what) {
 1997|      0|  case CURLUPART_SCHEME: {
  ------------------
  |  Branch (1997:3): [True: 0, False: 10.1k]
  ------------------
 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: 10.1k]
  ------------------
 2006|      0|    storep = &u->user;
 2007|      0|    break;
 2008|      0|  case CURLUPART_PASSWORD:
  ------------------
  |  Branch (2008:3): [True: 0, False: 10.1k]
  ------------------
 2009|      0|    storep = &u->password;
 2010|      0|    break;
 2011|      0|  case CURLUPART_OPTIONS:
  ------------------
  |  Branch (2011:3): [True: 0, False: 10.1k]
  ------------------
 2012|      0|    storep = &u->options;
 2013|      0|    break;
 2014|      0|  case CURLUPART_HOST:
  ------------------
  |  Branch (2014:3): [True: 0, False: 10.1k]
  ------------------
 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: 10.1k]
  ------------------
 2019|      0|    storep = &u->zoneid;
 2020|      0|    break;
 2021|      7|  case CURLUPART_PORT:
  ------------------
  |  Branch (2021:3): [True: 7, False: 10.1k]
  ------------------
 2022|      7|    return set_url_port(u, part);
 2023|      0|  case CURLUPART_PATH:
  ------------------
  |  Branch (2023:3): [True: 0, False: 10.1k]
  ------------------
 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: 10.1k]
  ------------------
 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: 10.1k]
  ------------------
 2036|      0|    storep = &u->fragment;
 2037|      0|    u->fragment_present = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 2038|      0|    break;
 2039|  10.1k|  case CURLUPART_URL:
  ------------------
  |  Branch (2039:3): [True: 10.1k, False: 7]
  ------------------
 2040|  10.1k|    return set_url(u, part, nalloc, flags);
 2041|      0|  default:
  ------------------
  |  Branch (2041:3): [True: 0, False: 10.1k]
  ------------------
 2042|      0|    return CURLUE_UNKNOWN_PART;
 2043|  10.1k|  }
 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|  6.61k|{
 2114|  6.61k|  if(u->port_present) {
  ------------------
  |  Branch (2114:6): [True: 42, False: 6.57k]
  ------------------
 2115|     42|    *pport = u->portnum;
 2116|     42|    return CURLUE_OK;
 2117|     42|  }
 2118|  6.57k|  else if(u->scheme) {
  ------------------
  |  Branch (2118:11): [True: 6.57k, False: 0]
  ------------------
 2119|  6.57k|    const struct Curl_scheme *s = Curl_get_scheme(u->scheme);
 2120|  6.57k|    if(s && s->defport) {
  ------------------
  |  Branch (2120:8): [True: 6.57k, False: 0]
  |  Branch (2120:13): [True: 6.51k, False: 56]
  ------------------
 2121|  6.51k|      *pport = s->defport;
 2122|  6.51k|      return CURLUE_OK;
 2123|  6.51k|    }
 2124|  6.57k|  }
 2125|     56|  *pport = 0;
 2126|     56|  return CURLUE_NO_PORT;
 2127|  6.61k|}
urlapi.c:parse_authority:
  651|  9.68k|{
  652|  9.68k|  size_t offset;
  653|  9.68k|  CURLUcode uc;
  654|  9.68k|  CURLcode result;
  655|       |
  656|       |  /*
  657|       |   * Parse the login details and strip them out of the hostname.
  658|       |   */
  659|  9.68k|  uc = parse_hostname_login(u, auth, authlen, flags, &offset);
  660|  9.68k|  if(uc)
  ------------------
  |  Branch (660:6): [True: 1, False: 9.68k]
  ------------------
  661|      1|    return uc;
  662|       |
  663|  9.68k|  result = curlx_dyn_addn(host, auth + offset, authlen - offset);
  664|  9.68k|  if(result) {
  ------------------
  |  Branch (664:6): [True: 0, False: 9.68k]
  ------------------
  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|  9.68k|  uc = parse_port(u, host, has_scheme);
  670|  9.68k|  if(uc)
  ------------------
  |  Branch (670:6): [True: 98, False: 9.59k]
  ------------------
  671|     98|    return uc;
  672|       |
  673|  9.59k|  if(!curlx_dyn_len(host))
  ------------------
  |  Branch (673:6): [True: 30, False: 9.56k]
  ------------------
  674|     30|    uc = CURLUE_NO_HOST;
  675|  9.56k|  else
  676|  9.56k|    uc = urldecode_host(host);
  677|  9.59k|  if(uc)
  ------------------
  |  Branch (677:6): [True: 36, False: 9.55k]
  ------------------
  678|     36|    return uc;
  679|       |
  680|  9.55k|  switch(ipv4_normalize(host)) {
  681|  5.78k|  case HOST_IPV4:
  ------------------
  |  |   49|  5.78k|#define HOST_IPV4    2
  ------------------
  |  Branch (681:3): [True: 5.78k, False: 3.77k]
  ------------------
  682|  5.78k|    break;
  683|    268|  case HOST_IPV6:
  ------------------
  |  |   50|    268|#define HOST_IPV6    3
  ------------------
  |  Branch (683:3): [True: 268, False: 9.28k]
  ------------------
  684|    268|    uc = ipv6_parse(u, curlx_dyn_ptr(host), curlx_dyn_len(host));
  685|    268|    break;
  686|  3.50k|  case HOST_NAME:
  ------------------
  |  |   48|  3.50k|#define HOST_NAME    1
  ------------------
  |  Branch (686:3): [True: 3.50k, False: 6.05k]
  ------------------
  687|  3.50k|    uc = hostname_check(u, curlx_dyn_ptr(host), curlx_dyn_len(host));
  688|  3.50k|    break;
  689|      0|  case HOST_ERROR:
  ------------------
  |  |   47|      0|#define HOST_ERROR   (-1) /* out of memory */
  ------------------
  |  Branch (689:3): [True: 0, False: 9.55k]
  ------------------
  690|      0|    uc = CURLUE_OUT_OF_MEMORY;
  691|      0|    break;
  692|      0|  default:
  ------------------
  |  Branch (692:3): [True: 0, False: 9.55k]
  ------------------
  693|      0|    uc = CURLUE_BAD_HOSTNAME; /* Bad IPv4 address even */
  694|      0|    break;
  695|  9.55k|  }
  696|       |
  697|  9.55k|  return uc;
  698|  9.55k|}
urlapi.c:urldecode_host:
  621|  9.56k|{
  622|  9.56k|  const char *per;
  623|  9.56k|  const char *hostname = curlx_dyn_ptr(host);
  624|  9.56k|  per = strchr(hostname, '%');
  625|  9.56k|  if(!per)
  ------------------
  |  Branch (625:6): [True: 9.36k, False: 194]
  ------------------
  626|       |    /* nothing to decode */
  627|  9.36k|    return CURLUE_OK;
  628|    194|  else {
  629|       |    /* encoded */
  630|    194|    size_t dlen;
  631|    194|    char *decoded;
  632|    194|    CURLcode result = Curl_urldecode(hostname, 0, &decoded, &dlen,
  633|    194|                                     REJECT_CTRL);
  634|    194|    if(result)
  ------------------
  |  Branch (634:8): [True: 6, False: 188]
  ------------------
  635|      6|      return CURLUE_BAD_HOSTNAME;
  636|    188|    curlx_dyn_reset(host);
  637|    188|    result = curlx_dyn_addn(host, decoded, dlen);
  638|    188|    curlx_free(decoded);
  ------------------
  |  | 1488|    188|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  639|    188|    if(result)
  ------------------
  |  Branch (639:8): [True: 0, False: 188]
  ------------------
  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|    188|  }
  642|       |
  643|    188|  return CURLUE_OK;
  644|  9.56k|}
urlapi.c:hostname_check:
  471|  3.50k|{
  472|  3.50k|  size_t len;
  473|  3.50k|  DEBUGASSERT(hostname);
  ------------------
  |  | 1077|  3.50k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (473:3): [True: 0, False: 3.50k]
  |  Branch (473:3): [True: 3.50k, False: 0]
  ------------------
  474|       |
  475|  3.50k|  if(!hlen)
  ------------------
  |  Branch (475:6): [True: 0, False: 3.50k]
  ------------------
  476|      0|    return CURLUE_NO_HOST;
  477|  3.50k|  else if(hostname[0] == '[')
  ------------------
  |  Branch (477:11): [True: 0, False: 3.50k]
  ------------------
  478|      0|    return ipv6_parse(u, hostname, hlen);
  479|  3.50k|  else {
  480|       |    /* letters from the second string are not ok */
  481|  3.50k|    len = strcspn(hostname, HOSTNAME_INVALID_CHARS);
  ------------------
  |  |   59|  3.50k|#define HOSTNAME_INVALID_CHARS " \r\n\t/:#?!@{}[]\\$\'\"^`*<>=;,+&()%|"
  ------------------
  482|  3.50k|    if(hlen != len)
  ------------------
  |  Branch (482:8): [True: 107, False: 3.39k]
  ------------------
  483|       |      /* hostname with bad content */
  484|    107|      return CURLUE_BAD_HOSTNAME;
  485|  3.39k|    else if((hlen >= 2) &&
  ------------------
  |  Branch (485:13): [True: 1.45k, False: 1.94k]
  ------------------
  486|  1.45k|            (hostname[hlen - 1] == '.') && (hostname[hlen - 2] == '.'))
  ------------------
  |  Branch (486:13): [True: 154, False: 1.30k]
  |  Branch (486:44): [True: 8, False: 146]
  ------------------
  487|       |      /* more than one trailing dot is not allowed */
  488|      8|      return CURLUE_BAD_HOSTNAME;
  489|  3.38k|    else if((hlen == 1) && (hostname[0] == '.'))
  ------------------
  |  Branch (489:13): [True: 1.94k, False: 1.44k]
  |  Branch (489:28): [True: 7, False: 1.93k]
  ------------------
  490|       |      /* a single dot alone is not allowed */
  491|      7|      return CURLUE_BAD_HOSTNAME;
  492|  3.50k|  }
  493|  3.38k|  return CURLUE_OK;
  494|  3.50k|}
urlapi.c:is_dot:
  726|  5.00M|{
  727|  5.00M|  const char *p = *str;
  728|  5.00M|  if(*p == '.') {
  ------------------
  |  Branch (728:6): [True: 33.5k, False: 4.97M]
  ------------------
  729|  33.5k|    (*str)++;
  730|  33.5k|    (*clen)--;
  731|  33.5k|    return TRUE;
  ------------------
  |  | 1051|  33.5k|#define TRUE true
  ------------------
  732|  33.5k|  }
  733|  4.97M|  else if((*clen >= 3) &&
  ------------------
  |  Branch (733:11): [True: 4.97M, False: 722]
  ------------------
  734|  4.97M|          (p[0] == '%') && (p[1] == '2') && ((p[2] | 0x20) == 'e')) {
  ------------------
  |  Branch (734:11): [True: 1.98k, False: 4.96M]
  |  Branch (734:28): [True: 292, False: 1.68k]
  |  Branch (734:45): [True: 71, False: 221]
  ------------------
  735|     71|    *str += 3;
  736|     71|    *clen -= 3;
  737|     71|    return TRUE;
  ------------------
  |  | 1051|     71|#define TRUE true
  ------------------
  738|     71|  }
  739|  4.97M|  return FALSE;
  ------------------
  |  | 1054|  4.97M|#define FALSE false
  ------------------
  740|  5.00M|}
urlapi.c:free_urlhandle:
   73|  20.0k|{
   74|  20.0k|  curlx_free(u->scheme);
  ------------------
  |  | 1488|  20.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   75|  20.0k|  curlx_free(u->user);
  ------------------
  |  | 1488|  20.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   76|  20.0k|  curlx_free(u->password);
  ------------------
  |  | 1488|  20.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   77|  20.0k|  curlx_free(u->options);
  ------------------
  |  | 1488|  20.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   78|  20.0k|  curlx_free(u->host);
  ------------------
  |  | 1488|  20.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   79|  20.0k|  curlx_free(u->zoneid);
  ------------------
  |  | 1488|  20.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   80|  20.0k|  curlx_free(u->path);
  ------------------
  |  | 1488|  20.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   81|  20.0k|  curlx_free(u->query);
  ------------------
  |  | 1488|  20.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   82|  20.0k|  curlx_free(u->fragment);
  ------------------
  |  | 1488|  20.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   83|  20.0k|}
urlapi.c:urlget_url:
 1471|  10.3k|{
 1472|  10.3k|  char *url;
 1473|  10.3k|  char *allochost = NULL;
 1474|  10.3k|  const char *fragmentsep =
 1475|  10.3k|    (u->fragment || (u->fragment_present && flags & CURLU_GET_EMPTY)) ?
  ------------------
  |  |  102|     35|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1475:6): [True: 113, False: 10.1k]
  |  Branch (1475:22): [True: 35, False: 10.1k]
  |  Branch (1475:45): [True: 35, False: 0]
  ------------------
 1476|  10.1k|    "#" : "";
 1477|  10.3k|  const char *querysep = ((u->query && u->query[0]) ||
  ------------------
  |  Branch (1477:28): [True: 551, False: 9.75k]
  |  Branch (1477:40): [True: 490, False: 61]
  ------------------
 1478|  9.81k|                          (u->query_present && flags & CURLU_GET_EMPTY)) ?
  ------------------
  |  |  102|     61|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1478:28): [True: 61, False: 9.75k]
  |  Branch (1478:48): [True: 61, False: 0]
  ------------------
 1479|  9.75k|    "?" : "";
 1480|  10.3k|  char portbuf[7];
 1481|  10.3k|  if(curl_strequal("file", u->scheme))
  ------------------
  |  Branch (1481:6): [True: 56, False: 10.2k]
  ------------------
 1482|     56|    return file_url(u, part, fragmentsep, querysep);
 1483|  10.2k|  else if(!u->host)
  ------------------
  |  Branch (1483:11): [True: 3.51k, False: 6.73k]
  ------------------
 1484|  3.51k|    return CURLUE_NO_HOST;
 1485|  6.73k|  else {
 1486|  6.73k|    const char *scheme;
 1487|  6.73k|    char *options = u->options;
 1488|  6.73k|    char *port = NULL;
 1489|  6.73k|    const struct Curl_scheme *h = NULL;
 1490|  6.73k|    char schemebuf[MAX_SCHEME_LEN + 5];
 1491|  6.73k|    if(u->scheme)
  ------------------
  |  Branch (1491:8): [True: 6.73k, False: 0]
  ------------------
 1492|  6.73k|      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|  6.73k|    if(u->port_present) {
  ------------------
  |  Branch (1498:8): [True: 47, False: 6.68k]
  ------------------
 1499|     47|      curl_msnprintf(portbuf, sizeof(portbuf), "%u", u->portnum);
 1500|     47|      port = portbuf;
 1501|     47|    }
 1502|       |
 1503|  6.73k|    h = Curl_get_scheme(scheme);
 1504|  6.73k|    if(h) {
  ------------------
  |  Branch (1504:8): [True: 6.69k, False: 41]
  ------------------
 1505|  6.69k|      if(!u->port_present && (flags & CURLU_DEFAULT_PORT)) {
  ------------------
  |  |   84|  6.64k|#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
  ------------------
  |  Branch (1505:10): [True: 6.64k, False: 47]
  |  Branch (1505:30): [True: 0, False: 6.64k]
  ------------------
 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|  6.69k|      else if(u->port_present && (h->defport == u->portnum) &&
  ------------------
  |  Branch (1511:15): [True: 47, False: 6.64k]
  |  Branch (1511:34): [True: 6, False: 41]
  ------------------
 1512|      6|              (flags & CURLU_NO_DEFAULT_PORT)) {
  ------------------
  |  |   85|      6|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  |  Branch (1512:15): [True: 0, False: 6]
  ------------------
 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|  6.69k|      if(!(h->flags & PROTOPT_URLOPTIONS))
  ------------------
  |  |  225|  6.69k|#define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo
  ------------------
  |  Branch (1518:10): [True: 6.68k, False: 6]
  ------------------
 1519|  6.68k|        options = NULL;
 1520|  6.69k|    }
 1521|       |
 1522|  6.73k|    if(u->host[0] == '[') {
  ------------------
  |  Branch (1522:8): [True: 156, False: 6.57k]
  ------------------
 1523|    156|      if(u->zoneid) {
  ------------------
  |  Branch (1523:10): [True: 20, False: 136]
  ------------------
 1524|       |        /* make it '[ host %25 zoneid ]' */
 1525|     20|        struct dynbuf enc;
 1526|     20|        size_t hostlen = strlen(u->host);
 1527|     20|        curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|     20|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1528|     20|        if(curlx_dyn_addf(&enc, "%.*s%%25%s]", (int)hostlen - 1, u->host,
  ------------------
  |  Branch (1528:12): [True: 0, False: 20]
  ------------------
 1529|     20|                          u->zoneid))
 1530|      0|          return CURLUE_OUT_OF_MEMORY;
 1531|     20|        allochost = curlx_dyn_ptr(&enc);
 1532|     20|      }
 1533|    156|    }
 1534|  6.57k|    else if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   94|  6.57k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1534:13): [True: 0, False: 6.57k]
  ------------------
 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|  6.57k|    else if(flags & CURLU_PUNYCODE) {
  ------------------
  |  |  100|  6.57k|#define CURLU_PUNYCODE (1 << 12)          /* get the hostname in punycode */
  ------------------
  |  Branch (1539:13): [True: 0, False: 6.57k]
  ------------------
 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|  6.57k|    else if(flags & CURLU_PUNY2IDN) {
  ------------------
  |  |  101|  6.57k|#define CURLU_PUNY2IDN (1 << 13)          /* punycode => IDN conversion */
  ------------------
  |  Branch (1546:13): [True: 0, False: 6.57k]
  ------------------
 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|  6.73k|    if(!(flags & CURLU_NO_GUESS_SCHEME) || !u->guessed_scheme)
  ------------------
  |  |  105|  6.73k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  |  Branch (1554:8): [True: 6.73k, False: 0]
  |  Branch (1554:44): [True: 0, False: 0]
  ------------------
 1555|  6.73k|      curl_msnprintf(schemebuf, sizeof(schemebuf), "%s://", scheme);
 1556|      0|    else
 1557|      0|      schemebuf[0] = 0;
 1558|       |
 1559|  6.73k|    url = curl_maprintf("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
 1560|  6.73k|                        schemebuf,
 1561|  6.73k|                        u->user ? u->user : "",
  ------------------
  |  Branch (1561:25): [True: 258, False: 6.47k]
  ------------------
 1562|  6.73k|                        u->password ? ":" : "",
  ------------------
  |  Branch (1562:25): [True: 60, False: 6.67k]
  ------------------
 1563|  6.73k|                        u->password ? u->password : "",
  ------------------
  |  Branch (1563:25): [True: 60, False: 6.67k]
  ------------------
 1564|  6.73k|                        options ? ";" : "",
  ------------------
  |  Branch (1564:25): [True: 1, False: 6.73k]
  ------------------
 1565|  6.73k|                        options ? options : "",
  ------------------
  |  Branch (1565:25): [True: 1, False: 6.73k]
  ------------------
 1566|  6.73k|                        (u->user || u->password || options) ? "@" : "",
  ------------------
  |  Branch (1566:26): [True: 258, False: 6.47k]
  |  Branch (1566:37): [True: 0, False: 6.47k]
  |  Branch (1566:52): [True: 0, False: 6.47k]
  ------------------
 1567|  6.73k|                        allochost ? allochost : u->host,
  ------------------
  |  Branch (1567:25): [True: 20, False: 6.71k]
  ------------------
 1568|  6.73k|                        port ? ":" : "",
  ------------------
  |  Branch (1568:25): [True: 47, False: 6.68k]
  ------------------
 1569|  6.73k|                        port ? port : "",
  ------------------
  |  Branch (1569:25): [True: 47, False: 6.68k]
  ------------------
 1570|  6.73k|                        u->path ? u->path : "/",
  ------------------
  |  Branch (1570:25): [True: 676, False: 6.05k]
  ------------------
 1571|  6.73k|                        querysep,
 1572|  6.73k|                        u->query ? u->query : "",
  ------------------
  |  Branch (1572:25): [True: 546, False: 6.18k]
  ------------------
 1573|  6.73k|                        fragmentsep,
 1574|  6.73k|                        u->fragment ? u->fragment : "");
  ------------------
  |  Branch (1574:25): [True: 109, False: 6.62k]
  ------------------
 1575|  6.73k|    curlx_free(allochost);
  ------------------
  |  | 1488|  6.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1576|  6.73k|  }
 1577|  6.73k|  if(!url)
  ------------------
  |  Branch (1577:6): [True: 0, False: 6.73k]
  ------------------
 1578|      0|    return CURLUE_OUT_OF_MEMORY;
 1579|  6.73k|  *part = url;
 1580|  6.73k|  return CURLUE_OK;
 1581|  6.73k|}
urlapi.c:file_url:
 1459|     56|{
 1460|     56|  char *url = curl_maprintf("file://%s%s%s%s%s",
 1461|     56|                            u->path, querysep, u->query ? u->query : "",
  ------------------
  |  Branch (1461:48): [True: 5, False: 51]
  ------------------
 1462|     56|                            fragmentsep, u->fragment ? u->fragment : "");
  ------------------
  |  Branch (1462:42): [True: 4, False: 52]
  ------------------
 1463|     56|  if(!url)
  ------------------
  |  Branch (1463:6): [True: 0, False: 56]
  ------------------
 1464|      0|    return CURLUE_OUT_OF_MEMORY;
 1465|       |
 1466|     56|  *part = url;
 1467|     56|  return CURLUE_OK;
 1468|     56|}
urlapi.c:urlget_format:
 1389|  26.2k|{
 1390|  26.2k|  CURLUcode uc = CURLUE_OK;
 1391|  26.2k|  size_t partlen = strlen(ptr);
 1392|  26.2k|  bool urldecode = (flags & CURLU_URLDECODE) ? 1 : 0;
  ------------------
  |  |   93|  26.2k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  |  Branch (1392:20): [True: 4.45k, False: 21.8k]
  ------------------
 1393|  26.2k|  bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
  ------------------
  |  |   94|  26.2k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1393:20): [True: 6.62k, False: 19.6k]
  ------------------
 1394|  26.2k|  bool punycode = (flags & CURLU_PUNYCODE) && (what == CURLUPART_HOST);
  ------------------
  |  |  100|  26.2k|#define CURLU_PUNYCODE (1 << 12)          /* get the hostname in punycode */
  ------------------
  |  Branch (1394:19): [True: 0, False: 26.2k]
  |  Branch (1394:47): [True: 0, False: 0]
  ------------------
 1395|  26.2k|  bool depunyfy = (flags & CURLU_PUNY2IDN) && (what == CURLUPART_HOST);
  ------------------
  |  |  101|  26.2k|#define CURLU_PUNY2IDN (1 << 13)          /* punycode => IDN conversion */
  ------------------
  |  Branch (1395:19): [True: 0, False: 26.2k]
  |  Branch (1395:47): [True: 0, False: 0]
  ------------------
 1396|  26.2k|  char *part = curlx_memdup0(ptr, partlen);
 1397|  26.2k|  *partp = NULL;
 1398|  26.2k|  if(!part)
  ------------------
  |  Branch (1398:6): [True: 0, False: 26.2k]
  ------------------
 1399|      0|    return CURLUE_OUT_OF_MEMORY;
 1400|  26.2k|  if(plusdecode) {
  ------------------
  |  Branch (1400:6): [True: 0, False: 26.2k]
  ------------------
 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|  26.2k|  if(urldecode) {
  ------------------
  |  Branch (1409:6): [True: 4.45k, False: 21.8k]
  ------------------
 1410|  4.45k|    char *decoded;
 1411|  4.45k|    size_t dlen;
 1412|       |    /* this unconditional rejection of control bytes is documented API
 1413|       |       behavior */
 1414|  4.45k|    CURLcode result = Curl_urldecode(part, partlen, &decoded, &dlen,
 1415|  4.45k|                                     REJECT_CTRL);
 1416|  4.45k|    curlx_free(part);
  ------------------
  |  | 1488|  4.45k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1417|  4.45k|    if(result)
  ------------------
  |  Branch (1417:8): [True: 3, False: 4.44k]
  ------------------
 1418|      3|      return CURLUE_URLDECODE;
 1419|  4.44k|    part = decoded;
 1420|  4.44k|    partlen = dlen;
 1421|  4.44k|  }
 1422|  26.2k|  if(urlencode) {
  ------------------
  |  Branch (1422:6): [True: 6.62k, False: 19.6k]
  ------------------
 1423|  6.62k|    struct dynbuf enc;
 1424|  6.62k|    curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  6.62k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1425|  6.62k|    uc = urlencode_str(&enc, part, partlen, TRUE, what == CURLUPART_QUERY ?
  ------------------
  |  | 1051|  6.62k|#define TRUE true
  ------------------
  |  Branch (1425:51): [True: 0, False: 6.62k]
  ------------------
 1426|  6.62k|                       QUERY_YES : QUERY_NO);
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
                                     QUERY_YES : QUERY_NO);
  ------------------
  |  |   52|  13.2k|#define QUERY_NO      2
  ------------------
 1427|  6.62k|    curlx_free(part);
  ------------------
  |  | 1488|  6.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1428|  6.62k|    if(uc)
  ------------------
  |  Branch (1428:8): [True: 0, False: 6.62k]
  ------------------
 1429|      0|      return uc;
 1430|  6.62k|    part = curlx_dyn_ptr(&enc);
 1431|  6.62k|  }
 1432|  19.6k|  else if(punycode) {
  ------------------
  |  Branch (1432:11): [True: 0, False: 19.6k]
  ------------------
 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|  19.6k|  else if(depunyfy) {
  ------------------
  |  Branch (1442:11): [True: 0, False: 19.6k]
  ------------------
 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|  26.2k|  *partp = part;
 1453|  26.2k|  return CURLUE_OK;
 1454|  26.2k|}
urlapi.c:set_url_port:
 1716|      7|{
 1717|      7|  curl_off_t port;
 1718|      7|  if(!ISDIGIT(provided_port[0]))
  ------------------
  |  |   44|      7|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 7, False: 0]
  |  |  |  Branch (44:38): [True: 7, False: 0]
  |  |  ------------------
  ------------------
 1719|       |    /* not a number */
 1720|      0|    return CURLUE_BAD_PORT_NUMBER;
 1721|      7|  if(curlx_str_number(&provided_port, &port, 0xffff) || *provided_port)
  ------------------
  |  Branch (1721:6): [True: 0, False: 7]
  |  Branch (1721:57): [True: 0, False: 7]
  ------------------
 1722|       |    /* weirdly provided number, not good! */
 1723|      0|    return CURLUE_BAD_PORT_NUMBER;
 1724|      7|  u->portnum = (uint16_t)port;
 1725|       |  u->port_present = TRUE;
  ------------------
  |  | 1051|      7|#define TRUE true
  ------------------
 1726|      7|  return CURLUE_OK;
 1727|      7|}
urlapi.c:set_url:
 1731|  10.1k|{
 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|  10.1k|  CURLUcode uc;
 1739|  10.1k|  char *oldurl = NULL;
 1740|       |
 1741|  10.1k|  if(!part_size) {
  ------------------
  |  Branch (1741:6): [True: 283, False: 9.87k]
  ------------------
 1742|       |    /* a blank URL is not a valid URL unless we already have a complete one
 1743|       |       and this is a redirect */
 1744|    283|    uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags);
 1745|    283|    if(!uc) {
  ------------------
  |  Branch (1745:8): [True: 0, False: 283]
  ------------------
 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|    283|    if(uc == CURLUE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1754:8): [True: 0, False: 283]
  ------------------
 1755|      0|      return uc;
 1756|    283|    return CURLUE_MALFORMED_INPUT;
 1757|    283|  }
 1758|       |
 1759|       |  /* if the new URL is absolute replace the existing with the new. */
 1760|  9.87k|  if(Curl_is_absolute_url(url, NULL, 0,
  ------------------
  |  Branch (1760:6): [True: 6.64k, False: 3.23k]
  ------------------
 1761|  9.87k|                          flags & (CURLU_GUESS_SCHEME | CURLU_DEFAULT_SCHEME)))
  ------------------
  |  |   96|  9.87k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
                                        flags & (CURLU_GUESS_SCHEME | CURLU_DEFAULT_SCHEME)))
  ------------------
  |  |   88|  9.87k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
 1762|  6.64k|    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.23k|  uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags & ~CURLU_NO_GUESS_SCHEME);
  ------------------
  |  |  105|  3.23k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
 1768|  3.23k|  if(uc == CURLUE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1768:6): [True: 0, False: 3.23k]
  ------------------
 1769|      0|    return uc;
 1770|  3.23k|  else if(uc)
  ------------------
  |  Branch (1770:11): [True: 3.23k, False: 0]
  ------------------
 1771|  3.23k|    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|  9.87k|{
 1225|  9.87k|  CURLUcode ures;
 1226|  9.87k|  CURLU tmpurl;
 1227|  9.87k|  memset(&tmpurl, 0, sizeof(tmpurl));
 1228|  9.87k|  ures = parseurl(url, &tmpurl, flags);
 1229|  9.87k|  if(!ures) {
  ------------------
  |  Branch (1229:6): [True: 9.40k, False: 473]
  ------------------
 1230|  9.40k|    free_urlhandle(u);
 1231|  9.40k|    *u = tmpurl;
 1232|  9.40k|  }
 1233|  9.87k|  return ures;
 1234|  9.87k|}
urlapi.c:parseurl:
 1134|  9.87k|{
 1135|  9.87k|  const char *path;
 1136|  9.87k|  size_t pathlen;
 1137|  9.87k|  char schemebuf[MAX_SCHEME_LEN + 1];
 1138|  9.87k|  size_t schemelen = 0;
 1139|  9.87k|  size_t urllen;
 1140|  9.87k|  CURLUcode ures = CURLUE_OK;
 1141|  9.87k|  struct dynbuf host;
 1142|  9.87k|  bool is_file = FALSE;
  ------------------
  |  | 1054|  9.87k|#define FALSE false
  ------------------
 1143|       |
 1144|  9.87k|  DEBUGASSERT(url);
  ------------------
  |  | 1077|  9.87k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1144:3): [True: 0, False: 9.87k]
  |  Branch (1144:3): [True: 9.87k, False: 0]
  ------------------
 1145|       |
 1146|  9.87k|  curlx_dyn_init(&host, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  9.87k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1147|       |
 1148|  9.87k|  ures = Curl_junkscan(url, &urllen, !!(flags & CURLU_ALLOW_SPACE));
  ------------------
  |  |   99|  9.87k|#define CURLU_ALLOW_SPACE (1 << 11)       /* Allow spaces in the URL */
  ------------------
 1149|  9.87k|  if(ures)
  ------------------
  |  Branch (1149:6): [True: 33, False: 9.84k]
  ------------------
 1150|     33|    goto fail;
 1151|       |
 1152|  9.84k|  schemelen = Curl_is_absolute_url(url, schemebuf, sizeof(schemebuf),
 1153|  9.84k|                                   flags & (CURLU_GUESS_SCHEME |
  ------------------
  |  |   96|  9.84k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 1154|  9.84k|                                            CURLU_DEFAULT_SCHEME));
  ------------------
  |  |   88|  9.84k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
 1155|       |
 1156|       |  /* handle the file: scheme */
 1157|  9.84k|  if(schemelen && !strcmp(schemebuf, "file")) {
  ------------------
  |  Branch (1157:6): [True: 6.62k, False: 3.21k]
  |  Branch (1157:19): [True: 101, False: 6.52k]
  ------------------
 1158|    101|    is_file = TRUE;
  ------------------
  |  | 1051|    101|#define TRUE true
  ------------------
 1159|    101|    ures = parse_file(url, urllen, u, &path, &pathlen);
 1160|    101|  }
 1161|  9.74k|  else {
 1162|  9.74k|    const char *hostp = NULL;
 1163|  9.74k|    size_t hostlen;
 1164|  9.74k|    ures = parse_scheme(url, u, schemebuf, schemelen, flags, &hostp);
 1165|  9.74k|    if(ures)
  ------------------
  |  Branch (1165:8): [True: 3, False: 9.74k]
  ------------------
 1166|      3|      goto fail;
 1167|       |
 1168|       |    /* find the end of the hostname + port number */
 1169|  9.74k|    hostlen = strcspn(hostp, "/?#");
 1170|  9.74k|    path = &hostp[hostlen];
 1171|       |
 1172|       |    /* this pathlen also contains the query and the fragment */
 1173|  9.74k|    pathlen = urllen - (path - url);
 1174|  9.74k|    if(hostlen) {
  ------------------
  |  Branch (1174:8): [True: 9.68k, False: 53]
  ------------------
 1175|  9.68k|      ures = parse_authority(u, hostp, hostlen, flags, &host, !!u->scheme);
 1176|  9.68k|      if(!ures && (flags & CURLU_GUESS_SCHEME) && !u->scheme)
  ------------------
  |  |   96|  9.35k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  |  Branch (1176:10): [True: 9.35k, False: 339]
  |  Branch (1176:19): [True: 9.35k, False: 0]
  |  Branch (1176:51): [True: 2.98k, False: 6.36k]
  ------------------
 1177|  2.98k|        ures = guess_scheme(u, &host);
 1178|  9.68k|    }
 1179|     53|    else if(flags & CURLU_NO_AUTHORITY) {
  ------------------
  |  |   97|     53|#define CURLU_NO_AUTHORITY (1 << 10)      /* Allow empty authority when the
  ------------------
  |  Branch (1179:13): [True: 0, False: 53]
  ------------------
 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|     53|    else
 1185|     53|      ures = CURLUE_NO_HOST;
 1186|  9.74k|  }
 1187|  9.84k|  if(!ures) {
  ------------------
  |  Branch (1187:6): [True: 9.40k, False: 437]
  ------------------
 1188|       |    /* The path might at this point contain a fragment and/or a query to
 1189|       |       handle */
 1190|  9.40k|    const char *fragment = strchr(path, '#');
 1191|  9.40k|    if(fragment) {
  ------------------
  |  Branch (1191:8): [True: 157, False: 9.24k]
  ------------------
 1192|    157|      size_t fraglen = pathlen - (fragment - path);
 1193|    157|      ures = handle_fragment(u, fragment, fraglen, flags);
 1194|       |      /* after this, pathlen still contains the query */
 1195|    157|      pathlen -= fraglen;
 1196|    157|    }
 1197|  9.40k|  }
 1198|  9.84k|  if(!ures) {
  ------------------
  |  Branch (1198:6): [True: 9.40k, False: 437]
  ------------------
 1199|  9.40k|    const char *query = memchr(path, '?', pathlen);
 1200|  9.40k|    if(query) {
  ------------------
  |  Branch (1200:8): [True: 636, False: 8.77k]
  ------------------
 1201|    636|      size_t qlen = pathlen - (query - path);
 1202|    636|      ures = handle_query(u, query, qlen, flags);
 1203|    636|      pathlen -= qlen;
 1204|    636|    }
 1205|  9.40k|  }
 1206|  9.84k|  if(!ures)
  ------------------
  |  Branch (1206:6): [True: 9.40k, False: 437]
  ------------------
 1207|       |    /* the fragment and query parts are trimmed off from the path */
 1208|  9.40k|    ures = handle_path(u, path, pathlen, flags, is_file);
 1209|  9.84k|  if(!ures) {
  ------------------
  |  Branch (1209:6): [True: 9.40k, False: 437]
  ------------------
 1210|  9.40k|    u->host = curlx_dyn_ptr(&host);
 1211|  9.40k|    return CURLUE_OK;
 1212|  9.40k|  }
 1213|    473|fail:
 1214|    473|  curlx_dyn_free(&host);
 1215|    473|  free_urlhandle(u);
 1216|    473|  return ures;
 1217|  9.84k|}
urlapi.c:parse_scheme:
  963|  9.74k|{
  964|       |  /* clear path */
  965|  9.74k|  const char *schemep = NULL;
  966|       |
  967|  9.74k|  if(schemelen) {
  ------------------
  |  Branch (967:6): [True: 6.52k, False: 3.21k]
  ------------------
  968|  6.52k|    int i = 0;
  969|  6.52k|    const char *p = &url[schemelen + 1];
  970|  13.8k|    while((*p == '/') && (i < 4)) {
  ------------------
  |  Branch (970:11): [True: 7.30k, False: 6.52k]
  |  Branch (970:26): [True: 7.30k, False: 0]
  ------------------
  971|  7.30k|      p++;
  972|  7.30k|      i++;
  973|  7.30k|    }
  974|       |
  975|  6.52k|    schemep = schemebuf;
  976|  6.52k|    if(!Curl_get_scheme(schemep) &&
  ------------------
  |  Branch (976:8): [True: 64, False: 6.46k]
  ------------------
  977|     64|       !(flags & CURLU_NON_SUPPORT_SCHEME))
  ------------------
  |  |   90|     64|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
  |  Branch (977:8): [True: 0, False: 64]
  ------------------
  978|      0|      return CURLUE_UNSUPPORTED_SCHEME;
  979|       |
  980|  6.52k|    if((i < 1) || (i > 3))
  ------------------
  |  Branch (980:8): [True: 0, False: 6.52k]
  |  Branch (980:19): [True: 3, False: 6.52k]
  ------------------
  981|       |      /* less than one or more than three slashes */
  982|      3|      return CURLUE_BAD_SLASHES;
  983|       |
  984|  6.52k|    *hostpp = p; /* hostname starts here */
  985|  6.52k|  }
  986|  3.21k|  else {
  987|       |    /* no scheme! */
  988|       |
  989|  3.21k|    if(!(flags & (CURLU_DEFAULT_SCHEME | CURLU_GUESS_SCHEME)))
  ------------------
  |  |   88|  3.21k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
                  if(!(flags & (CURLU_DEFAULT_SCHEME | CURLU_GUESS_SCHEME)))
  ------------------
  |  |   96|  3.21k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  |  Branch (989:8): [True: 0, False: 3.21k]
  ------------------
  990|      0|      return CURLUE_BAD_SCHEME;
  991|       |
  992|  3.21k|    if(flags & CURLU_DEFAULT_SCHEME)
  ------------------
  |  |   88|  3.21k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
  |  Branch (992:8): [True: 0, False: 3.21k]
  ------------------
  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.21k|    *hostpp = url;
  999|  3.21k|  }
 1000|       |
 1001|  9.74k|  if(schemep) {
  ------------------
  |  Branch (1001:6): [True: 6.52k, False: 3.21k]
  ------------------
 1002|  6.52k|    u->scheme = curlx_strdup(schemep);
  ------------------
  |  | 1482|  6.52k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1003|  6.52k|    if(!u->scheme)
  ------------------
  |  Branch (1003:8): [True: 0, False: 6.52k]
  ------------------
 1004|      0|      return CURLUE_OUT_OF_MEMORY;
 1005|  6.52k|  }
 1006|  9.74k|  return CURLUE_OK;
 1007|  9.74k|}
urlapi.c:guess_scheme:
 1010|  2.98k|{
 1011|  2.98k|  const char *hostname = curlx_dyn_ptr(host);
 1012|  2.98k|  const char *schemep = NULL;
 1013|       |  /* legacy curl-style guess based on hostname */
 1014|  2.98k|  if(checkprefix("ftp.", hostname))
  ------------------
  |  |   33|  2.98k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  2.98k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 2.98k]
  |  |  ------------------
  ------------------
 1015|      1|    schemep = "ftp";
 1016|  2.98k|  else if(checkprefix("dict.", hostname))
  ------------------
  |  |   33|  2.98k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  2.98k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 2.98k]
  |  |  ------------------
  ------------------
 1017|      1|    schemep = "dict";
 1018|  2.98k|  else if(checkprefix("ldap.", hostname))
  ------------------
  |  |   33|  2.98k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  2.98k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 2.98k]
  |  |  ------------------
  ------------------
 1019|      1|    schemep = "ldap";
 1020|  2.98k|  else if(checkprefix("imap.", hostname))
  ------------------
  |  |   33|  2.98k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  2.98k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 2.98k]
  |  |  ------------------
  ------------------
 1021|      1|    schemep = "imap";
 1022|  2.98k|  else if(checkprefix("smtp.", hostname))
  ------------------
  |  |   33|  2.98k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  2.98k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 2.98k]
  |  |  ------------------
  ------------------
 1023|      1|    schemep = "smtp";
 1024|  2.98k|  else if(checkprefix("pop3.", hostname))
  ------------------
  |  |   33|  2.98k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  2.98k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 2.98k]
  |  |  ------------------
  ------------------
 1025|      1|    schemep = "pop3";
 1026|  2.98k|  else
 1027|  2.98k|    schemep = "http";
 1028|       |
 1029|  2.98k|  u->scheme = curlx_strdup(schemep);
  ------------------
  |  | 1482|  2.98k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1030|  2.98k|  if(!u->scheme)
  ------------------
  |  Branch (1030:6): [True: 0, False: 2.98k]
  ------------------
 1031|      0|    return CURLUE_OUT_OF_MEMORY;
 1032|       |
 1033|  2.98k|  u->guessed_scheme = TRUE;
  ------------------
  |  | 1051|  2.98k|#define TRUE true
  ------------------
 1034|  2.98k|  return CURLUE_OK;
 1035|  2.98k|}
urlapi.c:handle_fragment:
 1039|    157|{
 1040|    157|  CURLUcode ures;
 1041|    157|  u->fragment_present = TRUE;
  ------------------
  |  | 1051|    157|#define TRUE true
  ------------------
 1042|    157|  if(fraglen > 1) {
  ------------------
  |  Branch (1042:6): [True: 118, False: 39]
  ------------------
 1043|       |    /* skip the leading '#' in the copy but include the null-terminator */
 1044|    118|    if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   94|    118|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1044:8): [True: 0, False: 118]
  ------------------
 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|    118|    else {
 1053|    118|      u->fragment = curlx_memdup0(fragment + 1, fraglen - 1);
 1054|    118|      if(!u->fragment)
  ------------------
  |  Branch (1054:10): [True: 0, False: 118]
  ------------------
 1055|      0|        return CURLUE_OUT_OF_MEMORY;
 1056|    118|    }
 1057|    118|  }
 1058|    157|  return CURLUE_OK;
 1059|    157|}
urlapi.c:handle_query:
 1063|    636|{
 1064|    636|  u->query_present = TRUE;
  ------------------
  |  | 1051|    636|#define TRUE true
  ------------------
 1065|    636|  if(qlen > 1) {
  ------------------
  |  Branch (1065:6): [True: 546, False: 90]
  ------------------
 1066|    546|    if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   94|    546|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1066:8): [True: 0, False: 546]
  ------------------
 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|    546|    else {
 1077|    546|      u->query = curlx_memdup0(query + 1, qlen - 1);
 1078|    546|      if(!u->query)
  ------------------
  |  Branch (1078:10): [True: 0, False: 546]
  ------------------
 1079|      0|        return CURLUE_OUT_OF_MEMORY;
 1080|    546|    }
 1081|    546|  }
 1082|     90|  else {
 1083|       |    /* single byte query */
 1084|     90|    u->query = curlx_strdup("");
  ------------------
  |  | 1482|     90|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1085|     90|    if(!u->query)
  ------------------
  |  Branch (1085:8): [True: 0, False: 90]
  ------------------
 1086|      0|      return CURLUE_OUT_OF_MEMORY;
 1087|     90|  }
 1088|    636|  return CURLUE_OK;
 1089|    636|}
urlapi.c:handle_path:
 1094|  9.40k|{
 1095|  9.40k|  CURLUcode ures;
 1096|  9.40k|  if(pathlen && (flags & CURLU_URLENCODE)) {
  ------------------
  |  |   94|  1.13k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1096:6): [True: 1.13k, False: 8.27k]
  |  Branch (1096:17): [True: 0, False: 1.13k]
  ------------------
 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|  9.40k|  if(pathlen >= (size_t)(1 + !is_file)) {
  ------------------
  |  Branch (1106:6): [True: 1.02k, False: 8.38k]
  ------------------
 1107|       |    /* paths for file:// scheme can be one byte, others need to be two */
 1108|  1.02k|    if(!u->path) {
  ------------------
  |  Branch (1108:8): [True: 1.02k, False: 0]
  ------------------
 1109|  1.02k|      u->path = curlx_memdup0(path, pathlen);
 1110|  1.02k|      if(!u->path)
  ------------------
  |  Branch (1110:10): [True: 0, False: 1.02k]
  ------------------
 1111|      0|        return CURLUE_OUT_OF_MEMORY;
 1112|  1.02k|      path = u->path;
 1113|  1.02k|    }
 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.02k|    if(!(flags & CURLU_PATH_AS_IS)) {
  ------------------
  |  |   91|  1.02k|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (1118:8): [True: 1.01k, False: 2]
  ------------------
 1119|       |      /* remove ../ and ./ sequences according to RFC3986 */
 1120|  1.01k|      char *dedot;
 1121|  1.01k|      int err = dedotdotify(path, pathlen, &dedot);
 1122|  1.01k|      if(err)
  ------------------
  |  Branch (1122:10): [True: 0, False: 1.01k]
  ------------------
 1123|      0|        return CURLUE_OUT_OF_MEMORY;
 1124|  1.01k|      if(dedot) {
  ------------------
  |  Branch (1124:10): [True: 1.01k, False: 9]
  ------------------
 1125|  1.01k|        curlx_free(u->path);
  ------------------
  |  | 1488|  1.01k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1126|  1.01k|        u->path = dedot;
 1127|  1.01k|      }
 1128|  1.01k|    }
 1129|  1.02k|  }
 1130|  9.40k|  return CURLUE_OK;
 1131|  9.40k|}

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

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

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

Curl_ssl_setup_x509_store:
 3305|  4.10k|{
 3306|  4.10k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3307|  4.10k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3308|  4.10k|  CURLcode result = CURLE_OK;
 3309|  4.10k|  X509_STORE *cached_store;
 3310|  4.10k|  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|  4.10k|  cache_criteria_met = (data->set.general_ssl.ca_cache_timeout != 0) &&
  ------------------
  |  Branch (3315:24): [True: 4.10k, False: 5]
  ------------------
 3316|  4.10k|    conn_config->verifypeer &&
  ------------------
  |  Branch (3316:5): [True: 4.07k, False: 27]
  ------------------
 3317|  4.07k|    !conn_config->CApath &&
  ------------------
  |  Branch (3317:5): [True: 0, False: 4.07k]
  ------------------
 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|  4.10k|  ERR_set_mark();
 3323|       |
 3324|  4.10k|  cached_store = ossl_get_cached_x509_store(cf, data, &is_empty);
 3325|  4.10k|  if(cached_store && cache_criteria_met && X509_STORE_up_ref(cached_store)) {
  ------------------
  |  Branch (3325:6): [True: 0, False: 4.10k]
  |  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|  4.10k|  else {
 3330|  4.10k|    X509_STORE *store = SSL_CTX_get_cert_store(octx->ssl_ctx);
 3331|       |
 3332|  4.10k|    result = ossl_populate_x509_store(cf, data, octx, store);
 3333|  4.10k|    if(result == CURLE_OK && cache_criteria_met) {
  ------------------
  |  Branch (3333:8): [True: 438, False: 3.66k]
  |  Branch (3333:30): [True: 0, False: 438]
  ------------------
 3334|      0|      ossl_set_cached_x509_store(cf, data, store, (bool)octx->store_is_empty);
 3335|      0|    }
 3336|  4.10k|  }
 3337|       |
 3338|  4.10k|  ERR_pop_to_mark();
 3339|       |
 3340|  4.10k|  return result;
 3341|  4.10k|}
Curl_ossl_need_httpsrr:
 3605|  3.13k|{
 3606|  3.13k|  (void)data;
 3607|       |  return FALSE;
  ------------------
  |  | 1054|  3.13k|#define FALSE false
  ------------------
 3608|  3.13k|}
Curl_ossl_ctx_init:
 3719|  3.13k|{
 3720|  3.13k|  CURLcode result = CURLE_OK;
 3721|  3.13k|  const char *ciphers;
 3722|  3.13k|  const SSL_METHOD *req_method = NULL;
 3723|  3.13k|  ctx_option_t ctx_options = 0;
 3724|  3.13k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3725|  3.13k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3726|  3.13k|  char * const ssl_cert = ssl_config->primary.clientcert;
 3727|  3.13k|  const struct curl_blob *ssl_cert_blob = ssl_config->primary.cert_blob;
 3728|  3.13k|  const char * const ssl_cert_type = ssl_config->primary.cert_type;
 3729|  3.13k|  unsigned int ssl_version_min;
 3730|  3.13k|  char error_buffer[256];
 3731|       |
 3732|       |  /* Make funny stuff to get random input */
 3733|  3.13k|  result = ossl_seed(data);
 3734|  3.13k|  if(result)
  ------------------
  |  Branch (3734:6): [True: 0, False: 3.13k]
  ------------------
 3735|      0|    return result;
 3736|       |
 3737|  3.13k|  ssl_config->certverifyresult = !X509_V_OK;
 3738|       |
 3739|  3.13k|  result = ossl_init_method(cf, data, peer, &req_method, &ssl_version_min);
 3740|  3.13k|  if(result)
  ------------------
  |  Branch (3740:6): [True: 0, False: 3.13k]
  ------------------
 3741|      0|    return result;
 3742|  3.13k|  DEBUGASSERT(req_method);
  ------------------
  |  | 1077|  3.13k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3742:3): [True: 0, False: 3.13k]
  |  Branch (3742:3): [True: 3.13k, False: 0]
  ------------------
 3743|       |
 3744|  3.13k|  DEBUGASSERT(!octx->ssl_ctx);
  ------------------
  |  | 1077|  3.13k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3744:3): [True: 0, False: 3.13k]
  |  Branch (3744:3): [True: 3.13k, False: 0]
  ------------------
 3745|  3.13k|  octx->ssl_ctx =
 3746|  3.13k|#ifdef OPENSSL_HAS_PROVIDERS
 3747|  3.13k|    data->state.libctx ?
  ------------------
  |  Branch (3747:5): [True: 673, False: 2.45k]
  ------------------
 3748|    673|    SSL_CTX_new_ex(data->state.libctx, data->state.propq, req_method):
 3749|  3.13k|#endif
 3750|  3.13k|    SSL_CTX_new(req_method);
 3751|       |
 3752|  3.13k|  if(!octx->ssl_ctx) {
  ------------------
  |  Branch (3752:6): [True: 95, False: 3.03k]
  ------------------
 3753|     95|    failf(data, "SSL: could not create a context: %s",
  ------------------
  |  |   62|     95|#define failf Curl_failf
  ------------------
 3754|     95|          ossl_strerror(ERR_peek_error(), error_buffer, sizeof(error_buffer)));
 3755|     95|    return CURLE_OUT_OF_MEMORY;
 3756|     95|  }
 3757|       |
 3758|  3.03k|  if(cb_setup) {
  ------------------
  |  Branch (3758:6): [True: 0, False: 3.03k]
  ------------------
 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|  3.03k|  if(data->set.fdebug && data->set.verbose &&
  ------------------
  |  Branch (3764:6): [True: 0, False: 3.03k]
  |  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|  3.03k|  ctx_options = SSL_OP_ALL | SSL_OP_NO_TICKET | SSL_OP_NO_COMPRESSION;
 3810|       |
 3811|       |  /* mitigate CVE-2010-4180 */
 3812|  3.03k|  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|  3.03k|  if(!ssl_config->enable_beast)
  ------------------
  |  Branch (3816:6): [True: 3.03k, False: 2]
  ------------------
 3817|  3.03k|    ctx_options &= ~(ctx_option_t)SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
 3818|       |
 3819|  3.03k|  DEBUGASSERT(ssl_version_min != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1077|  3.03k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3819:3): [True: 0, False: 3.03k]
  |  Branch (3819:3): [True: 3.03k, False: 0]
  ------------------
 3820|  3.03k|  switch(ssl_version_min) {
 3821|      0|  case CURL_SSLVERSION_SSLv2:
  ------------------
  |  | 2376|      0|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (3821:3): [True: 0, False: 3.03k]
  ------------------
 3822|      0|  case CURL_SSLVERSION_SSLv3:
  ------------------
  |  | 2377|      0|#define CURL_SSLVERSION_SSLv3   3L
  ------------------
  |  Branch (3822:3): [True: 0, False: 3.03k]
  ------------------
 3823|      0|    return CURLE_NOT_BUILT_IN;
 3824|       |
 3825|       |    /* "--tlsv<x.y>" options mean TLS >= version <x.y> */
 3826|      4|  case CURL_SSLVERSION_TLSv1:   /* TLS >= version 1.0 */
  ------------------
  |  | 2375|      4|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (3826:3): [True: 4, False: 3.03k]
  ------------------
 3827|     13|  case CURL_SSLVERSION_TLSv1_0: /* TLS >= version 1.0 */
  ------------------
  |  | 2378|     13|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (3827:3): [True: 9, False: 3.02k]
  ------------------
 3828|     61|  case CURL_SSLVERSION_TLSv1_1: /* TLS >= version 1.1 */
  ------------------
  |  | 2379|     61|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (3828:3): [True: 48, False: 2.98k]
  ------------------
 3829|  3.02k|  case CURL_SSLVERSION_TLSv1_2: /* TLS >= version 1.2 */
  ------------------
  |  | 2380|  3.02k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (3829:3): [True: 2.96k, False: 68]
  ------------------
 3830|  3.03k|  case CURL_SSLVERSION_TLSv1_3: /* TLS >= version 1.3 */
  ------------------
  |  | 2381|  3.03k|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3830:3): [True: 7, False: 3.02k]
  ------------------
 3831|       |    /* asking for any TLS version as the minimum, means no SSL versions
 3832|       |       allowed */
 3833|  3.03k|    ctx_options |= SSL_OP_NO_SSLv2;
 3834|  3.03k|    ctx_options |= SSL_OP_NO_SSLv3;
 3835|       |
 3836|  3.03k|    result = ossl_set_ssl_version_min_max(cf, octx->ssl_ctx, ssl_version_min);
 3837|  3.03k|    if(result)
  ------------------
  |  Branch (3837:8): [True: 0, False: 3.03k]
  ------------------
 3838|      0|      return result;
 3839|  3.03k|    break;
 3840|       |
 3841|  3.03k|  default:
  ------------------
  |  Branch (3841:3): [True: 0, False: 3.03k]
  ------------------
 3842|      0|    failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3843|      0|    return CURLE_SSL_CONNECT_ERROR;
 3844|  3.03k|  }
 3845|       |
 3846|  3.03k|  SSL_CTX_set_options(octx->ssl_ctx, ctx_options);
 3847|  3.03k|  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|  3.03k|#ifdef HAVE_SSL_CTX_SET_DEFAULT_READ_BUFFER_LEN
 3859|  3.03k|  SSL_CTX_set_default_read_buffer_len(octx->ssl_ctx, 0x401e * 4);
 3860|  3.03k|#endif
 3861|       |
 3862|       |  /* We do retry writes sometimes from another buffer address */
 3863|  3.03k|  SSL_CTX_set_mode(octx->ssl_ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
 3864|       |
 3865|  3.03k|  ciphers = conn_config->cipher_list;
 3866|  3.03k|  if(!ciphers && (peer->transport != TRNSPRT_QUIC))
  ------------------
  |  |  251|  2.23k|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3866:6): [True: 2.23k, False: 806]
  |  Branch (3866:18): [True: 2.23k, False: 0]
  ------------------
 3867|  2.23k|    ciphers = NULL;
 3868|  3.03k|  if(ciphers && (ssl_version_min < CURL_SSLVERSION_TLSv1_3)) {
  ------------------
  |  | 2381|    806|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3868:6): [True: 806, False: 2.23k]
  |  Branch (3868:17): [True: 805, False: 1]
  ------------------
 3869|    805|    if(!SSL_CTX_set_cipher_list(octx->ssl_ctx, ciphers)) {
  ------------------
  |  Branch (3869:8): [True: 525, False: 280]
  ------------------
 3870|    525|      failf(data, "failed setting cipher list: %s", ciphers);
  ------------------
  |  |   62|    525|#define failf Curl_failf
  ------------------
 3871|    525|      return CURLE_SSL_CIPHER;
 3872|    525|    }
 3873|    280|    infof(data, "Cipher selection: %s", ciphers);
  ------------------
  |  |  143|    280|  do {                               \
  |  |  144|    280|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    280|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 280, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 280]
  |  |  |  |  ------------------
  |  |  |  |  320|    280|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    280|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    280|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 280]
  |  |  ------------------
  ------------------
 3874|    280|  }
 3875|       |
 3876|  2.51k|#ifdef HAVE_SSL_CTX_SET_CIPHERSUITES
 3877|  2.51k|  {
 3878|  2.51k|    const char *ciphers13 = conn_config->cipher_list13;
 3879|  2.51k|    if(ciphers13 &&
  ------------------
  |  Branch (3879:8): [True: 123, False: 2.38k]
  ------------------
 3880|    123|       (!conn_config->version_max ||
  ------------------
  |  Branch (3880:9): [True: 116, False: 7]
  ------------------
 3881|      7|        (conn_config->version_max == CURL_SSLVERSION_MAX_DEFAULT) ||
  ------------------
  |  | 2386|      7|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2375|      7|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (3881:9): [True: 1, False: 6]
  ------------------
 3882|    119|        (conn_config->version_max >= CURL_SSLVERSION_MAX_TLSv1_3))) {
  ------------------
  |  | 2390|      6|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2381|      6|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (3882:9): [True: 2, False: 4]
  ------------------
 3883|    119|      if(!SSL_CTX_set_ciphersuites(octx->ssl_ctx, ciphers13)) {
  ------------------
  |  Branch (3883:10): [True: 64, False: 55]
  ------------------
 3884|     64|        failf(data, "failed setting TLS 1.3 cipher suite: %s", ciphers13);
  ------------------
  |  |   62|     64|#define failf Curl_failf
  ------------------
 3885|     64|        return CURLE_SSL_CIPHER;
 3886|     64|      }
 3887|     55|      infof(data, "TLS 1.3 cipher selection: %s", ciphers13);
  ------------------
  |  |  143|     55|  do {                               \
  |  |  144|     55|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     55|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 55, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 55]
  |  |  |  |  ------------------
  |  |  |  |  320|     55|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|     55|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     55|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 55]
  |  |  ------------------
  ------------------
 3888|     55|    }
 3889|  2.51k|  }
 3890|  2.44k|#endif
 3891|       |
 3892|  2.44k|  if(ssl_cert || ssl_cert_blob || ssl_cert_type) {
  ------------------
  |  Branch (3892:6): [True: 15, False: 2.43k]
  |  Branch (3892:18): [True: 0, False: 2.43k]
  |  Branch (3892:35): [True: 15, False: 2.41k]
  ------------------
 3893|     30|    result = client_cert(data, octx->ssl_ctx,
 3894|     30|                         ssl_cert, ssl_cert_blob, ssl_cert_type,
 3895|     30|                         ssl_config->primary.key, ssl_config->primary.key_blob,
 3896|     30|                         ssl_config->primary.key_type,
 3897|     30|                         ssl_config->primary.key_passwd);
 3898|     30|    if(result)
  ------------------
  |  Branch (3898:8): [True: 15, False: 15]
  ------------------
 3899|       |      /* failf() is already done in client_cert() */
 3900|     15|      return result;
 3901|     30|  }
 3902|       |
 3903|  2.43k|#ifdef HAVE_SSL_CTX_SET_POST_HANDSHAKE_AUTH
 3904|       |  /* OpenSSL 1.1.1 requires clients to opt-in for PHA */
 3905|  2.43k|  SSL_CTX_set_post_handshake_auth(octx->ssl_ctx, 1);
 3906|  2.43k|#endif
 3907|       |
 3908|  2.43k|  {
 3909|  2.43k|    const char *curves = conn_config->curves;
 3910|  2.43k|    if(curves) {
  ------------------
  |  Branch (3910:8): [True: 495, False: 1.93k]
  ------------------
 3911|       |#ifdef HAVE_BORINGSSL_LIKE
 3912|       |#define OSSL_CURVE_CAST(x) (x)
 3913|       |#else
 3914|    495|#define OSSL_CURVE_CAST(x) (char *)CURL_UNCONST(x)
 3915|    495|#endif
 3916|    495|      if(!SSL_CTX_set1_curves_list(octx->ssl_ctx, OSSL_CURVE_CAST(curves))) {
  ------------------
  |  Branch (3916:10): [True: 110, False: 385]
  ------------------
 3917|    110|        failf(data, "failed setting curves list: '%s'", curves);
  ------------------
  |  |   62|    110|#define failf Curl_failf
  ------------------
 3918|    110|        return CURLE_SSL_CIPHER;
 3919|    110|      }
 3920|    495|    }
 3921|  2.43k|  }
 3922|       |
 3923|  2.32k|#ifdef HAVE_SSL_CTX_SET1_SIGALGS
 3924|  2.32k|#define OSSL_SIGALG_CAST(x) OSSL_CURVE_CAST(x)
 3925|  2.32k|  {
 3926|  2.32k|    const char *signature_algorithms = conn_config->signature_algorithms;
 3927|  2.32k|    if(signature_algorithms) {
  ------------------
  |  Branch (3927:8): [True: 0, False: 2.32k]
  ------------------
 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|  2.32k|  }
 3936|  2.32k|#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|  2.32k|  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|  2.32k|#if !defined(HAVE_KEYLOG_UPSTREAM) && defined(HAVE_KEYLOG_CALLBACK)
 3946|  2.32k|  if(Curl_tls_keylog_enabled()) {
  ------------------
  |  Branch (3946:6): [True: 0, False: 2.32k]
  ------------------
 3947|      0|    SSL_CTX_set_keylog_callback(octx->ssl_ctx, ossl_keylog_callback);
 3948|      0|  }
 3949|  2.32k|#endif
 3950|       |
 3951|  2.32k|  if(cb_new_session) {
  ------------------
  |  Branch (3951:6): [True: 2.32k, 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|  2.32k|    SSL_CTX_set_session_cache_mode(octx->ssl_ctx,
 3957|  2.32k|                                   SSL_SESS_CACHE_CLIENT |
 3958|  2.32k|                                   SSL_SESS_CACHE_NO_INTERNAL);
 3959|  2.32k|    SSL_CTX_sess_set_new_cb(octx->ssl_ctx, cb_new_session);
 3960|  2.32k|  }
 3961|       |
 3962|       |  /* give application a chance to interfere with SSL set up. */
 3963|  2.32k|  if(data->set.ssl.fsslctx) {
  ------------------
  |  Branch (3963:6): [True: 0, False: 2.32k]
  ------------------
 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|  2.32k|  return ossl_init_ssl(octx, cf, data, peer, alpns_requested,
 3984|  2.32k|                       ssl_user_data, sess_reuse_cb);
 3985|  2.32k|}
Curl_ossl_version:
 5423|  3.75k|{
 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.75k|  return curl_msnprintf(buffer, size, "%s/%s",
 5450|  3.75k|                        OSSL_PACKAGE, OpenSSL_version(OPENSSL_VERSION_STRING));
  ------------------
  |  |  163|  3.75k|#define OSSL_PACKAGE "OpenSSL"
  ------------------
 5451|  3.75k|#endif
 5452|  3.75k|}
openssl.c:ossl_get_cached_x509_store:
 3227|  4.10k|{
 3228|  4.10k|  struct Curl_multi *multi = data->multi;
 3229|  4.10k|  struct ossl_x509_share *share;
 3230|  4.10k|  X509_STORE *store = NULL;
 3231|       |
 3232|  4.10k|  DEBUGASSERT(multi);
  ------------------
  |  | 1077|  4.10k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3232:3): [True: 0, False: 4.10k]
  |  Branch (3232:3): [True: 4.10k, False: 0]
  ------------------
 3233|  4.10k|  *pempty = TRUE;
  ------------------
  |  | 1051|  4.10k|#define TRUE true
  ------------------
 3234|  4.10k|  share = multi ? Curl_hash_pick(&multi->proto_hash,
  ------------------
  |  Branch (3234:11): [True: 4.10k, False: 0]
  ------------------
 3235|  4.10k|                                 CURL_UNCONST(MPROTO_OSSL_X509_KEY),
  ------------------
  |  |  862|  4.10k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 3236|  4.10k|                                 sizeof(MPROTO_OSSL_X509_KEY) - 1) : NULL;
  ------------------
  |  | 3172|  4.10k|#define MPROTO_OSSL_X509_KEY  "tls:ossl:x509:share"
  ------------------
 3237|  4.10k|  if(share && share->store &&
  ------------------
  |  Branch (3237:6): [True: 0, False: 4.10k]
  |  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|  4.10k|  return store;
 3245|  4.10k|}
openssl.c:ossl_populate_x509_store:
 3111|  4.10k|{
 3112|  4.10k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3113|  4.10k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3114|  4.10k|  CURLcode result = CURLE_OK;
 3115|  4.10k|  X509_LOOKUP *lookup = NULL;
 3116|  4.10k|  const char * const ssl_crlfile = ssl_config->primary.CRLfile;
 3117|  4.10k|  unsigned long x509flags = 0;
 3118|       |
 3119|  4.10k|  CURL_TRC_CF(data, cf, "configuring OpenSSL's x509 trust store");
  ------------------
  |  |  153|  4.10k|  do {                                          \
  |  |  154|  4.10k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  4.10k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  8.21k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 4.10k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.10k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  8.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]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  4.10k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  4.10k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  4.10k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4.10k]
  |  |  ------------------
  ------------------
 3120|  4.10k|  if(!store)
  ------------------
  |  Branch (3120:6): [True: 0, False: 4.10k]
  ------------------
 3121|      0|    return CURLE_OUT_OF_MEMORY;
 3122|       |
 3123|  4.10k|  if(!conn_config->verifypeer) {
  ------------------
  |  Branch (3123:6): [True: 27, False: 4.08k]
  ------------------
 3124|     27|    infof(data, "SSL Trust: peer verification disabled");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
 3125|     27|    return CURLE_OK;
 3126|     27|  }
 3127|       |
 3128|  4.08k|  infof(data, "SSL Trust Anchors:");
  ------------------
  |  |  143|  4.08k|  do {                               \
  |  |  144|  4.08k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  4.08k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 4.08k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.08k]
  |  |  |  |  ------------------
  |  |  |  |  320|  4.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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  4.08k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  4.08k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 4.08k]
  |  |  ------------------
  ------------------
 3129|  4.08k|  result = ossl_load_trust_anchors(cf, data, octx, store);
 3130|  4.08k|  if(result)
  ------------------
  |  Branch (3130:6): [True: 292, False: 3.78k]
  ------------------
 3131|    292|    return result;
 3132|       |
 3133|       |  /* Does not make sense to load a CRL file without peer verification */
 3134|  3.78k|  if(ssl_crlfile) {
  ------------------
  |  Branch (3134:6): [True: 3.37k, False: 411]
  ------------------
 3135|       |    /* tell OpenSSL where to find CRL file that is used to check certificate
 3136|       |     * revocation */
 3137|  3.37k|    lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
 3138|  3.37k|    if(!lookup ||
  ------------------
  |  Branch (3138:8): [True: 0, False: 3.37k]
  ------------------
 3139|  3.37k|       (!X509_load_crl_file(lookup, ssl_crlfile, X509_FILETYPE_PEM))) {
  ------------------
  |  Branch (3139:8): [True: 3.37k, False: 0]
  ------------------
 3140|  3.37k|      failf(data, "error loading CRL file: %s", ssl_crlfile);
  ------------------
  |  |   62|  3.37k|#define failf Curl_failf
  ------------------
 3141|  3.37k|      return CURLE_SSL_CRL_BADFILE;
 3142|  3.37k|    }
 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|    411|  x509flags |= X509_V_FLAG_TRUSTED_FIRST;
 3154|       |
 3155|    411|  if(!ssl_config->no_partialchain && !ssl_crlfile) {
  ------------------
  |  Branch (3155:6): [True: 409, False: 2]
  |  Branch (3155:38): [True: 409, 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|    409|    x509flags |= X509_V_FLAG_PARTIAL_CHAIN;
 3165|    409|  }
 3166|    411|  (void)X509_STORE_set_flags(store, x509flags);
 3167|       |
 3168|    411|  return result;
 3169|  3.78k|}
openssl.c:ossl_load_trust_anchors:
 3000|  4.08k|{
 3001|  4.08k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3002|  4.08k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3003|  4.08k|  CURLcode result = CURLE_OK;
 3004|  4.08k|  const char * const ssl_cafile =
 3005|       |    /* CURLOPT_CAINFO_BLOB overrides CURLOPT_CAINFO */
 3006|  4.08k|    (conn_config->ca_info_blob ? NULL : conn_config->CAfile);
  ------------------
  |  Branch (3006:6): [True: 0, False: 4.08k]
  ------------------
 3007|  4.08k|  const char * const ssl_capath = conn_config->CApath;
 3008|  4.08k|  bool have_native_check = FALSE;
  ------------------
  |  | 1054|  4.08k|#define FALSE false
  ------------------
 3009|       |
 3010|  4.08k|  octx->store_is_empty = TRUE;
  ------------------
  |  | 1051|  4.08k|#define TRUE true
  ------------------
 3011|  4.08k|  if(ssl_config->native_ca_store) {
  ------------------
  |  Branch (3011:6): [True: 2, False: 4.07k]
  ------------------
 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|      2|  }
 3026|       |
 3027|  4.08k|  if(conn_config->ca_info_blob) {
  ------------------
  |  Branch (3027:6): [True: 0, False: 4.08k]
  ------------------
 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|  4.08k|  if(ssl_cafile || ssl_capath) {
  ------------------
  |  Branch (3038:6): [True: 4.08k, False: 0]
  |  Branch (3038:20): [True: 0, False: 0]
  ------------------
 3039|  4.08k|#ifdef HAVE_OPENSSL3
 3040|       |    /* OpenSSL 3.0.0 has deprecated SSL_CTX_load_verify_locations */
 3041|  4.08k|    if(ssl_cafile) {
  ------------------
  |  Branch (3041:8): [True: 4.08k, False: 0]
  ------------------
 3042|  4.08k|      if(!X509_STORE_load_file(store, ssl_cafile)) {
  ------------------
  |  Branch (3042:10): [True: 292, False: 3.78k]
  ------------------
 3043|    292|        if(octx->store_is_empty && !have_native_check) {
  ------------------
  |  Branch (3043:12): [True: 292, False: 0]
  |  Branch (3043:36): [True: 292, False: 0]
  ------------------
 3044|       |          /* Fail if we insist on successfully verifying the server. */
 3045|    292|          failf(data, "error adding trust anchors from file: %s", ssl_cafile);
  ------------------
  |  |   62|    292|#define failf Curl_failf
  ------------------
 3046|    292|          return CURLE_SSL_CACERT_BADFILE;
 3047|    292|        }
 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|    292|      }
 3051|  3.78k|      infof(data, "  CAfile: %s", ssl_cafile);
  ------------------
  |  |  143|  3.78k|  do {                               \
  |  |  144|  3.78k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  3.78k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 3.78k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.78k]
  |  |  |  |  ------------------
  |  |  |  |  320|  3.78k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.78k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.78k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.78k]
  |  |  ------------------
  ------------------
 3052|  3.78k|      octx->store_is_empty = FALSE;
  ------------------
  |  | 1054|  3.78k|#define FALSE false
  ------------------
 3053|  3.78k|    }
 3054|  3.78k|    if(ssl_capath) {
  ------------------
  |  Branch (3054:8): [True: 3.78k, False: 0]
  ------------------
 3055|  3.78k|      if(!X509_STORE_load_path(store, ssl_capath)) {
  ------------------
  |  Branch (3055:10): [True: 7, False: 3.78k]
  ------------------
 3056|      7|        if(octx->store_is_empty && !have_native_check) {
  ------------------
  |  Branch (3056:12): [True: 0, False: 7]
  |  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|      7|        else
 3062|      7|          infof(data, "error setting certificate path, continuing anyway");
  ------------------
  |  |  143|      7|  do {                               \
  |  |  144|      7|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      7|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 7, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 7]
  |  |  |  |  ------------------
  |  |  |  |  320|      7|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      7|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      7|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 7]
  |  |  ------------------
  ------------------
 3063|      7|      }
 3064|  3.78k|      infof(data, "  CApath: %s", ssl_capath);
  ------------------
  |  |  143|  3.78k|  do {                               \
  |  |  144|  3.78k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  3.78k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 3.78k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.78k]
  |  |  |  |  ------------------
  |  |  |  |  320|  3.78k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.78k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.78k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.78k]
  |  |  ------------------
  ------------------
 3065|  3.78k|      octx->store_is_empty = FALSE;
  ------------------
  |  | 1054|  3.78k|#define FALSE false
  ------------------
 3066|  3.78k|    }
 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|  3.78k|  }
 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|  3.78k|  if(octx->store_is_empty && !have_native_check)
  ------------------
  |  Branch (3101:6): [True: 0, False: 3.78k]
  |  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|  3.78k|  return result;
 3105|  4.08k|}
openssl.c:ossl_seed:
  801|  7.03k|{
  802|       |  /* This might get called before it has been added to a multi handle */
  803|  7.03k|  if(data->multi && data->multi->ssl_seeded)
  ------------------
  |  Branch (803:6): [True: 3.16k, False: 3.87k]
  |  Branch (803:21): [True: 24, False: 3.13k]
  ------------------
  804|     24|    return CURLE_OK;
  805|       |
  806|  7.01k|  if(rand_enough()) {
  ------------------
  |  Branch (806:6): [True: 7.01k, False: 0]
  ------------------
  807|       |    /* OpenSSL 1.1.0+ should return here */
  808|  7.01k|    if(data->multi)
  ------------------
  |  Branch (808:8): [True: 3.13k, False: 3.87k]
  ------------------
  809|  3.13k|      data->multi->ssl_seeded = TRUE;
  ------------------
  |  | 1051|  3.13k|#define TRUE true
  ------------------
  810|  7.01k|    return CURLE_OK;
  811|  7.01k|  }
  812|      0|  failf(data, "Insufficient randomness");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  813|      0|  return CURLE_SSL_CONNECT_ERROR;
  814|  7.01k|}
openssl.c:rand_enough:
  796|  7.01k|{
  797|  7.01k|  return RAND_status() != 0;
  798|  7.01k|}
openssl.c:ossl_init_method:
 3661|  3.13k|{
 3662|  3.13k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3663|       |
 3664|  3.13k|  *pmethod = NULL;
 3665|  3.13k|  *pssl_version_min = conn_config->version;
 3666|  3.13k|  DEBUGASSERT(conn_config->version != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1077|  3.13k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3666:3): [True: 0, False: 3.13k]
  |  Branch (3666:3): [True: 3.13k, False: 0]
  ------------------
 3667|  3.13k|  switch(peer->transport) {
 3668|  3.13k|  case TRNSPRT_TCP:
  ------------------
  |  |  249|  3.13k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (3668:3): [True: 3.13k, False: 0]
  ------------------
 3669|       |    /* check to see if we have been told to use an explicit SSL/TLS version */
 3670|  3.13k|    switch(*pssl_version_min) {
 3671|      4|    case CURL_SSLVERSION_TLSv1:
  ------------------
  |  | 2375|      4|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (3671:5): [True: 4, False: 3.12k]
  ------------------
 3672|     13|    case CURL_SSLVERSION_TLSv1_0:
  ------------------
  |  | 2378|     13|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (3672:5): [True: 9, False: 3.12k]
  ------------------
 3673|     61|    case CURL_SSLVERSION_TLSv1_1:
  ------------------
  |  | 2379|     61|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (3673:5): [True: 48, False: 3.08k]
  ------------------
 3674|  3.12k|    case CURL_SSLVERSION_TLSv1_2:
  ------------------
  |  | 2380|  3.12k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (3674:5): [True: 3.06k, False: 68]
  ------------------
 3675|  3.13k|    case CURL_SSLVERSION_TLSv1_3:
  ------------------
  |  | 2381|  3.13k|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3675:5): [True: 7, False: 3.12k]
  ------------------
 3676|       |      /* it is handled later with the context options */
 3677|  3.13k|      *pmethod = TLS_client_method();
 3678|  3.13k|      break;
 3679|      0|    case CURL_SSLVERSION_SSLv2:
  ------------------
  |  | 2376|      0|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (3679:5): [True: 0, False: 3.13k]
  ------------------
 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: 3.13k]
  ------------------
 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: 3.13k]
  ------------------
 3686|      0|      failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3687|      0|      return CURLE_SSL_CONNECT_ERROR;
 3688|  3.13k|    }
 3689|  3.13k|    break;
 3690|  3.13k|  case TRNSPRT_QUIC:
  ------------------
  |  |  251|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3690:3): [True: 0, False: 3.13k]
  ------------------
 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: 3.13k]
  ------------------
 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|  3.13k|  }
 3705|       |
 3706|  3.13k|  return *pmethod ? CURLE_OK : CURLE_SSL_CONNECT_ERROR;
  ------------------
  |  Branch (3706:10): [True: 3.13k, False: 0]
  ------------------
 3707|  3.13k|}
openssl.c:ossl_strerror:
  749|    622|{
  750|    622|  size_t len;
  751|    622|  DEBUGASSERT(size);
  ------------------
  |  | 1077|    622|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (751:3): [True: 0, False: 622]
  |  Branch (751:3): [True: 622, False: 0]
  ------------------
  752|    622|  *buf = '\0';
  753|       |
  754|    622|  len = Curl_ossl_version(buf, size);
  755|    622|  DEBUGASSERT(len < (size - 2));
  ------------------
  |  | 1077|    622|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (755:3): [True: 0, False: 622]
  |  Branch (755:3): [True: 622, False: 0]
  ------------------
  756|    622|  if(len < (size - 2)) {
  ------------------
  |  Branch (756:6): [True: 622, False: 0]
  ------------------
  757|    622|    buf += len;
  758|    622|    size -= (len + 2);
  759|    622|    *buf++ = ':';
  760|    622|    *buf++ = ' ';
  761|    622|    *buf = '\0';
  762|    622|  }
  763|       |
  764|       |#ifdef HAVE_BORINGSSL_LIKE
  765|       |  ERR_error_string_n((uint32_t)error, buf, size);
  766|       |#else
  767|    622|  ERR_error_string_n(error, buf, size);
  768|    622|#endif
  769|       |
  770|    622|  if(!*buf) {
  ------------------
  |  Branch (770:6): [True: 0, False: 622]
  ------------------
  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|    622|  return buf;
  776|    622|}
openssl.c:ossl_set_ssl_version_min_max:
 2567|  3.03k|{
 2568|  3.03k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 2569|       |  /* first, TLS min version... */
 2570|  3.03k|  long curl_ssl_version_min = (long)ssl_version_min;
 2571|  3.03k|  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|  3.03k|  long ossl_ssl_version_min = 0;
 2579|  3.03k|  long ossl_ssl_version_max = 0;
 2580|  3.03k|#endif
 2581|       |  /* it cannot be default here */
 2582|  3.03k|  DEBUGASSERT(curl_ssl_version_min != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1077|  3.03k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2582:3): [True: 0, False: 3.03k]
  |  Branch (2582:3): [True: 3.03k, False: 0]
  ------------------
 2583|  3.03k|  switch(curl_ssl_version_min) {
  ------------------
  |  Branch (2583:10): [True: 3.03k, False: 0]
  ------------------
 2584|      4|  case CURL_SSLVERSION_TLSv1: /* TLS 1.x */
  ------------------
  |  | 2375|      4|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (2584:3): [True: 4, False: 3.03k]
  ------------------
 2585|     13|  case CURL_SSLVERSION_TLSv1_0:
  ------------------
  |  | 2378|     13|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (2585:3): [True: 9, False: 3.02k]
  ------------------
 2586|     13|    ossl_ssl_version_min = TLS1_VERSION;
 2587|     13|    break;
 2588|     48|  case CURL_SSLVERSION_TLSv1_1:
  ------------------
  |  | 2379|     48|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (2588:3): [True: 48, False: 2.98k]
  ------------------
 2589|     48|    ossl_ssl_version_min = TLS1_1_VERSION;
 2590|     48|    break;
 2591|  2.96k|  case CURL_SSLVERSION_TLSv1_2:
  ------------------
  |  | 2380|  2.96k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (2591:3): [True: 2.96k, False: 68]
  ------------------
 2592|  2.96k|    ossl_ssl_version_min = TLS1_2_VERSION;
 2593|  2.96k|    break;
 2594|      7|  case CURL_SSLVERSION_TLSv1_3:
  ------------------
  |  | 2381|      7|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (2594:3): [True: 7, False: 3.02k]
  ------------------
 2595|      7|    ossl_ssl_version_min = TLS1_3_VERSION;
 2596|      7|    break;
 2597|  3.03k|  }
 2598|       |
 2599|       |  /* ... then, TLS max version */
 2600|  3.03k|  curl_ssl_version_max = (long)conn_config->version_max;
 2601|       |
 2602|       |  /* convert curl max SSL version option to OpenSSL constant */
 2603|  3.03k|  switch(curl_ssl_version_max) {
 2604|      4|  case CURL_SSLVERSION_MAX_TLSv1_0:
  ------------------
  |  | 2387|      4|#define CURL_SSLVERSION_MAX_TLSv1_0 (CURL_SSLVERSION_TLSv1_0 << 16)
  |  |  ------------------
  |  |  |  | 2378|      4|#define CURL_SSLVERSION_TLSv1_0 4L
  |  |  ------------------
  ------------------
  |  Branch (2604:3): [True: 4, False: 3.03k]
  ------------------
 2605|      4|    ossl_ssl_version_max = TLS1_VERSION;
 2606|      4|    break;
 2607|     11|  case CURL_SSLVERSION_MAX_TLSv1_1:
  ------------------
  |  | 2388|     11|#define CURL_SSLVERSION_MAX_TLSv1_1 (CURL_SSLVERSION_TLSv1_1 << 16)
  |  |  ------------------
  |  |  |  | 2379|     11|#define CURL_SSLVERSION_TLSv1_1 5L
  |  |  ------------------
  ------------------
  |  Branch (2607:3): [True: 11, False: 3.02k]
  ------------------
 2608|     11|    ossl_ssl_version_max = TLS1_1_VERSION;
 2609|     11|    break;
 2610|     53|  case CURL_SSLVERSION_MAX_TLSv1_2:
  ------------------
  |  | 2389|     53|#define CURL_SSLVERSION_MAX_TLSv1_2 (CURL_SSLVERSION_TLSv1_2 << 16)
  |  |  ------------------
  |  |  |  | 2380|     53|#define CURL_SSLVERSION_TLSv1_2 6L
  |  |  ------------------
  ------------------
  |  Branch (2610:3): [True: 53, False: 2.98k]
  ------------------
 2611|     53|    ossl_ssl_version_max = TLS1_2_VERSION;
 2612|     53|    break;
 2613|      7|  case CURL_SSLVERSION_MAX_TLSv1_3:
  ------------------
  |  | 2390|      7|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2381|      7|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (2613:3): [True: 7, False: 3.02k]
  ------------------
 2614|      7|    ossl_ssl_version_max = TLS1_3_VERSION;
 2615|      7|    break;
 2616|  2.95k|  case CURL_SSLVERSION_MAX_NONE:  /* none selected */
  ------------------
  |  | 2385|  2.95k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (2616:3): [True: 2.95k, False: 78]
  ------------------
 2617|  2.96k|  case CURL_SSLVERSION_MAX_DEFAULT:  /* max selected */
  ------------------
  |  | 2386|  2.96k|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2375|  2.96k|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (2617:3): [True: 2, False: 3.03k]
  ------------------
 2618|  2.96k|  default:
  ------------------
  |  Branch (2618:3): [True: 1, False: 3.03k]
  ------------------
 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.96k|    ossl_ssl_version_max = 0;
 2623|  2.96k|    break;
 2624|  3.03k|  }
 2625|       |
 2626|  3.03k|  if(!SSL_CTX_set_min_proto_version(ctx, ossl_ssl_version_min) ||
  ------------------
  |  Branch (2626:6): [True: 0, False: 3.03k]
  ------------------
 2627|  3.03k|     !SSL_CTX_set_max_proto_version(ctx, ossl_ssl_version_max))
  ------------------
  |  Branch (2627:6): [True: 0, False: 3.03k]
  ------------------
 2628|      0|    return CURLE_SSL_CONNECT_ERROR;
 2629|       |
 2630|  3.03k|  return CURLE_OK;
 2631|  3.03k|}
openssl.c:client_cert:
 1431|     30|{
 1432|     30|  char error_buffer[256];
 1433|     30|  bool check_privkey = TRUE;
  ------------------
  |  | 1051|     30|#define TRUE true
  ------------------
 1434|     30|  int file_type = ossl_do_file_type(cert_type);
 1435|       |
 1436|     30|  if(cert_file || cert_blob || (file_type == SSL_FILETYPE_ENGINE) ||
  ------------------
  |  |  817|     15|#define SSL_FILETYPE_ENGINE 42
  ------------------
  |  Branch (1436:6): [True: 15, False: 15]
  |  Branch (1436:19): [True: 0, False: 15]
  |  Branch (1436:32): [True: 0, False: 15]
  ------------------
 1437|     15|     (file_type == SSL_FILETYPE_PROVIDER)) {
  ------------------
  |  |  823|     15|#define SSL_FILETYPE_PROVIDER 44
  ------------------
  |  Branch (1437:6): [True: 0, False: 15]
  ------------------
 1438|     15|    SSL *ssl;
 1439|     15|    X509 *x509;
 1440|     15|    bool pcks12_done = FALSE;
  ------------------
  |  | 1054|     15|#define FALSE false
  ------------------
 1441|     15|    int cert_use_result;
 1442|       |
 1443|     15|    if(key_passwd) {
  ------------------
  |  Branch (1443:8): [True: 1, False: 14]
  ------------------
 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|     15|    switch(file_type) {
 1451|     13|    case SSL_FILETYPE_PEM:
  ------------------
  |  Branch (1451:5): [True: 13, False: 2]
  ------------------
 1452|       |      /* SSL_CTX_use_certificate_chain_file() only works on PEM files */
 1453|     13|      cert_use_result = cert_blob ?
  ------------------
  |  Branch (1453:25): [True: 0, False: 13]
  ------------------
 1454|      0|        use_certificate_chain_blob(ctx, cert_blob, key_passwd) :
 1455|     13|        SSL_CTX_use_certificate_chain_file(ctx, cert_file);
 1456|     13|      if(cert_use_result != 1) {
  ------------------
  |  Branch (1456:10): [True: 13, False: 0]
  ------------------
 1457|     13|        failf(data,
  ------------------
  |  |   62|     13|#define failf Curl_failf
  ------------------
 1458|     13|              "could not load PEM client certificate from %s, " OSSL_PACKAGE
 1459|     13|              " error %s, "
 1460|     13|              "(no key found, wrong passphrase, or wrong file format?)",
 1461|     13|              (cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
  ------------------
  |  Branch (1461:16): [True: 0, False: 13]
  ------------------
 1462|     13|              ossl_strerror(ERR_get_error(), error_buffer,
 1463|     13|                            sizeof(error_buffer)));
 1464|     13|        return CURLE_SSL_CERTPROBLEM;
 1465|     13|      }
 1466|      0|      break;
 1467|       |
 1468|      1|    case SSL_FILETYPE_ASN1:
  ------------------
  |  Branch (1468:5): [True: 1, False: 14]
  ------------------
 1469|       |      /* SSL_CTX_use_certificate_file() works with either PEM or ASN1, but
 1470|       |         we use the case above for PEM so this can only be performed with
 1471|       |         ASN1 files. */
 1472|       |
 1473|      1|      cert_use_result = cert_blob ?
  ------------------
  |  Branch (1473:25): [True: 0, False: 1]
  ------------------
 1474|      0|        use_certificate_blob(ctx, cert_blob, file_type, key_passwd) :
 1475|      1|      SSL_CTX_use_certificate_file(ctx, cert_file, file_type);
 1476|      1|      if(cert_use_result != 1) {
  ------------------
  |  Branch (1476:10): [True: 1, False: 0]
  ------------------
 1477|      1|        failf(data,
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1478|      1|              "could not load ASN1 client certificate from %s, " OSSL_PACKAGE
 1479|      1|              " error %s, "
 1480|      1|              "(no key found, wrong passphrase, or wrong file format?)",
 1481|      1|              (cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
  ------------------
  |  Branch (1481:16): [True: 0, False: 1]
  ------------------
 1482|      1|              ossl_strerror(ERR_get_error(), error_buffer,
 1483|      1|                            sizeof(error_buffer)));
 1484|      1|        return CURLE_SSL_CERTPROBLEM;
 1485|      1|      }
 1486|      0|      break;
 1487|       |
 1488|      0|    case SSL_FILETYPE_ENGINE:
  ------------------
  |  |  817|      0|#define SSL_FILETYPE_ENGINE 42
  ------------------
  |  Branch (1488:5): [True: 0, False: 15]
  ------------------
 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: 15]
  ------------------
 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: 15]
  ------------------
 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: 14]
  ------------------
 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|     15|    }
 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|     15|  return CURLE_OK;
 1593|     30|}
openssl.c:ossl_do_file_type:
  826|     30|{
  827|     30|  if(!type || !type[0])
  ------------------
  |  Branch (827:6): [True: 13, False: 17]
  |  Branch (827:15): [True: 1, False: 16]
  ------------------
  828|     14|    return SSL_FILETYPE_PEM;
  829|     16|  if(curl_strequal(type, "PEM"))
  ------------------
  |  Branch (829:6): [True: 0, False: 16]
  ------------------
  830|      0|    return SSL_FILETYPE_PEM;
  831|     16|  if(curl_strequal(type, "DER"))
  ------------------
  |  Branch (831:6): [True: 2, False: 14]
  ------------------
  832|      2|    return SSL_FILETYPE_ASN1;
  833|     14|  if(curl_strequal(type, "PROV"))
  ------------------
  |  Branch (833:6): [True: 0, False: 14]
  ------------------
  834|      0|    return SSL_FILETYPE_PROVIDER;
  ------------------
  |  |  823|      0|#define SSL_FILETYPE_PROVIDER 44
  ------------------
  835|     14|  if(curl_strequal(type, "ENG"))
  ------------------
  |  Branch (835:6): [True: 0, False: 14]
  ------------------
  836|      0|    return SSL_FILETYPE_ENGINE;
  ------------------
  |  |  817|      0|#define SSL_FILETYPE_ENGINE 42
  ------------------
  837|     14|  if(curl_strequal(type, "P12"))
  ------------------
  |  Branch (837:6): [True: 0, False: 14]
  ------------------
  838|      0|    return SSL_FILETYPE_PKCS12;
  ------------------
  |  |  820|      0|#define SSL_FILETYPE_PKCS12 43
  ------------------
  839|     14|  return -1;
  840|     14|}
openssl.c:ossl_set_provider:
 1768|    769|{
 1769|    769|  char name[MAX_PROVIDER_LEN + 1];
 1770|    769|  struct Curl_str prov;
 1771|    769|  const char *propq = NULL;
 1772|       |
 1773|    769|  if(!iname) {
  ------------------
  |  Branch (1773:6): [True: 0, False: 769]
  ------------------
 1774|       |    /* clear and cleanup provider use */
 1775|      0|    ossl_provider_cleanup(data);
 1776|      0|    return CURLE_OK;
 1777|      0|  }
 1778|    769|  if(curlx_str_until(&iname, &prov, MAX_PROVIDER_LEN, ':'))
  ------------------
  |  | 1757|    769|#define MAX_PROVIDER_LEN 128 /* reasonable */
  ------------------
  |  Branch (1778:6): [True: 1, False: 768]
  ------------------
 1779|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1780|       |
 1781|    768|  if(!curlx_str_single(&iname, ':'))
  ------------------
  |  Branch (1781:6): [True: 628, False: 140]
  ------------------
 1782|       |    /* there was a colon, get the propq until the end of string */
 1783|    628|    propq = iname;
 1784|       |
 1785|       |  /* we need the name in a buffer, null-terminated */
 1786|    768|  memcpy(name, curlx_str(&prov), curlx_strlen(&prov));
  ------------------
  |  |   49|    768|#define curlx_str(x)    ((x)->str)
  ------------------
                memcpy(name, curlx_str(&prov), curlx_strlen(&prov));
  ------------------
  |  |   50|    768|#define curlx_strlen(x) ((x)->len)
  ------------------
 1787|    768|  name[curlx_strlen(&prov)] = 0;
  ------------------
  |  |   50|    768|#define curlx_strlen(x) ((x)->len)
  ------------------
 1788|       |
 1789|    768|  if(!data->state.libctx) {
  ------------------
  |  Branch (1789:6): [True: 768, False: 0]
  ------------------
 1790|    768|    OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new();
 1791|    768|    if(!libctx)
  ------------------
  |  Branch (1791:8): [True: 0, False: 768]
  ------------------
 1792|      0|      return CURLE_OUT_OF_MEMORY;
 1793|    768|    if(propq) {
  ------------------
  |  Branch (1793:8): [True: 628, False: 140]
  ------------------
 1794|    628|      data->state.propq = curlx_strdup(propq);
  ------------------
  |  | 1482|    628|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1795|    628|      if(!data->state.propq) {
  ------------------
  |  Branch (1795:10): [True: 0, False: 628]
  ------------------
 1796|      0|        OSSL_LIB_CTX_free(libctx);
 1797|      0|        return CURLE_OUT_OF_MEMORY;
 1798|      0|      }
 1799|    628|    }
 1800|    768|    data->state.libctx = libctx;
 1801|    768|  }
 1802|       |
 1803|    768|#ifndef CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
 1804|       |  /* load the configuration file into the library context before checking the
 1805|       |   * provider availability */
 1806|    768|  if(!OSSL_LIB_CTX_load_config(data->state.libctx, NULL)) {
  ------------------
  |  Branch (1806:6): [True: 768, False: 0]
  ------------------
 1807|    768|    infof(data, "Failed to load default openssl config. Proceeding.");
  ------------------
  |  |  143|    768|  do {                               \
  |  |  144|    768|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    768|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 768, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 768]
  |  |  |  |  ------------------
  |  |  |  |  320|    768|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((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|    768|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    768|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 768]
  |  |  ------------------
  ------------------
 1808|    768|  }
 1809|    768|#endif
 1810|       |
 1811|    768|  if(OSSL_PROVIDER_available(data->state.libctx, name)) {
  ------------------
  |  Branch (1811:6): [True: 39, False: 729]
  ------------------
 1812|       |    /* already loaded through the configuration - no action needed */
 1813|     39|    data->state.provider_loaded = TRUE;
  ------------------
  |  | 1051|     39|#define TRUE true
  ------------------
 1814|     39|    return CURLE_OK;
 1815|     39|  }
 1816|       |
 1817|    729|  data->state.provider = OSSL_PROVIDER_try_load(data->state.libctx, name, 1);
 1818|    729|  if(!data->state.provider) {
  ------------------
  |  Branch (1818:6): [True: 87, False: 642]
  ------------------
 1819|     87|    char error_buffer[256];
 1820|     87|    failf(data, "Failed to initialize provider: %s",
  ------------------
  |  |   62|     87|#define failf Curl_failf
  ------------------
 1821|     87|          ossl_strerror(ERR_get_error(), error_buffer, sizeof(error_buffer)));
 1822|     87|    ossl_provider_cleanup(data);
 1823|     87|    return CURLE_SSL_ENGINE_NOTFOUND;
 1824|     87|  }
 1825|       |
 1826|       |  /* load the base provider as well */
 1827|    642|  data->state.baseprov = OSSL_PROVIDER_try_load(data->state.libctx, "base", 1);
 1828|    642|  if(!data->state.baseprov) {
  ------------------
  |  Branch (1828:6): [True: 0, False: 642]
  ------------------
 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|    642|  else
 1834|    642|    data->state.provider_loaded = TRUE;
  ------------------
  |  | 1051|    642|#define TRUE true
  ------------------
 1835|    642|  return CURLE_OK;
 1836|    642|}
openssl.c:ossl_provider_cleanup:
 1742|  24.0k|{
 1743|  24.0k|  if(data->state.baseprov) {
  ------------------
  |  Branch (1743:6): [True: 642, False: 23.4k]
  ------------------
 1744|    642|    OSSL_PROVIDER_unload(data->state.baseprov);
 1745|    642|    data->state.baseprov = NULL;
 1746|    642|  }
 1747|  24.0k|  if(data->state.provider) {
  ------------------
  |  Branch (1747:6): [True: 642, False: 23.4k]
  ------------------
 1748|    642|    OSSL_PROVIDER_unload(data->state.provider);
 1749|    642|    data->state.provider = NULL;
 1750|    642|  }
 1751|  24.0k|  OSSL_LIB_CTX_free(data->state.libctx);
 1752|  24.0k|  data->state.libctx = NULL;
 1753|  24.0k|  curlx_safefree(data->state.propq);
  ------------------
  |  | 1332|  24.0k|  do {                      \
  |  | 1333|  24.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  24.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  24.0k|    (ptr) = NULL;           \
  |  | 1335|  24.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 24.0k]
  |  |  ------------------
  ------------------
 1754|       |  data->state.provider_loaded = FALSE;
  ------------------
  |  | 1054|  24.0k|#define FALSE false
  ------------------
 1755|  24.0k|}
openssl.c:ossl_init_ssl:
 3618|  2.32k|{
 3619|       |  /* Let's make an SSL structure */
 3620|  2.32k|  if(octx->ssl)
  ------------------
  |  Branch (3620:6): [True: 0, False: 2.32k]
  ------------------
 3621|      0|    SSL_free(octx->ssl);
 3622|  2.32k|  octx->ssl = SSL_new(octx->ssl_ctx);
 3623|  2.32k|  if(!octx->ssl) {
  ------------------
  |  Branch (3623:6): [True: 0, False: 2.32k]
  ------------------
 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|  2.32k|  SSL_set_app_data(octx->ssl, ssl_user_data);
 3629|       |
 3630|  2.32k|#ifndef OPENSSL_NO_OCSP
 3631|  2.32k|  if(Curl_ssl_cf_get_primary_config(cf)->verifystatus)
  ------------------
  |  Branch (3631:6): [True: 2, False: 2.32k]
  ------------------
 3632|  2.32k|    SSL_set_tlsext_status_type(octx->ssl, TLSEXT_STATUSTYPE_ocsp);
 3633|  2.32k|#endif
 3634|       |
 3635|  2.32k|  SSL_set_connect_state(octx->ssl);
 3636|       |
 3637|  2.32k|  if(peer->sni) {
  ------------------
  |  Branch (3637:6): [True: 941, False: 1.38k]
  ------------------
 3638|    941|    if(!SSL_set_tlsext_host_name(octx->ssl, peer->sni)) {
  ------------------
  |  Branch (3638:8): [True: 1, False: 940]
  ------------------
 3639|      1|      failf(data, "Failed set SNI");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 3640|      1|      return CURLE_SSL_CONNECT_ERROR;
 3641|      1|    }
 3642|    941|  }
 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|  2.32k|  return ossl_init_session_and_alpns(octx, cf, data, peer,
 3653|  2.32k|                                     alpns_requested, sess_reuse_cb);
 3654|  2.32k|}
openssl.c:ossl_init_session_and_alpns:
 3426|  2.32k|{
 3427|  2.32k|  struct ssl_primary_config *conn_cfg = Curl_ssl_cf_get_primary_config(cf);
 3428|  2.32k|  struct alpn_spec alpns;
 3429|  2.32k|  CURLcode result;
 3430|       |
 3431|  2.32k|  Curl_alpn_copy(&alpns, alpns_requested);
 3432|       |
 3433|  2.32k|  octx->reused_session = FALSE;
  ------------------
  |  | 1054|  2.32k|#define FALSE false
  ------------------
 3434|       |
 3435|  2.32k|  if((cf->sockindex == SECONDARYSOCKET) && !(cf->cft->flags & CF_TYPE_PROXY)) {
  ------------------
  |  |  246|  2.32k|#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: 2.32k]
  |  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|  2.32k|  if(!octx->reused_session &&
  ------------------
  |  Branch (3447:6): [True: 2.32k, False: 0]
  ------------------
 3448|  2.32k|     Curl_ssl_scache_use(cf, data) && !conn_cfg->verifystatus) {
  ------------------
  |  Branch (3448:6): [True: 2.32k, False: 1]
  |  Branch (3448:39): [True: 2.31k, False: 2]
  ------------------
 3449|  2.31k|    struct Curl_ssl_session *scs = NULL;
 3450|       |
 3451|  2.31k|    result = Curl_ssl_scache_take(cf, data, peer->scache_key, &scs);
 3452|  2.31k|    if(!result && scs && scs->sdata && scs->sdata_len) {
  ------------------
  |  Branch (3452:8): [True: 2.31k, False: 0]
  |  Branch (3452:19): [True: 0, False: 2.31k]
  |  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|  2.31k|    Curl_ssl_scache_return(cf, data, peer->scache_key, scs);
 3456|  2.31k|  }
 3457|       |
 3458|  2.32k|  if(alpns.count) {
  ------------------
  |  Branch (3458:6): [True: 2.31k, False: 10]
  ------------------
 3459|  2.31k|    struct alpn_proto_buf proto;
 3460|  2.31k|    memset(&proto, 0, sizeof(proto));
 3461|  2.31k|    result = Curl_alpn_to_proto_buf(&proto, &alpns);
 3462|  2.31k|    if(result) {
  ------------------
  |  Branch (3462:8): [True: 0, False: 2.31k]
  ------------------
 3463|      0|      failf(data, "Error determining ALPN");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3464|      0|      return CURLE_SSL_CONNECT_ERROR;
 3465|      0|    }
 3466|  2.31k|    if(SSL_set_alpn_protos(octx->ssl, proto.data, proto.len)) {
  ------------------
  |  Branch (3466:8): [True: 0, False: 2.31k]
  ------------------
 3467|      0|      failf(data, "Error setting ALPN");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3468|      0|      return CURLE_SSL_CONNECT_ERROR;
 3469|      0|    }
 3470|  2.31k|  }
 3471|       |
 3472|  2.32k|  return CURLE_OK;
 3473|  2.32k|}
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.90k|{
 5458|  3.90k|  int rc;
 5459|  3.90k|  if(data) {
  ------------------
  |  Branch (5459:6): [True: 3.90k, False: 0]
  ------------------
 5460|  3.90k|    if(ossl_seed(data)) /* Initiate the seed if not already done */
  ------------------
  |  Branch (5460:8): [True: 0, False: 3.90k]
  ------------------
 5461|      0|      return CURLE_FAILED_INIT; /* could not seed for some reason */
 5462|  3.90k|  }
 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.90k|  rc = RAND_bytes(entropy, (ossl_valsize_t)curlx_uztosi(length));
 5469|  3.90k|  return rc == 1 ? CURLE_OK : CURLE_FAILED_INIT;
  ------------------
  |  Branch (5469:10): [True: 3.90k, False: 0]
  ------------------
 5470|  3.90k|}
openssl.c:ossl_cert_status_request:
 5497|    686|{
 5498|    686|#ifndef OPENSSL_NO_OCSP
 5499|    686|  return TRUE;
  ------------------
  |  | 1051|    686|#define TRUE true
  ------------------
 5500|       |#else
 5501|       |  return FALSE;
 5502|       |#endif
 5503|    686|}
openssl.c:ossl_connect:
 4978|  3.55k|{
 4979|  3.55k|  CURLcode result = CURLE_OK;
 4980|  3.55k|  struct ssl_connect_data *connssl = cf->ctx;
 4981|       |
 4982|       |  /* check if the connection has already been established */
 4983|  3.55k|  if(ssl_connection_complete == connssl->state) {
  ------------------
  |  Branch (4983:6): [True: 0, False: 3.55k]
  ------------------
 4984|      0|    *done = TRUE;
  ------------------
  |  | 1051|      0|#define TRUE true
  ------------------
 4985|      0|    return CURLE_OK;
 4986|      0|  }
 4987|       |
 4988|  3.55k|  *done = FALSE;
  ------------------
  |  | 1054|  3.55k|#define FALSE false
  ------------------
 4989|  3.55k|  connssl->io_need = CURL_SSL_IO_NEED_NONE;
  ------------------
  |  |  105|  3.55k|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
 4990|       |
 4991|  3.55k|  if(connssl->connecting_state == ssl_connect_1) {
  ------------------
  |  Branch (4991:6): [True: 3.13k, False: 426]
  ------------------
 4992|  3.13k|    if(Curl_ossl_need_httpsrr(data) &&
  ------------------
  |  Branch (4992:8): [True: 0, False: 3.13k]
  ------------------
 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|  3.13k|                                     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|  3.13k|    CURL_TRC_CF(data, cf, "ossl_connect, step1");
  ------------------
  |  |  153|  3.13k|  do {                                          \
  |  |  154|  3.13k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  3.13k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  6.26k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.13k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.13k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  6.26k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  3.13k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.13k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.13k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.13k]
  |  |  ------------------
  ------------------
 4999|  3.13k|    result = ossl_connect_step1(cf, data);
 5000|  3.13k|    if(result)
  ------------------
  |  Branch (5000:8): [True: 810, False: 2.32k]
  ------------------
 5001|    810|      goto out;
 5002|  3.13k|  }
 5003|       |
 5004|  2.74k|  if(connssl->connecting_state == ssl_connect_2) {
  ------------------
  |  Branch (5004:6): [True: 2.74k, False: 0]
  ------------------
 5005|  2.74k|    CURL_TRC_CF(data, cf, "ossl_connect, step2");
  ------------------
  |  |  153|  2.74k|  do {                                          \
  |  |  154|  2.74k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.74k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  5.49k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.74k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.74k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  5.49k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->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.74k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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.74k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.74k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.74k]
  |  |  ------------------
  ------------------
 5006|  2.74k|#ifdef HAVE_OPENSSL_EARLYDATA
 5007|  2.74k|    if(connssl->earlydata_state == ssl_earlydata_await) {
  ------------------
  |  Branch (5007:8): [True: 0, False: 2.74k]
  ------------------
 5008|      0|      goto out;
 5009|      0|    }
 5010|  2.74k|    else if(connssl->earlydata_state == ssl_earlydata_sending) {
  ------------------
  |  Branch (5010:13): [True: 0, False: 2.74k]
  ------------------
 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|  2.74k|#endif
 5017|  2.74k|    DEBUGASSERT((connssl->earlydata_state == ssl_earlydata_none) ||
  ------------------
  |  | 1077|  2.74k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (5017:5): [True: 2.74k, False: 0]
  |  Branch (5017:5): [True: 0, False: 0]
  |  Branch (5017:5): [True: 2.74k, False: 0]
  |  Branch (5017:5): [True: 0, False: 0]
  ------------------
 5018|  2.74k|                (connssl->earlydata_state == ssl_earlydata_sent));
 5019|       |
 5020|  2.74k|    result = ossl_connect_step2(cf, data);
 5021|  2.74k|    if(result)
  ------------------
  |  Branch (5021:8): [True: 2.74k, False: 0]
  ------------------
 5022|  2.74k|      goto out;
 5023|  2.74k|  }
 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|  3.55k|out:
 5049|  3.55k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (5049:6): [True: 437, False: 3.12k]
  ------------------
 5050|    437|    *done = FALSE;
  ------------------
  |  | 1054|    437|#define FALSE false
  ------------------
 5051|    437|    return CURLE_OK;
 5052|    437|  }
 5053|  3.12k|  *done = ((connssl->state == ssl_connection_complete) ||
  ------------------
  |  Branch (5053:12): [True: 0, False: 3.12k]
  ------------------
 5054|  3.12k|           (connssl->state == ssl_connection_deferred));
  ------------------
  |  Branch (5054:12): [True: 0, False: 3.12k]
  ------------------
 5055|  3.12k|  return result;
 5056|  3.55k|}
openssl.c:ossl_connect_step1:
 4033|  3.13k|{
 4034|  3.13k|  struct ssl_connect_data *connssl = cf->ctx;
 4035|  3.13k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 4036|  3.13k|  BIO *bio;
 4037|  3.13k|  CURLcode result;
 4038|       |
 4039|  3.13k|  DEBUGASSERT(connssl->connecting_state == ssl_connect_1);
  ------------------
  |  | 1077|  3.13k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4039:3): [True: 0, False: 3.13k]
  |  Branch (4039:3): [True: 3.13k, False: 0]
  ------------------
 4040|  3.13k|  DEBUGASSERT(octx);
  ------------------
  |  | 1077|  3.13k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4040:3): [True: 0, False: 3.13k]
  |  Branch (4040:3): [True: 3.13k, False: 0]
  ------------------
 4041|  3.13k|  DEBUGASSERT(connssl->peer.origin);
  ------------------
  |  | 1077|  3.13k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4041:3): [True: 0, False: 3.13k]
  |  Branch (4041:3): [True: 3.13k, False: 0]
  ------------------
 4042|       |
 4043|  3.13k|  result = Curl_ossl_ctx_init(octx, cf, data, &connssl->peer,
 4044|  3.13k|                              connssl->alpn, NULL, NULL,
 4045|  3.13k|                              ossl_new_session_cb, cf,
 4046|  3.13k|                              ossl_on_session_reuse);
 4047|  3.13k|  if(result)
  ------------------
  |  Branch (4047:6): [True: 810, False: 2.32k]
  ------------------
 4048|    810|    return result;
 4049|       |
 4050|  2.32k|  octx->bio_method = ossl_bio_cf_method_create();
 4051|  2.32k|  if(!octx->bio_method)
  ------------------
  |  Branch (4051:6): [True: 0, False: 2.32k]
  ------------------
 4052|      0|    return CURLE_OUT_OF_MEMORY;
 4053|  2.32k|  bio = BIO_new(octx->bio_method);
 4054|  2.32k|  if(!bio)
  ------------------
  |  Branch (4054:6): [True: 0, False: 2.32k]
  ------------------
 4055|      0|    return CURLE_OUT_OF_MEMORY;
 4056|       |
 4057|  2.32k|  BIO_set_data(bio, cf);
 4058|  2.32k|#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|  2.32k|  BIO_up_ref(bio);
 4065|  2.32k|  SSL_set0_rbio(octx->ssl, bio);
 4066|  2.32k|  SSL_set0_wbio(octx->ssl, bio);
 4067|       |#else
 4068|       |  SSL_set_bio(octx->ssl, bio, bio);
 4069|       |#endif
 4070|       |
 4071|  2.32k|  if(connssl->alpn && (connssl->state != ssl_connection_deferred)) {
  ------------------
  |  Branch (4071:6): [True: 2.31k, False: 10]
  |  Branch (4071:23): [True: 2.31k, False: 0]
  ------------------
 4072|  2.31k|    struct alpn_proto_buf proto;
 4073|  2.31k|    memset(&proto, 0, sizeof(proto));
 4074|  2.31k|    Curl_alpn_to_proto_str(&proto, connssl->alpn);
 4075|  2.31k|    infof(data, VTLS_INFOF_ALPN_OFFER_1STR, proto.data);
  ------------------
  |  |  143|  2.31k|  do {                               \
  |  |  144|  2.31k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  2.31k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2.31k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.31k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.31k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  2.31k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.31k]
  |  |  ------------------
  ------------------
 4076|  2.31k|  }
 4077|       |
 4078|  2.32k|  connssl->connecting_state = ssl_connect_2;
 4079|  2.32k|  return CURLE_OK;
 4080|  2.32k|}
openssl.c:ossl_bio_cf_method_create:
  642|  2.32k|{
  643|  2.32k|  BIO_METHOD *m = BIO_meth_new(BIO_TYPE_MEM, "OpenSSL CF BIO");
  644|  2.32k|  if(m) {
  ------------------
  |  Branch (644:6): [True: 2.32k, False: 0]
  ------------------
  645|  2.32k|    BIO_meth_set_write(m, &ossl_bio_cf_out_write);
  646|  2.32k|    BIO_meth_set_read(m, &ossl_bio_cf_in_read);
  647|  2.32k|    BIO_meth_set_ctrl(m, &ossl_bio_cf_ctrl);
  648|  2.32k|    BIO_meth_set_create(m, &ossl_bio_cf_create);
  649|  2.32k|    BIO_meth_set_destroy(m, &ossl_bio_cf_destroy);
  650|  2.32k|  }
  651|  2.32k|  return m;
  652|  2.32k|}
openssl.c:ossl_bio_cf_out_write:
  568|  4.30k|{
  569|  4.30k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  570|  4.30k|  struct ssl_connect_data *connssl = cf->ctx;
  571|  4.30k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
  572|  4.30k|  struct Curl_easy *data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  689|  4.30k|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  221|  4.30k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (689:30): [True: 4.30k, False: 0]
  |  |  ------------------
  ------------------
  573|  4.30k|  size_t nwritten;
  574|  4.30k|  CURLcode result;
  575|       |
  576|  4.30k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  4.30k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (576:3): [True: 0, False: 4.30k]
  |  Branch (576:3): [True: 4.30k, False: 0]
  ------------------
  577|  4.30k|  if(blen < 0)
  ------------------
  |  Branch (577:6): [True: 0, False: 4.30k]
  ------------------
  578|      0|    return 0;
  579|       |
  580|  4.30k|  result = Curl_conn_cf_send(cf->next, data,
  581|  4.30k|                             (const uint8_t *)buf, (size_t)blen, FALSE,
  ------------------
  |  | 1054|  4.30k|#define FALSE false
  ------------------
  582|  4.30k|                             &nwritten);
  583|  4.30k|  CURL_TRC_CF(data, cf, "ossl_bio_cf_out_write(len=%d) -> %d, %zu",
  ------------------
  |  |  153|  4.30k|  do {                                          \
  |  |  154|  4.30k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  4.30k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  8.60k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 4.30k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  8.60k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->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.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|  4.30k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  4.30k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4.30k]
  |  |  ------------------
  ------------------
  584|  4.30k|              blen, (int)result, nwritten);
  585|  4.30k|  BIO_clear_retry_flags(bio);
  586|  4.30k|  octx->io_result = result;
  587|  4.30k|  if(result) {
  ------------------
  |  Branch (587:6): [True: 0, False: 4.30k]
  ------------------
  588|      0|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (588:8): [True: 0, False: 0]
  ------------------
  589|      0|      BIO_set_retry_write(bio);
  590|      0|    return -1;
  591|      0|  }
  592|  4.30k|  return (int)nwritten;
  593|  4.30k|}
openssl.c:ossl_bio_cf_in_read:
  596|  2.96k|{
  597|  2.96k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  598|  2.96k|  struct ssl_connect_data *connssl = cf->ctx;
  599|  2.96k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
  600|  2.96k|  struct Curl_easy *data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  689|  2.96k|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  221|  2.96k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (689:30): [True: 2.96k, False: 0]
  |  |  ------------------
  ------------------
  601|  2.96k|  size_t nread;
  602|  2.96k|  CURLcode result, r2;
  603|       |
  604|  2.96k|  DEBUGASSERT(data);
  ------------------
  |  | 1077|  2.96k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (604:3): [True: 0, False: 2.96k]
  |  Branch (604:3): [True: 2.96k, False: 0]
  ------------------
  605|       |  /* OpenSSL catches this case, so should we. */
  606|  2.96k|  if(!buf)
  ------------------
  |  Branch (606:6): [True: 0, False: 2.96k]
  ------------------
  607|      0|    return 0;
  608|  2.96k|  if(blen < 0)
  ------------------
  |  Branch (608:6): [True: 0, False: 2.96k]
  ------------------
  609|      0|    return 0;
  610|       |
  611|  2.96k|  result = Curl_conn_cf_recv(cf->next, data, buf, (size_t)blen, &nread);
  612|  2.96k|  CURL_TRC_CF(data, cf, "ossl_bio_cf_in_read(len=%d) -> %d, %zu",
  ------------------
  |  |  153|  2.96k|  do {                                          \
  |  |  154|  2.96k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.96k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  5.92k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.96k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.96k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  5.92k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->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.96k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_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.96k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.96k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.96k]
  |  |  ------------------
  ------------------
  613|  2.96k|              blen, (int)result, nread);
  614|  2.96k|  BIO_clear_retry_flags(bio);
  615|  2.96k|  octx->io_result = result;
  616|  2.96k|  if(result) {
  ------------------
  |  Branch (616:6): [True: 448, False: 2.51k]
  ------------------
  617|    448|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (617:8): [True: 448, False: 0]
  ------------------
  618|    448|      BIO_set_retry_read(bio);
  619|    448|  }
  620|  2.51k|  else {
  621|       |    /* feeding data to OpenSSL means SSL_read() might succeed */
  622|  2.51k|    connssl->input_pending = TRUE;
  ------------------
  |  | 1051|  2.51k|#define TRUE true
  ------------------
  623|  2.51k|    if(nread == 0)
  ------------------
  |  Branch (623:8): [True: 1.82k, False: 690]
  ------------------
  624|  1.82k|      connssl->peer_closed = TRUE;
  ------------------
  |  | 1051|  1.82k|#define TRUE true
  ------------------
  625|  2.51k|  }
  626|       |
  627|       |  /* Before returning server replies to the SSL instance, we need
  628|       |   * to have setup the x509 store or verification fails. */
  629|  2.96k|  if(!octx->x509_store_setup) {
  ------------------
  |  Branch (629:6): [True: 2.22k, False: 741]
  ------------------
  630|  2.22k|    r2 = Curl_ssl_setup_x509_store(cf, data, octx);
  631|  2.22k|    if(r2) {
  ------------------
  |  Branch (631:8): [True: 1.78k, False: 435]
  ------------------
  632|  1.78k|      BIO_clear_retry_flags(bio);
  633|  1.78k|      octx->io_result = r2;
  634|  1.78k|      return -1;
  635|  1.78k|    }
  636|    435|    octx->x509_store_setup = TRUE;
  ------------------
  |  | 1051|    435|#define TRUE true
  ------------------
  637|    435|  }
  638|  1.17k|  return result ? -1 : (int)nread;
  ------------------
  |  Branch (638:10): [True: 437, False: 739]
  ------------------
  639|  2.96k|}
openssl.c:ossl_bio_cf_ctrl:
  534|  10.9k|{
  535|  10.9k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  536|  10.9k|  long ret = 1;
  537|       |
  538|  10.9k|  (void)cf;
  539|  10.9k|  (void)ptr;
  540|  10.9k|  switch(cmd) {
  541|      0|  case BIO_CTRL_GET_CLOSE:
  ------------------
  |  Branch (541:3): [True: 0, False: 10.9k]
  ------------------
  542|      0|    ret = (long)BIO_get_shutdown(bio);
  543|      0|    break;
  544|      0|  case BIO_CTRL_SET_CLOSE:
  ------------------
  |  Branch (544:3): [True: 0, False: 10.9k]
  ------------------
  545|      0|    BIO_set_shutdown(bio, (int)num);
  546|      0|    break;
  547|  4.30k|  case BIO_CTRL_FLUSH:
  ------------------
  |  Branch (547:3): [True: 4.30k, False: 6.61k]
  ------------------
  548|       |    /* we do no delayed writes, but if we ever would, this
  549|       |     * needs to trigger it. */
  550|  4.30k|    ret = 1;
  551|  4.30k|    break;
  552|      0|  case BIO_CTRL_DUP:
  ------------------
  |  Branch (552:3): [True: 0, False: 10.9k]
  ------------------
  553|      0|    ret = 1;
  554|      0|    break;
  555|  1.96k|  case BIO_CTRL_EOF: {
  ------------------
  |  Branch (555:3): [True: 1.96k, False: 8.94k]
  ------------------
  556|       |    /* EOF has been reached on input? */
  557|  1.96k|    struct ssl_connect_data *connssl = cf->ctx;
  558|  1.96k|    return connssl->peer_closed;
  559|      0|  }
  560|  4.64k|  default:
  ------------------
  |  Branch (560:3): [True: 4.64k, False: 6.27k]
  ------------------
  561|  4.64k|    ret = 0;
  562|  4.64k|    break;
  563|  10.9k|  }
  564|  8.94k|  return ret;
  565|  10.9k|}
openssl.c:ossl_bio_cf_create:
  519|  2.32k|{
  520|  2.32k|  BIO_set_shutdown(bio, 1);
  521|  2.32k|  BIO_set_init(bio, 1);
  522|       |  BIO_set_data(bio, NULL);
  523|  2.32k|  return 1;
  524|  2.32k|}
openssl.c:ossl_bio_cf_destroy:
  527|  2.32k|{
  528|  2.32k|  if(!bio)
  ------------------
  |  Branch (528:6): [True: 0, False: 2.32k]
  ------------------
  529|      0|    return 0;
  530|  2.32k|  return 1;
  531|  2.32k|}
openssl.c:ossl_connect_step2:
 4149|  2.74k|{
 4150|  2.74k|  int err;
 4151|  2.74k|  struct ssl_connect_data *connssl = cf->ctx;
 4152|  2.74k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 4153|  2.74k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 4154|  2.74k|  DEBUGASSERT(connssl->connecting_state == ssl_connect_2);
  ------------------
  |  | 1077|  2.74k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4154:3): [True: 0, False: 2.74k]
  |  Branch (4154:3): [True: 2.74k, False: 0]
  ------------------
 4155|  2.74k|  DEBUGASSERT(octx);
  ------------------
  |  | 1077|  2.74k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4155:3): [True: 0, False: 2.74k]
  |  Branch (4155:3): [True: 2.74k, False: 0]
  ------------------
 4156|       |
 4157|  2.74k|  connssl->io_need = CURL_SSL_IO_NEED_NONE;
  ------------------
  |  |  105|  2.74k|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
 4158|  2.74k|  ERR_clear_error();
 4159|       |
 4160|  2.74k|  err = SSL_connect(octx->ssl);
 4161|       |
 4162|  2.74k|  if(!octx->x509_store_setup) {
  ------------------
  |  Branch (4162:6): [True: 1.88k, False: 861]
  ------------------
 4163|       |    /* After having send off the ClientHello, we prepare the x509
 4164|       |     * store to verify the coming certificate from the server */
 4165|  1.88k|    CURLcode result = Curl_ssl_setup_x509_store(cf, data, octx);
 4166|  1.88k|    if(result)
  ------------------
  |  Branch (4166:8): [True: 1.88k, False: 3]
  ------------------
 4167|  1.88k|      return result;
 4168|      3|    octx->x509_store_setup = TRUE;
  ------------------
  |  | 1051|      3|#define TRUE true
  ------------------
 4169|      3|  }
 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|    864|  if(err != 1) {
  ------------------
  |  Branch (4182:6): [True: 864, False: 0]
  ------------------
 4183|    864|    int detail = SSL_get_error(octx->ssl, err);
 4184|    864|    CURL_TRC_CF(data, cf, "SSL_connect() -> err=%d, detail=%d", err, detail);
  ------------------
  |  |  153|    864|  do {                                          \
  |  |  154|    864|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    864|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.72k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 864, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 864]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.72k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    864|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    864|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    864|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 864]
  |  |  ------------------
  ------------------
 4185|       |
 4186|    864|    if(detail == SSL_ERROR_WANT_READ) {
  ------------------
  |  Branch (4186:8): [True: 437, False: 427]
  ------------------
 4187|    437|      CURL_TRC_CF(data, cf, "SSL_connect() -> want recv");
  ------------------
  |  |  153|    437|  do {                                          \
  |  |  154|    437|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    437|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    874|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 437, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 437]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    874|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    437|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    437|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    437|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 437]
  |  |  ------------------
  ------------------
 4188|    437|      connssl->io_need = CURL_SSL_IO_NEED_RECV;
  ------------------
  |  |  106|    437|#define CURL_SSL_IO_NEED_RECV   (1 << 0)
  ------------------
 4189|    437|      return CURLE_AGAIN;
 4190|    437|    }
 4191|    427|    if(detail == SSL_ERROR_WANT_WRITE) {
  ------------------
  |  Branch (4191:8): [True: 0, False: 427]
  ------------------
 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|    427|#ifdef SSL_ERROR_WANT_ASYNC
 4197|    427|    if(detail == SSL_ERROR_WANT_ASYNC) {
  ------------------
  |  Branch (4197:8): [True: 0, False: 427]
  ------------------
 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|    427|#endif
 4203|    427|#ifdef SSL_ERROR_WANT_RETRY_VERIFY
 4204|    427|    if(detail == SSL_ERROR_WANT_RETRY_VERIFY) {
  ------------------
  |  Branch (4204:8): [True: 0, False: 427]
  ------------------
 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|    427|#endif
 4210|    427|    else {
 4211|       |      /* untreated error */
 4212|    427|      sslerr_t errdetail;
 4213|    427|      char error_buffer[256] = "";
 4214|    427|      CURLcode result;
 4215|    427|      long lerr;
 4216|    427|      int lib;
 4217|    427|      int reason;
 4218|       |
 4219|       |      /* the connection failed, we are not waiting for anything else. */
 4220|    427|      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|    427|      errdetail = ERR_get_error();
 4225|       |
 4226|       |      /* Extract which lib and reason */
 4227|    427|      lib = ERR_GET_LIB(errdetail);
 4228|    427|      reason = ERR_GET_REASON(errdetail);
 4229|       |
 4230|    427|      if((lib == ERR_LIB_SSL) &&
  ------------------
  |  Branch (4230:10): [True: 425, False: 2]
  ------------------
 4231|    425|         ((reason == SSL_R_CERTIFICATE_VERIFY_FAILED)
  ------------------
  |  Branch (4231:11): [True: 0, False: 425]
  ------------------
 4232|       |/* Missing from OpenSSL 4+ OPENSSL_NO_DEPRECATED_3_0 builds */
 4233|    425|#ifdef SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED
 4234|    425|          || (reason == SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED)
  ------------------
  |  Branch (4234:14): [True: 1, False: 424]
  ------------------
 4235|    425|#endif
 4236|    425|         )) {
 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|    426|#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|    426|      else if((lib == ERR_LIB_SSL) &&
  ------------------
  |  Branch (4251:15): [True: 424, False: 2]
  ------------------
 4252|    424|              (reason == SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED)) {
  ------------------
  |  Branch (4252:15): [True: 1, False: 423]
  ------------------
 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|    425|#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|    425|      else {
 4277|    425|        result = CURLE_SSL_CONNECT_ERROR;
 4278|    425|        failf(data, "TLS connect error: %s",
  ------------------
  |  |   62|    425|#define failf Curl_failf
  ------------------
 4279|    425|              ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)));
 4280|    425|      }
 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|    427|      if(result == CURLE_SSL_CONNECT_ERROR && errdetail == 0) {
  ------------------
  |  Branch (4288:10): [True: 425, False: 2]
  |  Branch (4288:47): [True: 2, False: 423]
  ------------------
 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|    427|      return result;
 4300|    427|    }
 4301|    427|  }
 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|    864|}
openssl.c:ossl_close:
 1961|  3.13k|{
 1962|  3.13k|  struct ssl_connect_data *connssl = cf->ctx;
 1963|  3.13k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 1964|       |
 1965|  3.13k|  (void)data;
 1966|  3.13k|  DEBUGASSERT(octx);
  ------------------
  |  | 1077|  3.13k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1966:3): [True: 0, False: 3.13k]
  |  Branch (1966:3): [True: 3.13k, False: 0]
  ------------------
 1967|       |
 1968|  3.13k|  connssl->input_pending = FALSE;
  ------------------
  |  | 1054|  3.13k|#define FALSE false
  ------------------
 1969|  3.13k|  if(octx->ssl) {
  ------------------
  |  Branch (1969:6): [True: 2.32k, False: 813]
  ------------------
 1970|  2.32k|    SSL_free(octx->ssl);
 1971|  2.32k|    octx->ssl = NULL;
 1972|  2.32k|  }
 1973|  3.13k|  if(octx->ssl_ctx) {
  ------------------
  |  Branch (1973:6): [True: 3.03k, False: 99]
  ------------------
 1974|  3.03k|    SSL_CTX_free(octx->ssl_ctx);
 1975|  3.03k|    octx->ssl_ctx = NULL;
 1976|  3.03k|    octx->x509_store_setup = FALSE;
  ------------------
  |  | 1054|  3.03k|#define FALSE false
  ------------------
 1977|  3.03k|  }
 1978|  3.13k|  if(octx->bio_method) {
  ------------------
  |  Branch (1978:6): [True: 2.32k, False: 814]
  ------------------
 1979|  2.32k|    ossl_bio_cf_method_free(octx->bio_method);
 1980|       |    octx->bio_method = NULL;
 1981|  2.32k|  }
 1982|  3.13k|}
openssl.c:ossl_bio_cf_method_free:
  655|  2.32k|{
  656|  2.32k|  if(m)
  ------------------
  |  Branch (656:6): [True: 2.32k, False: 0]
  ------------------
  657|  2.32k|    BIO_meth_free(m);
  658|  2.32k|}
openssl.c:ossl_close_all:
 1989|  23.9k|{
 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|  23.9k|  (void)data;
 1998|  23.9k|#endif
 1999|  23.9k|#ifdef OPENSSL_HAS_PROVIDERS
 2000|  23.9k|  ossl_provider_cleanup(data);
 2001|  23.9k|#endif
 2002|  23.9k|}
openssl.c:ossl_set_engine:
 1658|    769|{
 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|    769|#ifdef OPENSSL_HAS_PROVIDERS
 1687|    769|  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|    769|}
openssl.c:ossl_set_engine_default:
 1698|      4|{
 1699|       |#ifdef USE_OPENSSL_ENGINE
 1700|       |  if(data->state.engine) {
 1701|       |    if(ENGINE_set_default(data->state.engine, ENGINE_METHOD_ALL) > 0) {
 1702|       |      infof(data, "set default crypto engine '%s'",
 1703|       |            ENGINE_get_id(data->state.engine));
 1704|       |    }
 1705|       |    else {
 1706|       |      failf(data, "set default crypto engine '%s' failed",
 1707|       |            ENGINE_get_id(data->state.engine));
 1708|       |      return CURLE_SSL_ENGINE_SETFAILED;
 1709|       |    }
 1710|       |  }
 1711|       |#else
 1712|      4|  (void)data;
 1713|      4|#endif
 1714|      4|  return CURLE_OK;
 1715|      4|}

Curl_ssl_backend:
  134|  11.7k|{
  135|  11.7k|#ifdef USE_SSL
  136|  11.7k|  multissl_setup(NULL);
  137|  11.7k|  return Curl_ssl->info.id;
  138|       |#else
  139|       |  return CURLSSLBACKEND_NONE;
  140|       |#endif
  141|  11.7k|}
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|  23.9k|{
  231|  23.9k|  if(Curl_ssl->close_all)
  ------------------
  |  Branch (231:6): [True: 23.9k, False: 0]
  ------------------
  232|  23.9k|    Curl_ssl->close_all(data);
  233|  23.9k|}
Curl_ssl_adjust_pollset:
  238|    437|{
  239|    437|  struct ssl_connect_data *connssl = cf->ctx;
  240|       |
  241|    437|  if(connssl->io_need) {
  ------------------
  |  Branch (241:6): [True: 437, False: 0]
  ------------------
  242|    437|    curl_socket_t sock = Curl_conn_cf_get_socket(cf->next, data);
  243|    437|    CURLcode result = CURLE_OK;
  244|    437|    if(sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|    437|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (244:8): [True: 437, False: 0]
  ------------------
  245|    437|      if(connssl->io_need & CURL_SSL_IO_NEED_SEND) {
  ------------------
  |  |  107|    437|#define CURL_SSL_IO_NEED_SEND   (1 << 1)
  ------------------
  |  Branch (245:10): [True: 0, False: 437]
  ------------------
  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|    437|      else {
  251|    437|        result = Curl_pollset_set_in_only(data, ps, sock);
  ------------------
  |  |  172|    437|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|    437|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|    437|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
  252|    437|        CURL_TRC_CF(data, cf, "adjust_pollset, POLLIN fd=%" FMT_SOCKET_T,
  ------------------
  |  |  153|    437|  do {                                          \
  |  |  154|    437|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    437|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    874|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 437, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 437]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    874|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    437|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    437|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    437|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 437]
  |  |  ------------------
  ------------------
  253|    437|                    sock);
  254|    437|      }
  255|    437|    }
  256|    437|    return result;
  257|    437|  }
  258|      0|  return CURLE_OK;
  259|    437|}
Curl_ssl_set_engine:
  264|    769|{
  265|    769|  if(Curl_ssl->set_engine)
  ------------------
  |  Branch (265:6): [True: 769, False: 0]
  ------------------
  266|    769|    return Curl_ssl->set_engine(data, engine);
  267|      0|  return CURLE_NOT_BUILT_IN;
  268|    769|}
Curl_ssl_set_engine_default:
  273|      4|{
  274|      4|  if(Curl_ssl->set_engine_default)
  ------------------
  |  Branch (274:6): [True: 4, False: 0]
  ------------------
  275|      4|    return Curl_ssl->set_engine_default(data);
  276|      0|  return CURLE_NOT_BUILT_IN;
  277|      4|}
Curl_ssl_free_certinfo:
  299|  55.4k|{
  300|  55.4k|  struct curl_certinfo *ci = &data->info.certs;
  301|       |
  302|  55.4k|  if(ci->num_of_certs) {
  ------------------
  |  Branch (302:6): [True: 0, False: 55.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|  55.4k|}
Curl_ssl_random:
  371|  3.90k|{
  372|  3.90k|  DEBUGASSERT(length == sizeof(int));
  ------------------
  |  | 1077|  3.90k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (372:3): [True: 0, False: 3.90k]
  |  Branch (372:3): [True: 3.90k, False: 0]
  ------------------
  373|  3.90k|  if(Curl_ssl->random)
  ------------------
  |  Branch (373:6): [True: 3.90k, False: 0]
  ------------------
  374|  3.90k|    return Curl_ssl->random(data, buffer, length);
  375|      0|  else
  376|      0|    return CURLE_NOT_BUILT_IN;
  377|  3.90k|}
Curl_ssl_cert_status_request:
  589|    686|{
  590|    686|  if(Curl_ssl->cert_status_request)
  ------------------
  |  Branch (590:6): [True: 686, False: 0]
  ------------------
  591|    686|    return Curl_ssl->cert_status_request();
  592|      0|  return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  593|    686|}
Curl_ssl_peer_cleanup:
  871|  3.13k|{
  872|  3.13k|  Curl_peer_unlink(&peer->origin);
  873|  3.13k|  Curl_peer_unlink(&peer->peer);
  874|  3.13k|  curlx_safefree(peer->sni);
  ------------------
  |  | 1332|  3.13k|  do {                      \
  |  | 1333|  3.13k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  3.13k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.13k|    (ptr) = NULL;           \
  |  | 1335|  3.13k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.13k]
  |  |  ------------------
  ------------------
  875|  3.13k|  curlx_safefree(peer->scache_key);
  ------------------
  |  | 1332|  3.13k|  do {                      \
  |  | 1333|  3.13k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  3.13k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.13k|    (ptr) = NULL;           \
  |  | 1335|  3.13k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.13k]
  |  |  ------------------
  ------------------
  876|  3.13k|  peer->transport = TRNSPRT_NONE;
  ------------------
  |  |  248|  3.13k|#define TRNSPRT_NONE 0
  ------------------
  877|  3.13k|  peer->type = CURL_SSL_PEER_DNS;
  878|  3.13k|}
Curl_ssl_peer_init:
  905|  3.13k|{
  906|  3.13k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  907|       |
  908|       |  /* We expect a clean struct, e.g. called only ONCE */
  909|  3.13k|  if(!ssl_peer || !origin) {
  ------------------
  |  Branch (909:6): [True: 0, False: 3.13k]
  |  Branch (909:19): [True: 0, False: 3.13k]
  ------------------
  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|  3.13k|  DEBUGASSERT(!ssl_peer->origin);
  ------------------
  |  | 1077|  3.13k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (913:3): [True: 0, False: 3.13k]
  |  Branch (913:3): [True: 3.13k, False: 0]
  ------------------
  914|  3.13k|  DEBUGASSERT(!ssl_peer->peer);
  ------------------
  |  | 1077|  3.13k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (914:3): [True: 0, False: 3.13k]
  |  Branch (914:3): [True: 3.13k, False: 0]
  ------------------
  915|  3.13k|  DEBUGASSERT(!ssl_peer->sni);
  ------------------
  |  | 1077|  3.13k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (915:3): [True: 0, False: 3.13k]
  |  Branch (915:3): [True: 3.13k, False: 0]
  ------------------
  916|  3.13k|  ssl_peer->transport = transport;
  917|       |
  918|  3.13k|  Curl_peer_link(&ssl_peer->origin, origin);
  919|  3.13k|  Curl_peer_link(&ssl_peer->peer, peer);
  920|  3.13k|  ssl_peer->type = get_peer_type(origin->hostname);
  921|  3.13k|  if(ssl_peer->type == CURL_SSL_PEER_DNS) {
  ------------------
  |  Branch (921:6): [True: 1.42k, False: 1.71k]
  ------------------
  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.42k|    size_t len = strlen(origin->hostname);
  925|  1.42k|    if(len && (origin->hostname[len - 1] == '.'))
  ------------------
  |  Branch (925:8): [True: 1.42k, False: 0]
  |  Branch (925:15): [True: 8, False: 1.41k]
  ------------------
  926|      8|      len--;
  927|  1.42k|    if(len < USHRT_MAX) {
  ------------------
  |  Branch (927:8): [True: 1.42k, False: 0]
  ------------------
  928|  1.42k|      ssl_peer->sni = curlx_calloc(1, len + 1);
  ------------------
  |  | 1485|  1.42k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  929|  1.42k|      if(!ssl_peer->sni)
  ------------------
  |  Branch (929:10): [True: 0, False: 1.42k]
  ------------------
  930|      0|        goto out;
  931|  1.42k|      Curl_strntolower(ssl_peer->sni, origin->hostname, len);
  932|  1.42k|      ssl_peer->sni[len] = 0;
  933|  1.42k|    }
  934|  1.42k|  }
  935|       |
  936|  3.13k|  result = Curl_ssl_peer_key_make(ssl_peer, sslc, tls_id,
  937|  3.13k|                                  &ssl_peer->scache_key);
  938|       |
  939|  3.13k|out:
  940|  3.13k|  if(result)
  ------------------
  |  Branch (940:6): [True: 2, False: 3.13k]
  ------------------
  941|      2|    Curl_ssl_peer_cleanup(ssl_peer);
  942|  3.13k|  return result;
  943|  3.13k|}
Curl_cf_ssl_insert_after:
 1417|  2.72k|{
 1418|  2.72k|  struct Curl_cfilter *cf;
 1419|  2.72k|  CURLcode result;
 1420|       |
 1421|  2.72k|  result = cf_ssl_create(&cf, data, cf_at->conn);
 1422|  2.72k|  if(!result)
  ------------------
  |  Branch (1422:6): [True: 2.72k, False: 0]
  ------------------
 1423|  2.72k|    result = cf_ssl_peer_init(cf, origin, peer, &cf_at->conn->ssl_config);
 1424|  2.72k|  if(!result)
  ------------------
  |  Branch (1424:6): [True: 2.71k, False: 2]
  ------------------
 1425|  2.71k|    Curl_conn_cf_insert_after(cf_at, cf);
 1426|      2|  else if(cf)
  ------------------
  |  Branch (1426:11): [True: 2, False: 0]
  ------------------
 1427|      2|    Curl_conn_cf_discard_chain(&cf, data);
 1428|  2.72k|  return result;
 1429|  2.72k|}
Curl_cf_ssl_proxy_insert_after:
 1469|    415|{
 1470|    415|  struct Curl_cfilter *cf;
 1471|    415|  CURLcode result;
 1472|       |
 1473|    415|  result = cf_ssl_proxy_create(&cf, data, cf_at->conn);
 1474|    415|  if(!result)
  ------------------
  |  Branch (1474:6): [True: 415, False: 0]
  ------------------
 1475|    415|    result = cf_ssl_peer_init(cf, peer, NULL, &cf_at->conn->proxy_ssl_config);
 1476|    415|  if(!result)
  ------------------
  |  Branch (1476:6): [True: 415, False: 0]
  ------------------
 1477|    415|    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|    415|  return result;
 1481|    415|}
Curl_ssl_supports:
 1486|  14.3k|{
 1487|  14.3k|  (void)data;
 1488|  14.3k|  return (Curl_ssl->supports & ssl_option);
 1489|  14.3k|}
Curl_ssl_cf_is_proxy:
 1571|  49.0k|{
 1572|  49.0k|  return (cf->cft->flags & CF_TYPE_SSL) && (cf->cft->flags & CF_TYPE_PROXY);
  ------------------
  |  |  203|  49.0k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
                return (cf->cft->flags & CF_TYPE_SSL) && (cf->cft->flags & CF_TYPE_PROXY);
  ------------------
  |  |  205|  49.0k|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (1572:10): [True: 49.0k, False: 0]
  |  Branch (1572:44): [True: 6.61k, False: 42.4k]
  ------------------
 1573|  49.0k|}
Curl_ssl_cf_get_config:
 1577|  20.4k|{
 1578|       |#ifdef CURL_DISABLE_PROXY
 1579|       |  (void)cf;
 1580|       |  return &data->set.ssl;
 1581|       |#else
 1582|  20.4k|  return Curl_ssl_cf_is_proxy(cf) ? &data->set.proxy_ssl : &data->set.ssl;
  ------------------
  |  Branch (1582:10): [True: 2.89k, False: 17.6k]
  ------------------
 1583|  20.4k|#endif
 1584|  20.4k|}
Curl_ssl_cf_get_primary_config:
 1588|  28.5k|{
 1589|       |#ifdef CURL_DISABLE_PROXY
 1590|       |  return &cf->conn->ssl_config;
 1591|       |#else
 1592|  28.5k|  return Curl_ssl_cf_is_proxy(cf) ?
  ------------------
  |  Branch (1592:10): [True: 3.72k, False: 24.8k]
  ------------------
 1593|  24.8k|    &cf->conn->proxy_ssl_config : &cf->conn->ssl_config;
 1594|  28.5k|#endif
 1595|  28.5k|}
Curl_alpn_to_proto_buf:
 1599|  2.31k|{
 1600|  2.31k|  size_t i, len;
 1601|  2.31k|  int off = 0;
 1602|  2.31k|  unsigned char blen;
 1603|       |
 1604|  2.31k|  memset(buf, 0, sizeof(*buf));
 1605|  6.52k|  for(i = 0; spec && i < spec->count; ++i) {
  ------------------
  |  Branch (1605:14): [True: 6.52k, False: 0]
  |  Branch (1605:22): [True: 4.21k, False: 2.31k]
  ------------------
 1606|  4.21k|    len = strlen(spec->entries[i]);
 1607|  4.21k|    if(len >= ALPN_NAME_MAX)
  ------------------
  |  |   52|  4.21k|#define ALPN_NAME_MAX      10
  ------------------
  |  Branch (1607:8): [True: 0, False: 4.21k]
  ------------------
 1608|      0|      return CURLE_FAILED_INIT;
 1609|  4.21k|    blen = (unsigned char)len;
 1610|  4.21k|    if(off + blen + 1 >= (int)sizeof(buf->data))
  ------------------
  |  Branch (1610:8): [True: 0, False: 4.21k]
  ------------------
 1611|      0|      return CURLE_FAILED_INIT;
 1612|  4.21k|    buf->data[off++] = blen;
 1613|  4.21k|    memcpy(buf->data + off, spec->entries[i], blen);
 1614|  4.21k|    off += blen;
 1615|  4.21k|  }
 1616|  2.31k|  buf->len = off;
 1617|  2.31k|  return CURLE_OK;
 1618|  2.31k|}
Curl_alpn_to_proto_str:
 1622|  2.31k|{
 1623|  2.31k|  size_t i, len;
 1624|  2.31k|  size_t off = 0;
 1625|       |
 1626|  2.31k|  memset(buf, 0, sizeof(*buf));
 1627|  6.52k|  for(i = 0; spec && i < spec->count; ++i) {
  ------------------
  |  Branch (1627:14): [True: 6.52k, False: 0]
  |  Branch (1627:22): [True: 4.21k, False: 2.31k]
  ------------------
 1628|  4.21k|    len = strlen(spec->entries[i]);
 1629|  4.21k|    if(len >= ALPN_NAME_MAX)
  ------------------
  |  |   52|  4.21k|#define ALPN_NAME_MAX      10
  ------------------
  |  Branch (1629:8): [True: 0, False: 4.21k]
  ------------------
 1630|      0|      return CURLE_FAILED_INIT;
 1631|  4.21k|    if(off + len + 2 >= sizeof(buf->data))
  ------------------
  |  Branch (1631:8): [True: 0, False: 4.21k]
  ------------------
 1632|      0|      return CURLE_FAILED_INIT;
 1633|  4.21k|    if(off)
  ------------------
  |  Branch (1633:8): [True: 1.90k, False: 2.31k]
  ------------------
 1634|  1.90k|      buf->data[off++] = ',';
 1635|  4.21k|    memcpy(buf->data + off, spec->entries[i], len);
 1636|  4.21k|    off += len;
 1637|  4.21k|  }
 1638|  2.31k|  buf->data[off] = '\0';
 1639|  2.31k|  buf->len = (int)off;
 1640|  2.31k|  return CURLE_OK;
 1641|  2.31k|}
Curl_alpn_copy:
 1666|  2.32k|{
 1667|  2.32k|  if(src)
  ------------------
  |  Branch (1667:6): [True: 2.31k, False: 10]
  ------------------
 1668|  2.31k|    memcpy(dest, src, sizeof(*dest));
 1669|     10|  else
 1670|     10|    memset(dest, 0, sizeof(*dest));
 1671|  2.32k|}
vtls.c:multissl_setup:
  782|  11.7k|{
  783|  11.7k|  int i;
  784|  11.7k|  char *env;
  785|       |
  786|  11.7k|  if(Curl_ssl != &Curl_ssl_multi)
  ------------------
  |  Branch (786:6): [True: 11.7k, False: 0]
  ------------------
  787|  11.7k|    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|  3.13k|{
  882|  3.13k|  if(hostname && hostname[0]) {
  ------------------
  |  Branch (882:6): [True: 3.13k, False: 0]
  |  Branch (882:18): [True: 3.13k, False: 0]
  ------------------
  883|  3.13k|#ifdef USE_IPV6
  884|  3.13k|    struct in6_addr addr;
  885|       |#else
  886|       |    struct in_addr addr;
  887|       |#endif
  888|  3.13k|    if(curlx_inet_pton(AF_INET, hostname, &addr))
  ------------------
  |  Branch (888:8): [True: 1.65k, False: 1.48k]
  ------------------
  889|  1.65k|      return CURL_SSL_PEER_IPV4;
  890|  1.48k|#ifdef USE_IPV6
  891|  1.48k|    else if(curlx_inet_pton(AF_INET6, hostname, &addr)) {
  ------------------
  |  Branch (891:13): [True: 60, False: 1.42k]
  ------------------
  892|     60|      return CURL_SSL_PEER_IPV6;
  893|     60|    }
  894|  3.13k|#endif
  895|  3.13k|  }
  896|  1.42k|  return CURL_SSL_PEER_DNS;
  897|  3.13k|}
vtls.c:ssl_cf_destroy:
  946|  3.13k|{
  947|  3.13k|  struct ssl_connect_data *connssl = cf->ctx;
  948|  3.13k|  if(connssl) {
  ------------------
  |  Branch (948:6): [True: 3.13k, False: 0]
  ------------------
  949|  3.13k|    connssl->ssl_impl->close(cf, data);
  950|  3.13k|    connssl->state = ssl_connection_none;
  951|  3.13k|    connssl->connecting_state = ssl_connect_1;
  952|  3.13k|    connssl->prefs_checked = FALSE;
  ------------------
  |  | 1054|  3.13k|#define FALSE false
  ------------------
  953|  3.13k|    Curl_ssl_peer_cleanup(&connssl->peer);
  954|  3.13k|    Curl_ssl_session_destroy(connssl->session);
  955|  3.13k|    cf_ctx_free(connssl);
  956|  3.13k|    cf->ctx = NULL;
  957|  3.13k|  }
  958|       |  cf->connected = FALSE;
  ------------------
  |  | 1054|  3.13k|#define FALSE false
  ------------------
  959|  3.13k|}
vtls.c:cf_ctx_free:
  212|  3.13k|{
  213|  3.13k|  if(ctx) {
  ------------------
  |  Branch (213:6): [True: 3.13k, False: 0]
  ------------------
  214|  3.13k|    curlx_safefree(ctx->negotiated.alpn);
  ------------------
  |  | 1332|  3.13k|  do {                      \
  |  | 1333|  3.13k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  3.13k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.13k|    (ptr) = NULL;           \
  |  | 1335|  3.13k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.13k]
  |  |  ------------------
  ------------------
  215|  3.13k|    Curl_bufq_free(&ctx->earlydata);
  216|  3.13k|    curlx_free(ctx->backend);
  ------------------
  |  | 1488|  3.13k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  217|  3.13k|    curlx_free(ctx);
  ------------------
  |  | 1488|  3.13k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  218|  3.13k|  }
  219|  3.13k|}
vtls.c:ssl_cf_connect:
  964|  3.55k|{
  965|  3.55k|  struct ssl_connect_data *connssl = cf->ctx;
  966|  3.55k|  struct cf_call_data save;
  967|  3.55k|  CURLcode result;
  968|       |
  969|  3.55k|  if(cf->connected && (connssl->state != ssl_connection_deferred)) {
  ------------------
  |  Branch (969:6): [True: 0, False: 3.55k]
  |  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|  3.55k|  if(!cf->next || !connssl->peer.origin) {
  ------------------
  |  Branch (974:6): [True: 0, False: 3.55k]
  |  Branch (974:19): [True: 0, False: 3.55k]
  ------------------
  975|      0|    *done = FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  976|      0|    return CURLE_FAILED_INIT;
  977|      0|  }
  978|       |
  979|  3.55k|  if(!cf->next->connected) {
  ------------------
  |  Branch (979:6): [True: 0, False: 3.55k]
  ------------------
  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|  3.55k|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  660|  3.55k|  do { \
  |  |  661|  3.55k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  221|  3.55k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  662|  3.55k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1077|  3.55k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  663|  3.55k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  221|  3.55k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  664|  3.55k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  221|  3.55k|#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|  3.55k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  665|  3.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (665:11): [Folded, False: 3.55k]
  |  |  ------------------
  ------------------
  |  Branch (985:3): [True: 3.55k, False: 0]
  |  Branch (985:3): [True: 0, False: 0]
  |  Branch (985:3): [True: 3.55k, False: 0]
  |  Branch (985:3): [True: 0, False: 0]
  ------------------
  986|  3.55k|  CURL_TRC_CF(data, cf, "cf_connect()");
  ------------------
  |  |  153|  3.55k|  do {                                          \
  |  |  154|  3.55k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  3.55k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  7.11k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.55k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  7.11k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  3.55k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.55k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.55k]
  |  |  ------------------
  ------------------
  987|  3.55k|  DEBUGASSERT(connssl);
  ------------------
  |  | 1077|  3.55k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (987:3): [True: 0, False: 3.55k]
  |  Branch (987:3): [True: 3.55k, False: 0]
  ------------------
  988|       |
  989|  3.55k|  *done = FALSE;
  ------------------
  |  | 1054|  3.55k|#define FALSE false
  ------------------
  990|       |
  991|  3.55k|  if(!connssl->prefs_checked) {
  ------------------
  |  Branch (991:6): [True: 3.13k, False: 426]
  ------------------
  992|  3.13k|    if(!ssl_prefs_check(data)) {
  ------------------
  |  Branch (992:8): [True: 2, False: 3.13k]
  ------------------
  993|      2|      result = CURLE_SSL_CONNECT_ERROR;
  994|      2|      goto out;
  995|      2|    }
  996|  3.13k|    connssl->prefs_checked = TRUE;
  ------------------
  |  | 1051|  3.13k|#define TRUE true
  ------------------
  997|  3.13k|  }
  998|       |
  999|  3.55k|  result = connssl->ssl_impl->do_connect(cf, data, done);
 1000|       |
 1001|  3.55k|  if(!result && *done) {
  ------------------
  |  Branch (1001:6): [True: 437, False: 3.12k]
  |  Branch (1001:17): [True: 0, False: 437]
  ------------------
 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|  3.55k|out:
 1020|  3.55k|  CURL_TRC_CF(data, cf, "cf_connect() -> %d, done=%d", (int)result, *done);
  ------------------
  |  |  153|  3.55k|  do {                                          \
  |  |  154|  3.55k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  3.55k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  7.11k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.55k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  7.11k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  3.55k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.55k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.55k]
  |  |  ------------------
  ------------------
 1021|  3.55k|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  668|  3.55k|  do { \
  |  |  669|  3.55k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1077|  3.55k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  670|  3.55k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1077|  3.55k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  671|  3.55k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  221|  3.55k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|  3.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (672:11): [Folded, False: 3.55k]
  |  |  ------------------
  ------------------
  |  Branch (1021:3): [True: 0, False: 3.55k]
  |  Branch (1021:3): [True: 3.55k, False: 0]
  |  Branch (1021:3): [True: 3.55k, False: 0]
  |  Branch (1021:3): [True: 0, False: 0]
  |  Branch (1021:3): [True: 3.55k, False: 0]
  |  Branch (1021:3): [True: 0, False: 0]
  ------------------
 1022|  3.55k|  return result;
 1023|  3.55k|}
vtls.c:ssl_prefs_check:
  167|  3.13k|{
  168|       |  /* check for CURLOPT_SSLVERSION invalid parameter value */
  169|  3.13k|  const unsigned char sslver = data->set.ssl.primary.version;
  170|  3.13k|  if(sslver >= CURL_SSLVERSION_LAST) {
  ------------------
  |  | 2383|  3.13k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  ------------------
  |  Branch (170:6): [True: 0, False: 3.13k]
  ------------------
  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|  3.13k|  switch(data->set.ssl.primary.version_max) {
  176|  3.05k|  case CURL_SSLVERSION_MAX_NONE:
  ------------------
  |  | 2385|  3.05k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (176:3): [True: 3.05k, False: 79]
  ------------------
  177|  3.05k|  case CURL_SSLVERSION_MAX_DEFAULT:
  ------------------
  |  | 2386|  3.05k|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2375|  3.05k|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (177:3): [True: 2, False: 3.13k]
  ------------------
  178|  3.05k|    break;
  179|       |
  180|     77|  default:
  ------------------
  |  Branch (180:3): [True: 77, False: 3.05k]
  ------------------
  181|     77|    if((data->set.ssl.primary.version_max >> 16) < sslver) {
  ------------------
  |  Branch (181:8): [True: 2, False: 75]
  ------------------
  182|      2|      failf(data, "CURL_SSLVERSION_MAX incompatible with CURL_SSLVERSION");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  183|      2|      return FALSE;
  ------------------
  |  | 1054|      2|#define FALSE false
  ------------------
  184|      2|    }
  185|  3.13k|  }
  186|       |
  187|  3.13k|  return TRUE;
  ------------------
  |  | 1051|  3.13k|#define TRUE true
  ------------------
  188|  3.13k|}
vtls.c:ssl_cf_adjust_pollset:
 1220|    437|{
 1221|    437|  struct ssl_connect_data *connssl = cf->ctx;
 1222|    437|  struct cf_call_data save;
 1223|    437|  CURLcode result;
 1224|       |
 1225|    437|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  660|    437|  do { \
  |  |  661|    437|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  221|    437|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  662|    437|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1077|    437|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  663|    437|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  221|    437|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  664|    437|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  221|    437|#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|    437|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  665|    437|  } while(0)
  |  |  ------------------
  |  |  |  Branch (665:11): [Folded, False: 437]
  |  |  ------------------
  ------------------
  |  Branch (1225:3): [True: 437, False: 0]
  |  Branch (1225:3): [True: 0, False: 0]
  |  Branch (1225:3): [True: 437, False: 0]
  |  Branch (1225:3): [True: 0, False: 0]
  ------------------
 1226|    437|  result = connssl->ssl_impl->adjust_pollset(cf, data, ps);
 1227|    437|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  668|    437|  do { \
  |  |  669|    437|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1077|    437|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  670|    437|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1077|    437|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  671|    437|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  221|    437|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|    437|  } while(0)
  |  |  ------------------
  |  |  |  Branch (672:11): [Folded, False: 437]
  |  |  ------------------
  ------------------
  |  Branch (1227:3): [True: 0, False: 437]
  |  Branch (1227:3): [True: 437, False: 0]
  |  Branch (1227:3): [True: 437, False: 0]
  |  Branch (1227:3): [True: 0, False: 0]
  |  Branch (1227:3): [True: 437, False: 0]
  |  Branch (1227:3): [True: 0, False: 0]
  ------------------
 1228|    437|  return result;
 1229|    437|}
vtls.c:ssl_cf_cntrl:
 1276|      4|{
 1277|      4|  struct ssl_connect_data *connssl = cf->ctx;
 1278|       |
 1279|      4|  (void)arg1;
 1280|      4|  (void)arg2;
 1281|      4|  (void)data;
 1282|      4|  switch(event) {
  ------------------
  |  Branch (1282:10): [True: 0, False: 4]
  ------------------
 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: 4]
  ------------------
 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|      4|  }
 1294|      4|  return CURLE_OK;
 1295|      4|}
vtls.c:ssl_cf_query:
 1234|  6.68k|{
 1235|  6.68k|  struct ssl_connect_data *connssl = cf->ctx;
 1236|       |
 1237|  6.68k|  switch(query) {
 1238|  3.12k|  case CF_QUERY_TIMER_APPCONNECT: {
  ------------------
  |  |  165|  3.12k|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  |  Branch (1238:3): [True: 3.12k, False: 3.56k]
  ------------------
 1239|  3.12k|    struct curltime *when = pres2;
 1240|  3.12k|    if(cf->connected && !Curl_ssl_cf_is_proxy(cf))
  ------------------
  |  Branch (1240:8): [True: 0, False: 3.12k]
  |  Branch (1240:25): [True: 0, False: 0]
  ------------------
 1241|      0|      *when = connssl->handshake_done;
 1242|  3.12k|    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: 6.68k]
  ------------------
 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: 6.68k]
  ------------------
 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: 6.68k]
  ------------------
 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|  3.56k|  default:
  ------------------
  |  Branch (1265:3): [True: 3.56k, False: 3.12k]
  ------------------
 1266|  3.56k|    break;
 1267|  6.68k|  }
 1268|  3.56k|  return cf->next ?
  ------------------
  |  Branch (1268:10): [True: 3.56k, False: 0]
  ------------------
 1269|  3.56k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1270|  3.56k|    CURLE_UNKNOWN_OPTION;
 1271|  6.68k|}
vtls.c:cf_ssl_create:
 1349|  2.72k|{
 1350|  2.72k|  struct Curl_cfilter *cf = NULL;
 1351|  2.72k|  struct ssl_connect_data *ctx;
 1352|  2.72k|  CURLcode result;
 1353|       |
 1354|  2.72k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1077|  2.72k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1354:3): [True: 0, False: 2.72k]
  |  Branch (1354:3): [True: 2.72k, 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.72k|  ctx = cf_ctx_new(data, alpn_get_spec(data->state.http_neg.wanted,
 1363|  2.72k|                                       data->state.http_neg.preferred,
 1364|  2.72k|                                       (bool)data->state.http_neg.only_10,
 1365|  2.72k|                                       (bool)conn->bits.tls_enable_alpn));
 1366|  2.72k|#endif
 1367|  2.72k|  if(!ctx) {
  ------------------
  |  Branch (1367:6): [True: 0, False: 2.72k]
  ------------------
 1368|      0|    result = CURLE_OUT_OF_MEMORY;
 1369|      0|    goto out;
 1370|      0|  }
 1371|       |
 1372|  2.72k|  result = Curl_cf_create(&cf, &Curl_cft_ssl, ctx);
 1373|       |
 1374|  2.72k|out:
 1375|  2.72k|  if(result)
  ------------------
  |  Branch (1375:6): [True: 0, False: 2.72k]
  ------------------
 1376|      0|    cf_ctx_free(ctx);
 1377|  2.72k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (1377:10): [True: 0, False: 2.72k]
  ------------------
 1378|  2.72k|  return result;
 1379|  2.72k|}
vtls.c:cf_ctx_new:
  192|  3.13k|{
  193|  3.13k|  struct ssl_connect_data *ctx;
  194|       |
  195|  3.13k|  (void)data;
  196|  3.13k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1485|  3.13k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  197|  3.13k|  if(!ctx)
  ------------------
  |  Branch (197:6): [True: 0, False: 3.13k]
  ------------------
  198|      0|    return NULL;
  199|       |
  200|  3.13k|  ctx->ssl_impl = Curl_ssl;
  201|  3.13k|  ctx->alpn = alpn;
  202|  3.13k|  Curl_bufq_init2(&ctx->earlydata, CURL_SSL_EARLY_MAX, 1, BUFQ_OPT_NO_SPARES);
  ------------------
  |  |  110|  3.13k|#define CURL_SSL_EARLY_MAX      (64 * 1024)
  ------------------
                Curl_bufq_init2(&ctx->earlydata, CURL_SSL_EARLY_MAX, 1, BUFQ_OPT_NO_SPARES);
  ------------------
  |  |  115|  3.13k|#define BUFQ_OPT_NO_SPARES   (1 << 1)
  ------------------
  203|  3.13k|  ctx->backend = curlx_calloc(1, ctx->ssl_impl->sizeof_ssl_backend_data);
  ------------------
  |  | 1485|  3.13k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  204|  3.13k|  if(!ctx->backend) {
  ------------------
  |  Branch (204:6): [True: 0, False: 3.13k]
  ------------------
  205|      0|    curlx_free(ctx);
  ------------------
  |  | 1488|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  206|      0|    return NULL;
  207|      0|  }
  208|  3.13k|  return ctx;
  209|  3.13k|}
vtls.c:alpn_get_spec:
  105|  3.13k|{
  106|  3.13k|  if(!use_alpn)
  ------------------
  |  Branch (106:6): [True: 10, False: 3.12k]
  ------------------
  107|     10|    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|  3.12k|  if(only_http_10 && (wanted & CURL_HTTP_V1x))
  ------------------
  |  |   40|      1|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (111:6): [True: 1, False: 3.12k]
  |  Branch (111:22): [True: 1, False: 0]
  ------------------
  112|      1|    return &ALPN_SPEC_H10_H11;
  113|  3.12k|#ifdef USE_HTTP2
  114|  3.12k|  if(wanted & CURL_HTTP_V2x) {
  ------------------
  |  |   41|  3.12k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (114:6): [True: 2.71k, False: 408]
  ------------------
  115|  2.71k|    if(wanted & CURL_HTTP_V1x)
  ------------------
  |  |   40|  2.71k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (115:8): [True: 2.71k, False: 2]
  ------------------
  116|  2.71k|      return (preferred == CURL_HTTP_V1x) ?
  ------------------
  |  |   40|  2.71k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (116:14): [True: 0, False: 2.71k]
  ------------------
  117|  2.71k|        &ALPN_SPEC_H11_H2 : &ALPN_SPEC_H2_H11;
  118|      2|    return &ALPN_SPEC_H2;
  119|  2.71k|  }
  120|       |#else
  121|       |  (void)wanted;
  122|       |  (void)preferred;
  123|       |#endif
  124|    408|  return &ALPN_SPEC_H11;
  125|  3.12k|}
vtls.c:cf_ssl_peer_init:
 1385|  3.13k|{
 1386|  3.13k|  struct ssl_connect_data *connssl = cf->ctx;
 1387|  3.13k|  char tls_id[80];
 1388|  3.13k|  connssl->ssl_impl->version(tls_id, sizeof(tls_id) - 1);
 1389|  3.13k|  return Curl_ssl_peer_init(&connssl->peer, origin, peer, sslc,
 1390|  3.13k|                            tls_id, TRNSPRT_TCP);
  ------------------
  |  |  249|  3.13k|#define TRNSPRT_TCP  3
  ------------------
 1391|  3.13k|}
vtls.c:cf_ssl_proxy_create:
 1436|    415|{
 1437|    415|  struct Curl_cfilter *cf = NULL;
 1438|    415|  struct ssl_connect_data *ctx;
 1439|    415|  CURLcode result;
 1440|       |  /* ALPN is default, but if user explicitly disables it, obey */
 1441|    415|  bool use_alpn = (bool)data->set.ssl_enable_alpn;
 1442|    415|  http_majors wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|    415|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 1443|       |
 1444|    415|  (void)conn;
 1445|    415|#ifdef USE_HTTP2
 1446|    415|  if(conn->http_proxy.proxytype == CURLPROXY_HTTPS2) {
  ------------------
  |  |  796|    415|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (1446:6): [True: 1, False: 414]
  ------------------
 1447|      1|    use_alpn = TRUE;
  ------------------
  |  | 1051|      1|#define TRUE true
  ------------------
 1448|      1|    wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|      1|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|      1|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 1449|      1|  }
 1450|    415|#endif
 1451|       |
 1452|    415|  ctx = cf_ctx_new(data, alpn_get_spec(wanted, 0, FALSE, use_alpn));
  ------------------
  |  | 1054|    415|#define FALSE false
  ------------------
 1453|    415|  if(!ctx) {
  ------------------
  |  Branch (1453:6): [True: 0, False: 415]
  ------------------
 1454|      0|    result = CURLE_OUT_OF_MEMORY;
 1455|      0|    goto out;
 1456|      0|  }
 1457|    415|  result = Curl_cf_create(&cf, &Curl_cft_ssl_proxy, ctx);
 1458|       |
 1459|    415|out:
 1460|    415|  if(result)
  ------------------
  |  Branch (1460:6): [True: 0, False: 415]
  ------------------
 1461|      0|    cf_ctx_free(ctx);
 1462|    415|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (1462:10): [True: 0, False: 415]
  ------------------
 1463|    415|  return result;
 1464|    415|}

Curl_ssl_config_init:
  105|  47.9k|{
  106|       |  /*
  107|       |   * libcurl 7.10 introduced SSL verification *by default*! This needs to be
  108|       |   * switched off unless wanted.
  109|       |   */
  110|  47.9k|  sslc->verifypeer = TRUE;
  ------------------
  |  | 1051|  47.9k|#define TRUE true
  ------------------
  111|  47.9k|  sslc->verifyhost = TRUE;
  ------------------
  |  | 1051|  47.9k|#define TRUE true
  ------------------
  112|       |  sslc->cache_session = TRUE; /* caching by default */
  ------------------
  |  | 1051|  47.9k|#define TRUE true
  ------------------
  113|  47.9k|}
Curl_ssl_config_cleanup:
  116|  61.2k|{
  117|  61.2k|  if(sslc->deep_copy) {
  ------------------
  |  Branch (117:6): [True: 11.3k, False: 49.9k]
  ------------------
  118|  11.3k|    curlx_safefree(sslc->CApath);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  119|  11.3k|    curlx_safefree(sslc->CAfile);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  120|  11.3k|    curlx_safefree(sslc->issuercert);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  121|  11.3k|    curlx_safefree(sslc->clientcert);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  122|  11.3k|    curlx_safefree(sslc->cipher_list);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  123|  11.3k|    curlx_safefree(sslc->cipher_list13);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  124|  11.3k|    curlx_safefree(sslc->pinned_key);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  125|  11.3k|    curlx_safefree(sslc->cert_blob);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  126|  11.3k|    curlx_safefree(sslc->ca_info_blob);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  127|  11.3k|    curlx_safefree(sslc->issuercert_blob);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  128|  11.3k|    curlx_safefree(sslc->key_blob);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  129|  11.3k|    curlx_safefree(sslc->curves);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  130|  11.3k|    curlx_safefree(sslc->signature_algorithms);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  131|  11.3k|    curlx_safefree(sslc->CRLfile);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  132|  11.3k|    curlx_safefree(sslc->cert_type);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  133|  11.3k|    curlx_safefree(sslc->key);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  134|  11.3k|    curlx_safefree(sslc->key_type);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  135|  11.3k|    curlx_safefree(sslc->key_passwd);
  ------------------
  |  | 1332|  11.3k|  do {                      \
  |  | 1333|  11.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|  11.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.3k|    (ptr) = NULL;           \
  |  | 1335|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  136|       |    sslc->deep_copy = FALSE;
  ------------------
  |  | 1054|  11.3k|#define FALSE false
  ------------------
  137|  11.3k|  }
  138|  61.2k|}
Curl_ssl_easy_config_complete:
  245|  5.85k|{
  246|  5.85k|  struct ssl_config_data *sslc = &data->set.ssl;
  247|  5.85k|#if defined(CURL_CA_PATH) || defined(CURL_CA_BUNDLE)
  248|  5.85k|  struct UserDefined *set = &data->set;
  249|  5.85k|  CURLcode result;
  250|  5.85k|#endif
  251|       |
  252|  5.85k|  ssl_easy_config_compl_options(origin, data->state.initial_origin, sslc);
  253|       |
  254|  5.85k|  if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
  ------------------
  |  Branch (254:6): [True: 5.85k, 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|  5.85k|#ifdef CURL_CA_PATH
  260|  5.85k|    if(!sslc->custom_capath && !set->str[STRING_SSL_CAPATH]) {
  ------------------
  |  Branch (260:8): [True: 5.22k, False: 628]
  |  Branch (260:32): [True: 5.22k, False: 0]
  ------------------
  261|  5.22k|      result = Curl_setstropt(&set->str[STRING_SSL_CAPATH], CURL_CA_PATH);
  ------------------
  |  |   32|  5.22k|#define CURL_CA_PATH "/etc/ssl/certs"
  ------------------
  262|  5.22k|      if(result)
  ------------------
  |  Branch (262:10): [True: 0, False: 5.22k]
  ------------------
  263|      0|        return result;
  264|  5.22k|    }
  265|  5.85k|#endif
  266|  5.85k|#ifdef CURL_CA_BUNDLE
  267|  5.85k|    if(!sslc->custom_cafile && !set->str[STRING_SSL_CAFILE]) {
  ------------------
  |  Branch (267:8): [True: 5.20k, False: 652]
  |  Branch (267:32): [True: 5.20k, False: 0]
  ------------------
  268|  5.20k|      result = Curl_setstropt(&set->str[STRING_SSL_CAFILE], CURL_CA_BUNDLE);
  ------------------
  |  |   26|  5.20k|#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
  ------------------
  269|  5.20k|      if(result)
  ------------------
  |  Branch (269:10): [True: 0, False: 5.20k]
  ------------------
  270|      0|        return result;
  271|  5.20k|    }
  272|  5.85k|#endif
  273|  5.85k|  }
  274|  5.85k|  sslc->primary.CAfile = data->set.str[STRING_SSL_CAFILE];
  275|  5.85k|  sslc->primary.CRLfile = data->set.str[STRING_SSL_CRLFILE];
  276|  5.85k|  sslc->primary.CApath = data->set.str[STRING_SSL_CAPATH];
  277|  5.85k|  sslc->primary.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST];
  278|  5.85k|  sslc->primary.cipher_list13 = data->set.str[STRING_SSL_CIPHER13_LIST];
  279|  5.85k|  sslc->primary.signature_algorithms =
  280|  5.85k|    data->set.str[STRING_SSL_SIGNATURE_ALGORITHMS];
  281|  5.85k|  sslc->primary.ca_info_blob = data->set.blobs[BLOB_CAINFO];
  282|  5.85k|  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|  5.85k|  sslc->primary.issuercert = data->set.str[STRING_SSL_ISSUERCERT];
  286|  5.85k|  sslc->primary.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT];
  287|       |
  288|  5.85k|  if(Curl_peer_equal(data->state.initial_origin, origin)) {
  ------------------
  |  Branch (288:6): [True: 5.85k, False: 0]
  ------------------
  289|  5.85k|    sslc->primary.pinned_key = data->set.str[STRING_SSL_PINNEDPUBLICKEY];
  290|  5.85k|    sslc->primary.cert_blob = data->set.blobs[BLOB_CERT];
  291|  5.85k|    sslc->primary.cert_type = data->set.str[STRING_CERT_TYPE];
  292|  5.85k|    sslc->primary.key = data->set.str[STRING_KEY];
  293|  5.85k|    sslc->primary.key_type = data->set.str[STRING_KEY_TYPE];
  294|  5.85k|    sslc->primary.key_passwd = data->set.str[STRING_KEY_PASSWD];
  295|  5.85k|    sslc->primary.clientcert = data->set.str[STRING_CERT];
  296|  5.85k|    sslc->primary.key_blob = data->set.blobs[BLOB_KEY];
  297|  5.85k|  }
  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|  5.85k|#ifndef CURL_DISABLE_PROXY
  310|  5.85k|  sslc = &data->set.proxy_ssl;
  311|       |  /* no initial origin for proxy, it is not changed for redirects */
  312|  5.85k|  ssl_easy_config_compl_options(NULL, NULL, sslc);
  313|       |
  314|  5.85k|  if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
  ------------------
  |  Branch (314:6): [True: 5.85k, 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|  5.85k|#ifdef CURL_CA_PATH
  320|  5.85k|    if(!sslc->custom_capath && !set->str[STRING_SSL_CAPATH_PROXY]) {
  ------------------
  |  Branch (320:8): [True: 5.85k, False: 2]
  |  Branch (320:32): [True: 5.82k, False: 24]
  ------------------
  321|  5.82k|      result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_PROXY],
  322|  5.82k|                              CURL_CA_PATH);
  ------------------
  |  |   32|  5.82k|#define CURL_CA_PATH "/etc/ssl/certs"
  ------------------
  323|  5.82k|      if(result)
  ------------------
  |  Branch (323:10): [True: 0, False: 5.82k]
  ------------------
  324|      0|        return result;
  325|  5.82k|    }
  326|  5.85k|#endif
  327|  5.85k|#ifdef CURL_CA_BUNDLE
  328|  5.85k|    if(!sslc->custom_cafile && !set->str[STRING_SSL_CAFILE_PROXY]) {
  ------------------
  |  Branch (328:8): [True: 5.85k, False: 2]
  |  Branch (328:32): [True: 5.82k, False: 24]
  ------------------
  329|  5.82k|      result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_PROXY],
  330|  5.82k|                              CURL_CA_BUNDLE);
  ------------------
  |  |   26|  5.82k|#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
  ------------------
  331|  5.82k|      if(result)
  ------------------
  |  Branch (331:10): [True: 0, False: 5.82k]
  ------------------
  332|      0|        return result;
  333|  5.82k|    }
  334|  5.85k|#endif
  335|  5.85k|  }
  336|  5.85k|  sslc->primary.CAfile = data->set.str[STRING_SSL_CAFILE_PROXY];
  337|  5.85k|  sslc->primary.CApath = data->set.str[STRING_SSL_CAPATH_PROXY];
  338|  5.85k|  sslc->primary.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST_PROXY];
  339|  5.85k|  sslc->primary.cipher_list13 = data->set.str[STRING_SSL_CIPHER13_LIST_PROXY];
  340|  5.85k|  sslc->primary.pinned_key = data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY];
  341|  5.85k|  sslc->primary.cert_blob = data->set.blobs[BLOB_CERT_PROXY];
  342|  5.85k|  sslc->primary.ca_info_blob = data->set.blobs[BLOB_CAINFO_PROXY];
  343|  5.85k|  sslc->primary.issuercert = data->set.str[STRING_SSL_ISSUERCERT_PROXY];
  344|  5.85k|  sslc->primary.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT_PROXY];
  345|  5.85k|  sslc->primary.CRLfile = data->set.str[STRING_SSL_CRLFILE_PROXY];
  346|  5.85k|  sslc->primary.cert_type = data->set.str[STRING_CERT_TYPE_PROXY];
  347|  5.85k|  sslc->primary.key = data->set.str[STRING_KEY_PROXY];
  348|  5.85k|  sslc->primary.key_type = data->set.str[STRING_KEY_TYPE_PROXY];
  349|  5.85k|  sslc->primary.key_passwd = data->set.str[STRING_KEY_PASSWD_PROXY];
  350|  5.85k|  sslc->primary.clientcert = data->set.str[STRING_CERT_PROXY];
  351|  5.85k|  sslc->primary.key_blob = data->set.blobs[BLOB_KEY_PROXY];
  352|  5.85k|#endif /* CURL_DISABLE_PROXY */
  353|       |
  354|  5.85k|  return CURLE_OK;
  355|  5.85k|}
Curl_ssl_conn_config_init:
  359|  5.65k|{
  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|  5.65k|  if(!clone_ssl_primary_config(&data->set.ssl.primary, &conn->ssl_config))
  ------------------
  |  Branch (363:6): [True: 0, False: 5.65k]
  ------------------
  364|      0|    return CURLE_OUT_OF_MEMORY;
  365|  5.65k|#ifndef CURL_DISABLE_PROXY
  366|  5.65k|  if(!clone_ssl_primary_config(&data->set.proxy_ssl.primary,
  ------------------
  |  Branch (366:6): [True: 0, False: 5.65k]
  ------------------
  367|  5.65k|                               &conn->proxy_ssl_config))
  368|      0|    return CURLE_OUT_OF_MEMORY;
  369|  5.65k|#endif
  370|  5.65k|  return CURLE_OK;
  371|  5.65k|}
Curl_ssl_conn_config_cleanup:
  374|  6.61k|{
  375|  6.61k|  Curl_ssl_config_cleanup(&conn->ssl_config);
  376|  6.61k|#ifndef CURL_DISABLE_PROXY
  377|  6.61k|  Curl_ssl_config_cleanup(&conn->proxy_ssl_config);
  378|  6.61k|#endif
  379|  6.61k|}
Curl_ssl_conn_config_update:
  382|  2.09k|{
  383|       |  /* May be called on an easy that has no connection yet */
  384|  2.09k|  if(data->conn) {
  ------------------
  |  Branch (384:6): [True: 0, False: 2.09k]
  ------------------
  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|  2.09k|}
vtls_config.c:ssl_easy_config_compl_options:
  227|  11.7k|{
  228|  11.7k|  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|  11.7k|  sslc->native_ca_store = !!(options & CURLSSLOPT_NATIVE_CA);
  ------------------
  |  |  957|  11.7k|#define CURLSSLOPT_NATIVE_CA (1L << 4)
  ------------------
  233|  11.7k|  sslc->enable_beast = !!(options & CURLSSLOPT_ALLOW_BEAST);
  ------------------
  |  |  940|  11.7k|#define CURLSSLOPT_ALLOW_BEAST (1L << 0)
  ------------------
  234|  11.7k|  sslc->no_partialchain = !!(options & CURLSSLOPT_NO_PARTIALCHAIN);
  ------------------
  |  |  948|  11.7k|#define CURLSSLOPT_NO_PARTIALCHAIN (1L << 2)
  ------------------
  235|  11.7k|  sslc->no_revoke = !!(options & CURLSSLOPT_NO_REVOKE);
  ------------------
  |  |  944|  11.7k|#define CURLSSLOPT_NO_REVOKE (1L << 1)
  ------------------
  236|  11.7k|  sslc->revoke_best_effort = !!(options & CURLSSLOPT_REVOKE_BEST_EFFORT);
  ------------------
  |  |  953|  11.7k|#define CURLSSLOPT_REVOKE_BEST_EFFORT (1L << 3)
  ------------------
  237|  11.7k|  sslc->earlydata = !!(options & CURLSSLOPT_EARLYDATA);
  ------------------
  |  |  964|  11.7k|#define CURLSSLOPT_EARLYDATA (1L << 6)
  ------------------
  238|       |
  239|  11.7k|  sslc->auto_client_cert = Curl_peer_equal(origin, initial_origin) &&
  ------------------
  |  Branch (239:28): [True: 11.7k, False: 0]
  ------------------
  240|  11.7k|                           !!(options & CURLSSLOPT_AUTO_CLIENT_CERT);
  ------------------
  |  |  961|  11.7k|#define CURLSSLOPT_AUTO_CLIENT_CERT (1L << 5)
  ------------------
  |  Branch (240:28): [True: 2, False: 11.7k]
  ------------------
  241|  11.7k|}
vtls_config.c:clone_ssl_primary_config:
  191|  11.3k|{
  192|  11.3k|  DEBUGASSERT(!dest->deep_copy);
  ------------------
  |  | 1077|  11.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (192:3): [True: 0, False: 11.3k]
  |  Branch (192:3): [True: 11.3k, False: 0]
  ------------------
  193|  11.3k|  dest->deep_copy = TRUE;
  ------------------
  |  | 1051|  11.3k|#define TRUE true
  ------------------
  194|  11.3k|  dest->version = source->version;
  195|  11.3k|  dest->version_max = source->version_max;
  196|  11.3k|  dest->verifypeer = source->verifypeer;
  197|  11.3k|  dest->verifyhost = source->verifyhost;
  198|  11.3k|  dest->verifystatus = source->verifystatus;
  199|  11.3k|  dest->cache_session = source->cache_session;
  200|  11.3k|  dest->ssl_options = source->ssl_options;
  201|       |
  202|  11.3k|  CLONE_BLOB(cert_blob);
  ------------------
  |  |   66|  11.3k|  do {                                   \
  |  |   67|  11.3k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (67:8): [True: 0, False: 11.3k]
  |  |  ------------------
  |  |   68|  11.3k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   69|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (69:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  203|  11.3k|  CLONE_BLOB(ca_info_blob);
  ------------------
  |  |   66|  11.3k|  do {                                   \
  |  |   67|  11.3k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (67:8): [True: 0, False: 11.3k]
  |  |  ------------------
  |  |   68|  11.3k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   69|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (69:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  204|  11.3k|  CLONE_BLOB(issuercert_blob);
  ------------------
  |  |   66|  11.3k|  do {                                   \
  |  |   67|  11.3k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (67:8): [True: 0, False: 11.3k]
  |  |  ------------------
  |  |   68|  11.3k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   69|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (69:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  205|  11.3k|  CLONE_STRING(CApath);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 11.3k, False: 0]
  |  |  ------------------
  |  |   57|  11.3k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|  11.3k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|  11.3k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 11.3k]
  |  |  ------------------
  |  |   59|  11.3k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|  11.3k|    }                                        \
  |  |   61|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  206|  11.3k|  CLONE_STRING(CAfile);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 11.3k, False: 0]
  |  |  ------------------
  |  |   57|  11.3k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|  11.3k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|  11.3k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 11.3k]
  |  |  ------------------
  |  |   59|  11.3k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|  11.3k|    }                                        \
  |  |   61|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  207|  11.3k|  CLONE_STRING(issuercert);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 6, False: 11.2k]
  |  |  ------------------
  |  |   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|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  208|  11.3k|  CLONE_STRING(cipher_list);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 809, False: 10.4k]
  |  |  ------------------
  |  |   57|    809|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|    809|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|    809|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 809]
  |  |  ------------------
  |  |   59|    809|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|    809|    }                                        \
  |  |   61|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  209|  11.3k|  CLONE_STRING(cipher_list13);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 128, False: 11.1k]
  |  |  ------------------
  |  |   57|    128|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|    128|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|    128|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 128]
  |  |  ------------------
  |  |   59|    128|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|    128|    }                                        \
  |  |   61|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  210|  11.3k|  CLONE_STRING(pinned_key);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 23, False: 11.2k]
  |  |  ------------------
  |  |   57|     23|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|     23|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|     23|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 23]
  |  |  ------------------
  |  |   59|     23|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|     23|    }                                        \
  |  |   61|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  211|  11.3k|  CLONE_STRING(curves);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 509, False: 10.7k]
  |  |  ------------------
  |  |   57|    509|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|    509|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|    509|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 509]
  |  |  ------------------
  |  |   59|    509|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|    509|    }                                        \
  |  |   61|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  212|  11.3k|  CLONE_STRING(signature_algorithms);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 0, False: 11.3k]
  |  |  ------------------
  |  |   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|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  213|  11.3k|  CLONE_STRING(CRLfile);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 5.65k, False: 5.64k]
  |  |  ------------------
  |  |   57|  5.65k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|  5.65k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|  5.65k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 5.65k]
  |  |  ------------------
  |  |   59|  5.65k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|  5.65k|    }                                        \
  |  |   61|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  214|       |  /* SSL credentials: client certificate */
  215|  11.3k|  CLONE_STRING(clientcert);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 17, False: 11.2k]
  |  |  ------------------
  |  |   57|     17|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|     17|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|     17|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 17]
  |  |  ------------------
  |  |   59|     17|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|     17|    }                                        \
  |  |   61|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  216|  11.3k|  CLONE_STRING(cert_type);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 19, False: 11.2k]
  |  |  ------------------
  |  |   57|     19|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|     19|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|     19|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 19]
  |  |  ------------------
  |  |   59|     19|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|     19|    }                                        \
  |  |   61|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  217|  11.3k|  CLONE_STRING(key);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 11, False: 11.2k]
  |  |  ------------------
  |  |   57|     11|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|     11|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|     11|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 11]
  |  |  ------------------
  |  |   59|     11|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|     11|    }                                        \
  |  |   61|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  218|  11.3k|  CLONE_STRING(key_type);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 19, False: 11.2k]
  |  |  ------------------
  |  |   57|     19|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|     19|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|     19|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 19]
  |  |  ------------------
  |  |   59|     19|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|     19|    }                                        \
  |  |   61|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  219|  11.3k|  CLONE_STRING(key_passwd);
  ------------------
  |  |   55|  11.3k|  do {                                       \
  |  |   56|  11.3k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (56:8): [True: 36, False: 11.2k]
  |  |  ------------------
  |  |   57|     36|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1482|     36|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   58|     36|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (58:10): [True: 0, False: 36]
  |  |  ------------------
  |  |   59|     36|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   60|     36|    }                                        \
  |  |   61|  11.3k|    else                                     \
  |  |   62|  11.3k|      dest->var = NULL;                      \
  |  |   63|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (63:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  220|  11.3k|  CLONE_BLOB(key_blob);
  ------------------
  |  |   66|  11.3k|  do {                                   \
  |  |   67|  11.3k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (67:8): [True: 0, False: 11.3k]
  |  |  ------------------
  |  |   68|  11.3k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1054|      0|#define FALSE false
  |  |  ------------------
  |  |   69|  11.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (69:11): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  221|  11.3k|  return TRUE;
  ------------------
  |  | 1051|  11.3k|#define TRUE true
  ------------------
  222|  11.3k|}
vtls_config.c:blobdup:
   72|  45.2k|{
   73|  45.2k|  DEBUGASSERT(dest);
  ------------------
  |  | 1077|  45.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (73:3): [True: 0, False: 45.2k]
  |  Branch (73:3): [True: 45.2k, False: 0]
  ------------------
   74|  45.2k|  DEBUGASSERT(!*dest);
  ------------------
  |  | 1077|  45.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (74:3): [True: 0, False: 45.2k]
  |  Branch (74:3): [True: 45.2k, False: 0]
  ------------------
   75|  45.2k|  if(src) {
  ------------------
  |  Branch (75:6): [True: 0, False: 45.2k]
  ------------------
   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|  45.2k|  return CURLE_OK;
   90|  45.2k|}

Curl_ssl_peer_key_make:
  349|  3.13k|{
  350|  3.13k|  return ssl_peer_key_build(sslc, peer, tls_id, ppeer_key);
  351|  3.13k|}
Curl_ssl_session_destroy:
  439|  5.45k|{
  440|  5.45k|  if(s) {
  ------------------
  |  Branch (440:6): [True: 0, False: 5.45k]
  ------------------
  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|  5.45k|}
Curl_ssl_scache_create:
  622|  10.8k|{
  623|  10.8k|  struct Curl_ssl_scache *scache;
  624|  10.8k|  struct Curl_ssl_scache_peer *peers;
  625|  10.8k|  size_t i;
  626|       |
  627|  10.8k|  *pscache = NULL;
  628|  10.8k|  peers = curlx_calloc(max_peers, sizeof(*peers));
  ------------------
  |  | 1485|  10.8k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  629|  10.8k|  if(!peers)
  ------------------
  |  Branch (629:6): [True: 0, False: 10.8k]
  ------------------
  630|      0|    return CURLE_OUT_OF_MEMORY;
  631|       |
  632|  10.8k|  scache = curlx_calloc(1, sizeof(*scache));
  ------------------
  |  | 1485|  10.8k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  633|  10.8k|  if(!scache) {
  ------------------
  |  Branch (633:6): [True: 0, False: 10.8k]
  ------------------
  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|  10.8k|  scache->magic = CURL_SCACHE_MAGIC;
  ------------------
  |  |   65|  10.8k|#define CURL_SCACHE_MAGIC 0x000e1551
  ------------------
  639|  10.8k|  scache->default_lifetime_secs = (24 * 60 * 60); /* 1 day */
  640|  10.8k|  scache->peer_count = max_peers;
  641|  10.8k|  scache->peers = peers;
  642|  10.8k|  scache->age = 1;
  643|   281k|  for(i = 0; i < scache->peer_count; ++i) {
  ------------------
  |  Branch (643:14): [True: 270k, False: 10.8k]
  ------------------
  644|   270k|    scache->peers[i].max_sessions = max_sessions_per_peer;
  645|   270k|    Curl_llist_init(&scache->peers[i].sessions,
  646|   270k|                    cf_ssl_scache_session_ldestroy);
  647|   270k|  }
  648|       |
  649|  10.8k|  *pscache = scache;
  650|  10.8k|  return CURLE_OK;
  651|  10.8k|}
Curl_ssl_scache_destroy:
  654|  10.8k|{
  655|  10.8k|  if(GOOD_SCACHE(scache)) {
  ------------------
  |  |   67|  10.8k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   65|  10.8k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 10.8k, False: 0]
  |  |  |  Branch (67:32): [True: 10.8k, False: 0]
  |  |  ------------------
  ------------------
  656|  10.8k|    size_t i;
  657|  10.8k|    scache->magic = 0;
  658|   281k|    for(i = 0; i < scache->peer_count; ++i) {
  ------------------
  |  Branch (658:16): [True: 270k, False: 10.8k]
  ------------------
  659|   270k|      cf_ssl_scache_clear_peer(&scache->peers[i]);
  660|   270k|    }
  661|  10.8k|    curlx_free(scache->peers);
  ------------------
  |  | 1488|  10.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  662|  10.8k|    curlx_free(scache);
  ------------------
  |  | 1488|  10.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  663|  10.8k|  }
  664|  10.8k|}
Curl_ssl_scache_use:
  667|  2.32k|{
  668|  2.32k|  if(cf_ssl_scache_get(data)) {
  ------------------
  |  Branch (668:6): [True: 2.32k, False: 0]
  ------------------
  669|  2.32k|    struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
  670|  2.32k|    return ssl_config ? ssl_config->primary.cache_session : FALSE;
  ------------------
  |  | 1054|  2.32k|#define FALSE false
  ------------------
  |  Branch (670:12): [True: 2.32k, False: 0]
  ------------------
  671|  2.32k|  }
  672|      0|  return FALSE;
  ------------------
  |  | 1054|      0|#define FALSE false
  ------------------
  673|  2.32k|}
Curl_ssl_scache_lock:
  677|  2.31k|{
  678|  2.31k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  679|  2.31k|  if(scache) {
  ------------------
  |  Branch (679:6): [True: 2.31k, False: 0]
  ------------------
  680|  2.31k|    if(CURL_SHARE_ssl_scache(data))
  ------------------
  |  |   85|  2.31k|  ((data)->share &&                                                \
  |  |  ------------------
  |  |  |  Branch (85:4): [True: 0, False: 2.31k]
  |  |  ------------------
  |  |   86|  2.31k|   ((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|  2.31k|    DEBUGASSERT(!scache->is_locked);
  ------------------
  |  | 1077|  2.31k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (683:5): [True: 0, False: 2.31k]
  |  Branch (683:5): [True: 2.31k, False: 0]
  ------------------
  684|  2.31k|    scache->is_locked = TRUE;
  ------------------
  |  | 1051|  2.31k|#define TRUE true
  ------------------
  685|  2.31k|  }
  686|  2.31k|}
Curl_ssl_scache_unlock:
  690|  2.31k|{
  691|  2.31k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  692|  2.31k|  if(scache) {
  ------------------
  |  Branch (692:6): [True: 2.31k, False: 0]
  ------------------
  693|  2.31k|    DEBUGASSERT(scache->is_locked);
  ------------------
  |  | 1077|  2.31k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (693:5): [True: 0, False: 2.31k]
  |  Branch (693:5): [True: 2.31k, False: 0]
  ------------------
  694|  2.31k|    scache->is_locked = FALSE;
  ------------------
  |  | 1054|  2.31k|#define FALSE false
  ------------------
  695|  2.31k|    if(CURL_SHARE_ssl_scache(data))
  ------------------
  |  |   85|  2.31k|  ((data)->share &&                                                \
  |  |  ------------------
  |  |  |  Branch (85:4): [True: 0, False: 2.31k]
  |  |  ------------------
  |  |   86|  2.31k|   ((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|  2.31k|  }
  698|  2.31k|}
Curl_ssl_scache_return:
  959|  2.31k|{
  960|       |  /* See RFC 8446 C.4:
  961|       |   * "Clients SHOULD NOT reuse a ticket for multiple connections." */
  962|  2.31k|  if(s && s->ietf_tls_id < 0x304)
  ------------------
  |  Branch (962:6): [True: 0, False: 2.31k]
  |  Branch (962:11): [True: 0, False: 0]
  ------------------
  963|      0|    (void)Curl_ssl_scache_put(cf, data, ssl_peer_key, s);
  964|  2.31k|  else
  965|  2.31k|    Curl_ssl_session_destroy(s);
  966|  2.31k|}
Curl_ssl_scache_take:
  972|  2.31k|{
  973|  2.31k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  974|  2.31k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
  975|  2.31k|  struct Curl_ssl_scache_peer *peer = NULL;
  976|  2.31k|  struct Curl_llist_node *n;
  977|  2.31k|  struct Curl_ssl_session *s = NULL;
  978|  2.31k|  CURLcode result;
  979|       |
  980|  2.31k|  *ps = NULL;
  981|  2.31k|  if(!scache)
  ------------------
  |  Branch (981:6): [True: 0, False: 2.31k]
  ------------------
  982|      0|    return CURLE_OK;
  983|       |
  984|  2.31k|  Curl_ssl_scache_lock(data);
  985|  2.31k|  result = cf_ssl_find_peer_by_key(data, scache, ssl_peer_key, conn_config,
  986|  2.31k|                                   &peer);
  987|  2.31k|  if(!result && peer) {
  ------------------
  |  Branch (987:6): [True: 2.31k, False: 0]
  |  Branch (987:17): [True: 0, False: 2.31k]
  ------------------
  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|  2.31k|  if(s) {
  ------------------
  |  Branch (996:6): [True: 0, False: 2.31k]
  ------------------
  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|  2.31k|  else {
 1005|  2.31k|    CURL_TRC_SSLS(data, "no cached session for %s", ssl_peer_key);
  ------------------
  |  |  194|  2.31k|  do {                                                    \
  |  |  195|  2.31k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|  2.31k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  4.63k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.31k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  4.63k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  2.31k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  2.31k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  2.31k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 2.31k]
  |  |  ------------------
  ------------------
 1006|  2.31k|  }
 1007|  2.31k|  Curl_ssl_scache_unlock(data);
 1008|  2.31k|  return result;
 1009|  2.31k|}
vtls_scache.c:ssl_peer_key_build:
  231|  3.13k|{
  232|  3.13k|  struct dynbuf buf;
  233|  3.13k|  size_t key_len;
  234|  3.13k|  bool is_local = FALSE;
  ------------------
  |  | 1054|  3.13k|#define FALSE false
  ------------------
  235|  3.13k|  CURLcode result;
  236|       |
  237|  3.13k|  *ppeer_key = NULL;
  238|  3.13k|  curlx_dyn_init(&buf, 10 * 1024);
  239|       |
  240|  3.13k|  result = curlx_dyn_addf(&buf, "%s:%d",
  241|  3.13k|                          peer->origin->hostname, peer->origin->port);
  242|  3.13k|  if(result)
  ------------------
  |  Branch (242:6): [True: 0, False: 3.13k]
  ------------------
  243|      0|    goto out;
  244|  3.13k|  result = ssl_peer_key_add_transport(&buf, peer->transport);
  245|  3.13k|  if(result)
  ------------------
  |  Branch (245:6): [True: 0, False: 3.13k]
  ------------------
  246|      0|    goto out;
  247|  3.13k|  result = ssl_peer_key_add_vrfy(&buf, ssl, peer);
  248|  3.13k|  if(result)
  ------------------
  |  Branch (248:6): [True: 0, False: 3.13k]
  ------------------
  249|      0|    goto out;
  250|  3.13k|  if(ssl->version || ssl->version_max) {
  ------------------
  |  Branch (250:6): [True: 3.13k, False: 0]
  |  Branch (250:22): [True: 0, False: 0]
  ------------------
  251|  3.13k|    result = curlx_dyn_addf(&buf, ":TLSVER-%d-%u", ssl->version,
  252|  3.13k|                            (ssl->version_max >> 16));
  253|  3.13k|    if(result)
  ------------------
  |  Branch (253:8): [True: 0, False: 3.13k]
  ------------------
  254|      0|      goto out;
  255|  3.13k|  }
  256|  3.13k|  if(ssl->ssl_options) {
  ------------------
  |  Branch (256:6): [True: 2, False: 3.13k]
  ------------------
  257|      2|    result = curlx_dyn_addf(&buf, ":TLSOPT-%x", ssl->ssl_options);
  258|      2|    if(result)
  ------------------
  |  Branch (258:8): [True: 0, False: 2]
  ------------------
  259|      0|      goto out;
  260|      2|  }
  261|  3.13k|  if(ssl->cipher_list) {
  ------------------
  |  Branch (261:6): [True: 806, False: 2.32k]
  ------------------
  262|    806|    result = curlx_dyn_addf(&buf, ":CIPHER-%s", ssl->cipher_list);
  263|    806|    if(result)
  ------------------
  |  Branch (263:8): [True: 0, False: 806]
  ------------------
  264|      0|      goto out;
  265|    806|  }
  266|  3.13k|  if(ssl->cipher_list13) {
  ------------------
  |  Branch (266:6): [True: 124, False: 3.01k]
  ------------------
  267|    124|    result = curlx_dyn_addf(&buf, ":CIPHER13-%s", ssl->cipher_list13);
  268|    124|    if(result)
  ------------------
  |  Branch (268:8): [True: 0, False: 124]
  ------------------
  269|      0|      goto out;
  270|    124|  }
  271|  3.13k|  if(ssl->curves) {
  ------------------
  |  Branch (271:6): [True: 499, False: 2.63k]
  ------------------
  272|    499|    result = curlx_dyn_addf(&buf, ":CURVES-%s", ssl->curves);
  273|    499|    if(result)
  ------------------
  |  Branch (273:8): [True: 0, False: 499]
  ------------------
  274|      0|      goto out;
  275|    499|  }
  276|  3.13k|  if(ssl->signature_algorithms) {
  ------------------
  |  Branch (276:6): [True: 0, False: 3.13k]
  ------------------
  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|  3.13k|  if(ssl->verifypeer) {
  ------------------
  |  Branch (282:6): [True: 3.10k, False: 27]
  ------------------
  283|  3.10k|    result = cf_ssl_peer_key_add_path(&buf, "CA", ssl->CAfile, &is_local);
  284|  3.10k|    if(result)
  ------------------
  |  Branch (284:8): [True: 0, False: 3.10k]
  ------------------
  285|      0|      goto out;
  286|  3.10k|    result = cf_ssl_peer_key_add_path(&buf, "CApath", ssl->CApath, &is_local);
  287|  3.10k|    if(result)
  ------------------
  |  Branch (287:8): [True: 1, False: 3.10k]
  ------------------
  288|      1|      goto out;
  289|  3.10k|    result = cf_ssl_peer_key_add_path(&buf, "CRL", ssl->CRLfile, &is_local);
  290|  3.10k|    if(result)
  ------------------
  |  Branch (290:8): [True: 1, False: 3.10k]
  ------------------
  291|      1|      goto out;
  292|  3.10k|    result = cf_ssl_peer_key_add_path(&buf, "Issuer", ssl->issuercert,
  293|  3.10k|                                      &is_local);
  294|  3.10k|    if(result)
  ------------------
  |  Branch (294:8): [True: 0, False: 3.10k]
  ------------------
  295|      0|      goto out;
  296|  3.10k|    if(ssl->ca_info_blob) {
  ------------------
  |  Branch (296:8): [True: 0, False: 3.10k]
  ------------------
  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|  3.10k|    if(ssl->issuercert_blob) {
  ------------------
  |  Branch (301:8): [True: 0, False: 3.10k]
  ------------------
  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|  3.10k|  }
  308|  3.13k|  if(ssl->cert_blob) {
  ------------------
  |  Branch (308:6): [True: 0, False: 3.13k]
  ------------------
  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|  3.13k|  if(ssl->pinned_key && ssl->pinned_key[0]) {
  ------------------
  |  Branch (313:6): [True: 8, False: 3.12k]
  |  Branch (313:25): [True: 5, False: 3]
  ------------------
  314|      5|    result = curlx_dyn_addf(&buf, ":Pinned-%s", ssl->pinned_key);
  315|      5|    if(result)
  ------------------
  |  Branch (315:8): [True: 0, False: 5]
  ------------------
  316|      0|      goto out;
  317|      5|  }
  318|       |
  319|  3.13k|  result = cf_ssl_peer_key_add_mtls(&buf, ssl, &is_local);
  320|  3.13k|  if(result)
  ------------------
  |  Branch (320:6): [True: 0, False: 3.13k]
  ------------------
  321|      0|    goto out;
  322|       |
  323|  3.13k|  if(!tls_id || !tls_id[0]) {
  ------------------
  |  Branch (323:6): [True: 0, False: 3.13k]
  |  Branch (323:17): [True: 0, False: 3.13k]
  ------------------
  324|      0|    result = CURLE_FAILED_INIT;
  325|      0|    goto out;
  326|      0|  }
  327|  3.13k|  result = curlx_dyn_addf(&buf, ":IMPL-%s", tls_id);
  328|  3.13k|  if(result)
  ------------------
  |  Branch (328:6): [True: 0, False: 3.13k]
  ------------------
  329|      0|    goto out;
  330|       |
  331|  3.13k|  result = curlx_dyn_addf(&buf, is_local ?
  ------------------
  |  Branch (331:33): [True: 161, False: 2.97k]
  ------------------
  332|  2.97k|                          CURL_SSLS_LOCAL_SUFFIX : CURL_SSLS_GLOBAL_SUFFIX);
  ------------------
  |  |  167|    161|#define CURL_SSLS_LOCAL_SUFFIX     ":L"
  ------------------
                                        CURL_SSLS_LOCAL_SUFFIX : CURL_SSLS_GLOBAL_SUFFIX);
  ------------------
  |  |  168|  2.97k|#define CURL_SSLS_GLOBAL_SUFFIX    ":G"
  ------------------
  333|  3.13k|  if(result)
  ------------------
  |  Branch (333:6): [True: 0, False: 3.13k]
  ------------------
  334|      0|    goto out;
  335|       |
  336|  3.13k|  *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|  3.13k|out:
  341|  3.13k|  curlx_dyn_free(&buf);
  342|  3.13k|  return result;
  343|  3.13k|}
vtls_scache.c:ssl_peer_key_add_transport:
  180|  3.13k|{
  181|  3.13k|  switch(transport) {
  182|  3.13k|  case TRNSPRT_TCP:
  ------------------
  |  |  249|  3.13k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (182:3): [True: 3.13k, False: 0]
  ------------------
  183|  3.13k|    return CURLE_OK;
  184|      0|  case TRNSPRT_UDP:
  ------------------
  |  |  250|      0|#define TRNSPRT_UDP  4
  ------------------
  |  Branch (184:3): [True: 0, False: 3.13k]
  ------------------
  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: 3.13k]
  ------------------
  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: 3.13k]
  ------------------
  189|      0|    return curlx_dyn_add(buf, ":UNIX");
  190|      0|  default:
  ------------------
  |  Branch (190:3): [True: 0, False: 3.13k]
  ------------------
  191|      0|    return curlx_dyn_addf(buf, ":TRNSPRT-%d", transport);
  192|  3.13k|  }
  193|  3.13k|}
vtls_scache.c:ssl_peer_key_add_vrfy:
  198|  3.13k|{
  199|  3.13k|  CURLcode result;
  200|       |
  201|  3.13k|  if(!ssl->verifypeer) {
  ------------------
  |  Branch (201:6): [True: 27, False: 3.10k]
  ------------------
  202|     27|    result = curlx_dyn_add(buf, ":NO-VRFY-PEER");
  203|     27|    if(result)
  ------------------
  |  Branch (203:8): [True: 0, False: 27]
  ------------------
  204|      0|      return result;
  205|     27|  }
  206|  3.13k|  if(!ssl->verifyhost) {
  ------------------
  |  Branch (206:6): [True: 2, False: 3.13k]
  ------------------
  207|      2|    result = curlx_dyn_add(buf, ":NO-VRFY-HOST");
  208|      2|    if(result)
  ------------------
  |  Branch (208:8): [True: 0, False: 2]
  ------------------
  209|      0|      return result;
  210|      2|  }
  211|  3.13k|  if(ssl->verifystatus) {
  ------------------
  |  Branch (211:6): [True: 2, False: 3.13k]
  ------------------
  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|  3.13k|  if((!ssl->verifypeer || !ssl->verifyhost) &&
  ------------------
  |  Branch (216:7): [True: 27, False: 3.10k]
  |  Branch (216:27): [True: 2, False: 3.10k]
  ------------------
  217|     29|     peer->peer && !Curl_peer_equal(peer->origin, peer->peer)) {
  ------------------
  |  Branch (217:6): [True: 28, False: 1]
  |  Branch (217:20): [True: 28, False: 0]
  ------------------
  218|     28|    result = curlx_dyn_addf(buf, ":CHOST-%s:CPORT-%u",
  219|     28|                            peer->peer->hostname,
  220|     28|                            peer->peer->port);
  221|     28|    if(result)
  ------------------
  |  Branch (221:8): [True: 0, False: 28]
  ------------------
  222|      0|      return result;
  223|     28|  }
  224|  3.13k|  return CURLE_OK;
  225|  3.13k|}
vtls_scache.c:cf_ssl_peer_key_add_path:
   73|  12.4k|{
   74|  12.4k|  if(path && path[0]) {
  ------------------
  |  Branch (74:6): [True: 8.92k, False: 3.51k]
  |  Branch (74:14): [True: 8.77k, False: 156]
  ------------------
   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|  8.77k|    if(path[0] != '/') {
  ------------------
  |  Branch (84:8): [True: 175, False: 8.59k]
  ------------------
   85|    175|      char *abspath = realpath(path, NULL);
   86|    175|      if(abspath) {
  ------------------
  |  Branch (86:10): [True: 9, False: 166]
  ------------------
   87|      9|        CURLcode result = curlx_dyn_addf(buf, ":%s-%s", name, abspath);
   88|       |        /* !checksrc! disable BANNEDFUNC 1 */
   89|      9|        free(abspath); /* allocated by libc, free without memdebug */
   90|      9|        return result;
   91|      9|      }
   92|    166|      *is_local = TRUE;
  ------------------
  |  | 1051|    166|#define TRUE true
  ------------------
   93|    166|    }
   94|  8.76k|#endif
   95|  8.76k|    return curlx_dyn_addf(buf, ":%s-%s", name, path);
   96|  8.77k|  }
   97|  3.67k|  return CURLE_OK;
   98|  12.4k|}
vtls_scache.c:cf_ssl_peer_key_add_mtls:
  128|  3.13k|{
  129|  3.13k|  CURLcode result = CURLE_OK;
  130|  3.13k|  if(ssl->clientcert && ssl->clientcert[0]) {
  ------------------
  |  Branch (130:6): [True: 15, False: 3.11k]
  |  Branch (130:25): [True: 8, False: 7]
  ------------------
  131|      8|    result = cf_ssl_peer_key_add_path(buf, "CCERT", ssl->clientcert, is_local);
  132|      8|    if(result)
  ------------------
  |  Branch (132:8): [True: 0, False: 8]
  ------------------
  133|      0|      goto out;
  134|      8|  }
  135|  3.13k|  if(ssl->key && ssl->key[0]) {
  ------------------
  |  Branch (135:6): [True: 9, False: 3.12k]
  |  Branch (135:18): [True: 7, False: 2]
  ------------------
  136|      7|    result = cf_ssl_peer_key_add_path(buf, "KEY", ssl->key, is_local);
  137|      7|    if(result)
  ------------------
  |  Branch (137:8): [True: 0, False: 7]
  ------------------
  138|      0|      goto out;
  139|      7|  }
  140|  3.13k|  if(ssl->key_blob) {
  ------------------
  |  Branch (140:6): [True: 0, False: 3.13k]
  ------------------
  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|  3.13k|  if(ssl->cert_type && ssl->cert_type[0]) {
  ------------------
  |  Branch (145:6): [True: 17, False: 3.11k]
  |  Branch (145:24): [True: 16, False: 1]
  ------------------
  146|     16|    size_t i;
  147|     16|    result = curlx_dyn_add(buf, ":CT-");
  148|    554|    for(i = 0; !result && ssl->cert_type[i]; i++) {
  ------------------
  |  Branch (148:16): [True: 554, False: 0]
  |  Branch (148:27): [True: 538, False: 16]
  ------------------
  149|    538|      char c = Curl_raw_toupper(ssl->cert_type[i]);
  150|    538|      result = curlx_dyn_addn(buf, &c, 1);
  151|    538|    }
  152|     16|    if(result)
  ------------------
  |  Branch (152:8): [True: 0, False: 16]
  ------------------
  153|      0|      goto out;
  154|     16|  }
  155|  3.13k|  if(ssl->key_type && ssl->key_type[0]) {
  ------------------
  |  Branch (155:6): [True: 17, False: 3.11k]
  |  Branch (155:23): [True: 15, False: 2]
  ------------------
  156|     15|    size_t i;
  157|     15|    result = curlx_dyn_add(buf, ":KT-");
  158|    541|    for(i = 0; !result && ssl->key_type[i]; i++) {
  ------------------
  |  Branch (158:16): [True: 541, False: 0]
  |  Branch (158:27): [True: 526, False: 15]
  ------------------
  159|    526|      char c = Curl_raw_toupper(ssl->key_type[i]);
  160|    526|      result = curlx_dyn_addn(buf, &c, 1);
  161|    526|    }
  162|     15|  }
  163|  3.13k|out:
  164|  3.13k|  return result;
  165|  3.13k|}
vtls_scache.c:cf_ssl_scache_clear_peer:
  499|   270k|{
  500|   270k|  Curl_llist_destroy(&peer->sessions, NULL);
  501|   270k|  if(peer->sobj) {
  ------------------
  |  Branch (501:6): [True: 0, False: 270k]
  ------------------
  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|   270k|  peer->sobj_free = NULL;
  508|   270k|  curlx_safefree(peer->clientcert);
  ------------------
  |  | 1332|   270k|  do {                      \
  |  | 1333|   270k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|   270k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|   270k|    (ptr) = NULL;           \
  |  | 1335|   270k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 270k]
  |  |  ------------------
  ------------------
  509|   270k|  curlx_safefree(peer->key_passwd);
  ------------------
  |  | 1332|   270k|  do {                      \
  |  | 1333|   270k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|   270k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|   270k|    (ptr) = NULL;           \
  |  | 1335|   270k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 270k]
  |  |  ------------------
  ------------------
  510|   270k|  curlx_safefree(peer->ssl_peer_key);
  ------------------
  |  | 1332|   270k|  do {                      \
  |  | 1333|   270k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1488|   270k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|   270k|    (ptr) = NULL;           \
  |  | 1335|   270k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 270k]
  |  |  ------------------
  ------------------
  511|   270k|  peer->age = 0;
  512|       |  peer->hmac_set = FALSE;
  ------------------
  |  | 1054|   270k|#define FALSE false
  ------------------
  513|   270k|}
vtls_scache.c:cf_ssl_scache_get:
  363|  9.27k|{
  364|  9.27k|  struct Curl_ssl_scache *scache = NULL;
  365|       |  /* If a share is present, its ssl_scache has preference over the multi */
  366|  9.27k|  if(data->share && data->share->ssl_scache)
  ------------------
  |  Branch (366:6): [True: 0, False: 9.27k]
  |  Branch (366:21): [True: 0, False: 0]
  ------------------
  367|      0|    scache = data->share->ssl_scache;
  368|  9.27k|  else if(data->multi && data->multi->ssl_scache)
  ------------------
  |  Branch (368:11): [True: 9.27k, False: 0]
  |  Branch (368:26): [True: 9.27k, False: 0]
  ------------------
  369|  9.27k|    scache = data->multi->ssl_scache;
  370|  9.27k|  if(scache && !GOOD_SCACHE(scache)) {
  ------------------
  |  |   67|  9.27k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   65|  9.27k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 9.27k, False: 0]
  |  |  |  Branch (67:32): [True: 9.27k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (370:6): [True: 9.27k, 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|  9.27k|  return scache;
  377|  9.27k|}
vtls_scache.c:cf_ssl_find_peer_by_key:
  720|  2.31k|{
  721|  2.31k|  size_t i, peer_key_len = 0;
  722|  2.31k|  CURLcode result = CURLE_OK;
  723|       |
  724|  2.31k|  *ppeer = NULL;
  725|  2.31k|  if(!GOOD_SCACHE(scache)) {
  ------------------
  |  |   67|  2.31k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   65|  2.31k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 2.31k, False: 0]
  |  |  |  Branch (67:32): [True: 2.31k, False: 0]
  |  |  ------------------
  ------------------
  726|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  727|      0|  }
  728|       |
  729|  2.31k|  CURL_TRC_SSLS(data, "find peer slot for %s among %zu slots",
  ------------------
  |  |  194|  2.31k|  do {                                                    \
  |  |  195|  2.31k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|  2.31k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  4.63k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.31k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  4.63k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  2.31k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  2.31k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  2.31k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 2.31k]
  |  |  ------------------
  ------------------
  730|  2.31k|                ssl_peer_key, scache->peer_count);
  731|       |
  732|       |  /* check for entries with known peer_key */
  733|  60.2k|  for(i = 0; scache && i < scache->peer_count; i++) {
  ------------------
  |  Branch (733:14): [True: 60.2k, False: 0]
  |  Branch (733:24): [True: 57.9k, False: 2.31k]
  ------------------
  734|  57.9k|    if(scache->peers[i].ssl_peer_key &&
  ------------------
  |  Branch (734:8): [True: 0, False: 57.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|  57.9k|  }
  742|       |  /* check for entries with HMAC set but no known peer_key */
  743|  60.2k|  for(i = 0; scache && i < scache->peer_count; i++) {
  ------------------
  |  Branch (743:14): [True: 60.2k, False: 0]
  |  Branch (743:24): [True: 57.9k, False: 2.31k]
  ------------------
  744|  57.9k|    if(!scache->peers[i].ssl_peer_key &&
  ------------------
  |  Branch (744:8): [True: 57.9k, False: 0]
  ------------------
  745|  57.9k|       scache->peers[i].hmac_set &&
  ------------------
  |  Branch (745:8): [True: 0, False: 57.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|  57.9k|  }
  774|  2.31k|  CURL_TRC_SSLS(data, "peer not found for %s", ssl_peer_key);
  ------------------
  |  |  194|  2.31k|  do {                                                    \
  |  |  195|  2.31k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|  2.31k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  4.63k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.31k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  4.63k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  2.31k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  2.31k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  2.31k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 2.31k]
  |  |  ------------------
  ------------------
  775|  2.31k|out:
  776|  2.31k|  return result;
  777|  2.31k|}

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

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

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

c_tolower:
  338|  8.90k|{
  339|  8.90k|  switch (c)
  340|  8.90k|    {
  341|  6.28k|    _C_CTYPE_UPPER:
  ------------------
  |  |  148|      0|#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
  |  |  ------------------
  |  |  |  |  122|  1.31k|   _C_CTYPE_LOWER_A_THRU_F_N(N): \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|    786|   case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:4): [True: 786, False: 8.12k]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 8.90k]
  |  |  |  |  |  |  |  Branch (119:36): [True: 0, False: 8.90k]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 8.90k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.31k|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 0, False: 8.90k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 524, False: 8.38k]
  |  |  |  |  ------------------
  |  |  |  |  123|  1.83k|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 0, False: 8.90k]
  |  |  |  |  |  Branch (123:20): [True: 0, False: 8.90k]
  |  |  |  |  |  Branch (123:36): [True: 524, False: 8.38k]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 8.90k]
  |  |  |  |  ------------------
  |  |  |  |  124|  2.88k|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 8.90k]
  |  |  |  |  |  Branch (124:20): [True: 524, False: 8.38k]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 8.90k]
  |  |  |  |  |  Branch (124:52): [True: 524, False: 8.38k]
  |  |  |  |  ------------------
  |  |  |  |  125|  3.40k|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 8.90k]
  |  |  |  |  |  Branch (125:20): [True: 0, False: 8.90k]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 8.90k]
  |  |  |  |  |  Branch (125:52): [True: 524, False: 8.38k]
  |  |  |  |  ------------------
  |  |  |  |  126|  6.28k|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 524, False: 8.38k]
  |  |  |  |  |  Branch (126:20): [True: 1.57k, False: 7.33k]
  |  |  |  |  |  Branch (126:36): [True: 786, False: 8.12k]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 8.90k]
  |  |  |  |  ------------------
  |  |  |  |  127|  6.28k|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 8.90k]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 8.90k]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 8.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  342|  6.28k|      return c - 'A' + 'a';
  343|  2.62k|    default:
  ------------------
  |  Branch (343:5): [True: 2.62k, False: 6.28k]
  ------------------
  344|  2.62k|      return c;
  345|  8.90k|    }
  346|  8.90k|}
c_isupper:
  313|  2.09k|{
  314|  2.09k|  switch (c)
  315|  2.09k|    {
  316|  1.31k|    _C_CTYPE_UPPER:
  ------------------
  |  |  148|      0|#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
  |  |  ------------------
  |  |  |  |  122|    262|   _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.09k]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 2.09k]
  |  |  |  |  |  |  |  Branch (119:36): [True: 0, False: 2.09k]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 2.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|    262|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 0, False: 2.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 262, False: 1.83k]
  |  |  |  |  ------------------
  |  |  |  |  123|    262|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 0, False: 2.09k]
  |  |  |  |  |  Branch (123:20): [True: 0, False: 2.09k]
  |  |  |  |  |  Branch (123:36): [True: 0, False: 2.09k]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 2.09k]
  |  |  |  |  ------------------
  |  |  |  |  124|    262|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 2.09k]
  |  |  |  |  |  Branch (124:20): [True: 0, False: 2.09k]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 2.09k]
  |  |  |  |  |  Branch (124:52): [True: 0, False: 2.09k]
  |  |  |  |  ------------------
  |  |  |  |  125|    262|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 2.09k]
  |  |  |  |  |  Branch (125:20): [True: 0, False: 2.09k]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 2.09k]
  |  |  |  |  |  Branch (125:52): [True: 0, False: 2.09k]
  |  |  |  |  ------------------
  |  |  |  |  126|  1.31k|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 0, False: 2.09k]
  |  |  |  |  |  Branch (126:20): [True: 262, False: 1.83k]
  |  |  |  |  |  Branch (126:36): [True: 786, False: 1.31k]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 2.09k]
  |  |  |  |  ------------------
  |  |  |  |  127|  1.31k|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 2.09k]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 2.09k]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 2.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  317|  1.31k|      return true;
  318|    786|    default:
  ------------------
  |  Branch (318:5): [True: 786, False: 1.31k]
  ------------------
  319|       |      return false;
  320|  2.09k|    }
  321|  2.09k|}

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

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

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

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

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

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

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

asn1_d2i_read_bio:
  110|   916k|{
  111|   916k|    BUF_MEM *b;
  112|   916k|    unsigned char *p;
  113|   916k|    size_t want = HEADER_SIZE;
  ------------------
  |  |  107|   916k|#define HEADER_SIZE 2
  ------------------
  114|   916k|    uint32_t eos = 0;
  115|   916k|    size_t off = 0;
  116|   916k|    size_t len = 0;
  117|   916k|    size_t diff;
  118|       |
  119|   916k|    const unsigned char *q;
  120|   916k|    long slen;
  121|   916k|    int inf, tag, xclass;
  122|       |
  123|   916k|    b = BUF_MEM_new();
  124|   916k|    if (b == NULL) {
  ------------------
  |  Branch (124:9): [True: 0, False: 916k]
  ------------------
  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|   916k|    ERR_set_mark();
  130|  1.54M|    for (;;) {
  131|  1.54M|        diff = len - off;
  132|  1.54M|        if (want >= diff) {
  ------------------
  |  Branch (132:13): [True: 1.54M, False: 0]
  ------------------
  133|  1.54M|            int i;
  134|       |
  135|  1.54M|            want -= diff;
  136|       |
  137|  1.54M|            if (len + want < len || !BUF_MEM_grow_clean(b, len + want)) {
  ------------------
  |  Branch (137:17): [True: 0, False: 1.54M]
  |  Branch (137:37): [True: 0, False: 1.54M]
  ------------------
  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.54M|            i = BIO_read(in, &(b->data[len]), (int)want);
  142|       |
  143|  1.54M|            if (i <= 0) {
  ------------------
  |  Branch (143:17): [True: 0, False: 1.54M]
  ------------------
  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.54M|            if (i > 0) {
  ------------------
  |  Branch (148:17): [True: 1.54M, False: 0]
  ------------------
  149|  1.54M|                if (len + i < len) {
  ------------------
  |  Branch (149:21): [True: 0, False: 1.54M]
  ------------------
  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.54M|                len += i;
  154|  1.54M|                if ((size_t)i < want)
  ------------------
  |  Branch (154:21): [True: 0, False: 1.54M]
  ------------------
  155|      0|                    continue;
  156|  1.54M|            }
  157|  1.54M|        }
  158|       |        /* else data already loaded */
  159|       |
  160|       |        /* make sure there is enough data for a complete header */
  161|  1.54M|        p = (unsigned char *)&(b->data[off]);
  162|  1.54M|        q = p;
  163|  1.54M|        diff = len - off;
  164|  1.54M|        if (diff < 2) {
  ------------------
  |  Branch (164:13): [True: 0, False: 1.54M]
  ------------------
  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.54M|        diff--;
  171|  1.54M|        if ((*(q++) & V_ASN1_PRIMITIVE_TAG) == V_ASN1_PRIMITIVE_TAG) {
  ------------------
  |  |   55|  1.54M|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
                      if ((*(q++) & V_ASN1_PRIMITIVE_TAG) == V_ASN1_PRIMITIVE_TAG) {
  ------------------
  |  |   55|  1.54M|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
  |  Branch (171:13): [True: 0, False: 1.54M]
  ------------------
  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.54M|        diff--;
  199|  1.54M|        if (*q & 0x80) {
  ------------------
  |  Branch (199:13): [True: 1.25M, False: 287k]
  ------------------
  200|  1.25M|            unsigned int i = *q & 0x7f;
  201|       |
  202|  1.25M|            if (i > sizeof(long)) {
  ------------------
  |  Branch (202:17): [True: 0, False: 1.25M]
  ------------------
  203|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  204|      0|                goto err;
  205|      0|            }
  206|  1.25M|            if (i > diff) {
  ------------------
  |  Branch (206:17): [True: 628k, False: 628k]
  ------------------
  207|   628k|                want = q - p + i + 1;
  208|   628k|                continue;
  209|   628k|            }
  210|  1.25M|        }
  211|       |
  212|       |        /*
  213|       |         * We have a complete header now, assuming we didn't hit EOF. Parse the
  214|       |         * tag and length
  215|       |         */
  216|   916k|        q = p;
  217|   916k|        diff = len - off;
  218|   916k|        inf = ASN1_get_object(&q, &slen, &tag, &xclass, (int)diff);
  219|   916k|        if (inf & 0x80) {
  ------------------
  |  Branch (219:13): [True: 916k, False: 0]
  ------------------
  220|   916k|            unsigned long e;
  221|       |
  222|   916k|            e = ERR_GET_REASON(ERR_peek_last_error());
  223|   916k|            if (e != ASN1_R_TOO_LONG)
  ------------------
  |  |  118|   916k|#define ASN1_R_TOO_LONG 155
  ------------------
  |  Branch (223:17): [True: 0, False: 916k]
  ------------------
  224|      0|                goto err;
  225|   916k|            ERR_pop_to_mark();
  226|   916k|            ERR_set_mark();
  227|   916k|        }
  228|   916k|        off += q - p; /* end of data */
  229|       |
  230|   916k|        if (inf & 1) {
  ------------------
  |  Branch (230:13): [True: 0, False: 916k]
  ------------------
  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|   916k|        } else if (eos && (slen == 0) && (tag == V_ASN1_EOC)) {
  ------------------
  |  |   64|      0|#define V_ASN1_EOC 0
  ------------------
  |  Branch (238:20): [True: 0, False: 916k]
  |  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|   916k|        } else {
  246|       |            /* suck in slen bytes of data */
  247|   916k|            want = slen;
  248|   916k|            if (want > (len - off)) {
  ------------------
  |  Branch (248:17): [True: 916k, False: 0]
  ------------------
  249|   916k|                size_t chunk_max = ASN1_CHUNK_INITIAL_SIZE;
  ------------------
  |  |  108|   916k|#define ASN1_CHUNK_INITIAL_SIZE (16 * 1024)
  ------------------
  250|       |
  251|   916k|                want -= (len - off);
  252|   916k|                if (want > INT_MAX /* BIO_read takes an int length */ || len + want < len) {
  ------------------
  |  Branch (252:21): [True: 0, False: 916k]
  |  Branch (252:74): [True: 0, False: 916k]
  ------------------
  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.83M|                while (want > 0) {
  ------------------
  |  Branch (256:24): [True: 916k, False: 916k]
  ------------------
  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|   916k|                    size_t chunk = want > chunk_max ? chunk_max : want;
  ------------------
  |  Branch (263:36): [True: 0, False: 916k]
  ------------------
  264|   916k|                    int i;
  265|       |
  266|   916k|                    if (!BUF_MEM_grow_clean(b, len + chunk)) {
  ------------------
  |  Branch (266:25): [True: 0, False: 916k]
  ------------------
  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|   916k|                    want -= chunk;
  271|  1.83M|                    while (chunk > 0) {
  ------------------
  |  Branch (271:28): [True: 916k, False: 916k]
  ------------------
  272|   916k|                        i = BIO_read(in, &(b->data[len]), (int)chunk);
  273|   916k|                        if (i <= 0) {
  ------------------
  |  Branch (273:29): [True: 0, False: 916k]
  ------------------
  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|   916k|                        len += i;
  282|   916k|                        chunk -= i;
  283|   916k|                    }
  284|   916k|                    if (chunk_max < INT_MAX / 2)
  ------------------
  |  Branch (284:25): [True: 916k, False: 0]
  ------------------
  285|   916k|                        chunk_max *= 2;
  286|   916k|                }
  287|   916k|            }
  288|   916k|            if (off + slen < off) {
  ------------------
  |  Branch (288:17): [True: 0, False: 916k]
  ------------------
  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|   916k|            off += slen;
  293|   916k|            if (eos == 0) {
  ------------------
  |  Branch (293:17): [True: 916k, False: 0]
  ------------------
  294|   916k|                break;
  295|   916k|            } else
  296|      0|                want = HEADER_SIZE;
  ------------------
  |  |  107|      0|#define HEADER_SIZE 2
  ------------------
  297|   916k|        }
  298|   916k|    }
  299|       |
  300|   916k|    if (off > INT_MAX) {
  ------------------
  |  Branch (300:9): [True: 0, False: 916k]
  ------------------
  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|   916k|    *pb = b;
  306|   916k|    ERR_clear_last_mark();
  307|   916k|    return (int)off;
  308|      0|err:
  309|      0|    ERR_clear_last_mark();
  310|      0|    BUF_MEM_free(b);
  311|      0|    return -1;
  312|   916k|}

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

ossl_c2i_ASN1_INTEGER:
  301|   923k|{
  302|   923k|    ASN1_INTEGER *ret = NULL;
  303|   923k|    size_t r;
  304|   923k|    int neg;
  305|       |
  306|   923k|    r = c2i_ibuf(NULL, NULL, *pp, len);
  307|       |
  308|   923k|    if (r == 0)
  ------------------
  |  Branch (308:9): [True: 0, False: 923k]
  ------------------
  309|      0|        return NULL;
  310|       |
  311|   923k|    if ((a == NULL) || ((*a) == NULL)) {
  ------------------
  |  Branch (311:9): [True: 0, False: 923k]
  |  Branch (311:24): [True: 464k, False: 458k]
  ------------------
  312|   464k|        ret = ASN1_INTEGER_new();
  313|   464k|        if (ret == NULL)
  ------------------
  |  Branch (313:13): [True: 0, False: 464k]
  ------------------
  314|      0|            return NULL;
  315|   464k|        ret->type = V_ASN1_INTEGER;
  ------------------
  |  |   66|   464k|#define V_ASN1_INTEGER 2
  ------------------
  316|   464k|    } else
  317|   458k|        ret = *a;
  318|       |
  319|   923k|    if (r > INT_MAX || ASN1_STRING_set(ret, NULL, (int)r) == 0) {
  ------------------
  |  Branch (319:9): [True: 0, False: 923k]
  |  Branch (319:24): [True: 0, False: 923k]
  ------------------
  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|   923k|    c2i_ibuf(ret->data, &neg, *pp, len);
  325|       |
  326|   923k|    if (neg != 0)
  ------------------
  |  Branch (326:9): [True: 0, False: 923k]
  ------------------
  327|      0|        ret->type |= V_ASN1_NEG;
  ------------------
  |  |   99|      0|#define V_ASN1_NEG 0x100
  ------------------
  328|   923k|    else
  329|   923k|        ret->type &= ~V_ASN1_NEG;
  ------------------
  |  |   99|   923k|#define V_ASN1_NEG 0x100
  ------------------
  330|       |
  331|   923k|    *pp += len;
  332|   923k|    if (a != NULL)
  ------------------
  |  Branch (332:9): [True: 923k, False: 0]
  ------------------
  333|   923k|        (*a) = ret;
  334|   923k|    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|   923k|}
ASN1_INTEGER_get_int64:
  539|   406k|{
  540|   406k|    return asn1_string_get_int64(pr, a, V_ASN1_INTEGER);
  ------------------
  |  |   66|   406k|#define V_ASN1_INTEGER 2
  ------------------
  541|   406k|}
ASN1_INTEGER_get:
  564|   406k|{
  565|   406k|    int i;
  566|   406k|    int64_t r;
  567|   406k|    if (a == NULL)
  ------------------
  |  Branch (567:9): [True: 0, False: 406k]
  ------------------
  568|      0|        return 0;
  569|   406k|    i = ASN1_INTEGER_get_int64(&r, a);
  570|   406k|    if (i == 0)
  ------------------
  |  Branch (570:9): [True: 0, False: 406k]
  ------------------
  571|      0|        return -1;
  572|   406k|    if (r > LONG_MAX || r < LONG_MIN)
  ------------------
  |  Branch (572:9): [True: 0, False: 406k]
  |  Branch (572:25): [True: 0, False: 406k]
  ------------------
  573|      0|        return -1;
  574|   406k|    return (long)r;
  575|   406k|}
a_int.c:twos_complement:
   78|   412k|{
   79|   412k|    unsigned int carry = pad & 1;
   80|       |
   81|       |    /* Begin at the end of the encoding */
   82|   412k|    if (len != 0) {
  ------------------
  |  Branch (82:9): [True: 412k, False: 0]
  ------------------
   83|       |        /*
   84|       |         * if len == 0 then src/dst could be NULL, and this would be undefined
   85|       |         * behaviour.
   86|       |         */
   87|   412k|        dst += len;
   88|   412k|        src += len;
   89|   412k|    }
   90|       |    /* two's complement value: ~value + 1 */
   91|  6.38M|    while (len-- != 0) {
  ------------------
  |  Branch (91:12): [True: 5.97M, False: 412k]
  ------------------
   92|  5.97M|        *(--dst) = (unsigned char)(carry += *(--src) ^ pad);
   93|  5.97M|        carry >>= 8;
   94|  5.97M|    }
   95|   412k|}
a_int.c:c2i_ibuf:
  156|  1.84M|{
  157|  1.84M|    int neg, pad;
  158|       |    /* Zero content length is illegal */
  159|  1.84M|    if (plen == 0) {
  ------------------
  |  Branch (159:9): [True: 0, False: 1.84M]
  ------------------
  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.84M|    neg = p[0] & 0x80;
  164|  1.84M|    if (pneg)
  ------------------
  |  Branch (164:9): [True: 923k, False: 923k]
  ------------------
  165|   923k|        *pneg = neg;
  166|       |    /* Handle common case where length is 1 octet separately */
  167|  1.84M|    if (plen == 1) {
  ------------------
  |  Branch (167:9): [True: 1.02M, False: 825k]
  ------------------
  168|  1.02M|        if (b != NULL) {
  ------------------
  |  Branch (168:13): [True: 510k, False: 510k]
  ------------------
  169|   510k|            if (neg)
  ------------------
  |  Branch (169:17): [True: 0, False: 510k]
  ------------------
  170|      0|                b[0] = (p[0] ^ 0xFF) + 1;
  171|   510k|            else
  172|   510k|                b[0] = p[0];
  173|   510k|        }
  174|  1.02M|        return 1;
  175|  1.02M|    }
  176|       |
  177|   825k|    pad = 0;
  178|   825k|    if (p[0] == 0) {
  ------------------
  |  Branch (178:9): [True: 68.1k, False: 757k]
  ------------------
  179|  68.1k|        pad = 1;
  180|   757k|    } else if (p[0] == 0xFF) {
  ------------------
  |  Branch (180:16): [True: 0, False: 757k]
  ------------------
  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|   825k|    if (pad && (neg == (p[1] & 0x80))) {
  ------------------
  |  Branch (192:9): [True: 68.1k, False: 757k]
  |  Branch (192:16): [True: 0, False: 68.1k]
  ------------------
  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|   825k|    p += pad;
  199|   825k|    plen -= pad;
  200|       |
  201|   825k|    if (b != NULL)
  ------------------
  |  Branch (201:9): [True: 412k, False: 412k]
  ------------------
  202|   412k|        twos_complement(b, p, plen, neg ? 0xffU : 0);
  ------------------
  |  Branch (202:37): [True: 0, False: 412k]
  ------------------
  203|       |
  204|   825k|    return plen;
  205|   825k|}
a_int.c:asn1_string_get_int64:
  342|   406k|{
  343|   406k|    if (a == NULL) {
  ------------------
  |  Branch (343:9): [True: 0, False: 406k]
  ------------------
  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|   406k|    if ((a->type & ~V_ASN1_NEG) != itype) {
  ------------------
  |  |   99|   406k|#define V_ASN1_NEG 0x100
  ------------------
  |  Branch (347:9): [True: 0, False: 406k]
  ------------------
  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|   406k|    return asn1_get_int64(pr, a->data, a->length, a->type & V_ASN1_NEG);
  ------------------
  |  |   99|   406k|#define V_ASN1_NEG 0x100
  ------------------
  352|   406k|}
a_int.c:asn1_get_int64:
  266|   406k|{
  267|   406k|    uint64_t r;
  268|   406k|    if (asn1_get_uint64(&r, b, blen) == 0)
  ------------------
  |  Branch (268:9): [True: 0, False: 406k]
  ------------------
  269|      0|        return 0;
  270|   406k|    if (neg) {
  ------------------
  |  Branch (270:9): [True: 0, False: 406k]
  ------------------
  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|   406k|    } else {
  288|   406k|        if (r <= INT64_MAX) {
  ------------------
  |  Branch (288:13): [True: 406k, False: 0]
  ------------------
  289|   406k|            *pr = (int64_t)r;
  290|   406k|        } 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|   406k|    }
  295|   406k|    return 1;
  296|   406k|}
a_int.c:asn1_get_uint64:
  223|   406k|{
  224|   406k|    size_t i;
  225|   406k|    uint64_t r;
  226|       |
  227|   406k|    if (blen > sizeof(*pr)) {
  ------------------
  |  Branch (227:9): [True: 0, False: 406k]
  ------------------
  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|   406k|    if (b == NULL)
  ------------------
  |  Branch (231:9): [True: 0, False: 406k]
  ------------------
  232|      0|        return 0;
  233|   812k|    for (r = 0, i = 0; i < blen; i++) {
  ------------------
  |  Branch (233:24): [True: 406k, False: 406k]
  ------------------
  234|   406k|        r <<= 8;
  235|   406k|        r |= b[i];
  236|   406k|    }
  237|   406k|    *pr = r;
  238|   406k|    return 1;
  239|   406k|}

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

a2d_ASN1_OBJECT:
   52|  18.2k|{
   53|  18.2k|    int i, first, len = 0, use_bn;
   54|  18.2k|    char c;
   55|  18.2k|    char ftmp[24], *tmp = ftmp;
   56|  18.2k|    int tmpsize = sizeof(ftmp);
   57|  18.2k|    const char *p;
   58|  18.2k|    unsigned long l;
   59|  18.2k|    BIGNUM *bl = NULL;
   60|       |
   61|  18.2k|    if (num == 0) {
  ------------------
  |  Branch (61:9): [True: 0, False: 18.2k]
  ------------------
   62|      0|        return 0;
   63|  18.2k|    } else if (num == -1) {
  ------------------
  |  Branch (63:16): [True: 18.2k, False: 0]
  ------------------
   64|  18.2k|        size_t num_s = strlen(buf);
   65|       |
   66|  18.2k|        if (num_s >= INT_MAX) {
  ------------------
  |  Branch (66:13): [True: 0, False: 18.2k]
  ------------------
   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|  18.2k|        num = (int)num_s;
   71|  18.2k|    }
   72|       |
   73|  18.2k|    p = buf;
   74|  18.2k|    c = *(p++);
   75|  18.2k|    num--;
   76|  18.2k|    if ((c >= '0') && (c <= '2')) {
  ------------------
  |  Branch (76:9): [True: 18.2k, False: 0]
  |  Branch (76:23): [True: 18.2k, False: 0]
  ------------------
   77|  18.2k|        first = c - '0';
   78|  18.2k|    } 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|  18.2k|    if (num <= 0) {
  ------------------
  |  Branch (83:9): [True: 0, False: 18.2k]
  ------------------
   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|  18.2k|    c = *(p++);
   88|  18.2k|    num--;
   89|   163k|    for (;;) {
   90|   163k|        if (num <= 0)
  ------------------
  |  Branch (90:13): [True: 18.2k, False: 145k]
  ------------------
   91|  18.2k|            break;
   92|   145k|        if ((c != '.') && (c != ' ')) {
  ------------------
  |  Branch (92:13): [True: 0, False: 145k]
  |  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|   145k|        l = 0;
   97|   145k|        use_bn = 0;
   98|   400k|        for (;;) {
   99|   400k|            if (num <= 0)
  ------------------
  |  Branch (99:17): [True: 18.2k, False: 382k]
  ------------------
  100|  18.2k|                break;
  101|   382k|            num--;
  102|   382k|            c = *(p++);
  103|   382k|            if ((c == ' ') || (c == '.'))
  ------------------
  |  Branch (103:17): [True: 0, False: 382k]
  |  Branch (103:31): [True: 127k, False: 255k]
  ------------------
  104|   127k|                break;
  105|   255k|            if (!ossl_isdigit(c)) {
  ------------------
  |  Branch (105:17): [True: 0, False: 255k]
  ------------------
  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|   255k|            if (!use_bn && l >= ((ULONG_MAX - 80) / 10L)) {
  ------------------
  |  Branch (109:17): [True: 255k, False: 0]
  |  Branch (109:28): [True: 0, False: 255k]
  ------------------
  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|   255k|            if (use_bn) {
  ------------------
  |  Branch (116:17): [True: 0, False: 255k]
  ------------------
  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|   255k|                l = l * 10L + (long)(c - '0');
  122|   255k|        }
  123|   145k|        if (len == 0) {
  ------------------
  |  Branch (123:13): [True: 18.2k, False: 127k]
  ------------------
  124|  18.2k|            if ((first < 2) && (l >= 40)) {
  ------------------
  |  Branch (124:17): [True: 0, False: 18.2k]
  |  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|  18.2k|            if (use_bn) {
  ------------------
  |  Branch (128:17): [True: 0, False: 18.2k]
  ------------------
  129|      0|                if (!BN_add_word(bl, first * 40))
  ------------------
  |  Branch (129:21): [True: 0, False: 0]
  ------------------
  130|      0|                    goto err;
  131|      0|            } else
  132|  18.2k|                l += (long)first * 40;
  133|  18.2k|        }
  134|   145k|        i = 0;
  135|   145k|        if (use_bn) {
  ------------------
  |  Branch (135:13): [True: 0, False: 145k]
  ------------------
  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|   145k|        } else {
  154|       |
  155|   163k|            for (;;) {
  156|   163k|                tmp[i++] = (unsigned char)l & 0x7f;
  157|   163k|                l >>= 7L;
  158|   163k|                if (l == 0L)
  ------------------
  |  Branch (158:21): [True: 145k, False: 18.2k]
  ------------------
  159|   145k|                    break;
  160|   163k|            }
  161|   145k|        }
  162|   145k|        if (out != NULL) {
  ------------------
  |  Branch (162:13): [True: 72.8k, False: 72.8k]
  ------------------
  163|  72.8k|            if (len + i > olen) {
  ------------------
  |  Branch (163:17): [True: 0, False: 72.8k]
  ------------------
  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|  81.9k|            while (--i > 0)
  ------------------
  |  Branch (167:20): [True: 9.10k, False: 72.8k]
  ------------------
  168|  9.10k|                out[len++] = tmp[i] | 0x80;
  169|  72.8k|            out[len++] = tmp[0];
  170|  72.8k|        } else
  171|  72.8k|            len += i;
  172|   145k|    }
  173|  18.2k|    if (tmp != ftmp)
  ------------------
  |  Branch (173:9): [True: 0, False: 18.2k]
  ------------------
  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|  18.2k|    BN_free(bl);
  176|  18.2k|    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|  18.2k|}
d2i_ASN1_OBJECT:
  220|  9.10k|{
  221|  9.10k|    const unsigned char *p;
  222|  9.10k|    long len;
  223|  9.10k|    int tag, xclass;
  224|  9.10k|    int inf, i;
  225|  9.10k|    ASN1_OBJECT *ret = NULL;
  226|  9.10k|    p = *pp;
  227|  9.10k|    inf = ASN1_get_object(&p, &len, &tag, &xclass, length);
  228|  9.10k|    if (inf & 0x80) {
  ------------------
  |  Branch (228:9): [True: 0, False: 9.10k]
  ------------------
  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|  9.10k|    if (tag != V_ASN1_OBJECT) {
  ------------------
  |  |   70|  9.10k|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (233:9): [True: 0, False: 9.10k]
  ------------------
  234|      0|        i = ASN1_R_EXPECTING_AN_OBJECT;
  ------------------
  |  |   43|      0|#define ASN1_R_EXPECTING_AN_OBJECT 116
  ------------------
  235|      0|        goto err;
  236|      0|    }
  237|  9.10k|    ret = ossl_c2i_ASN1_OBJECT(a, &p, len);
  238|  9.10k|    if (ret)
  ------------------
  |  Branch (238:9): [True: 9.10k, False: 0]
  ------------------
  239|  9.10k|        *pp = p;
  240|  9.10k|    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|  9.10k|}
ossl_c2i_ASN1_OBJECT:
  248|  7.55M|{
  249|  7.55M|    ASN1_OBJECT *ret = NULL, tobj;
  250|  7.55M|    const unsigned char *p;
  251|  7.55M|    unsigned char *data;
  252|  7.55M|    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|  7.55M|    if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL || p[len - 1] & 0x80) {
  ------------------
  |  Branch (259:9): [True: 0, False: 7.55M]
  |  Branch (259:21): [True: 0, False: 7.55M]
  |  Branch (259:38): [True: 0, False: 7.55M]
  |  Branch (259:52): [True: 0, False: 7.55M]
  |  Branch (259:73): [True: 0, False: 7.55M]
  ------------------
  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|  7.55M|    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|  7.55M|    tobj.nid = NID_undef;
  ------------------
  |  |   18|  7.55M|#define NID_undef                       0
  ------------------
  270|  7.55M|    tobj.data = p;
  271|  7.55M|    tobj.length = length;
  272|  7.55M|    tobj.flags = 0;
  273|  7.55M|    i = OBJ_obj2nid(&tobj);
  274|  7.55M|    if (i != NID_undef) {
  ------------------
  |  |   18|  7.55M|#define NID_undef                       0
  ------------------
  |  Branch (274:9): [True: 7.53M, False: 18.9k]
  ------------------
  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|  7.53M|        ret = OBJ_nid2obj(i);
  281|  7.53M|        if (a) {
  ------------------
  |  Branch (281:13): [True: 7.52M, False: 9.10k]
  ------------------
  282|  7.52M|            ASN1_OBJECT_free(*a);
  283|  7.52M|            *a = ret;
  284|  7.52M|        }
  285|  7.53M|        *pp += len;
  286|  7.53M|        return ret;
  287|  7.53M|    }
  288|   189k|    for (i = 0; i < length; i++, p++) {
  ------------------
  |  Branch (288:17): [True: 170k, False: 18.9k]
  ------------------
  289|   170k|        if (*p == 0x80 && (!i || !(p[-1] & 0x80))) {
  ------------------
  |  Branch (289:13): [True: 0, False: 170k]
  |  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|   170k|    }
  294|       |
  295|  18.9k|    if ((a == NULL) || ((*a) == NULL) || !((*a)->flags & ASN1_OBJECT_FLAG_DYNAMIC)) {
  ------------------
  |  |  146|  18.9k|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  |  Branch (295:9): [True: 0, False: 18.9k]
  |  Branch (295:24): [True: 0, False: 18.9k]
  |  Branch (295:42): [True: 18.9k, False: 0]
  ------------------
  296|  18.9k|        if ((ret = ossl_asn1_object_new()) == NULL)
  ------------------
  |  Branch (296:13): [True: 0, False: 18.9k]
  ------------------
  297|      0|            return NULL;
  298|  18.9k|    } else {
  299|      0|        ret = (*a);
  300|      0|    }
  301|       |
  302|  18.9k|    p = *pp;
  303|       |    /* detach data from object */
  304|  18.9k|    data = (unsigned char *)ret->data;
  305|  18.9k|    ret->data = NULL;
  306|       |    /* once detached we can change it */
  307|  18.9k|    if ((data == NULL) || (ret->length < length)) {
  ------------------
  |  Branch (307:9): [True: 18.9k, False: 0]
  |  Branch (307:27): [True: 0, False: 0]
  ------------------
  308|  18.9k|        ret->length = 0;
  309|  18.9k|        OPENSSL_free(data);
  ------------------
  |  |  132|  18.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__
  |  |  ------------------
  ------------------
  310|  18.9k|        data = OPENSSL_malloc(length);
  ------------------
  |  |  107|  18.9k|    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|  18.9k|        if (data == NULL)
  ------------------
  |  Branch (311:13): [True: 0, False: 18.9k]
  ------------------
  312|      0|            goto err;
  313|  18.9k|        ret->flags |= ASN1_OBJECT_FLAG_DYNAMIC_DATA;
  ------------------
  |  |  149|  18.9k|#define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 /* internal use */
  ------------------
  314|  18.9k|    }
  315|  18.9k|    memcpy(data, p, length);
  316|       |    /* If there are dynamic strings, free them here, and clear the flag */
  317|  18.9k|    if ((ret->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) != 0) {
  ------------------
  |  |  148|  18.9k|#define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 /* internal use */
  ------------------
  |  Branch (317:9): [True: 0, False: 18.9k]
  ------------------
  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|  18.9k|    ret->data = data;
  324|  18.9k|    ret->length = length;
  325|  18.9k|    ret->sn = NULL;
  326|  18.9k|    ret->ln = NULL;
  327|       |    /* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */
  328|  18.9k|    p += length;
  329|       |
  330|  18.9k|    if (a != NULL)
  ------------------
  |  Branch (330:9): [True: 18.9k, False: 0]
  ------------------
  331|  18.9k|        (*a) = ret;
  332|  18.9k|    *pp = p;
  333|  18.9k|    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|  18.9k|}
ossl_asn1_object_new:
  349|  18.9k|{
  350|  18.9k|    ASN1_OBJECT *ret;
  351|       |
  352|  18.9k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  18.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__
  |  |  ------------------
  ------------------
  353|  18.9k|    if (ret == NULL)
  ------------------
  |  Branch (353:9): [True: 0, False: 18.9k]
  ------------------
  354|      0|        return NULL;
  355|  18.9k|    ret->flags = ASN1_OBJECT_FLAG_DYNAMIC;
  ------------------
  |  |  146|  18.9k|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  356|  18.9k|    return ret;
  357|  18.9k|}
ASN1_OBJECT_free:
  360|  18.6M|{
  361|  18.6M|    if (a == NULL)
  ------------------
  |  Branch (361:9): [True: 443k, False: 18.2M]
  ------------------
  362|   443k|        return;
  363|  18.2M|    if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) {
  ------------------
  |  |  148|  18.2M|#define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 /* internal use */
  ------------------
  |  Branch (363:9): [True: 0, False: 18.2M]
  ------------------
  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|  18.2M|    if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_DATA) {
  ------------------
  |  |  149|  18.2M|#define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 /* internal use */
  ------------------
  |  Branch (374:9): [True: 18.9k, False: 18.1M]
  ------------------
  375|  18.9k|        OPENSSL_free((void *)a->data);
  ------------------
  |  |  132|  18.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__
  |  |  ------------------
  ------------------
  376|  18.9k|        a->data = NULL;
  377|  18.9k|        a->length = 0;
  378|  18.9k|    }
  379|  18.2M|    if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC)
  ------------------
  |  |  146|  18.2M|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  |  Branch (379:9): [True: 18.9k, False: 18.1M]
  ------------------
  380|  18.9k|        OPENSSL_free(a);
  ------------------
  |  |  132|  18.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__
  |  |  ------------------
  ------------------
  381|  18.2M|}

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

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

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

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

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

ASN1_tag2bit:
  106|  7.41M|{
  107|  7.41M|    if ((tag < 0) || (tag > 30))
  ------------------
  |  Branch (107:9): [True: 0, False: 7.41M]
  |  Branch (107:22): [True: 0, False: 7.41M]
  ------------------
  108|      0|        return 0;
  109|  7.41M|    return tag2bit[tag];
  110|  7.41M|}
ASN1_item_ex_d2i:
  153|   920k|{
  154|   920k|    return asn1_item_ex_d2i_intern(pval, in, len, it, tag, aclass, opt, ctx,
  155|   920k|        NULL, NULL);
  156|   920k|}
ASN1_item_d2i_ex:
  162|  3.00M|{
  163|  3.00M|    ASN1_TLC c;
  164|  3.00M|    ASN1_VALUE *ptmpval = NULL;
  165|       |
  166|  3.00M|    if (pval == NULL)
  ------------------
  |  Branch (166:9): [True: 1.62M, False: 1.37M]
  ------------------
  167|  1.62M|        pval = &ptmpval;
  168|  3.00M|    asn1_tlc_clear_nc(&c);
  ------------------
  |  |  121|  3.00M|    do {                     \
  |  |  122|  3.00M|        (c)->valid = 0;      \
  |  |  123|  3.00M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (123:14): [Folded, False: 3.00M]
  |  |  ------------------
  ------------------
  169|  3.00M|    if (asn1_item_ex_d2i_intern(pval, in, len, it, -1, 0, 0, &c, libctx,
  ------------------
  |  Branch (169:9): [True: 3.00M, False: 0]
  ------------------
  170|  3.00M|            propq)
  171|  3.00M|        > 0)
  172|  3.00M|        return *pval;
  173|      0|    return NULL;
  174|  3.00M|}
ASN1_item_d2i:
  179|  2.54M|{
  180|  2.54M|    return ASN1_item_d2i_ex(pval, in, len, it, NULL, NULL);
  181|  2.54M|}
asn1_item_embed_d2i:
  193|  39.0M|{
  194|  39.0M|    const ASN1_TEMPLATE *tt, *errtt = NULL;
  195|  39.0M|    const ASN1_EXTERN_FUNCS *ef;
  196|  39.0M|    const ASN1_AUX *aux;
  197|  39.0M|    ASN1_aux_cb *asn1_cb;
  198|  39.0M|    const unsigned char *p = NULL, *q;
  199|  39.0M|    unsigned char oclass;
  200|  39.0M|    char seq_eoc, seq_nolen, cst, isopt;
  201|  39.0M|    long tmplen;
  202|  39.0M|    int i;
  203|  39.0M|    int otag;
  204|  39.0M|    int ret = 0;
  205|  39.0M|    ASN1_VALUE **pchptr;
  206|       |
  207|  39.0M|    if (pval == NULL || it == NULL) {
  ------------------
  |  Branch (207:9): [True: 0, False: 39.0M]
  |  Branch (207:25): [True: 0, False: 39.0M]
  ------------------
  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|  39.0M|    if (len <= 0) {
  ------------------
  |  Branch (211:9): [True: 0, False: 39.0M]
  ------------------
  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|  39.0M|    aux = it->funcs;
  216|  39.0M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (216:9): [True: 3.72M, False: 35.3M]
  |  Branch (216:16): [True: 1.43M, False: 2.29M]
  ------------------
  217|  1.43M|        asn1_cb = aux->asn1_cb;
  218|  37.6M|    else
  219|  37.6M|        asn1_cb = 0;
  220|       |
  221|  39.0M|    if (++depth > ASN1_MAX_CONSTRUCTED_NEST) {
  ------------------
  |  |   27|  39.0M|#define ASN1_MAX_CONSTRUCTED_NEST 30
  ------------------
  |  Branch (221:9): [True: 0, False: 39.0M]
  ------------------
  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|  39.0M|    switch (it->itype) {
  227|  22.1M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  22.1M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (227:5): [True: 22.1M, False: 16.8M]
  ------------------
  228|  22.1M|        if (it->templates) {
  ------------------
  |  Branch (228:13): [True: 4.20M, False: 17.9M]
  ------------------
  229|       |            /*
  230|       |             * tagging or OPTIONAL is currently illegal on an item template
  231|       |             * because the flags can't get passed down. In practice this
  232|       |             * isn't a problem: we include the relevant flags from the item
  233|       |             * template in the template itself.
  234|       |             */
  235|  4.20M|            if ((tag != -1) || opt) {
  ------------------
  |  Branch (235:17): [True: 0, False: 4.20M]
  |  Branch (235:32): [True: 0, False: 4.20M]
  ------------------
  236|      0|                ERR_raise(ERR_LIB_ASN1,
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  237|      0|                    ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE);
  238|      0|                goto err;
  239|      0|            }
  240|  4.20M|            return asn1_template_ex_d2i(pval, in, len, it->templates, opt, ctx,
  241|  4.20M|                depth, libctx, propq);
  242|  4.20M|        }
  243|  17.9M|        return asn1_d2i_ex_primitive(pval, in, len, it,
  244|  17.9M|            tag, aclass, opt, ctx);
  245|       |
  246|  4.16M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  4.16M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (246:5): [True: 4.16M, False: 34.9M]
  ------------------
  247|       |        /*
  248|       |         * It never makes sense for multi-strings to have implicit tagging, so
  249|       |         * if tag != -1, then this looks like an error in the template.
  250|       |         */
  251|  4.16M|        if (tag != -1) {
  ------------------
  |  Branch (251:13): [True: 0, False: 4.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|  4.16M|        p = *in;
  257|       |        /* Just read in tag and class */
  258|  4.16M|        ret = asn1_check_tlen(NULL, &otag, &oclass, NULL, NULL,
  259|  4.16M|            &p, len, -1, 0, 1, ctx);
  260|  4.16M|        if (!ret) {
  ------------------
  |  Branch (260:13): [True: 0, False: 4.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|  4.16M|        if (oclass != V_ASN1_UNIVERSAL) {
  ------------------
  |  |   49|  4.16M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (266:13): [True: 0, False: 4.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|  4.16M|        if (!(ASN1_tag2bit(otag) & it->utype)) {
  ------------------
  |  Branch (275:13): [True: 0, False: 4.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|  4.16M|        return asn1_d2i_ex_primitive(pval, in, len, it, otag, 0, 0, ctx);
  283|       |
  284|  1.83M|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  1.83M|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (284:5): [True: 1.83M, False: 37.2M]
  ------------------
  285|       |        /* Use new style d2i */
  286|  1.83M|        ef = it->funcs;
  287|  1.83M|        if (ef->asn1_ex_d2i_ex != NULL)
  ------------------
  |  Branch (287:13): [True: 916k, False: 920k]
  ------------------
  288|   916k|            return ef->asn1_ex_d2i_ex(pval, in, len, it, tag, aclass, opt, ctx,
  289|   916k|                libctx, propq);
  290|   920k|        return ef->asn1_ex_d2i(pval, in, len, it, tag, aclass, opt, ctx);
  291|       |
  292|  99.1k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  99.1k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (292:5): [True: 99.1k, False: 38.9M]
  ------------------
  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|  99.1k|        if (tag != -1) {
  ------------------
  |  Branch (297:13): [True: 0, False: 99.1k]
  ------------------
  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|  99.1k|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
  ------------------
  |  |  735|  42.9k|#define ASN1_OP_D2I_PRE 4
  ------------------
  |  Branch (302:13): [True: 42.9k, False: 56.1k]
  |  Branch (302:24): [True: 0, False: 42.9k]
  ------------------
  303|      0|            goto auxerr;
  304|  99.1k|        if (*pval) {
  ------------------
  |  Branch (304:13): [True: 0, False: 99.1k]
  ------------------
  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|  99.1k|        } else if (!ossl_asn1_item_ex_new_intern(pval, it, libctx, propq)) {
  ------------------
  |  Branch (313:20): [True: 0, False: 99.1k]
  ------------------
  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|  99.1k|        p = *in;
  319|   379k|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (319:41): [True: 379k, False: 0]
  ------------------
  320|   379k|            pchptr = ossl_asn1_get_field_ptr(pval, tt);
  321|       |            /*
  322|       |             * We mark field as OPTIONAL so its absence can be recognised.
  323|       |             */
  324|   379k|            ret = asn1_template_ex_d2i(pchptr, &p, len, tt, 1, ctx, depth,
  325|   379k|                libctx, propq);
  326|       |            /* If field not present, try the next one */
  327|   379k|            if (ret == -1)
  ------------------
  |  Branch (327:17): [True: 280k, False: 99.1k]
  ------------------
  328|   280k|                continue;
  329|       |            /* If positive return, read OK, break loop */
  330|  99.1k|            if (ret > 0)
  ------------------
  |  Branch (330:17): [True: 99.1k, False: 0]
  ------------------
  331|  99.1k|                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|  99.1k|        }
  341|       |
  342|       |        /* Did we fall off the end without reading anything? */
  343|  99.1k|        if (i == it->tcount) {
  ------------------
  |  Branch (343:13): [True: 0, False: 99.1k]
  ------------------
  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|  99.1k|        ossl_asn1_set_choice_selector(pval, i, it);
  355|       |
  356|  99.1k|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL))
  ------------------
  |  |  736|  42.9k|#define ASN1_OP_D2I_POST 5
  ------------------
  |  Branch (356:13): [True: 42.9k, False: 56.1k]
  |  Branch (356:24): [True: 0, False: 42.9k]
  ------------------
  357|      0|            goto auxerr;
  358|  99.1k|        *in = p;
  359|  99.1k|        return 1;
  360|       |
  361|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (361:5): [True: 0, False: 39.0M]
  ------------------
  362|  10.7M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  10.7M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (362:5): [True: 10.7M, False: 28.2M]
  ------------------
  363|  10.7M|        p = *in;
  364|  10.7M|        tmplen = len;
  365|       |
  366|       |        /* If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL */
  367|  10.7M|        if (tag == -1) {
  ------------------
  |  Branch (367:13): [True: 10.6M, False: 99.1k]
  ------------------
  368|  10.6M|            tag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|  10.6M|#define V_ASN1_SEQUENCE 16
  ------------------
  369|  10.6M|            aclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  10.6M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  370|  10.6M|        }
  371|       |        /* Get SEQUENCE length and update len, p */
  372|  10.7M|        ret = asn1_check_tlen(&len, NULL, NULL, &seq_eoc, &cst,
  373|  10.7M|            &p, len, tag, aclass, opt, ctx);
  374|  10.7M|        if (!ret) {
  ------------------
  |  Branch (374:13): [True: 0, False: 10.7M]
  ------------------
  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|  10.7M|        } else if (ret == -1)
  ------------------
  |  Branch (377:20): [True: 99.1k, False: 10.6M]
  ------------------
  378|  99.1k|            return -1;
  379|  10.6M|        if (aux && (aux->flags & ASN1_AFLG_BROKEN)) {
  ------------------
  |  |  725|  1.22M|#define ASN1_AFLG_BROKEN 4
  ------------------
  |  Branch (379:13): [True: 1.22M, False: 9.46M]
  |  Branch (379:20): [True: 0, False: 1.22M]
  ------------------
  380|      0|            len = tmplen - (long)(p - *in);
  381|      0|            seq_nolen = 1;
  382|      0|        }
  383|       |        /* If indefinite we don't do a length check */
  384|  10.6M|        else
  385|  10.6M|            seq_nolen = seq_eoc;
  386|  10.6M|        if (!cst) {
  ------------------
  |  Branch (386:13): [True: 0, False: 10.6M]
  ------------------
  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|  10.6M|        if (*pval == NULL
  ------------------
  |  Branch (391:13): [True: 6.11M, False: 4.58M]
  ------------------
  392|  6.11M|            && !ossl_asn1_item_ex_new_intern(pval, it, libctx, propq)) {
  ------------------
  |  Branch (392:16): [True: 0, False: 6.11M]
  ------------------
  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|  10.6M|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
  ------------------
  |  |  735|   768k|#define ASN1_OP_D2I_PRE 4
  ------------------
  |  Branch (397:13): [True: 768k, False: 9.92M]
  |  Branch (397:24): [True: 0, False: 768k]
  ------------------
  398|      0|            goto auxerr;
  399|       |
  400|       |        /* Free up and zero any ADB found */
  401|  37.9M|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (401:41): [True: 27.2M, False: 10.6M]
  ------------------
  402|  27.2M|            if (tt->flags & ASN1_TFLG_ADB_MASK) {
  ------------------
  |  |  572|  27.2M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (402:17): [True: 0, False: 27.2M]
  ------------------
  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|  27.2M|        }
  412|       |
  413|       |        /* Get each field entry */
  414|  36.9M|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (414:41): [True: 27.0M, False: 9.87M]
  ------------------
  415|  27.0M|            const ASN1_TEMPLATE *seqtt;
  416|  27.0M|            ASN1_VALUE **pseqval;
  417|  27.0M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  418|  27.0M|            if (seqtt == NULL)
  ------------------
  |  Branch (418:17): [True: 0, False: 27.0M]
  ------------------
  419|      0|                goto err;
  420|  27.0M|            pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  421|       |            /* Have we ran out of data? */
  422|  27.0M|            if (!len)
  ------------------
  |  Branch (422:17): [True: 820k, False: 26.2M]
  ------------------
  423|   820k|                break;
  424|  26.2M|            q = p;
  425|  26.2M|            if (asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (425:17): [True: 0, False: 26.2M]
  ------------------
  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|  26.2M|            if (i == (it->tcount - 1))
  ------------------
  |  Branch (440:17): [True: 9.87M, False: 16.3M]
  ------------------
  441|  9.87M|                isopt = 0;
  442|  16.3M|            else
  443|  16.3M|                isopt = (char)(seqtt->flags & ASN1_TFLG_OPTIONAL);
  ------------------
  |  |  512|  16.3M|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  444|       |            /*
  445|       |             * attempt to read in field, allowing each to be OPTIONAL
  446|       |             */
  447|       |
  448|  26.2M|            ret = asn1_template_ex_d2i(pseqval, &p, len, seqtt, isopt, ctx,
  449|  26.2M|                depth, libctx, propq);
  450|  26.2M|            if (!ret) {
  ------------------
  |  Branch (450:17): [True: 0, False: 26.2M]
  ------------------
  451|      0|                errtt = seqtt;
  452|      0|                goto err;
  453|  26.2M|            } else if (ret == -1) {
  ------------------
  |  Branch (453:24): [True: 1.57M, False: 24.6M]
  ------------------
  454|       |                /*
  455|       |                 * OPTIONAL component absent. Free and zero the field.
  456|       |                 */
  457|  1.57M|                ossl_asn1_template_free(pseqval, seqtt);
  458|  1.57M|                continue;
  459|  1.57M|            }
  460|       |            /* Update length */
  461|  24.6M|            len -= (long)(p - q);
  462|  24.6M|        }
  463|       |
  464|       |        /* Check for EOC if expecting one */
  465|  10.6M|        if (seq_eoc && !asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (465:13): [True: 0, False: 10.6M]
  |  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|  10.6M|        if (!seq_nolen && len) {
  ------------------
  |  Branch (470:13): [True: 10.6M, False: 0]
  |  Branch (470:27): [True: 0, False: 10.6M]
  ------------------
  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|  11.6M|        for (; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (480:16): [True: 952k, False: 10.6M]
  ------------------
  481|   952k|            const ASN1_TEMPLATE *seqtt;
  482|   952k|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  483|   952k|            if (seqtt == NULL)
  ------------------
  |  Branch (483:17): [True: 0, False: 952k]
  ------------------
  484|      0|                goto err;
  485|   952k|            if (seqtt->flags & ASN1_TFLG_OPTIONAL) {
  ------------------
  |  |  512|   952k|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (485:17): [True: 952k, False: 0]
  ------------------
  486|   952k|                ASN1_VALUE **pseqval;
  487|   952k|                pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  488|   952k|                ossl_asn1_template_free(pseqval, seqtt);
  489|   952k|            } 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|   952k|        }
  495|       |        /* Save encoding */
  496|  10.6M|        if (!ossl_asn1_enc_save(pval, *in, (long)(p - *in), it))
  ------------------
  |  Branch (496:13): [True: 0, False: 10.6M]
  ------------------
  497|      0|            goto auxerr;
  498|  10.6M|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL))
  ------------------
  |  |  736|   768k|#define ASN1_OP_D2I_POST 5
  ------------------
  |  Branch (498:13): [True: 768k, False: 9.92M]
  |  Branch (498:24): [True: 0, False: 768k]
  ------------------
  499|      0|            goto auxerr;
  500|  10.6M|        *in = p;
  501|  10.6M|        return 1;
  502|       |
  503|      0|    default:
  ------------------
  |  Branch (503:5): [True: 0, False: 39.0M]
  ------------------
  504|      0|        return 0;
  505|  39.0M|    }
  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|  3.92M|{
  137|  3.92M|    int rv;
  138|       |
  139|  3.92M|    if (pval == NULL || it == NULL) {
  ------------------
  |  Branch (139:9): [True: 0, False: 3.92M]
  |  Branch (139:25): [True: 0, False: 3.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|  3.92M|    rv = asn1_item_embed_d2i(pval, in, len, it, tag, aclass, opt, ctx, 0,
  144|  3.92M|        libctx, propq);
  145|  3.92M|    if (rv <= 0)
  ------------------
  |  Branch (145:9): [True: 0, False: 3.92M]
  ------------------
  146|      0|        ASN1_item_ex_free(pval, it);
  147|  3.92M|    return rv;
  148|  3.92M|}
tasn_dec.c:asn1_template_ex_d2i:
  527|  30.8M|{
  528|  30.8M|    int flags, aclass;
  529|  30.8M|    int ret;
  530|  30.8M|    long len;
  531|  30.8M|    const unsigned char *p, *q;
  532|  30.8M|    char exp_eoc;
  533|  30.8M|    if (!val)
  ------------------
  |  Branch (533:9): [True: 0, False: 30.8M]
  ------------------
  534|      0|        return 0;
  535|  30.8M|    flags = tt->flags;
  536|  30.8M|    aclass = flags & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  30.8M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  537|       |
  538|  30.8M|    p = *in;
  539|       |
  540|       |    /* Check if EXPLICIT tag expected */
  541|  30.8M|    if (flags & ASN1_TFLG_EXPTAG) {
  ------------------
  |  |  539|  30.8M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (541:9): [True: 1.00M, False: 29.8M]
  ------------------
  542|  1.00M|        char cst;
  543|       |        /*
  544|       |         * Need to work out amount of data available to the inner content and
  545|       |         * where it starts: so read in EXPLICIT header to get the info.
  546|       |         */
  547|  1.00M|        ret = asn1_check_tlen(&len, NULL, NULL, &exp_eoc, &cst,
  548|  1.00M|            &p, inlen, tt->tag, aclass, opt, ctx);
  549|  1.00M|        q = p;
  550|  1.00M|        if (!ret) {
  ------------------
  |  Branch (550:13): [True: 0, False: 1.00M]
  ------------------
  551|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  552|      0|            return 0;
  553|  1.00M|        } else if (ret == -1)
  ------------------
  |  Branch (553:20): [True: 42.9k, False: 962k]
  ------------------
  554|  42.9k|            return -1;
  555|   962k|        if (!cst) {
  ------------------
  |  Branch (555:13): [True: 0, False: 962k]
  ------------------
  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|   962k|        ret = asn1_template_noexp_d2i(val, &p, len, tt, 0, ctx, depth, libctx,
  561|   962k|            propq);
  562|   962k|        if (!ret) {
  ------------------
  |  Branch (562:13): [True: 0, False: 962k]
  ------------------
  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|   962k|        len -= (long)(p - q);
  568|   962k|        if (exp_eoc) {
  ------------------
  |  Branch (568:13): [True: 0, False: 962k]
  ------------------
  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|   962k|        } else {
  575|       |            /*
  576|       |             * Otherwise we must hit the EXPLICIT tag end or its an error
  577|       |             */
  578|   962k|            if (len) {
  ------------------
  |  Branch (578:17): [True: 0, False: 962k]
  ------------------
  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|   962k|        }
  583|   962k|    } else
  584|  29.8M|        return asn1_template_noexp_d2i(val, in, inlen, tt, opt, ctx, depth,
  585|  29.8M|            libctx, propq);
  586|       |
  587|   962k|    *in = p;
  588|   962k|    return 1;
  589|       |
  590|      0|err:
  591|      0|    return 0;
  592|  30.8M|}
tasn_dec.c:asn1_template_noexp_d2i:
  599|  30.7M|{
  600|  30.7M|    int flags, aclass;
  601|  30.7M|    int ret;
  602|  30.7M|    ASN1_VALUE *tval;
  603|  30.7M|    const unsigned char *p, *q;
  604|  30.7M|    if (!val)
  ------------------
  |  Branch (604:9): [True: 0, False: 30.7M]
  ------------------
  605|      0|        return 0;
  606|  30.7M|    flags = tt->flags;
  607|  30.7M|    aclass = flags & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  30.7M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  608|       |
  609|  30.7M|    p = *in;
  610|       |
  611|       |    /*
  612|       |     * If field is embedded then val needs fixing so it is a pointer to
  613|       |     * a pointer to a field.
  614|       |     */
  615|  30.7M|    if (tt->flags & ASN1_TFLG_EMBED) {
  ------------------
  |  |  586|  30.7M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  |  Branch (615:9): [True: 4.31M, False: 26.4M]
  ------------------
  616|  4.31M|        tval = (ASN1_VALUE *)val;
  617|  4.31M|        val = &tval;
  618|  4.31M|    }
  619|       |
  620|  30.7M|    if (flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  30.7M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (620:9): [True: 4.70M, False: 26.0M]
  ------------------
  621|       |        /* SET OF, SEQUENCE OF */
  622|  4.70M|        int sktag, skaclass;
  623|  4.70M|        char sk_eoc;
  624|       |        /* First work out expected inner tag value */
  625|  4.70M|        if (flags & ASN1_TFLG_IMPTAG) {
  ------------------
  |  |  536|  4.70M|#define ASN1_TFLG_IMPTAG (0x1 << 3)
  ------------------
  |  Branch (625:13): [True: 42.9k, False: 4.66M]
  ------------------
  626|  42.9k|            sktag = tt->tag;
  627|  42.9k|            skaclass = aclass;
  628|  4.66M|        } else {
  629|  4.66M|            skaclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  4.66M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  630|  4.66M|            if (flags & ASN1_TFLG_SET_OF)
  ------------------
  |  |  515|  4.66M|#define ASN1_TFLG_SET_OF (0x1 << 1)
  ------------------
  |  Branch (630:17): [True: 3.24M, False: 1.41M]
  ------------------
  631|  3.24M|                sktag = V_ASN1_SET;
  ------------------
  |  |   77|  3.24M|#define V_ASN1_SET 17
  ------------------
  632|  1.41M|            else
  633|  1.41M|                sktag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|  1.41M|#define V_ASN1_SEQUENCE 16
  ------------------
  634|  4.66M|        }
  635|       |        /* Get the tag */
  636|  4.70M|        ret = asn1_check_tlen(&len, NULL, NULL, &sk_eoc, NULL,
  637|  4.70M|            &p, len, sktag, skaclass, opt, ctx);
  638|  4.70M|        if (!ret) {
  ------------------
  |  Branch (638:13): [True: 0, False: 4.70M]
  ------------------
  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|  4.70M|        } else if (ret == -1)
  ------------------
  |  Branch (641:20): [True: 0, False: 4.70M]
  ------------------
  642|      0|            return -1;
  643|  4.70M|        if (*val == NULL)
  ------------------
  |  Branch (643:13): [True: 4.70M, False: 0]
  ------------------
  644|  4.70M|            *val = (ASN1_VALUE *)sk_ASN1_VALUE_new_null();
  ------------------
  |  |  890|  4.70M|#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|  4.70M|        if (*val == NULL) {
  ------------------
  |  Branch (657:13): [True: 0, False: 4.70M]
  ------------------
  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|  12.8M|        while (len > 0) {
  ------------------
  |  Branch (663:16): [True: 8.15M, False: 4.70M]
  ------------------
  664|  8.15M|            ASN1_VALUE *skfield;
  665|  8.15M|            q = p;
  666|       |            /* See if EOC found */
  667|  8.15M|            if (asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (667:17): [True: 0, False: 8.15M]
  ------------------
  668|      0|                if (!sk_eoc) {
  ------------------
  |  Branch (668:21): [True: 0, False: 0]
  ------------------
  669|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_UNEXPECTED_EOC);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  670|      0|                    goto err;
  671|      0|                }
  672|      0|                len -= (long)(p - q);
  673|      0|                sk_eoc = 0;
  674|      0|                break;
  675|      0|            }
  676|  8.15M|            skfield = NULL;
  677|  8.15M|            if (asn1_item_embed_d2i(&skfield, &p, len,
  ------------------
  |  Branch (677:17): [True: 0, False: 8.15M]
  ------------------
  678|  8.15M|                    ASN1_ITEM_ptr(tt->item), -1, 0, 0, ctx,
  ------------------
  |  |  394|  8.15M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  679|  8.15M|                    depth, libctx, propq)
  680|  8.15M|                <= 0) {
  681|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  682|       |                /* |skfield| may be partially allocated despite failure. */
  683|      0|                ASN1_item_free(skfield, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  394|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  684|      0|                goto err;
  685|      0|            }
  686|  8.15M|            len -= (long)(p - q);
  687|  8.15M|            if (!sk_ASN1_VALUE_push((STACK_OF(ASN1_VALUE) *)*val, skfield)) {
  ------------------
  |  |  897|  8.15M|#define sk_ASN1_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
  ------------------
  |  Branch (687:17): [True: 0, False: 8.15M]
  ------------------
  688|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  689|      0|                ASN1_item_free(skfield, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  394|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  690|      0|                goto err;
  691|      0|            }
  692|  8.15M|        }
  693|  4.70M|        if (sk_eoc) {
  ------------------
  |  Branch (693:13): [True: 0, False: 4.70M]
  ------------------
  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|  26.0M|    } else if (flags & ASN1_TFLG_IMPTAG) {
  ------------------
  |  |  536|  26.0M|#define ASN1_TFLG_IMPTAG (0x1 << 3)
  ------------------
  |  Branch (697:16): [True: 1.29M, False: 24.7M]
  ------------------
  698|       |        /* IMPLICIT tagging */
  699|  1.29M|        ret = asn1_item_embed_d2i(val, &p, len,
  700|  1.29M|            ASN1_ITEM_ptr(tt->item), tt->tag, aclass, opt,
  ------------------
  |  |  394|  1.29M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  701|  1.29M|            ctx, depth, libctx, propq);
  702|  1.29M|        if (!ret) {
  ------------------
  |  Branch (702:13): [True: 0, False: 1.29M]
  ------------------
  703|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  704|      0|            goto err;
  705|  1.29M|        } else if (ret == -1)
  ------------------
  |  Branch (705:20): [True: 1.15M, False: 142k]
  ------------------
  706|  1.15M|            return -1;
  707|  24.7M|    } else {
  708|       |        /* Nothing special */
  709|  24.7M|        ret = asn1_item_embed_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  24.7M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  710|  24.7M|            -1, 0, opt, ctx, depth, libctx, propq);
  711|  24.7M|        if (!ret) {
  ------------------
  |  Branch (711:13): [True: 0, False: 24.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|  24.7M|        } else if (ret == -1)
  ------------------
  |  Branch (714:20): [True: 655k, False: 24.1M]
  ------------------
  715|   655k|            return -1;
  716|  24.7M|    }
  717|       |
  718|  28.9M|    *in = p;
  719|  28.9M|    return 1;
  720|       |
  721|      0|err:
  722|      0|    return 0;
  723|  30.7M|}
tasn_dec.c:asn1_d2i_ex_primitive:
  729|  22.1M|{
  730|  22.1M|    int ret = 0, utype;
  731|  22.1M|    long plen;
  732|  22.1M|    char cst, inf, free_cont = 0;
  733|  22.1M|    const unsigned char *p;
  734|  22.1M|    BUF_MEM buf = { 0, NULL, 0, 0 };
  735|  22.1M|    const unsigned char *cont = NULL;
  736|  22.1M|    long len;
  737|       |
  738|  22.1M|    if (pval == NULL) {
  ------------------
  |  Branch (738:9): [True: 0, False: 22.1M]
  ------------------
  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|  22.1M|    if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  22.1M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (743:9): [True: 4.16M, False: 17.9M]
  ------------------
  744|  4.16M|        utype = tag;
  745|  4.16M|        tag = -1;
  746|  4.16M|    } else
  747|  17.9M|        utype = it->utype;
  748|       |
  749|  22.1M|    if (utype == V_ASN1_ANY) {
  ------------------
  |  |   60|  22.1M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (749:9): [True: 1.99M, False: 20.1M]
  ------------------
  750|       |        /* If type is ANY need to figure out type from tag */
  751|  1.99M|        unsigned char oclass;
  752|  1.99M|        if (tag >= 0) {
  ------------------
  |  Branch (752:13): [True: 0, False: 1.99M]
  ------------------
  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.99M|        if (opt) {
  ------------------
  |  Branch (756:13): [True: 0, False: 1.99M]
  ------------------
  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.99M|        p = *in;
  761|  1.99M|        ret = asn1_check_tlen(NULL, &utype, &oclass, NULL, NULL,
  762|  1.99M|            &p, inlen, -1, 0, 0, ctx);
  763|  1.99M|        if (!ret) {
  ------------------
  |  Branch (763:13): [True: 0, False: 1.99M]
  ------------------
  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.99M|        if (oclass != V_ASN1_UNIVERSAL)
  ------------------
  |  |   49|  1.99M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (767:13): [True: 0, False: 1.99M]
  ------------------
  768|      0|            utype = V_ASN1_OTHER;
  ------------------
  |  |   59|      0|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  769|  1.99M|    }
  770|  22.1M|    if (tag == -1) {
  ------------------
  |  Branch (770:9): [True: 20.9M, False: 1.19M]
  ------------------
  771|  20.9M|        tag = utype;
  772|  20.9M|        aclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  20.9M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  773|  20.9M|    }
  774|  22.1M|    p = *in;
  775|       |    /* Check header */
  776|  22.1M|    ret = asn1_check_tlen(&plen, NULL, NULL, &inf, &cst,
  777|  22.1M|        &p, inlen, tag, aclass, opt, ctx);
  778|  22.1M|    if (!ret) {
  ------------------
  |  Branch (778:9): [True: 0, False: 22.1M]
  ------------------
  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|  22.1M|    } else if (ret == -1)
  ------------------
  |  Branch (781:16): [True: 1.71M, False: 20.4M]
  ------------------
  782|  1.71M|        return -1;
  783|  20.4M|    ret = 0;
  784|       |    /* SEQUENCE, SET and "OTHER" are left in encoded form */
  785|  20.4M|    if ((utype == V_ASN1_SEQUENCE)
  ------------------
  |  |   76|  20.4M|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (785:9): [True: 0, False: 20.4M]
  ------------------
  786|  20.4M|        || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER)) {
  ------------------
  |  |   77|  20.4M|#define V_ASN1_SET 17
  ------------------
                      || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER)) {
  ------------------
  |  |   59|  20.4M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (786:12): [True: 0, False: 20.4M]
  |  Branch (786:37): [True: 0, False: 20.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|  20.4M|    } else if (cst) {
  ------------------
  |  Branch (810:16): [True: 0, False: 20.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|  20.4M|    } else {
  838|  20.4M|        cont = p;
  839|  20.4M|        len = plen;
  840|  20.4M|        p += plen;
  841|  20.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|  20.4M|    if (!asn1_ex_c2i(pval, cont, len, utype, &free_cont, it))
  ------------------
  |  Branch (845:9): [True: 0, False: 20.4M]
  ------------------
  846|      0|        goto err;
  847|       |
  848|  20.4M|    *in = p;
  849|  20.4M|    ret = 1;
  850|  20.4M|err:
  851|  20.4M|    if (free_cont)
  ------------------
  |  Branch (851:9): [True: 0, False: 20.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|  20.4M|    return ret;
  854|  20.4M|}
tasn_dec.c:asn1_ex_c2i:
  860|  20.4M|{
  861|  20.4M|    ASN1_VALUE **opval = NULL;
  862|  20.4M|    ASN1_STRING *stmp;
  863|  20.4M|    ASN1_TYPE *typ = NULL;
  864|  20.4M|    int ret = 0;
  865|  20.4M|    int ilen = (int)len;
  866|  20.4M|    const ASN1_PRIMITIVE_FUNCS *pf;
  867|  20.4M|    ASN1_INTEGER **tint;
  868|  20.4M|    pf = it->funcs;
  869|       |
  870|  20.4M|    if (pf && pf->prim_c2i) {
  ------------------
  |  Branch (870:9): [True: 621k, False: 19.8M]
  |  Branch (870:15): [True: 621k, False: 0]
  ------------------
  871|   621k|        if (len == (long)ilen)
  ------------------
  |  Branch (871:13): [True: 621k, False: 0]
  ------------------
  872|   621k|            return pf->prim_c2i(pval, cont, ilen, utype, free_cont, it);
  873|   621k|        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|   621k|    }
  876|       |    /* If ANY type clear type and set pointer to internal value */
  877|  19.8M|    if (it->utype == V_ASN1_ANY) {
  ------------------
  |  |   60|  19.8M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (877:9): [True: 1.99M, False: 17.8M]
  ------------------
  878|  1.99M|        if (*pval == NULL) {
  ------------------
  |  Branch (878:13): [True: 1.99M, False: 0]
  ------------------
  879|  1.99M|            typ = ASN1_TYPE_new();
  880|  1.99M|            if (typ == NULL)
  ------------------
  |  Branch (880:17): [True: 0, False: 1.99M]
  ------------------
  881|      0|                goto err;
  882|  1.99M|            *pval = (ASN1_VALUE *)typ;
  883|  1.99M|        } else
  884|      0|            typ = (ASN1_TYPE *)*pval;
  885|       |
  886|  1.99M|        if (utype != typ->type)
  ------------------
  |  Branch (886:13): [True: 1.99M, False: 0]
  ------------------
  887|  1.99M|            ASN1_TYPE_set(typ, utype, NULL);
  888|  1.99M|        opval = pval;
  889|  1.99M|        pval = &typ->value.asn1_value;
  890|  1.99M|    }
  891|  19.8M|    switch (utype) {
  892|  7.54M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  7.54M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (892:5): [True: 7.54M, False: 12.2M]
  ------------------
  893|  7.54M|        if (len != (long)ilen
  ------------------
  |  Branch (893:13): [True: 0, False: 7.54M]
  ------------------
  894|  7.54M|            || !ossl_c2i_ASN1_OBJECT((ASN1_OBJECT **)pval, &cont, ilen))
  ------------------
  |  Branch (894:16): [True: 0, False: 7.54M]
  ------------------
  895|      0|            goto err;
  896|  7.54M|        break;
  897|       |
  898|  7.54M|    case V_ASN1_NULL:
  ------------------
  |  |   69|  1.55M|#define V_ASN1_NULL 5
  ------------------
  |  Branch (898:5): [True: 1.55M, False: 18.2M]
  ------------------
  899|  1.55M|        if (len) {
  ------------------
  |  Branch (899:13): [True: 0, False: 1.55M]
  ------------------
  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.55M|        *pval = (ASN1_VALUE *)1;
  904|  1.55M|        break;
  905|       |
  906|  1.30M|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|  1.30M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (906:5): [True: 1.30M, False: 18.5M]
  ------------------
  907|  1.30M|        if (len != 1) {
  ------------------
  |  Branch (907:13): [True: 0, False: 1.30M]
  ------------------
  908|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BOOLEAN_IS_WRONG_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  909|      0|            goto err;
  910|  1.30M|        } else {
  911|  1.30M|            ASN1_BOOLEAN *tbool;
  912|  1.30M|            tbool = (ASN1_BOOLEAN *)pval;
  913|  1.30M|            *tbool = *cont;
  914|  1.30M|        }
  915|  1.30M|        break;
  916|       |
  917|  2.22M|    case V_ASN1_BIT_STRING:
  ------------------
  |  |   67|  2.22M|#define V_ASN1_BIT_STRING 3
  ------------------
  |  Branch (917:5): [True: 2.22M, False: 17.5M]
  ------------------
  918|  2.22M|        if (!ossl_c2i_ASN1_BIT_STRING((ASN1_BIT_STRING **)pval, &cont, len))
  ------------------
  |  Branch (918:13): [True: 0, False: 2.22M]
  ------------------
  919|      0|            goto err;
  920|  2.22M|        break;
  921|       |
  922|  2.22M|    case V_ASN1_INTEGER:
  ------------------
  |  |   66|   923k|#define V_ASN1_INTEGER 2
  ------------------
  |  Branch (922:5): [True: 923k, False: 18.8M]
  ------------------
  923|   923k|    case V_ASN1_ENUMERATED:
  ------------------
  |  |   74|   923k|#define V_ASN1_ENUMERATED 10
  ------------------
  |  Branch (923:5): [True: 0, False: 19.8M]
  ------------------
  924|   923k|        tint = (ASN1_INTEGER **)pval;
  925|   923k|        if (!ossl_c2i_ASN1_INTEGER(tint, &cont, len))
  ------------------
  |  Branch (925:13): [True: 0, False: 923k]
  ------------------
  926|      0|            goto err;
  927|       |        /* Fixup type to match the expected form */
  928|   923k|        (*tint)->type = utype | ((*tint)->type & V_ASN1_NEG);
  ------------------
  |  |   99|   923k|#define V_ASN1_NEG 0x100
  ------------------
  929|   923k|        break;
  930|       |
  931|  2.04M|    case V_ASN1_OCTET_STRING:
  ------------------
  |  |   68|  2.04M|#define V_ASN1_OCTET_STRING 4
  ------------------
  |  Branch (931:5): [True: 2.04M, False: 17.7M]
  ------------------
  932|  2.04M|    case V_ASN1_NUMERICSTRING:
  ------------------
  |  |   78|  2.04M|#define V_ASN1_NUMERICSTRING 18
  ------------------
  |  Branch (932:5): [True: 0, False: 19.8M]
  ------------------
  933|  4.40M|    case V_ASN1_PRINTABLESTRING:
  ------------------
  |  |   79|  4.40M|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  |  Branch (933:5): [True: 2.35M, False: 17.4M]
  ------------------
  934|  4.40M|    case V_ASN1_T61STRING:
  ------------------
  |  |   80|  4.40M|#define V_ASN1_T61STRING 20
  ------------------
  |  Branch (934:5): [True: 0, False: 19.8M]
  ------------------
  935|  4.40M|    case V_ASN1_VIDEOTEXSTRING:
  ------------------
  |  |   82|  4.40M|#define V_ASN1_VIDEOTEXSTRING 21
  ------------------
  |  Branch (935:5): [True: 0, False: 19.8M]
  ------------------
  936|  4.46M|    case V_ASN1_IA5STRING:
  ------------------
  |  |   83|  4.46M|#define V_ASN1_IA5STRING 22
  ------------------
  |  Branch (936:5): [True: 60.4k, False: 19.7M]
  ------------------
  937|  5.37M|    case V_ASN1_UTCTIME:
  ------------------
  |  |   84|  5.37M|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (937:5): [True: 909k, False: 18.9M]
  ------------------
  938|  5.37M|    case V_ASN1_GENERALIZEDTIME:
  ------------------
  |  |   85|  5.37M|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (938:5): [True: 7.57k, False: 19.8M]
  ------------------
  939|  5.37M|    case V_ASN1_GRAPHICSTRING:
  ------------------
  |  |   86|  5.37M|#define V_ASN1_GRAPHICSTRING 25
  ------------------
  |  Branch (939:5): [True: 0, False: 19.8M]
  ------------------
  940|  5.37M|    case V_ASN1_VISIBLESTRING:
  ------------------
  |  |   88|  5.37M|#define V_ASN1_VISIBLESTRING 26 /* alias */
  ------------------
  |  Branch (940:5): [True: 0, False: 19.8M]
  ------------------
  941|  5.37M|    case V_ASN1_GENERALSTRING:
  ------------------
  |  |   89|  5.37M|#define V_ASN1_GENERALSTRING 27
  ------------------
  |  Branch (941:5): [True: 0, False: 19.8M]
  ------------------
  942|  5.37M|    case V_ASN1_UNIVERSALSTRING:
  ------------------
  |  |   90|  5.37M|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (942:5): [True: 0, False: 19.8M]
  ------------------
  943|  5.37M|    case V_ASN1_BMPSTRING:
  ------------------
  |  |   91|  5.37M|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (943:5): [True: 0, False: 19.8M]
  ------------------
  944|  6.26M|    case V_ASN1_UTF8STRING:
  ------------------
  |  |   75|  6.26M|#define V_ASN1_UTF8STRING 12
  ------------------
  |  Branch (944:5): [True: 885k, False: 18.9M]
  ------------------
  945|  6.26M|    case V_ASN1_OTHER:
  ------------------
  |  |   59|  6.26M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (945:5): [True: 0, False: 19.8M]
  ------------------
  946|  6.26M|    case V_ASN1_SET:
  ------------------
  |  |   77|  6.26M|#define V_ASN1_SET 17
  ------------------
  |  Branch (946:5): [True: 0, False: 19.8M]
  ------------------
  947|  6.26M|    case V_ASN1_SEQUENCE:
  ------------------
  |  |   76|  6.26M|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (947:5): [True: 0, False: 19.8M]
  ------------------
  948|  6.26M|    default:
  ------------------
  |  Branch (948:5): [True: 0, False: 19.8M]
  ------------------
  949|  6.26M|        if (len != (long)ilen) {
  ------------------
  |  Branch (949:13): [True: 0, False: 6.26M]
  ------------------
  950|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  951|      0|            goto err;
  952|      0|        }
  953|  6.26M|        if (utype == V_ASN1_BMPSTRING && (len & 1)) {
  ------------------
  |  |   91|  12.5M|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (953:13): [True: 0, False: 6.26M]
  |  Branch (953:42): [True: 0, False: 0]
  ------------------
  954|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BMPSTRING_IS_WRONG_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  955|      0|            goto err;
  956|      0|        }
  957|  6.26M|        if (utype == V_ASN1_UNIVERSALSTRING && (len & 3)) {
  ------------------
  |  |   90|  12.5M|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (957:13): [True: 0, False: 6.26M]
  |  Branch (957:48): [True: 0, False: 0]
  ------------------
  958|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  959|      0|            goto err;
  960|      0|        }
  961|  6.26M|        if (utype == V_ASN1_GENERALIZEDTIME && (len < 15)) {
  ------------------
  |  |   85|  12.5M|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (961:13): [True: 7.57k, False: 6.25M]
  |  Branch (961:48): [True: 0, False: 7.57k]
  ------------------
  962|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_GENERALIZEDTIME_IS_TOO_SHORT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  963|      0|            goto err;
  964|      0|        }
  965|  6.26M|        if (utype == V_ASN1_UTCTIME && (len < 13)) {
  ------------------
  |  |   84|  12.5M|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (965:13): [True: 909k, False: 5.35M]
  |  Branch (965:40): [True: 0, False: 909k]
  ------------------
  966|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_UTCTIME_IS_TOO_SHORT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  967|      0|            goto err;
  968|      0|        }
  969|       |        /* All based on ASN1_STRING and handled the same */
  970|  6.26M|        if (*pval == NULL) {
  ------------------
  |  Branch (970:13): [True: 538k, False: 5.72M]
  ------------------
  971|   538k|            stmp = ASN1_STRING_type_new(utype);
  972|   538k|            if (stmp == NULL) {
  ------------------
  |  Branch (972:17): [True: 0, False: 538k]
  ------------------
  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|   538k|            *pval = (ASN1_VALUE *)stmp;
  977|  5.72M|        } else {
  978|  5.72M|            stmp = (ASN1_STRING *)*pval;
  979|  5.72M|            stmp->type = utype;
  980|  5.72M|        }
  981|       |        /* If we've already allocated a buffer use it */
  982|  6.26M|        if (*free_cont) {
  ------------------
  |  Branch (982:13): [True: 0, False: 6.26M]
  ------------------
  983|      0|            ASN1_STRING_set0(stmp, (unsigned char *)cont /* UGLY CAST! */, ilen);
  984|      0|            *free_cont = 0;
  985|  6.26M|        } else {
  986|  6.26M|            if (!ASN1_STRING_set(stmp, cont, ilen)) {
  ------------------
  |  Branch (986:17): [True: 0, False: 6.26M]
  ------------------
  987|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  988|      0|                ASN1_STRING_free(stmp);
  989|      0|                *pval = NULL;
  990|      0|                goto err;
  991|      0|            }
  992|  6.26M|        }
  993|  6.26M|        break;
  994|  19.8M|    }
  995|       |    /* If ASN1_ANY and NULL type fix up value */
  996|  19.8M|    if (typ && (utype == V_ASN1_NULL))
  ------------------
  |  |   69|  1.99M|#define V_ASN1_NULL 5
  ------------------
  |  Branch (996:9): [True: 1.99M, False: 17.8M]
  |  Branch (996:16): [True: 1.55M, False: 443k]
  ------------------
  997|  1.55M|        typ->value.ptr = NULL;
  998|       |
  999|  19.8M|    ret = 1;
 1000|  19.8M|err:
 1001|  19.8M|    if (!ret) {
  ------------------
  |  Branch (1001:9): [True: 0, False: 19.8M]
  ------------------
 1002|      0|        ASN1_TYPE_free(typ);
 1003|      0|        if (opval)
  ------------------
  |  Branch (1003:13): [True: 0, False: 0]
  ------------------
 1004|      0|            *opval = NULL;
 1005|      0|    }
 1006|  19.8M|    return ret;
 1007|  19.8M|}
tasn_dec.c:asn1_check_eoc:
 1163|  34.4M|{
 1164|  34.4M|    const unsigned char *p;
 1165|       |
 1166|  34.4M|    if (len < 2)
  ------------------
  |  Branch (1166:9): [True: 0, False: 34.4M]
  ------------------
 1167|      0|        return 0;
 1168|  34.4M|    p = *in;
 1169|  34.4M|    if (p[0] == '\0' && p[1] == '\0') {
  ------------------
  |  Branch (1169:9): [True: 0, False: 34.4M]
  |  Branch (1169:25): [True: 0, False: 0]
  ------------------
 1170|      0|        *in += 2;
 1171|      0|        return 1;
 1172|      0|    }
 1173|  34.4M|    return 0;
 1174|  34.4M|}
tasn_dec.c:asn1_check_tlen:
 1187|  44.8M|{
 1188|  44.8M|    int i;
 1189|  44.8M|    int ptag, pclass;
 1190|  44.8M|    long plen;
 1191|  44.8M|    const unsigned char *p, *q;
 1192|  44.8M|    p = *in;
 1193|  44.8M|    q = p;
 1194|       |
 1195|  44.8M|    if (len <= 0) {
  ------------------
  |  Branch (1195:9): [True: 0, False: 44.8M]
  ------------------
 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|  44.8M|    if (ctx != NULL && ctx->valid) {
  ------------------
  |  Branch (1199:9): [True: 44.8M, False: 0]
  |  Branch (1199:24): [True: 8.01M, False: 36.8M]
  ------------------
 1200|  8.01M|        i = ctx->ret;
 1201|  8.01M|        plen = ctx->plen;
 1202|  8.01M|        pclass = ctx->pclass;
 1203|  8.01M|        ptag = ctx->ptag;
 1204|  8.01M|        p += ctx->hdrlen;
 1205|  36.8M|    } else {
 1206|  36.8M|        i = ASN1_get_object(&p, &plen, &ptag, &pclass, len);
 1207|  36.8M|        if (ctx != NULL) {
  ------------------
  |  Branch (1207:13): [True: 36.8M, False: 0]
  ------------------
 1208|  36.8M|            ctx->ret = i;
 1209|  36.8M|            ctx->plen = plen;
 1210|  36.8M|            ctx->pclass = pclass;
 1211|  36.8M|            ctx->ptag = ptag;
 1212|  36.8M|            ctx->hdrlen = (int)(p - q);
 1213|  36.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|  36.8M|            if ((i & 0x81) == 0 && (plen + ctx->hdrlen) > len) {
  ------------------
  |  Branch (1218:17): [True: 36.8M, False: 0]
  |  Branch (1218:36): [True: 0, False: 36.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|  36.8M|        }
 1223|  36.8M|    }
 1224|       |
 1225|  44.8M|    if ((i & 0x80) != 0) {
  ------------------
  |  Branch (1225:9): [True: 0, False: 44.8M]
  ------------------
 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|  44.8M|    if (exptag >= 0) {
  ------------------
  |  Branch (1229:9): [True: 38.6M, False: 6.16M]
  ------------------
 1230|  38.6M|        if (exptag != ptag || expclass != pclass) {
  ------------------
  |  Branch (1230:13): [True: 1.85M, False: 36.8M]
  |  Branch (1230:31): [True: 0, False: 36.8M]
  ------------------
 1231|       |            /*
 1232|       |             * If type is OPTIONAL, not an error: indicate missing type.
 1233|       |             */
 1234|  1.85M|            if (opt != 0)
  ------------------
  |  Branch (1234:17): [True: 1.85M, False: 0]
  ------------------
 1235|  1.85M|                return -1;
 1236|  1.85M|            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.85M|        }
 1239|       |        /*
 1240|       |         * We have a tag and class match: assume we are going to do something
 1241|       |         * with it
 1242|       |         */
 1243|  36.8M|        asn1_tlc_clear(ctx);
  ------------------
  |  |  115|  36.8M|    do {                    \
  |  |  116|  36.8M|        if ((c) != NULL)    \
  |  |  ------------------
  |  |  |  Branch (116:13): [True: 36.8M, False: 0]
  |  |  ------------------
  |  |  117|  36.8M|            (c)->valid = 0; \
  |  |  118|  36.8M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (118:14): [Folded, False: 36.8M]
  |  |  ------------------
  ------------------
 1244|  36.8M|    }
 1245|       |
 1246|  42.9M|    if ((i & 1) != 0)
  ------------------
  |  Branch (1246:9): [True: 0, False: 42.9M]
  ------------------
 1247|      0|        plen = len - (long)(p - q);
 1248|       |
 1249|  42.9M|    if (inf != NULL)
  ------------------
  |  Branch (1249:9): [True: 36.8M, False: 6.16M]
  ------------------
 1250|  36.8M|        *inf = i & 1;
 1251|       |
 1252|  42.9M|    if (cst != NULL)
  ------------------
  |  Branch (1252:9): [True: 32.0M, False: 10.8M]
  ------------------
 1253|  32.0M|        *cst = i & V_ASN1_CONSTRUCTED;
  ------------------
  |  |   54|  32.0M|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
 1254|       |
 1255|  42.9M|    if (olen != NULL)
  ------------------
  |  Branch (1255:9): [True: 36.8M, False: 6.16M]
  ------------------
 1256|  36.8M|        *olen = plen;
 1257|       |
 1258|  42.9M|    if (oclass != NULL)
  ------------------
  |  Branch (1258:9): [True: 6.16M, False: 36.8M]
  ------------------
 1259|  6.16M|        *oclass = pclass;
 1260|       |
 1261|  42.9M|    if (otag != NULL)
  ------------------
  |  Branch (1261:9): [True: 6.16M, False: 36.8M]
  ------------------
 1262|  6.16M|        *otag = ptag;
 1263|       |
 1264|  42.9M|    *in = p;
 1265|  42.9M|    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|  44.8M|}

ASN1_item_i2d:
   44|   399k|{
   45|   399k|    return asn1_item_flags_i2d(val, out, it, 0);
   46|   399k|}
ASN1_item_ex_i2d:
   83|  49.8M|{
   84|  49.8M|    const ASN1_TEMPLATE *tt = NULL;
   85|  49.8M|    int i, seqcontlen, seqlen, ndef = 1;
   86|  49.8M|    const ASN1_EXTERN_FUNCS *ef;
   87|  49.8M|    const ASN1_AUX *aux = it->funcs;
   88|  49.8M|    ASN1_aux_const_cb *asn1_cb = NULL;
   89|       |
   90|  49.8M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE) && *pval == NULL)
  ------------------
  |  |   82|  49.8M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (90:9): [True: 25.9M, False: 23.8M]
  |  Branch (90:48): [True: 0, False: 25.9M]
  ------------------
   91|      0|        return 0;
   92|       |
   93|  49.8M|    if (aux != NULL) {
  ------------------
  |  Branch (93:9): [True: 1.99M, False: 47.8M]
  ------------------
   94|  1.99M|        asn1_cb = ((aux->flags & ASN1_AFLG_CONST_CB) != 0) ? aux->asn1_const_cb
  ------------------
  |  |  727|  1.99M|#define ASN1_AFLG_CONST_CB 8
  ------------------
  |  Branch (94:19): [True: 0, False: 1.99M]
  ------------------
   95|  1.99M|                                                           : (ASN1_aux_const_cb *)aux->asn1_cb; /* backward compatibility */
   96|  1.99M|    }
   97|       |
   98|  49.8M|    switch (it->itype) {
   99|       |
  100|  23.8M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  23.8M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (100:5): [True: 23.8M, False: 25.9M]
  ------------------
  101|  23.8M|        if (it->templates)
  ------------------
  |  Branch (101:13): [True: 6.49M, False: 17.3M]
  ------------------
  102|  6.49M|            return asn1_template_ex_i2d(pval, out, it->templates,
  103|  6.49M|                tag, aclass);
  104|  17.3M|        return asn1_i2d_ex_primitive(pval, out, it, tag, aclass);
  105|       |
  106|  12.9M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  12.9M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (106:5): [True: 12.9M, False: 36.8M]
  ------------------
  107|       |        /*
  108|       |         * It never makes sense for multi-strings to have implicit tagging, so
  109|       |         * if tag != -1, then this looks like an error in the template.
  110|       |         */
  111|  12.9M|        if (tag != -1) {
  ------------------
  |  Branch (111:13): [True: 0, False: 12.9M]
  ------------------
  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|  12.9M|        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: 49.8M]
  ------------------
  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: 49.8M]
  ------------------
  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: 49.8M]
  ------------------
  147|       |        /* Use indefinite length constructed if requested */
  148|      0|        if (aclass & ASN1_TFLG_NDEF)
  ------------------
  |  |  583|      0|#define ASN1_TFLG_NDEF (0x1 << 11)
  ------------------
  |  Branch (148:13): [True: 0, False: 0]
  ------------------
  149|      0|            ndef = 2;
  150|       |        /* fall through */
  151|       |
  152|  12.9M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  12.9M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (152:5): [True: 12.9M, False: 36.8M]
  ------------------
  153|  12.9M|        i = ossl_asn1_enc_restore(&seqcontlen, out, pval, it);
  154|       |        /* An error occurred */
  155|  12.9M|        if (i < 0)
  ------------------
  |  Branch (155:13): [True: 0, False: 12.9M]
  ------------------
  156|      0|            return 0;
  157|       |        /* We have a valid cached encoding... */
  158|  12.9M|        if (i > 0)
  ------------------
  |  Branch (158:13): [True: 1.19M, False: 11.7M]
  ------------------
  159|  1.19M|            return seqcontlen;
  160|       |        /* Otherwise carry on */
  161|  11.7M|        seqcontlen = 0;
  162|       |        /* If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL */
  163|  11.7M|        if (tag == -1) {
  ------------------
  |  Branch (163:13): [True: 11.7M, False: 0]
  ------------------
  164|  11.7M|            tag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|  11.7M|#define V_ASN1_SEQUENCE 16
  ------------------
  165|       |            /* Retain any other flags in aclass */
  166|  11.7M|            aclass = (aclass & ~ASN1_TFLG_TAG_CLASS)
  ------------------
  |  |  564|  11.7M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  167|  11.7M|                | V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  11.7M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  168|  11.7M|        }
  169|  11.7M|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL))
  ------------------
  |  |  737|   799k|#define ASN1_OP_I2D_PRE 6
  ------------------
  |  Branch (169:13): [True: 799k, False: 10.9M]
  |  Branch (169:24): [True: 0, False: 799k]
  ------------------
  170|      0|            return 0;
  171|       |        /* First work out sequence content length */
  172|  36.0M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (172:41): [True: 24.2M, False: 11.7M]
  ------------------
  173|  24.2M|            const ASN1_TEMPLATE *seqtt;
  174|  24.2M|            const ASN1_VALUE **pseqval;
  175|  24.2M|            int tmplen;
  176|  24.2M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  177|  24.2M|            if (!seqtt)
  ------------------
  |  Branch (177:17): [True: 0, False: 24.2M]
  ------------------
  178|      0|                return 0;
  179|  24.2M|            pseqval = ossl_asn1_get_const_field_ptr(pval, seqtt);
  180|  24.2M|            tmplen = asn1_template_ex_i2d(pseqval, NULL, seqtt, -1, aclass);
  181|  24.2M|            if (tmplen == -1 || (tmplen > INT_MAX - seqcontlen))
  ------------------
  |  Branch (181:17): [True: 0, False: 24.2M]
  |  Branch (181:33): [True: 0, False: 24.2M]
  ------------------
  182|      0|                return -1;
  183|  24.2M|            seqcontlen += tmplen;
  184|  24.2M|        }
  185|       |
  186|  11.7M|        seqlen = ASN1_object_size(ndef, seqcontlen, tag);
  187|  11.7M|        if (!out || seqlen == -1)
  ------------------
  |  Branch (187:13): [True: 7.69M, False: 4.04M]
  |  Branch (187:21): [True: 0, False: 4.04M]
  ------------------
  188|  7.69M|            return seqlen;
  189|       |        /* Output SEQUENCE header */
  190|  4.04M|        ASN1_put_object(out, ndef, seqcontlen, tag, aclass);
  191|  12.5M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (191:41): [True: 8.49M, False: 4.04M]
  ------------------
  192|  8.49M|            const ASN1_TEMPLATE *seqtt;
  193|  8.49M|            const ASN1_VALUE **pseqval;
  194|  8.49M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  195|  8.49M|            if (!seqtt)
  ------------------
  |  Branch (195:17): [True: 0, False: 8.49M]
  ------------------
  196|      0|                return 0;
  197|  8.49M|            pseqval = ossl_asn1_get_const_field_ptr(pval, seqtt);
  198|       |            /* FIXME: check for errors in enhanced version */
  199|  8.49M|            asn1_template_ex_i2d(pseqval, out, seqtt, -1, aclass);
  200|  8.49M|        }
  201|  4.04M|        if (ndef == 2)
  ------------------
  |  Branch (201:13): [True: 0, False: 4.04M]
  ------------------
  202|      0|            ASN1_put_eoc(out);
  203|  4.04M|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_POST, pval, it, NULL))
  ------------------
  |  |  738|   399k|#define ASN1_OP_I2D_POST 7
  ------------------
  |  Branch (203:13): [True: 399k, False: 3.64M]
  |  Branch (203:24): [True: 0, False: 399k]
  ------------------
  204|      0|            return 0;
  205|  4.04M|        return seqlen;
  206|       |
  207|      0|    default:
  ------------------
  |  Branch (207:5): [True: 0, False: 49.8M]
  ------------------
  208|      0|        return 0;
  209|  49.8M|    }
  210|      0|    return 0;
  211|  49.8M|}
tasn_enc.c:asn1_item_flags_i2d:
   57|   399k|{
   58|   399k|    if (out != NULL && *out == NULL) {
  ------------------
  |  Branch (58:9): [True: 399k, False: 0]
  |  Branch (58:24): [True: 399k, False: 0]
  ------------------
   59|   399k|        unsigned char *p, *buf;
   60|   399k|        int len;
   61|       |
   62|   399k|        len = ASN1_item_ex_i2d(&val, NULL, it, -1, flags);
   63|   399k|        if (len <= 0)
  ------------------
  |  Branch (63:13): [True: 0, False: 399k]
  ------------------
   64|      0|            return len;
   65|   399k|        if ((buf = OPENSSL_malloc(len)) == NULL)
  ------------------
  |  |  107|   399k|    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: 399k]
  ------------------
   66|      0|            return -1;
   67|   399k|        p = buf;
   68|   399k|        ASN1_item_ex_i2d(&val, &p, it, -1, flags);
   69|   399k|        *out = buf;
   70|   399k|        return len;
   71|   399k|    }
   72|       |
   73|      0|    return ASN1_item_ex_i2d(&val, out, it, -1, flags);
   74|   399k|}
tasn_enc.c:asn1_template_ex_i2d:
  215|  39.2M|{
  216|  39.2M|    const int flags = tt->flags;
  217|  39.2M|    int i, ret, ttag, tclass, ndef, len;
  218|  39.2M|    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|  39.2M|    if (flags & ASN1_TFLG_EMBED) {
  ------------------
  |  |  586|  39.2M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  |  Branch (224:9): [True: 3.59M, False: 35.6M]
  ------------------
  225|  3.59M|        tval = (ASN1_VALUE *)pval;
  226|  3.59M|        pval = &tval;
  227|  3.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|  39.2M|    if (flags & ASN1_TFLG_TAG_MASK) {
  ------------------
  |  |  541|  39.2M|#define ASN1_TFLG_TAG_MASK (0x3 << 3)
  ------------------
  |  Branch (235:9): [True: 0, False: 39.2M]
  ------------------
  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|  39.2M|    } else if (tag != -1) {
  ------------------
  |  Branch (243:16): [True: 0, False: 39.2M]
  ------------------
  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|  39.2M|    } else {
  248|  39.2M|        ttag = -1;
  249|  39.2M|        tclass = 0;
  250|  39.2M|    }
  251|       |    /*
  252|       |     * Remove any class mask from iflag.
  253|       |     */
  254|  39.2M|    iclass &= ~ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  39.2M|#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|  39.2M|    if ((flags & ASN1_TFLG_NDEF) && (iclass & ASN1_TFLG_NDEF))
  ------------------
  |  |  583|  39.2M|#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: 39.2M]
  |  Branch (262:37): [True: 0, False: 0]
  ------------------
  263|      0|        ndef = 2;
  264|  39.2M|    else
  265|  39.2M|        ndef = 1;
  266|       |
  267|  39.2M|    if (flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  39.2M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (267:9): [True: 6.49M, False: 32.7M]
  ------------------
  268|       |        /* SET OF, SEQUENCE OF */
  269|  6.49M|        STACK_OF(const_ASN1_VALUE) *sk = (STACK_OF(const_ASN1_VALUE) *)*pval;
  ------------------
  |  |   33|  6.49M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  270|  6.49M|        int isset, sktag, skaclass;
  271|  6.49M|        int skcontlen, sklen;
  272|  6.49M|        const ASN1_VALUE *skitem;
  273|       |
  274|  6.49M|        if (*pval == NULL)
  ------------------
  |  Branch (274:13): [True: 0, False: 6.49M]
  ------------------
  275|      0|            return 0;
  276|       |
  277|  6.49M|        if (flags & ASN1_TFLG_SET_OF) {
  ------------------
  |  |  515|  6.49M|#define ASN1_TFLG_SET_OF (0x1 << 1)
  ------------------
  |  Branch (277:13): [True: 6.49M, False: 0]
  ------------------
  278|  6.49M|            isset = 1;
  279|       |            /* 2 means we reorder */
  280|  6.49M|            if (flags & ASN1_TFLG_SEQUENCE_OF)
  ------------------
  |  |  518|  6.49M|#define ASN1_TFLG_SEQUENCE_OF (0x2 << 1)
  ------------------
  |  Branch (280:17): [True: 0, False: 6.49M]
  ------------------
  281|      0|                isset = 2;
  282|  6.49M|        } else
  283|      0|            isset = 0;
  284|       |
  285|       |        /*
  286|       |         * Work out inner tag value: if EXPLICIT or no tagging use underlying
  287|       |         * type.
  288|       |         */
  289|  6.49M|        if ((ttag != -1) && !(flags & ASN1_TFLG_EXPTAG)) {
  ------------------
  |  |  539|      0|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (289:13): [True: 0, False: 6.49M]
  |  Branch (289:29): [True: 0, False: 0]
  ------------------
  290|      0|            sktag = ttag;
  291|      0|            skaclass = tclass;
  292|  6.49M|        } else {
  293|  6.49M|            skaclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  6.49M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  294|  6.49M|            if (isset)
  ------------------
  |  Branch (294:17): [True: 6.49M, False: 0]
  ------------------
  295|  6.49M|                sktag = V_ASN1_SET;
  ------------------
  |  |   77|  6.49M|#define V_ASN1_SET 17
  ------------------
  296|      0|            else
  297|      0|                sktag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|      0|#define V_ASN1_SEQUENCE 16
  ------------------
  298|  6.49M|        }
  299|       |
  300|       |        /* Determine total length of items */
  301|  6.49M|        skcontlen = 0;
  302|  12.9M|        for (i = 0; i < sk_const_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  Branch (302:21): [True: 6.49M, False: 6.49M]
  ------------------
  303|  6.49M|            skitem = sk_const_ASN1_VALUE_value(sk, i);
  304|  6.49M|            len = ASN1_item_ex_i2d(&skitem, NULL, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  6.49M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  305|  6.49M|                -1, iclass);
  306|  6.49M|            if (len == -1 || (skcontlen > INT_MAX - len))
  ------------------
  |  Branch (306:17): [True: 0, False: 6.49M]
  |  Branch (306:30): [True: 0, False: 6.49M]
  ------------------
  307|      0|                return -1;
  308|  6.49M|            if (len == 0 && (tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|      0|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (308:17): [True: 0, False: 6.49M]
  |  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|  6.49M|            skcontlen += len;
  313|  6.49M|        }
  314|  6.49M|        sklen = ASN1_object_size(ndef, skcontlen, sktag);
  315|  6.49M|        if (sklen == -1)
  ------------------
  |  Branch (315:13): [True: 0, False: 6.49M]
  ------------------
  316|      0|            return -1;
  317|       |        /* If EXPLICIT need length of surrounding tag */
  318|  6.49M|        if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|  6.49M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (318:13): [True: 0, False: 6.49M]
  ------------------
  319|      0|            ret = ASN1_object_size(ndef, sklen, ttag);
  320|  6.49M|        else
  321|  6.49M|            ret = sklen;
  322|       |
  323|  6.49M|        if (!out || ret == -1)
  ------------------
  |  Branch (323:13): [True: 3.24M, False: 3.24M]
  |  Branch (323:21): [True: 0, False: 3.24M]
  ------------------
  324|  3.24M|            return ret;
  325|       |
  326|       |        /* Now encode this lot... */
  327|       |        /* EXPLICIT tag */
  328|  3.24M|        if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|  3.24M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (328:13): [True: 0, False: 3.24M]
  ------------------
  329|      0|            ASN1_put_object(out, ndef, sklen, ttag, tclass);
  330|       |        /* SET or SEQUENCE and IMPLICIT tag */
  331|  3.24M|        ASN1_put_object(out, ndef, skcontlen, sktag, skaclass);
  332|       |        /* And the stuff itself */
  333|  3.24M|        asn1_set_seq_out(sk, out, skcontlen, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  3.24M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  334|  3.24M|            isset, iclass);
  335|  3.24M|        if (ndef == 2) {
  ------------------
  |  Branch (335:13): [True: 0, False: 3.24M]
  ------------------
  336|      0|            ASN1_put_eoc(out);
  337|      0|            if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|      0|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (337:17): [True: 0, False: 0]
  ------------------
  338|      0|                ASN1_put_eoc(out);
  339|      0|        }
  340|       |
  341|  3.24M|        return ret;
  342|  6.49M|    }
  343|       |
  344|  32.7M|    if (flags & ASN1_TFLG_EXPTAG) {
  ------------------
  |  |  539|  32.7M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (344:9): [True: 0, False: 32.7M]
  ------------------
  345|       |        /* EXPLICIT tagging */
  346|       |        /* Find length of tagged item */
  347|      0|        i = ASN1_item_ex_i2d(pval, NULL, ASN1_ITEM_ptr(tt->item), -1, iclass);
  ------------------
  |  |  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|  32.7M|    len = ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  32.7M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  369|  32.7M|        ttag, tclass | iclass);
  370|  32.7M|    if (len == 0 && (tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|   515k|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (370:9): [True: 515k, False: 32.2M]
  |  Branch (370:21): [True: 0, False: 515k]
  ------------------
  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|  32.7M|    return len;
  375|  32.7M|}
tasn_enc.c:asn1_set_seq_out:
  402|  3.24M|{
  403|  3.24M|    int i, ret = 0;
  404|  3.24M|    const ASN1_VALUE *skitem;
  405|  3.24M|    unsigned char *tmpdat = NULL, *p = NULL;
  406|  3.24M|    DER_ENC *derlst = NULL, *tder;
  407|       |
  408|  3.24M|    if (do_sort) {
  ------------------
  |  Branch (408:9): [True: 3.24M, False: 0]
  ------------------
  409|       |        /* Don't need to sort less than 2 items */
  410|  3.24M|        if (sk_const_ASN1_VALUE_num(sk) < 2)
  ------------------
  |  Branch (410:13): [True: 3.24M, False: 0]
  ------------------
  411|  3.24M|            do_sort = 0;
  412|      0|        else {
  413|      0|            derlst = OPENSSL_malloc(sk_const_ASN1_VALUE_num(sk)
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  414|      0|                * sizeof(*derlst));
  415|      0|            if (derlst == NULL)
  ------------------
  |  Branch (415:17): [True: 0, False: 0]
  ------------------
  416|      0|                return 0;
  417|      0|            tmpdat = OPENSSL_malloc(skcontlen);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  418|      0|            if (tmpdat == NULL)
  ------------------
  |  Branch (418:17): [True: 0, False: 0]
  ------------------
  419|      0|                goto err;
  420|      0|        }
  421|  3.24M|    }
  422|       |    /* If not sorting just output each item */
  423|  3.24M|    if (!do_sort) {
  ------------------
  |  Branch (423:9): [True: 3.24M, False: 0]
  ------------------
  424|  6.49M|        for (i = 0; i < sk_const_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  Branch (424:21): [True: 3.24M, False: 3.24M]
  ------------------
  425|  3.24M|            skitem = sk_const_ASN1_VALUE_value(sk, i);
  426|  3.24M|            ASN1_item_ex_i2d(&skitem, out, item, -1, iclass);
  427|  3.24M|        }
  428|  3.24M|        return 1;
  429|  3.24M|    }
  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|  30.3M|{
  464|  30.3M|    int len;
  465|  30.3M|    int utype;
  466|  30.3M|    int usetag;
  467|  30.3M|    int ndef = 0;
  468|       |
  469|  30.3M|    utype = it->utype;
  470|       |
  471|       |    /*
  472|       |     * Get length of content octets and maybe find out the underlying type.
  473|       |     */
  474|       |
  475|  30.3M|    len = asn1_ex_i2c(pval, NULL, &utype, it);
  476|       |
  477|       |    /*
  478|       |     * If SEQUENCE, SET or OTHER then header is included in pseudo content
  479|       |     * octets so don't include tag+length. We need to check here because the
  480|       |     * call to asn1_ex_i2c() could change utype.
  481|       |     */
  482|  30.3M|    if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   76|  30.3M|#define V_ASN1_SEQUENCE 16
  ------------------
                  if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   77|  30.3M|#define V_ASN1_SET 17
  ------------------
                  if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   59|  30.3M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (482:9): [True: 0, False: 30.3M]
  |  Branch (482:39): [True: 0, False: 30.3M]
  |  Branch (482:64): [True: 0, False: 30.3M]
  ------------------
  483|      0|        usetag = 0;
  484|  30.3M|    else
  485|  30.3M|        usetag = 1;
  486|       |
  487|       |    /* -1 means omit type */
  488|       |
  489|  30.3M|    if (len == -1)
  ------------------
  |  Branch (489:9): [True: 515k, False: 29.8M]
  ------------------
  490|   515k|        return 0;
  491|       |
  492|       |    /* -2 return is special meaning use ndef */
  493|  29.8M|    if (len == -2) {
  ------------------
  |  Branch (493:9): [True: 0, False: 29.8M]
  ------------------
  494|      0|        ndef = 2;
  495|      0|        len = 0;
  496|      0|    }
  497|       |
  498|       |    /* If not implicitly tagged get tag from underlying type */
  499|  29.8M|    if (tag == -1)
  ------------------
  |  Branch (499:9): [True: 29.8M, False: 0]
  ------------------
  500|  29.8M|        tag = utype;
  501|       |
  502|       |    /* Output tag+length followed by content octets */
  503|  29.8M|    if (out) {
  ------------------
  |  Branch (503:9): [True: 7.56M, False: 22.3M]
  ------------------
  504|  7.56M|        if (usetag)
  ------------------
  |  Branch (504:13): [True: 7.56M, False: 0]
  ------------------
  505|  7.56M|            ASN1_put_object(out, ndef, len, tag, aclass);
  506|  7.56M|        asn1_ex_i2c(pval, *out, &utype, it);
  507|  7.56M|        if (ndef)
  ------------------
  |  Branch (507:13): [True: 0, False: 7.56M]
  ------------------
  508|      0|            ASN1_put_eoc(out);
  509|  7.56M|        else
  510|  7.56M|            *out += len;
  511|  7.56M|    }
  512|       |
  513|  29.8M|    if (usetag)
  ------------------
  |  Branch (513:9): [True: 29.8M, False: 0]
  ------------------
  514|  29.8M|        return ASN1_object_size(ndef, len, tag);
  515|      0|    return len;
  516|  29.8M|}
tasn_enc.c:asn1_ex_i2c:
  522|  37.9M|{
  523|  37.9M|    ASN1_BOOLEAN *tbool = NULL;
  524|  37.9M|    ASN1_STRING *strtmp;
  525|  37.9M|    ASN1_OBJECT *otmp;
  526|  37.9M|    int utype;
  527|  37.9M|    const unsigned char *cont;
  528|  37.9M|    unsigned char c;
  529|  37.9M|    int len;
  530|  37.9M|    const ASN1_PRIMITIVE_FUNCS *pf;
  531|  37.9M|    pf = it->funcs;
  532|  37.9M|    if (pf && pf->prim_i2c)
  ------------------
  |  Branch (532:9): [True: 0, False: 37.9M]
  |  Branch (532:15): [True: 0, False: 0]
  ------------------
  533|      0|        return pf->prim_i2c(pval, cout, putype, it);
  534|       |
  535|       |    /* Should type be omitted? */
  536|  37.9M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE)
  ------------------
  |  |   82|  37.9M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (536:9): [True: 16.2M, False: 21.7M]
  ------------------
  537|  37.9M|        || (it->utype != V_ASN1_BOOLEAN)) {
  ------------------
  |  |   65|  21.7M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (537:12): [True: 21.7M, False: 0]
  ------------------
  538|  37.9M|        if (*pval == NULL)
  ------------------
  |  Branch (538:13): [True: 515k, False: 37.4M]
  ------------------
  539|   515k|            return -1;
  540|  37.9M|    }
  541|       |
  542|  37.4M|    if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  37.4M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (542:9): [True: 16.2M, False: 21.1M]
  ------------------
  543|       |        /* If MSTRING type set the underlying type */
  544|  16.2M|        strtmp = (ASN1_STRING *)*pval;
  545|  16.2M|        utype = strtmp->type;
  546|  16.2M|        *putype = utype;
  547|  21.1M|    } else if (it->utype == V_ASN1_ANY) {
  ------------------
  |  |   60|  21.1M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (547:16): [True: 1.35M, False: 19.8M]
  ------------------
  548|       |        /* If ANY set type and pointer to value */
  549|  1.35M|        ASN1_TYPE *typ;
  550|  1.35M|        typ = (ASN1_TYPE *)*pval;
  551|  1.35M|        utype = typ->type;
  552|  1.35M|        *putype = utype;
  553|  1.35M|        pval = (const ASN1_VALUE **)&typ->value.asn1_value; /* actually is const */
  554|  1.35M|    } else
  555|  19.8M|        utype = *putype;
  556|       |
  557|  37.4M|    switch (utype) {
  558|  18.2M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  18.2M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (558:5): [True: 18.2M, False: 19.1M]
  ------------------
  559|  18.2M|        otmp = (ASN1_OBJECT *)*pval;
  560|  18.2M|        cont = otmp->data;
  561|  18.2M|        len = otmp->length;
  562|  18.2M|        if (cont == NULL || len == 0)
  ------------------
  |  Branch (562:13): [True: 0, False: 18.2M]
  |  Branch (562:29): [True: 0, False: 18.2M]
  ------------------
  563|      0|            return -1;
  564|  18.2M|        break;
  565|       |
  566|  18.2M|    case V_ASN1_UNDEF:
  ------------------
  |  |   62|      0|#define V_ASN1_UNDEF -1
  ------------------
  |  Branch (566:5): [True: 0, False: 37.4M]
  ------------------
  567|      0|        return -2;
  568|       |
  569|  1.35M|    case V_ASN1_NULL:
  ------------------
  |  |   69|  1.35M|#define V_ASN1_NULL 5
  ------------------
  |  Branch (569:5): [True: 1.35M, False: 36.0M]
  ------------------
  570|  1.35M|        cont = NULL;
  571|  1.35M|        len = 0;
  572|  1.35M|        break;
  573|       |
  574|      0|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (574:5): [True: 0, False: 37.4M]
  ------------------
  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.59M|    case V_ASN1_BIT_STRING:
  ------------------
  |  |   67|  1.59M|#define V_ASN1_BIT_STRING 3
  ------------------
  |  Branch (592:5): [True: 1.59M, False: 35.8M]
  ------------------
  593|  1.59M|        return ossl_i2c_ASN1_BIT_STRING((const ASN1_BIT_STRING *)*pval,
  594|  1.59M|            cout ? &cout : NULL);
  ------------------
  |  Branch (594:13): [True: 399k, False: 1.19M]
  ------------------
  595|       |
  596|      0|    case V_ASN1_INTEGER:
  ------------------
  |  |   66|      0|#define V_ASN1_INTEGER 2
  ------------------
  |  Branch (596:5): [True: 0, False: 37.4M]
  ------------------
  597|      0|    case V_ASN1_ENUMERATED:
  ------------------
  |  |   74|      0|#define V_ASN1_ENUMERATED 10
  ------------------
  |  Branch (597:5): [True: 0, False: 37.4M]
  ------------------
  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: 37.4M]
  ------------------
  604|      0|    case V_ASN1_NUMERICSTRING:
  ------------------
  |  |   78|      0|#define V_ASN1_NUMERICSTRING 18
  ------------------
  |  Branch (604:5): [True: 0, False: 37.4M]
  ------------------
  605|      0|    case V_ASN1_PRINTABLESTRING:
  ------------------
  |  |   79|      0|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  |  Branch (605:5): [True: 0, False: 37.4M]
  ------------------
  606|      0|    case V_ASN1_T61STRING:
  ------------------
  |  |   80|      0|#define V_ASN1_T61STRING 20
  ------------------
  |  Branch (606:5): [True: 0, False: 37.4M]
  ------------------
  607|      0|    case V_ASN1_VIDEOTEXSTRING:
  ------------------
  |  |   82|      0|#define V_ASN1_VIDEOTEXSTRING 21
  ------------------
  |  Branch (607:5): [True: 0, False: 37.4M]
  ------------------
  608|      0|    case V_ASN1_IA5STRING:
  ------------------
  |  |   83|      0|#define V_ASN1_IA5STRING 22
  ------------------
  |  Branch (608:5): [True: 0, False: 37.4M]
  ------------------
  609|      0|    case V_ASN1_UTCTIME:
  ------------------
  |  |   84|      0|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (609:5): [True: 0, False: 37.4M]
  ------------------
  610|      0|    case V_ASN1_GENERALIZEDTIME:
  ------------------
  |  |   85|      0|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (610:5): [True: 0, False: 37.4M]
  ------------------
  611|      0|    case V_ASN1_GRAPHICSTRING:
  ------------------
  |  |   86|      0|#define V_ASN1_GRAPHICSTRING 25
  ------------------
  |  Branch (611:5): [True: 0, False: 37.4M]
  ------------------
  612|      0|    case V_ASN1_VISIBLESTRING:
  ------------------
  |  |   88|      0|#define V_ASN1_VISIBLESTRING 26 /* alias */
  ------------------
  |  Branch (612:5): [True: 0, False: 37.4M]
  ------------------
  613|      0|    case V_ASN1_GENERALSTRING:
  ------------------
  |  |   89|      0|#define V_ASN1_GENERALSTRING 27
  ------------------
  |  Branch (613:5): [True: 0, False: 37.4M]
  ------------------
  614|      0|    case V_ASN1_UNIVERSALSTRING:
  ------------------
  |  |   90|      0|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (614:5): [True: 0, False: 37.4M]
  ------------------
  615|      0|    case V_ASN1_BMPSTRING:
  ------------------
  |  |   91|      0|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (615:5): [True: 0, False: 37.4M]
  ------------------
  616|  16.2M|    case V_ASN1_UTF8STRING:
  ------------------
  |  |   75|  16.2M|#define V_ASN1_UTF8STRING 12
  ------------------
  |  Branch (616:5): [True: 16.2M, False: 21.1M]
  ------------------
  617|  16.2M|    case V_ASN1_SEQUENCE:
  ------------------
  |  |   76|  16.2M|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (617:5): [True: 0, False: 37.4M]
  ------------------
  618|  16.2M|    case V_ASN1_SET:
  ------------------
  |  |   77|  16.2M|#define V_ASN1_SET 17
  ------------------
  |  Branch (618:5): [True: 0, False: 37.4M]
  ------------------
  619|  16.2M|    default:
  ------------------
  |  Branch (619:5): [True: 0, False: 37.4M]
  ------------------
  620|       |        /* All based on ASN1_STRING and handled the same */
  621|  16.2M|        strtmp = (ASN1_STRING *)*pval;
  622|       |        /* Special handling for NDEF */
  623|  16.2M|        if ((it->size == ASN1_TFLG_NDEF)
  ------------------
  |  |  583|  16.2M|#define ASN1_TFLG_NDEF (0x1 << 11)
  ------------------
  |  Branch (623:13): [True: 0, False: 16.2M]
  ------------------
  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|  16.2M|        cont = strtmp->data;
  633|  16.2M|        len = strtmp->length;
  634|       |
  635|  16.2M|        break;
  636|  37.4M|    }
  637|  35.8M|    if (cout && len)
  ------------------
  |  Branch (637:9): [True: 7.16M, False: 28.6M]
  |  Branch (637:17): [True: 6.89M, False: 270k]
  ------------------
  638|  6.89M|        memcpy(cout, cont, len);
  639|  35.8M|    return len;
  640|  37.4M|}

ASN1_item_free:
   19|  19.0M|{
   20|  19.0M|    ossl_asn1_item_embed_free(&val, it, 0);
   21|  19.0M|}
ossl_asn1_item_embed_free:
   29|  53.8M|{
   30|  53.8M|    const ASN1_TEMPLATE *tt = NULL, *seqtt;
   31|  53.8M|    const ASN1_EXTERN_FUNCS *ef;
   32|  53.8M|    const ASN1_AUX *aux = it->funcs;
   33|  53.8M|    ASN1_aux_cb *asn1_cb;
   34|  53.8M|    int i;
   35|       |
   36|  53.8M|    if (pval == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 53.8M]
  ------------------
   37|      0|        return;
   38|  53.8M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE) && *pval == NULL)
  ------------------
  |  |   82|  53.8M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (38:9): [True: 30.0M, False: 23.8M]
  |  Branch (38:48): [True: 7.50M, False: 22.5M]
  ------------------
   39|  7.50M|        return;
   40|  46.3M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (40:9): [True: 3.25M, False: 43.0M]
  |  Branch (40:16): [True: 959k, False: 2.29M]
  ------------------
   41|   959k|        asn1_cb = aux->asn1_cb;
   42|  45.3M|    else
   43|  45.3M|        asn1_cb = 0;
   44|       |
   45|  46.3M|    switch (it->itype) {
  ------------------
  |  Branch (45:13): [True: 46.3M, False: 0]
  ------------------
   46|       |
   47|  23.8M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  23.8M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (47:5): [True: 23.8M, False: 22.5M]
  ------------------
   48|  23.8M|        if (it->templates)
  ------------------
  |  Branch (48:13): [True: 1.83M, False: 21.9M]
  ------------------
   49|  1.83M|            ossl_asn1_template_free(pval, it->templates);
   50|  21.9M|        else
   51|  21.9M|            ossl_asn1_primitive_free(pval, it, embed);
   52|  23.8M|        break;
   53|       |
   54|  7.41M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  7.41M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (54:5): [True: 7.41M, False: 38.9M]
  ------------------
   55|  7.41M|        ossl_asn1_primitive_free(pval, it, embed);
   56|  7.41M|        break;
   57|       |
   58|  99.1k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  99.1k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (58:5): [True: 99.1k, False: 46.2M]
  ------------------
   59|  99.1k|        if (asn1_cb) {
  ------------------
  |  Branch (59:13): [True: 42.9k, False: 56.1k]
  ------------------
   60|  42.9k|            i = asn1_cb(ASN1_OP_FREE_PRE, pval, it, NULL);
  ------------------
  |  |  733|  42.9k|#define ASN1_OP_FREE_PRE 2
  ------------------
   61|  42.9k|            if (i == 2)
  ------------------
  |  Branch (61:17): [True: 0, False: 42.9k]
  ------------------
   62|      0|                return;
   63|  42.9k|        }
   64|  99.1k|        i = ossl_asn1_get_choice_selector(pval, it);
   65|  99.1k|        if ((i >= 0) && (i < it->tcount)) {
  ------------------
  |  Branch (65:13): [True: 99.1k, False: 0]
  |  Branch (65:25): [True: 99.1k, False: 0]
  ------------------
   66|  99.1k|            ASN1_VALUE **pchval;
   67|       |
   68|  99.1k|            tt = it->templates + i;
   69|  99.1k|            pchval = ossl_asn1_get_field_ptr(pval, tt);
   70|  99.1k|            ossl_asn1_template_free(pchval, tt);
   71|  99.1k|        }
   72|  99.1k|        if (asn1_cb)
  ------------------
  |  Branch (72:13): [True: 42.9k, False: 56.1k]
  ------------------
   73|  42.9k|            asn1_cb(ASN1_OP_FREE_POST, pval, it, NULL);
  ------------------
  |  |  734|  42.9k|#define ASN1_OP_FREE_POST 3
  ------------------
   74|  99.1k|        if (embed == 0) {
  ------------------
  |  Branch (74:13): [True: 99.1k, False: 0]
  ------------------
   75|  99.1k|            OPENSSL_free(*pval);
  ------------------
  |  |  132|  99.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__
  |  |  ------------------
  ------------------
   76|  99.1k|            *pval = NULL;
   77|  99.1k|        }
   78|  99.1k|        break;
   79|       |
   80|  1.83M|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  1.83M|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (80:5): [True: 1.83M, False: 44.5M]
  ------------------
   81|  1.83M|        ef = it->funcs;
   82|  1.83M|        if (ef && ef->asn1_ex_free)
  ------------------
  |  Branch (82:13): [True: 1.83M, False: 0]
  |  Branch (82:19): [True: 1.83M, False: 0]
  ------------------
   83|  1.83M|            ef->asn1_ex_free(pval, it);
   84|  1.83M|        break;
   85|       |
   86|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (86:5): [True: 0, False: 46.3M]
  ------------------
   87|  13.1M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  13.1M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (87:5): [True: 13.1M, False: 33.1M]
  ------------------
   88|  13.1M|        if (ossl_asn1_do_lock(pval, -1, it) != 0) {
  ------------------
  |  Branch (88:13): [True: 458k, False: 12.7M]
  ------------------
   89|       |            /* if error or ref-counter > 0 */
   90|   458k|            OPENSSL_assert(embed == 0);
  ------------------
  |  |  477|   458k|    (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: 458k, False: 0]
  |  |  ------------------
  ------------------
   91|   458k|            *pval = NULL;
   92|   458k|            return;
   93|   458k|        }
   94|  12.7M|        if (asn1_cb) {
  ------------------
  |  Branch (94:13): [True: 458k, False: 12.2M]
  ------------------
   95|   458k|            i = asn1_cb(ASN1_OP_FREE_PRE, pval, it, NULL);
  ------------------
  |  |  733|   458k|#define ASN1_OP_FREE_PRE 2
  ------------------
   96|   458k|            if (i == 2)
  ------------------
  |  Branch (96:17): [True: 0, False: 458k]
  ------------------
   97|      0|                return;
   98|   458k|        }
   99|  12.7M|        ossl_asn1_enc_free(pval, it);
  100|       |        /*
  101|       |         * If we free up as normal we will invalidate any ANY DEFINED BY
  102|       |         * field and we won't be able to determine the type of the field it
  103|       |         * defines. So free up in reverse order.
  104|       |         */
  105|  12.7M|        tt = it->templates + it->tcount;
  106|  43.9M|        for (i = 0; i < it->tcount; i++) {
  ------------------
  |  Branch (106:21): [True: 31.2M, False: 12.7M]
  ------------------
  107|  31.2M|            ASN1_VALUE **pseqval;
  108|       |
  109|  31.2M|            tt--;
  110|  31.2M|            seqtt = ossl_asn1_do_adb(*pval, tt, 0);
  111|  31.2M|            if (!seqtt)
  ------------------
  |  Branch (111:17): [True: 0, False: 31.2M]
  ------------------
  112|      0|                continue;
  113|  31.2M|            pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  114|  31.2M|            ossl_asn1_template_free(pseqval, seqtt);
  115|  31.2M|        }
  116|  12.7M|        if (asn1_cb)
  ------------------
  |  Branch (116:13): [True: 458k, False: 12.2M]
  ------------------
  117|   458k|            asn1_cb(ASN1_OP_FREE_POST, pval, it, NULL);
  ------------------
  |  |  734|   458k|#define ASN1_OP_FREE_POST 3
  ------------------
  118|  12.7M|        if (embed == 0) {
  ------------------
  |  Branch (118:13): [True: 10.8M, False: 1.83M]
  ------------------
  119|  10.8M|            OPENSSL_free(*pval);
  ------------------
  |  |  132|  10.8M|    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|  10.8M|        }
  122|  12.7M|        break;
  123|  46.3M|    }
  124|  46.3M|}
ossl_asn1_template_free:
  127|  35.7M|{
  128|  35.7M|    int embed = tt->flags & ASN1_TFLG_EMBED;
  ------------------
  |  |  586|  35.7M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  129|  35.7M|    ASN1_VALUE *tval;
  130|  35.7M|    if (embed) {
  ------------------
  |  Branch (130:9): [True: 4.31M, False: 31.3M]
  ------------------
  131|  4.31M|        tval = (ASN1_VALUE *)pval;
  132|  4.31M|        pval = &tval;
  133|  4.31M|    }
  134|  35.7M|    if (tt->flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  35.7M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (134:9): [True: 2.59M, False: 33.1M]
  ------------------
  135|  2.59M|        STACK_OF(ASN1_VALUE) *sk = (STACK_OF(ASN1_VALUE) *)*pval;
  ------------------
  |  |   33|  2.59M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  136|  2.59M|        int i;
  137|       |
  138|  4.25M|        for (i = 0; i < sk_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  |  887|  4.25M|#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
  ------------------
  |  Branch (138:21): [True: 1.65M, False: 2.59M]
  ------------------
  139|  1.65M|            ASN1_VALUE *vtmp = sk_ASN1_VALUE_value(sk, i);
  ------------------
  |  |  888|  1.65M|#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
  ------------------
  140|       |
  141|  1.65M|            ossl_asn1_item_embed_free(&vtmp, ASN1_ITEM_ptr(tt->item), embed);
  ------------------
  |  |  394|  1.65M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  142|  1.65M|        }
  143|  2.59M|        sk_ASN1_VALUE_free(sk);
  ------------------
  |  |  893|  2.59M|#define sk_ASN1_VALUE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_VALUE_sk_type(sk))
  ------------------
  144|  2.59M|        *pval = NULL;
  145|  33.1M|    } else {
  146|  33.1M|        ossl_asn1_item_embed_free(pval, ASN1_ITEM_ptr(tt->item), embed);
  ------------------
  |  |  394|  33.1M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  147|  33.1M|    }
  148|  35.7M|}
ossl_asn1_primitive_free:
  151|  31.3M|{
  152|  31.3M|    int utype;
  153|       |
  154|       |    /* Special case: if 'it' is a primitive with a free_func, use that. */
  155|  31.3M|    if (it) {
  ------------------
  |  Branch (155:9): [True: 29.3M, False: 1.99M]
  ------------------
  156|  29.3M|        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
  157|       |
  158|  29.3M|        if (embed) {
  ------------------
  |  Branch (158:13): [True: 2.47M, False: 26.9M]
  ------------------
  159|  2.47M|            if (pf && pf->prim_clear) {
  ------------------
  |  Branch (159:17): [True: 0, False: 2.47M]
  |  Branch (159:23): [True: 0, False: 0]
  ------------------
  160|      0|                pf->prim_clear(pval, it);
  161|      0|                return;
  162|      0|            }
  163|  26.9M|        } else if (pf && pf->prim_free) {
  ------------------
  |  Branch (163:20): [True: 0, False: 26.9M]
  |  Branch (163:26): [True: 0, False: 0]
  ------------------
  164|      0|            pf->prim_free(pval, it);
  165|      0|            return;
  166|      0|        }
  167|  29.3M|    }
  168|       |
  169|       |    /* Special case: if 'it' is NULL, free contents of ASN1_TYPE */
  170|  31.3M|    if (!it) {
  ------------------
  |  Branch (170:9): [True: 1.99M, False: 29.3M]
  ------------------
  171|  1.99M|        ASN1_TYPE *typ = (ASN1_TYPE *)*pval;
  172|       |
  173|  1.99M|        utype = typ->type;
  174|  1.99M|        pval = &typ->value.asn1_value;
  175|  1.99M|        if (*pval == NULL)
  ------------------
  |  Branch (175:13): [True: 1.55M, False: 443k]
  ------------------
  176|  1.55M|            return;
  177|  29.3M|    } else if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  29.3M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (177:16): [True: 7.41M, False: 21.9M]
  ------------------
  178|  7.41M|        utype = -1;
  179|  7.41M|        if (*pval == NULL)
  ------------------
  |  Branch (179:13): [True: 0, False: 7.41M]
  ------------------
  180|      0|            return;
  181|  21.9M|    } else {
  182|  21.9M|        utype = it->utype;
  183|  21.9M|        if ((utype != V_ASN1_BOOLEAN) && *pval == NULL)
  ------------------
  |  |   65|  21.9M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (183:13): [True: 19.3M, False: 2.61M]
  |  Branch (183:42): [True: 3.47M, False: 15.8M]
  ------------------
  184|  3.47M|            return;
  185|  21.9M|    }
  186|       |
  187|  26.3M|    switch (utype) {
  188|  10.7M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  10.7M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (188:5): [True: 10.7M, False: 15.5M]
  ------------------
  189|  10.7M|        ASN1_OBJECT_free((ASN1_OBJECT *)*pval);
  190|  10.7M|        break;
  191|       |
  192|  2.61M|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|  2.61M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (192:5): [True: 2.61M, False: 23.7M]
  ------------------
  193|  2.61M|        if (it)
  ------------------
  |  Branch (193:13): [True: 2.61M, False: 0]
  ------------------
  194|  2.61M|            *(ASN1_BOOLEAN *)pval = it->size;
  195|      0|        else
  196|      0|            *(ASN1_BOOLEAN *)pval = -1;
  197|  2.61M|        return;
  198|       |
  199|      0|    case V_ASN1_NULL:
  ------------------
  |  |   69|      0|#define V_ASN1_NULL 5
  ------------------
  |  Branch (199:5): [True: 0, False: 26.3M]
  ------------------
  200|      0|        break;
  201|       |
  202|  1.99M|    case V_ASN1_ANY:
  ------------------
  |  |   60|  1.99M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (202:5): [True: 1.99M, False: 24.3M]
  ------------------
  203|  1.99M|        ossl_asn1_primitive_free(pval, NULL, 0);
  204|  1.99M|        OPENSSL_free(*pval);
  ------------------
  |  |  132|  1.99M|    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.99M|        break;
  206|       |
  207|  10.9M|    default:
  ------------------
  |  Branch (207:5): [True: 10.9M, False: 15.4M]
  ------------------
  208|  10.9M|        ossl_asn1_string_embed_free((ASN1_STRING *)*pval, embed);
  209|  10.9M|        break;
  210|  26.3M|    }
  211|  23.7M|    *pval = NULL;
  212|  23.7M|}

ASN1_item_new:
   30|  6.16M|{
   31|  6.16M|    ASN1_VALUE *ret = NULL;
   32|  6.16M|    if (ASN1_item_ex_new(&ret, it) > 0)
  ------------------
  |  Branch (32:9): [True: 6.16M, False: 0]
  ------------------
   33|  6.16M|        return ret;
   34|      0|    return NULL;
   35|  6.16M|}
ASN1_item_new_ex:
   39|   458k|{
   40|   458k|    ASN1_VALUE *ret = NULL;
   41|   458k|    if (asn1_item_embed_new(&ret, it, 0, libctx, propq) > 0)
  ------------------
  |  Branch (41:9): [True: 458k, False: 0]
  ------------------
   42|   458k|        return ret;
   43|      0|    return NULL;
   44|   458k|}
ossl_asn1_item_ex_new_intern:
   50|  6.20M|{
   51|  6.20M|    return asn1_item_embed_new(pval, it, 0, libctx, propq);
   52|  6.20M|}
ASN1_item_ex_new:
   55|  6.16M|{
   56|  6.16M|    return asn1_item_embed_new(pval, it, 0, NULL, NULL);
   57|  6.16M|}
tasn_new.c:asn1_item_embed_new:
   61|  36.2M|{
   62|  36.2M|    const ASN1_TEMPLATE *tt = NULL;
   63|  36.2M|    const ASN1_EXTERN_FUNCS *ef;
   64|  36.2M|    const ASN1_AUX *aux = it->funcs;
   65|  36.2M|    ASN1_aux_cb *asn1_cb;
   66|  36.2M|    ASN1_VALUE **pseqval;
   67|  36.2M|    int i;
   68|  36.2M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (68:9): [True: 2.64M, False: 33.6M]
  |  Branch (68:16): [True: 811k, False: 1.83M]
  ------------------
   69|   811k|        asn1_cb = aux->asn1_cb;
   70|  35.4M|    else
   71|  35.4M|        asn1_cb = 0;
   72|       |
   73|  36.2M|    switch (it->itype) {
  ------------------
  |  Branch (73:13): [True: 36.2M, False: 0]
  ------------------
   74|       |
   75|  1.37M|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  1.37M|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (75:5): [True: 1.37M, False: 34.9M]
  ------------------
   76|  1.37M|        ef = it->funcs;
   77|  1.37M|        if (ef != NULL) {
  ------------------
  |  Branch (77:13): [True: 1.37M, False: 0]
  ------------------
   78|  1.37M|            if (ef->asn1_ex_new_ex != NULL) {
  ------------------
  |  Branch (78:17): [True: 458k, False: 916k]
  ------------------
   79|   458k|                if (!ef->asn1_ex_new_ex(pval, it, libctx, propq))
  ------------------
  |  Branch (79:21): [True: 0, False: 458k]
  ------------------
   80|      0|                    goto asn1err;
   81|   916k|            } else if (ef->asn1_ex_new != NULL) {
  ------------------
  |  Branch (81:24): [True: 916k, False: 0]
  ------------------
   82|   916k|                if (!ef->asn1_ex_new(pval, it))
  ------------------
  |  Branch (82:21): [True: 0, False: 916k]
  ------------------
   83|      0|                    goto asn1err;
   84|   916k|            }
   85|  1.37M|        }
   86|  1.37M|        break;
   87|       |
   88|  14.8M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  14.8M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (88:5): [True: 14.8M, False: 21.4M]
  ------------------
   89|  14.8M|        if (it->templates) {
  ------------------
  |  Branch (89:13): [True: 0, False: 14.8M]
  ------------------
   90|      0|            if (!asn1_template_new(pval, it->templates, libctx, propq))
  ------------------
  |  Branch (90:17): [True: 0, False: 0]
  ------------------
   91|      0|                goto asn1err;
   92|  14.8M|        } else if (!asn1_primitive_new(pval, it, embed))
  ------------------
  |  Branch (92:20): [True: 0, False: 14.8M]
  ------------------
   93|      0|            goto asn1err;
   94|  14.8M|        break;
   95|       |
   96|  14.8M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  7.41M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (96:5): [True: 7.41M, False: 28.8M]
  ------------------
   97|  7.41M|        if (!asn1_primitive_new(pval, it, embed))
  ------------------
  |  Branch (97:13): [True: 0, False: 7.41M]
  ------------------
   98|      0|            goto asn1err;
   99|  7.41M|        break;
  100|       |
  101|  7.41M|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  99.1k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (101:5): [True: 99.1k, False: 36.1M]
  ------------------
  102|  99.1k|        if (asn1_cb) {
  ------------------
  |  Branch (102:13): [True: 42.9k, False: 56.1k]
  ------------------
  103|  42.9k|            i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL);
  ------------------
  |  |  731|  42.9k|#define ASN1_OP_NEW_PRE 0
  ------------------
  104|  42.9k|            if (!i)
  ------------------
  |  Branch (104:17): [True: 0, False: 42.9k]
  ------------------
  105|      0|                goto auxerr;
  106|  42.9k|            if (i == 2) {
  ------------------
  |  Branch (106:17): [True: 0, False: 42.9k]
  ------------------
  107|      0|                return 1;
  108|      0|            }
  109|  42.9k|        }
  110|  99.1k|        if (embed) {
  ------------------
  |  Branch (110:13): [True: 0, False: 99.1k]
  ------------------
  111|      0|            memset(*pval, 0, it->size);
  112|  99.1k|        } else {
  113|  99.1k|            *pval = OPENSSL_zalloc(it->size);
  ------------------
  |  |  109|  99.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__
  |  |  ------------------
  ------------------
  114|  99.1k|            if (*pval == NULL)
  ------------------
  |  Branch (114:17): [True: 0, False: 99.1k]
  ------------------
  115|      0|                return 0;
  116|  99.1k|        }
  117|  99.1k|        ossl_asn1_set_choice_selector(pval, -1, it);
  118|  99.1k|        if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL))
  ------------------
  |  |  732|  42.9k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (118:13): [True: 42.9k, False: 56.1k]
  |  Branch (118:24): [True: 0, False: 42.9k]
  ------------------
  119|      0|            goto auxerr2;
  120|  99.1k|        break;
  121|       |
  122|  99.1k|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (122:5): [True: 0, False: 36.2M]
  ------------------
  123|  12.5M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  12.5M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (123:5): [True: 12.5M, False: 23.7M]
  ------------------
  124|  12.5M|        if (asn1_cb) {
  ------------------
  |  Branch (124:13): [True: 768k, False: 11.7M]
  ------------------
  125|   768k|            i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL);
  ------------------
  |  |  731|   768k|#define ASN1_OP_NEW_PRE 0
  ------------------
  126|   768k|            if (!i)
  ------------------
  |  Branch (126:17): [True: 0, False: 768k]
  ------------------
  127|      0|                goto auxerr;
  128|   768k|            if (i == 2) {
  ------------------
  |  Branch (128:17): [True: 310k, False: 458k]
  ------------------
  129|   310k|                return 1;
  130|   310k|            }
  131|   768k|        }
  132|  12.2M|        if (embed) {
  ------------------
  |  Branch (132:13): [True: 1.83M, False: 10.4M]
  ------------------
  133|  1.83M|            memset(*pval, 0, it->size);
  134|  10.4M|        } else {
  135|  10.4M|            *pval = OPENSSL_zalloc(it->size);
  ------------------
  |  |  109|  10.4M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  136|  10.4M|            if (*pval == NULL)
  ------------------
  |  Branch (136:17): [True: 0, False: 10.4M]
  ------------------
  137|      0|                return 0;
  138|  10.4M|        }
  139|       |        /* 0 : init. lock */
  140|  12.2M|        if (ossl_asn1_do_lock(pval, 0, it) < 0) {
  ------------------
  |  Branch (140:13): [True: 0, False: 12.2M]
  ------------------
  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|  12.2M|        ossl_asn1_enc_init(pval, it);
  148|  42.5M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (148:41): [True: 30.3M, False: 12.2M]
  ------------------
  149|  30.3M|            pseqval = ossl_asn1_get_field_ptr(pval, tt);
  150|  30.3M|            if (!asn1_template_new(pseqval, tt, libctx, propq))
  ------------------
  |  Branch (150:17): [True: 0, False: 30.3M]
  ------------------
  151|      0|                goto asn1err2;
  152|  30.3M|        }
  153|  12.2M|        if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL))
  ------------------
  |  |  732|   458k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (153:13): [True: 458k, False: 11.7M]
  |  Branch (153:24): [True: 0, False: 458k]
  ------------------
  154|      0|            goto auxerr2;
  155|  12.2M|        break;
  156|  36.2M|    }
  157|  35.9M|    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|  30.3M|{
  208|  30.3M|    const ASN1_ITEM *it = ASN1_ITEM_ptr(tt->item);
  ------------------
  |  |  394|  30.3M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  209|  30.3M|    int embed = tt->flags & ASN1_TFLG_EMBED;
  ------------------
  |  |  586|  30.3M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  210|  30.3M|    ASN1_VALUE *tval;
  211|  30.3M|    int ret;
  212|  30.3M|    if (embed) {
  ------------------
  |  Branch (212:9): [True: 4.31M, False: 26.0M]
  ------------------
  213|  4.31M|        tval = (ASN1_VALUE *)pval;
  214|  4.31M|        pval = &tval;
  215|  4.31M|    }
  216|  30.3M|    if (tt->flags & ASN1_TFLG_OPTIONAL) {
  ------------------
  |  |  512|  30.3M|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (216:9): [True: 6.88M, False: 23.4M]
  ------------------
  217|  6.88M|        asn1_template_clear(pval, tt);
  218|  6.88M|        return 1;
  219|  6.88M|    }
  220|       |    /* If ANY DEFINED BY nothing to do */
  221|       |
  222|  23.4M|    if (tt->flags & ASN1_TFLG_ADB_MASK) {
  ------------------
  |  |  572|  23.4M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (222:9): [True: 0, False: 23.4M]
  ------------------
  223|      0|        *pval = NULL;
  224|      0|        return 1;
  225|      0|    }
  226|       |    /* If SET OF or SEQUENCE OF, its a STACK */
  227|  23.4M|    if (tt->flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  23.4M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (227:9): [True: 0, False: 23.4M]
  ------------------
  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|  23.4M|    ret = asn1_item_embed_new(pval, it, embed, libctx, propq);
  241|  23.4M|done:
  242|  23.4M|    return ret;
  243|  23.4M|}
tasn_new.c:asn1_template_clear:
  246|  6.88M|{
  247|       |    /* If ADB or STACK just NULL the field */
  248|  6.88M|    if (tt->flags & (ASN1_TFLG_ADB_MASK | ASN1_TFLG_SK_MASK))
  ------------------
  |  |  572|  6.88M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
                  if (tt->flags & (ASN1_TFLG_ADB_MASK | ASN1_TFLG_SK_MASK))
  ------------------
  |  |  528|  6.88M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (248:9): [True: 590k, False: 6.29M]
  ------------------
  249|   590k|        *pval = NULL;
  250|  6.29M|    else
  251|  6.29M|        asn1_item_clear(pval, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  394|  6.29M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  252|  6.88M|}
tasn_new.c:asn1_item_clear:
  173|  6.29M|{
  174|  6.29M|    const ASN1_EXTERN_FUNCS *ef;
  175|       |
  176|  6.29M|    switch (it->itype) {
  ------------------
  |  Branch (176:13): [True: 6.29M, False: 0]
  ------------------
  177|       |
  178|      0|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|      0|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (178:5): [True: 0, False: 6.29M]
  ------------------
  179|      0|        ef = it->funcs;
  180|      0|        if (ef && ef->asn1_ex_clear)
  ------------------
  |  Branch (180:13): [True: 0, False: 0]
  |  Branch (180:19): [True: 0, False: 0]
  ------------------
  181|      0|            ef->asn1_ex_clear(pval, it);
  182|      0|        else
  183|      0|            *pval = NULL;
  184|      0|        break;
  185|       |
  186|  6.24M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  6.24M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (186:5): [True: 6.24M, False: 42.9k]
  ------------------
  187|  6.24M|        if (it->templates)
  ------------------
  |  Branch (187:13): [True: 0, False: 6.24M]
  ------------------
  188|      0|            asn1_template_clear(pval, it->templates);
  189|  6.24M|        else
  190|  6.24M|            asn1_primitive_clear(pval, it);
  191|  6.24M|        break;
  192|       |
  193|      0|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|      0|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (193:5): [True: 0, False: 6.29M]
  ------------------
  194|      0|        asn1_primitive_clear(pval, it);
  195|      0|        break;
  196|       |
  197|  42.9k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  42.9k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (197:5): [True: 42.9k, False: 6.24M]
  ------------------
  198|  42.9k|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  42.9k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (198:5): [True: 0, False: 6.29M]
  ------------------
  199|  42.9k|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|  42.9k|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (199:5): [True: 0, False: 6.29M]
  ------------------
  200|       |        *pval = NULL;
  201|  42.9k|        break;
  202|  6.29M|    }
  203|  6.29M|}
tasn_new.c:asn1_primitive_clear:
  326|  6.24M|{
  327|  6.24M|    int utype;
  328|  6.24M|    if (it && it->funcs) {
  ------------------
  |  Branch (328:9): [True: 6.24M, False: 0]
  |  Branch (328:15): [True: 0, False: 6.24M]
  ------------------
  329|      0|        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
  330|      0|        if (pf->prim_clear)
  ------------------
  |  Branch (330:13): [True: 0, False: 0]
  ------------------
  331|      0|            pf->prim_clear(pval, it);
  332|      0|        else
  333|      0|            *pval = NULL;
  334|      0|        return;
  335|      0|    }
  336|  6.24M|    if (!it || (it->itype == ASN1_ITYPE_MSTRING))
  ------------------
  |  |   87|  6.24M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (336:9): [True: 0, False: 6.24M]
  |  Branch (336:16): [True: 0, False: 6.24M]
  ------------------
  337|      0|        utype = -1;
  338|  6.24M|    else
  339|  6.24M|        utype = it->utype;
  340|  6.24M|    if (utype == V_ASN1_BOOLEAN)
  ------------------
  |  |   65|  6.24M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (340:9): [True: 1.96M, False: 4.28M]
  ------------------
  341|  1.96M|        *(ASN1_BOOLEAN *)pval = it->size;
  342|  4.28M|    else
  343|  4.28M|        *pval = NULL;
  344|  6.24M|}
tasn_new.c:asn1_primitive_new:
  261|  22.2M|{
  262|  22.2M|    ASN1_TYPE *typ;
  263|  22.2M|    ASN1_STRING *str;
  264|  22.2M|    int utype;
  265|       |
  266|  22.2M|    if (!it)
  ------------------
  |  Branch (266:9): [True: 0, False: 22.2M]
  ------------------
  267|      0|        return 0;
  268|       |
  269|  22.2M|    if (it->funcs) {
  ------------------
  |  Branch (269:9): [True: 0, False: 22.2M]
  ------------------
  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|  22.2M|    if (it->itype == ASN1_ITYPE_MSTRING)
  ------------------
  |  |   87|  22.2M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (281:9): [True: 7.41M, False: 14.8M]
  ------------------
  282|  7.41M|        utype = -1;
  283|  14.8M|    else
  284|  14.8M|        utype = it->utype;
  285|  22.2M|    switch (utype) {
  286|  10.3M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  10.3M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (286:5): [True: 10.3M, False: 11.8M]
  ------------------
  287|  10.3M|        *pval = (ASN1_VALUE *)OBJ_nid2obj(NID_undef);
  ------------------
  |  |   18|  10.3M|#define NID_undef                       0
  ------------------
  288|  10.3M|        return 1;
  289|       |
  290|      0|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (290:5): [True: 0, False: 22.2M]
  ------------------
  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: 22.2M]
  ------------------
  295|      0|        *pval = (ASN1_VALUE *)1;
  296|      0|        return 1;
  297|       |
  298|  1.99M|    case V_ASN1_ANY:
  ------------------
  |  |   60|  1.99M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (298:5): [True: 1.99M, False: 20.2M]
  ------------------
  299|  1.99M|        if ((typ = OPENSSL_malloc(sizeof(*typ))) == NULL)
  ------------------
  |  |  107|  1.99M|    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.99M]
  ------------------
  300|      0|            return 0;
  301|  1.99M|        typ->value.ptr = NULL;
  302|  1.99M|        typ->type = -1;
  303|  1.99M|        *pval = (ASN1_VALUE *)typ;
  304|  1.99M|        break;
  305|       |
  306|  9.89M|    default:
  ------------------
  |  Branch (306:5): [True: 9.89M, False: 12.3M]
  ------------------
  307|  9.89M|        if (embed) {
  ------------------
  |  Branch (307:13): [True: 2.47M, False: 7.41M]
  ------------------
  308|  2.47M|            str = *(ASN1_STRING **)pval;
  309|  2.47M|            memset(str, 0, sizeof(*str));
  310|  2.47M|            str->type = utype;
  311|  2.47M|            str->flags = ASN1_STRING_FLAG_EMBED;
  ------------------
  |  |   44|  2.47M|#define ASN1_STRING_FLAG_EMBED 0x080
  ------------------
  312|  7.41M|        } else {
  313|  7.41M|            str = ASN1_STRING_type_new(utype);
  314|  7.41M|            *pval = (ASN1_VALUE *)str;
  315|  7.41M|        }
  316|  9.89M|        if (it->itype == ASN1_ITYPE_MSTRING && str)
  ------------------
  |  |   87|  19.7M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (316:13): [True: 7.41M, False: 2.47M]
  |  Branch (316:48): [True: 7.41M, False: 0]
  ------------------
  317|  7.41M|            str->flags |= ASN1_STRING_FLAG_MSTRING;
  ------------------
  |  |   42|  7.41M|#define ASN1_STRING_FLAG_MSTRING 0x040
  ------------------
  318|  9.89M|        break;
  319|  22.2M|    }
  320|  11.8M|    if (*pval)
  ------------------
  |  Branch (320:9): [True: 11.8M, False: 0]
  ------------------
  321|  11.8M|        return 1;
  322|      0|    return 0;
  323|  11.8M|}

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

ossl_asn1_get_choice_selector:
   30|  99.1k|{
   31|  99.1k|    int *sel = offset2ptr(*pval, it->utype);
  ------------------
  |  |   23|  99.1k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   32|       |
   33|  99.1k|    return *sel;
   34|  99.1k|}
ossl_asn1_set_choice_selector:
   50|   198k|{
   51|   198k|    int *sel, ret;
   52|       |
   53|   198k|    sel = offset2ptr(*pval, it->utype);
  ------------------
  |  |   23|   198k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   54|   198k|    ret = *sel;
   55|   198k|    *sel = value;
   56|   198k|    return ret;
   57|   198k|}
ossl_asn1_do_lock:
   69|  25.4M|{
   70|  25.4M|    const ASN1_AUX *aux;
   71|  25.4M|    CRYPTO_RWLOCK **lock;
   72|  25.4M|    CRYPTO_REF_COUNT *refcnt;
   73|  25.4M|    int ret = -1;
   74|       |
   75|  25.4M|    if ((it->itype != ASN1_ITYPE_SEQUENCE)
  ------------------
  |  |   83|  25.4M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (75:9): [True: 0, False: 25.4M]
  ------------------
   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|  25.4M|    aux = it->funcs;
   79|  25.4M|    if (aux == NULL || (aux->flags & ASN1_AFLG_REFCOUNT) == 0)
  ------------------
  |  |  721|  2.29M|#define ASN1_AFLG_REFCOUNT 1
  ------------------
  |  Branch (79:9): [True: 23.1M, False: 2.29M]
  |  Branch (79:24): [True: 916k, False: 1.37M]
  ------------------
   80|  24.0M|        return 0;
   81|  1.37M|    lock = offset2ptr(*pval, aux->ref_lock);
  ------------------
  |  |   23|  1.37M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   82|  1.37M|    refcnt = offset2ptr(*pval, aux->ref_offset);
  ------------------
  |  |   23|  1.37M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   83|       |
   84|  1.37M|    switch (op) {
  ------------------
  |  Branch (84:13): [True: 1.37M, False: 0]
  ------------------
   85|   458k|    case 0:
  ------------------
  |  Branch (85:5): [True: 458k, False: 916k]
  ------------------
   86|   458k|        if (!CRYPTO_NEW_REF(refcnt, 1))
  ------------------
  |  Branch (86:13): [True: 0, False: 458k]
  ------------------
   87|      0|            return -1;
   88|   458k|        *lock = CRYPTO_THREAD_lock_new();
   89|   458k|        if (*lock == NULL) {
  ------------------
  |  Branch (89:13): [True: 0, False: 458k]
  ------------------
   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|   458k|        ret = 1;
   95|   458k|        break;
   96|      0|    case 1:
  ------------------
  |  Branch (96:5): [True: 0, False: 1.37M]
  ------------------
   97|      0|        if (!CRYPTO_UP_REF(refcnt, &ret))
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  ------------------
   98|      0|            return -1;
   99|      0|        break;
  100|   916k|    case -1:
  ------------------
  |  Branch (100:5): [True: 916k, False: 458k]
  ------------------
  101|   916k|        if (!CRYPTO_DOWN_REF(refcnt, &ret))
  ------------------
  |  Branch (101:13): [True: 0, False: 916k]
  ------------------
  102|      0|            return -1; /* failed */
  103|   916k|        REF_PRINT_EX(it->sname, ret, (void *)it);
  ------------------
  |  |  299|   916k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  ------------------
  |  |  |  |  295|   916k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|   916k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  104|   916k|        REF_ASSERT_ISNT(ret < 0);
  ------------------
  |  |  293|   916k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 916k]
  |  |  ------------------
  ------------------
  105|   916k|        if (ret == 0) {
  ------------------
  |  Branch (105:13): [True: 458k, False: 458k]
  ------------------
  106|   458k|            CRYPTO_THREAD_lock_free(*lock);
  107|   458k|            *lock = NULL;
  108|   458k|            CRYPTO_FREE_REF(refcnt);
  109|   458k|        }
  110|   916k|        break;
  111|  1.37M|    }
  112|       |
  113|  1.37M|    return ret;
  114|  1.37M|}
ossl_asn1_enc_init:
  142|  12.2M|{
  143|  12.2M|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  144|       |
  145|  12.2M|    if (enc != NULL) {
  ------------------
  |  Branch (145:9): [True: 458k, False: 11.7M]
  ------------------
  146|       |        enc->enc = NULL;
  147|   458k|        enc->len = 0;
  148|   458k|        enc->modified = 1;
  149|   458k|    }
  150|  12.2M|}
ossl_asn1_enc_free:
  153|  12.7M|{
  154|  12.7M|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  155|       |
  156|  12.7M|    if (enc != NULL) {
  ------------------
  |  Branch (156:9): [True: 458k, False: 12.2M]
  ------------------
  157|   458k|        OPENSSL_free(enc->enc);
  ------------------
  |  |  132|   458k|    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|   458k|        enc->len = 0;
  160|   458k|        enc->modified = 1;
  161|   458k|    }
  162|  12.7M|}
ossl_asn1_enc_save:
  166|  10.6M|{
  167|  10.6M|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  168|       |
  169|  10.6M|    if (enc == NULL)
  ------------------
  |  Branch (169:9): [True: 10.2M, False: 458k]
  ------------------
  170|  10.2M|        return 1;
  171|       |
  172|   458k|    OPENSSL_free(enc->enc);
  ------------------
  |  |  132|   458k|    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|   458k|    if (inlen <= 0) {
  ------------------
  |  Branch (173:9): [True: 0, False: 458k]
  ------------------
  174|      0|        enc->enc = NULL;
  175|      0|        return 0;
  176|      0|    }
  177|   458k|    if ((enc->enc = OPENSSL_malloc(inlen)) == NULL)
  ------------------
  |  |  107|   458k|    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: 458k]
  ------------------
  178|      0|        return 0;
  179|   458k|    memcpy(enc->enc, in, inlen);
  180|   458k|    enc->len = inlen;
  181|   458k|    enc->modified = 0;
  182|       |
  183|   458k|    return 1;
  184|   458k|}
ossl_asn1_enc_restore:
  188|  12.9M|{
  189|  12.9M|    const ASN1_ENCODING *enc = asn1_get_const_enc_ptr(pval, it);
  190|       |
  191|  12.9M|    if (enc == NULL || enc->modified)
  ------------------
  |  Branch (191:9): [True: 11.7M, False: 1.19M]
  |  Branch (191:24): [True: 0, False: 1.19M]
  ------------------
  192|  11.7M|        return 0;
  193|  1.19M|    if (out) {
  ------------------
  |  Branch (193:9): [True: 399k, False: 799k]
  ------------------
  194|   399k|        memcpy(*out, enc->enc, enc->len);
  195|   399k|        *out += enc->len;
  196|   399k|    }
  197|  1.19M|    if (len != NULL)
  ------------------
  |  Branch (197:9): [True: 1.19M, False: 0]
  ------------------
  198|  1.19M|        *len = enc->len;
  199|  1.19M|    return 1;
  200|  12.9M|}
ossl_asn1_get_field_ptr:
  204|  90.0M|{
  205|  90.0M|    ASN1_VALUE **pvaltmp = offset2ptr(*pval, tt->offset);
  ------------------
  |  |   23|  90.0M|#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|  90.0M|    return pvaltmp;
  212|  90.0M|}
ossl_asn1_get_const_field_ptr:
  217|  32.7M|{
  218|  32.7M|    return offset2ptr(*pval, tt->offset);
  ------------------
  |  |   23|  32.7M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  219|  32.7M|}
ossl_asn1_do_adb:
  229|  92.0M|{
  230|  92.0M|    const ASN1_ADB *adb;
  231|  92.0M|    const ASN1_ADB_TABLE *atbl;
  232|  92.0M|    long selector;
  233|  92.0M|    const ASN1_VALUE **sfld;
  234|  92.0M|    int i;
  235|       |
  236|  92.0M|    if ((tt->flags & ASN1_TFLG_ADB_MASK) == 0)
  ------------------
  |  |  572|  92.0M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (236:9): [True: 92.0M, False: 0]
  ------------------
  237|  92.0M|        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|  35.6M|{
  118|  35.6M|    const ASN1_AUX *aux;
  119|       |
  120|  35.6M|    if (pval == NULL || *pval == NULL)
  ------------------
  |  Branch (120:9): [True: 0, False: 35.6M]
  |  Branch (120:25): [True: 0, False: 35.6M]
  ------------------
  121|      0|        return NULL;
  122|  35.6M|    aux = it->funcs;
  123|  35.6M|    if (aux == NULL || (aux->flags & ASN1_AFLG_ENCODING) == 0)
  ------------------
  |  |  723|  3.06M|#define ASN1_AFLG_ENCODING 2
  ------------------
  |  Branch (123:9): [True: 32.6M, False: 3.06M]
  |  Branch (123:24): [True: 1.68M, False: 1.37M]
  ------------------
  124|  34.2M|        return NULL;
  125|  1.37M|    return offset2ptr(*pval, aux->enc_offset);
  ------------------
  |  |   23|  1.37M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  126|  35.6M|}
tasn_utl.c:asn1_get_const_enc_ptr:
  130|  12.9M|{
  131|  12.9M|    const ASN1_AUX *aux;
  132|       |
  133|  12.9M|    if (pval == NULL || *pval == NULL)
  ------------------
  |  Branch (133:9): [True: 0, False: 12.9M]
  |  Branch (133:25): [True: 0, False: 12.9M]
  ------------------
  134|      0|        return NULL;
  135|  12.9M|    aux = it->funcs;
  136|  12.9M|    if (aux == NULL || (aux->flags & ASN1_AFLG_ENCODING) == 0)
  ------------------
  |  |  723|  1.99M|#define ASN1_AFLG_ENCODING 2
  ------------------
  |  Branch (136:9): [True: 10.9M, False: 1.99M]
  |  Branch (136:24): [True: 799k, False: 1.19M]
  ------------------
  137|  11.7M|        return NULL;
  138|  1.19M|    return offset2ptr(*pval, aux->enc_offset);
  ------------------
  |  |   23|  1.19M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  139|  12.9M|}

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

BIGNUM_it:
   57|   621k|ASN1_ITEM_start(BIGNUM)
  ------------------
  |  |   97|   621k|    {                                  \
  |  |   98|   621k|        static const ASN1_ITEM local_it = {
  ------------------
   58|   621k|    ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   82|   621k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
   59|   621k|    V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM" ASN1_ITEM_end(BIGNUM)
  ------------------
  |  |   66|   621k|#define V_ASN1_INTEGER 2
  ------------------
                  V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM" ASN1_ITEM_end(BIGNUM)
  ------------------
  |  |  104|   621k|    }                         \
  |  |  105|   621k|    ;                         \
  |  |  106|   621k|    return &local_it;         \
  |  |  107|   621k|    }
  ------------------
x_bignum.c:bn_new:
   65|   621k|{
   66|   621k|    *pval = (ASN1_VALUE *)BN_new();
   67|   621k|    if (*pval != NULL)
  ------------------
  |  Branch (67:9): [True: 621k, False: 0]
  ------------------
   68|   621k|        return 1;
   69|      0|    else
   70|      0|        return 0;
   71|   621k|}
x_bignum.c:bn_c2i:
  116|   621k|{
  117|   621k|    int allocated = 0;
  118|   621k|    BIGNUM *bn;
  119|       |
  120|       |    /* Reject encodings that imply a negative number. */
  121|   621k|    if (len == 0 || (*cont & 0x80) != 0) {
  ------------------
  |  Branch (121:9): [True: 0, False: 621k]
  |  Branch (121:21): [True: 0, False: 621k]
  ------------------
  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|   621k|    if (*pval == NULL && (allocated = bn_new(pval, it)) == 0)
  ------------------
  |  Branch (126:9): [True: 621k, False: 0]
  |  Branch (126:26): [True: 0, False: 621k]
  ------------------
  127|      0|        return 0;
  128|   621k|    bn = (BIGNUM *)*pval;
  129|   621k|    if (!BN_bin2bn(cont, len, bn)) {
  ------------------
  |  Branch (129:9): [True: 0, False: 621k]
  ------------------
  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|   621k|    return 1;
  135|   621k|}

X509_INFO_new:
   17|   458k|{
   18|   458k|    X509_INFO *ret;
   19|       |
   20|   458k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   458k|    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|   458k|    if (ret == NULL)
  ------------------
  |  Branch (21:9): [True: 0, False: 458k]
  ------------------
   22|      0|        return NULL;
   23|       |
   24|   458k|    return ret;
   25|   458k|}
X509_INFO_free:
   28|   462k|{
   29|   462k|    if (x == NULL)
  ------------------
  |  Branch (29:9): [True: 3.78k, False: 458k]
  ------------------
   30|  3.78k|        return;
   31|       |
   32|   458k|    X509_free(x->x509);
   33|   458k|    X509_CRL_free(x->crl);
   34|   458k|    X509_PKEY_free(x->x_pkey);
   35|   458k|    OPENSSL_free(x->enc_data);
  ------------------
  |  |  132|   458k|    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|   458k|    OPENSSL_free(x);
  ------------------
  |  |  132|   458k|    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|   458k|}

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

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

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

BIO_f_buffer:
   41|  2.32k|{
   42|  2.32k|    return &methods_buffer;
   43|  2.32k|}
bf_buff.c:buffer_write:
  159|  4.30k|{
  160|  4.30k|    int i, num = 0;
  161|  4.30k|    BIO_F_BUFFER_CTX *ctx;
  162|       |
  163|  4.30k|    if ((in == NULL) || (inl <= 0))
  ------------------
  |  Branch (163:9): [True: 0, False: 4.30k]
  |  Branch (163:25): [True: 0, False: 4.30k]
  ------------------
  164|      0|        return 0;
  165|  4.30k|    ctx = (BIO_F_BUFFER_CTX *)b->ptr;
  166|  4.30k|    if ((ctx == NULL) || (b->next_bio == NULL))
  ------------------
  |  Branch (166:9): [True: 0, False: 4.30k]
  |  Branch (166:26): [True: 0, False: 4.30k]
  ------------------
  167|      0|        return 0;
  168|       |
  169|  4.30k|    BIO_clear_retry_flags(b);
  ------------------
  |  |  272|  4.30k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  4.30k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  4.30k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  4.30k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  4.30k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  4.30k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  170|  4.30k|start:
  171|  4.30k|    i = ctx->obuf_size - (ctx->obuf_len + ctx->obuf_off);
  172|       |    /* add to buffer and return */
  173|  4.30k|    if (i >= inl) {
  ------------------
  |  Branch (173:9): [True: 4.30k, False: 0]
  ------------------
  174|  4.30k|        memcpy(&(ctx->obuf[ctx->obuf_off + ctx->obuf_len]), in, inl);
  175|  4.30k|        ctx->obuf_len += inl;
  176|  4.30k|        return (num + inl);
  177|  4.30k|    }
  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|  11.2k|{
  237|  11.2k|    BIO *dbio;
  238|  11.2k|    BIO_F_BUFFER_CTX *ctx;
  239|  11.2k|    long ret = 1;
  240|  11.2k|    char *p1, *p2;
  241|  11.2k|    int r, i, *ip;
  242|  11.2k|    int ibs, obs;
  243|       |
  244|  11.2k|    ctx = (BIO_F_BUFFER_CTX *)b->ptr;
  245|       |
  246|  11.2k|    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: 11.2k]
  ------------------
  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: 11.2k]
  ------------------
  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: 11.2k]
  ------------------
  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: 11.2k]
  ------------------
  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: 11.2k]
  ------------------
  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: 11.2k]
  ------------------
  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: 11.2k]
  ------------------
  295|      0|        if (num > ctx->ibuf_size) {
  ------------------
  |  Branch (295:13): [True: 0, False: 0]
  ------------------
  296|      0|            if (num <= 0)
  ------------------
  |  Branch (296:17): [True: 0, False: 0]
  ------------------
  297|      0|                return 0;
  298|      0|            p1 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  299|      0|            if (p1 == NULL)
  ------------------
  |  Branch (299:17): [True: 0, False: 0]
  ------------------
  300|      0|                return 0;
  301|      0|            OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  302|      0|            ctx->ibuf = p1;
  303|      0|        }
  304|      0|        ctx->ibuf_off = 0;
  305|      0|        ctx->ibuf_len = (int)num;
  306|      0|        memcpy(ctx->ibuf, ptr, (int)num);
  307|      0|        ret = 1;
  308|      0|        break;
  309|  2.32k|    case BIO_C_SET_BUFF_SIZE:
  ------------------
  |  |  460|  2.32k|#define BIO_C_SET_BUFF_SIZE 117
  ------------------
  |  Branch (309:5): [True: 2.32k, False: 8.94k]
  ------------------
  310|  2.32k|        if (ptr != NULL) {
  ------------------
  |  Branch (310:13): [True: 2.32k, False: 0]
  ------------------
  311|  2.32k|            ip = (int *)ptr;
  312|  2.32k|            if (*ip == 0) {
  ------------------
  |  Branch (312:17): [True: 2.32k, False: 0]
  ------------------
  313|  2.32k|                ibs = (int)num;
  314|  2.32k|                obs = ctx->obuf_size;
  315|  2.32k|            } else { /* if (*ip == 1) */
  316|       |
  317|      0|                ibs = ctx->ibuf_size;
  318|      0|                obs = (int)num;
  319|      0|            }
  320|  2.32k|        } else {
  321|      0|            ibs = (int)num;
  322|      0|            obs = (int)num;
  323|      0|        }
  324|  2.32k|        p1 = ctx->ibuf;
  325|  2.32k|        p2 = ctx->obuf;
  326|  2.32k|        if ((ibs > DEFAULT_BUFFER_SIZE) && (ibs != ctx->ibuf_size)) {
  ------------------
  |  |   23|  2.32k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
  |  Branch (326:13): [True: 0, False: 2.32k]
  |  Branch (326:44): [True: 0, False: 0]
  ------------------
  327|      0|            if (num <= 0)
  ------------------
  |  Branch (327:17): [True: 0, False: 0]
  ------------------
  328|      0|                return 0;
  329|      0|            p1 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  330|      0|            if (p1 == NULL)
  ------------------
  |  Branch (330:17): [True: 0, False: 0]
  ------------------
  331|      0|                return 0;
  332|      0|        }
  333|  2.32k|        if ((obs > DEFAULT_BUFFER_SIZE) && (obs != ctx->obuf_size)) {
  ------------------
  |  |   23|  2.32k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
  |  Branch (333:13): [True: 0, False: 2.32k]
  |  Branch (333:44): [True: 0, False: 0]
  ------------------
  334|      0|            p2 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  335|      0|            if (p2 == NULL) {
  ------------------
  |  Branch (335:17): [True: 0, False: 0]
  ------------------
  336|      0|                if (p1 != ctx->ibuf)
  ------------------
  |  Branch (336:21): [True: 0, False: 0]
  ------------------
  337|      0|                    OPENSSL_free(p1);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  338|      0|                return 0;
  339|      0|            }
  340|      0|        }
  341|  2.32k|        if (ctx->ibuf != p1) {
  ------------------
  |  Branch (341:13): [True: 0, False: 2.32k]
  ------------------
  342|      0|            OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  343|      0|            ctx->ibuf = p1;
  344|      0|            ctx->ibuf_off = 0;
  345|      0|            ctx->ibuf_len = 0;
  346|      0|            ctx->ibuf_size = ibs;
  347|      0|        }
  348|  2.32k|        if (ctx->obuf != p2) {
  ------------------
  |  Branch (348:13): [True: 0, False: 2.32k]
  ------------------
  349|      0|            OPENSSL_free(ctx->obuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  350|      0|            ctx->obuf = p2;
  351|      0|            ctx->obuf_off = 0;
  352|      0|            ctx->obuf_len = 0;
  353|      0|            ctx->obuf_size = obs;
  354|      0|        }
  355|  2.32k|        break;
  356|      0|    case BIO_C_DO_STATE_MACHINE:
  ------------------
  |  |  444|      0|#define BIO_C_DO_STATE_MACHINE 101
  ------------------
  |  Branch (356:5): [True: 0, False: 11.2k]
  ------------------
  357|      0|        if (b->next_bio == NULL)
  ------------------
  |  Branch (357:13): [True: 0, False: 0]
  ------------------
  358|      0|            return 0;
  359|      0|        BIO_clear_retry_flags(b);
  ------------------
  |  |  272|      0|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|      0|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  360|      0|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  361|      0|        BIO_copy_next_retry(b);
  362|      0|        break;
  363|       |
  364|  4.30k|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|  4.30k|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (364:5): [True: 4.30k, False: 6.96k]
  ------------------
  365|  4.30k|        if (b->next_bio == NULL)
  ------------------
  |  Branch (365:13): [True: 0, False: 4.30k]
  ------------------
  366|      0|            return 0;
  367|  4.30k|        if (ctx->obuf_len <= 0) {
  ------------------
  |  Branch (367:13): [True: 0, False: 4.30k]
  ------------------
  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|  8.60k|        for (;;) {
  374|  8.60k|            BIO_clear_retry_flags(b);
  ------------------
  |  |  272|  8.60k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  8.60k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  8.60k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  8.60k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  8.60k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  8.60k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  375|  8.60k|            if (ctx->obuf_len > 0) {
  ------------------
  |  Branch (375:17): [True: 4.30k, False: 4.30k]
  ------------------
  376|  4.30k|                r = BIO_write(b->next_bio,
  377|  4.30k|                    &(ctx->obuf[ctx->obuf_off]), ctx->obuf_len);
  378|  4.30k|                BIO_copy_next_retry(b);
  379|  4.30k|                if (r <= 0)
  ------------------
  |  Branch (379:21): [True: 0, False: 4.30k]
  ------------------
  380|      0|                    return (long)r;
  381|  4.30k|                ctx->obuf_off += r;
  382|  4.30k|                ctx->obuf_len -= r;
  383|  4.30k|            } else {
  384|  4.30k|                ctx->obuf_len = 0;
  385|  4.30k|                ctx->obuf_off = 0;
  386|  4.30k|                break;
  387|  4.30k|            }
  388|  8.60k|        }
  389|  4.30k|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  390|  4.30k|        BIO_copy_next_retry(b);
  391|  4.30k|        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: 11.2k]
  ------------------
  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: 11.2k]
  ------------------
  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|  4.64k|    default:
  ------------------
  |  Branch (408:5): [True: 4.64k, False: 6.62k]
  ------------------
  409|  4.64k|        if (b->next_bio == NULL)
  ------------------
  |  Branch (409:13): [True: 0, False: 4.64k]
  ------------------
  410|      0|            return 0;
  411|  4.64k|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  412|  4.64k|        break;
  413|  11.2k|    }
  414|  11.2k|    return ret;
  415|  11.2k|}
bf_buff.c:buffer_new:
   46|  2.32k|{
   47|  2.32k|    BIO_F_BUFFER_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|  2.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__
  |  |  ------------------
  ------------------
   48|       |
   49|  2.32k|    if (ctx == NULL)
  ------------------
  |  Branch (49:9): [True: 0, False: 2.32k]
  ------------------
   50|      0|        return 0;
   51|  2.32k|    ctx->ibuf_size = DEFAULT_BUFFER_SIZE;
  ------------------
  |  |   23|  2.32k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
   52|  2.32k|    ctx->ibuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
  ------------------
  |  |  107|  2.32k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   53|  2.32k|    if (ctx->ibuf == NULL) {
  ------------------
  |  Branch (53:9): [True: 0, False: 2.32k]
  ------------------
   54|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   55|      0|        return 0;
   56|      0|    }
   57|  2.32k|    ctx->obuf_size = DEFAULT_BUFFER_SIZE;
  ------------------
  |  |   23|  2.32k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
   58|  2.32k|    ctx->obuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
  ------------------
  |  |  107|  2.32k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   59|  2.32k|    if (ctx->obuf == NULL) {
  ------------------
  |  Branch (59:9): [True: 0, False: 2.32k]
  ------------------
   60|      0|        OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   62|      0|        return 0;
   63|      0|    }
   64|       |
   65|  2.32k|    bi->init = 1;
   66|  2.32k|    bi->ptr = (char *)ctx;
   67|  2.32k|    bi->flags = 0;
   68|  2.32k|    return 1;
   69|  2.32k|}
bf_buff.c:buffer_free:
   72|  2.32k|{
   73|  2.32k|    BIO_F_BUFFER_CTX *b;
   74|       |
   75|  2.32k|    if (a == NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 2.32k]
  ------------------
   76|      0|        return 0;
   77|  2.32k|    b = (BIO_F_BUFFER_CTX *)a->ptr;
   78|  2.32k|    OPENSSL_free(b->ibuf);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|  2.32k|    OPENSSL_free(b->obuf);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   80|  2.32k|    OPENSSL_free(a->ptr);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|       |    a->ptr = NULL;
   82|  2.32k|    a->init = 0;
   83|  2.32k|    a->flags = 0;
   84|  2.32k|    return 1;
   85|  2.32k|}

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.78M|{
   83|  2.78M|    BIO *bio = OPENSSL_zalloc(sizeof(*bio));
  ------------------
  |  |  109|  2.78M|    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.78M|    if (bio == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 2.78M]
  ------------------
   86|      0|        return NULL;
   87|       |
   88|  2.78M|    bio->libctx = libctx;
   89|  2.78M|    bio->method = method;
   90|  2.78M|    bio->shutdown = 1;
   91|       |
   92|  2.78M|    if (!CRYPTO_NEW_REF(&bio->references, 1))
  ------------------
  |  Branch (92:9): [True: 0, False: 2.78M]
  ------------------
   93|      0|        goto err;
   94|       |
   95|  2.78M|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data))
  ------------------
  |  |  263|  2.78M|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  |  Branch (95:9): [True: 0, False: 2.78M]
  ------------------
   96|      0|        goto err;
   97|       |
   98|  2.78M|    if (method->create != NULL && !method->create(bio)) {
  ------------------
  |  Branch (98:9): [True: 2.78M, False: 0]
  |  Branch (98:35): [True: 0, False: 2.78M]
  ------------------
   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.78M|    if (method->create == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 2.78M]
  ------------------
  104|      0|        bio->init = 1;
  105|       |
  106|  2.78M|    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.78M|}
BIO_new:
  115|  2.78M|{
  116|       |    return BIO_new_ex(NULL, method);
  117|  2.78M|}
BIO_free:
  120|  4.69M|{
  121|  4.69M|    int ret;
  122|       |
  123|  4.69M|    if (a == NULL)
  ------------------
  |  Branch (123:9): [True: 965k, False: 3.72M]
  ------------------
  124|   965k|        return 0;
  125|       |
  126|  3.72M|    if (CRYPTO_DOWN_REF(&a->references, &ret) <= 0)
  ------------------
  |  Branch (126:9): [True: 0, False: 3.72M]
  ------------------
  127|      0|        return 0;
  128|       |
  129|  3.72M|    REF_PRINT_COUNT("BIO", ret, a);
  ------------------
  |  |  301|  3.72M|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  3.72M|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  3.72M|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  3.72M|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  130|  3.72M|    if (ret > 0)
  ------------------
  |  Branch (130:9): [True: 939k, False: 2.78M]
  ------------------
  131|   939k|        return 1;
  132|  2.78M|    REF_ASSERT_ISNT(ret < 0);
  ------------------
  |  |  293|  2.78M|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 2.78M]
  |  |  ------------------
  ------------------
  133|       |
  134|  2.78M|    if (HAS_CALLBACK(a)) {
  ------------------
  |  |   26|  2.78M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 2.78M]
  |  |  |  Branch (26:51): [True: 0, False: 2.78M]
  |  |  ------------------
  ------------------
  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.78M|    if ((a->method != NULL) && (a->method->destroy != NULL))
  ------------------
  |  Branch (140:9): [True: 2.78M, False: 0]
  |  Branch (140:32): [True: 2.78M, False: 0]
  ------------------
  141|  2.78M|        a->method->destroy(a);
  142|       |
  143|  2.78M|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data);
  ------------------
  |  |  263|  2.78M|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  144|       |
  145|  2.78M|    CRYPTO_FREE_REF(&a->references);
  146|       |
  147|  2.78M|    OPENSSL_free(a);
  ------------------
  |  |  132|  2.78M|    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.78M|    return 1;
  150|  2.78M|}
BIO_set_data:
  153|   921k|{
  154|   921k|    a->ptr = ptr;
  155|   921k|}
BIO_get_data:
  158|  3.39M|{
  159|  3.39M|    return a->ptr;
  160|  3.39M|}
BIO_set_init:
  163|  1.83M|{
  164|  1.83M|    a->init = init;
  165|  1.83M|}
BIO_set_shutdown:
  173|  2.32k|{
  174|  2.32k|    a->shutdown = shut;
  175|  2.32k|}
BIO_up_ref:
  188|   939k|{
  189|   939k|    int i;
  190|       |
  191|   939k|    if (CRYPTO_UP_REF(&a->references, &i) <= 0)
  ------------------
  |  Branch (191:9): [True: 0, False: 939k]
  ------------------
  192|      0|        return 0;
  193|       |
  194|   939k|    REF_PRINT_COUNT("BIO", i, a);
  ------------------
  |  |  301|   939k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   939k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   939k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   939k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|   939k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   939k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 939k]
  |  |  ------------------
  ------------------
  196|   939k|    return i > 1;
  197|   939k|}
BIO_clear_flags:
  200|  13.3M|{
  201|  13.3M|    b->flags &= ~flags;
  202|  13.3M|}
BIO_test_flags:
  205|  11.3k|{
  206|  11.3k|    return (b->flags & flags);
  207|  11.3k|}
BIO_set_flags:
  210|  9.05k|{
  211|  9.05k|    b->flags |= flags;
  212|  9.05k|}
BIO_read:
  318|  2.92M|{
  319|  2.92M|    size_t readbytes;
  320|  2.92M|    int ret;
  321|       |
  322|  2.92M|    if (dlen < 0) {
  ------------------
  |  Branch (322:9): [True: 0, False: 2.92M]
  ------------------
  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.92M|    ret = bio_read_intern(b, data, (size_t)dlen, &readbytes);
  328|       |
  329|  2.92M|    if (ret > 0) {
  ------------------
  |  Branch (329:9): [True: 2.92M, False: 2.28k]
  ------------------
  330|       |        /* *readbytes should always be <= dlen */
  331|  2.92M|        ret = (int)readbytes;
  332|  2.92M|    }
  333|       |
  334|  2.92M|    return ret;
  335|  2.92M|}
BIO_read_ex:
  338|  2.46M|{
  339|  2.46M|    return bio_read_intern(b, data, dlen, readbytes) > 0;
  340|  2.46M|}
BIO_write:
  385|  10.9k|{
  386|  10.9k|    size_t written;
  387|  10.9k|    int ret;
  388|       |
  389|  10.9k|    if (dlen <= 0)
  ------------------
  |  Branch (389:9): [True: 0, False: 10.9k]
  ------------------
  390|      0|        return 0;
  391|       |
  392|  10.9k|    ret = bio_write_intern(b, data, (size_t)dlen, &written);
  393|       |
  394|  10.9k|    if (ret > 0) {
  ------------------
  |  Branch (394:9): [True: 10.9k, False: 0]
  ------------------
  395|       |        /* written should always be <= dlen */
  396|  10.9k|        ret = (int)written;
  397|  10.9k|    }
  398|       |
  399|  10.9k|    return ret;
  400|  10.9k|}
BIO_write_ex:
  403|     31|{
  404|     31|    return bio_write_intern(b, data, dlen, written) > 0
  ------------------
  |  Branch (404:12): [True: 31, 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|     31|}
BIO_puts:
  513|  10.4M|{
  514|  10.4M|    int ret;
  515|  10.4M|    size_t written = 0;
  516|       |
  517|  10.4M|    if (b == NULL) {
  ------------------
  |  Branch (517:9): [True: 0, False: 10.4M]
  ------------------
  518|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  519|      0|        return -1;
  520|      0|    }
  521|  10.4M|    if (b->method == NULL || b->method->bputs == NULL) {
  ------------------
  |  Branch (521:9): [True: 0, False: 10.4M]
  |  Branch (521:30): [True: 0, False: 10.4M]
  ------------------
  522|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  523|      0|        return -2;
  524|      0|    }
  525|       |
  526|  10.4M|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|  10.4M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 10.4M]
  |  |  |  Branch (26:51): [True: 0, False: 10.4M]
  |  |  ------------------
  ------------------
  527|      0|        ret = (int)bio_call_callback(b, BIO_CB_PUTS, buf, 0, 0, 0L, 1L, NULL);
  ------------------
  |  |  303|      0|#define BIO_CB_PUTS 0x04
  ------------------
  528|      0|        if (ret <= 0)
  ------------------
  |  Branch (528:13): [True: 0, False: 0]
  ------------------
  529|      0|            return ret;
  530|      0|    }
  531|       |
  532|  10.4M|    if (!b->init) {
  ------------------
  |  Branch (532:9): [True: 0, False: 10.4M]
  ------------------
  533|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  534|      0|        return -1;
  535|      0|    }
  536|       |
  537|  10.4M|    ret = b->method->bputs(b, buf);
  538|       |
  539|  10.4M|    if (ret > 0) {
  ------------------
  |  Branch (539:9): [True: 10.4M, False: 0]
  ------------------
  540|  10.4M|        b->num_write += (uint64_t)ret;
  541|  10.4M|        written = ret;
  542|  10.4M|        ret = 1;
  543|  10.4M|    }
  544|       |
  545|  10.4M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  10.4M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 10.4M]
  |  |  |  Branch (26:51): [True: 0, False: 10.4M]
  |  |  ------------------
  ------------------
  546|      0|        ret = (int)bio_call_callback(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0,
  ------------------
  |  |  303|      0|#define BIO_CB_PUTS 0x04
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0,
  ------------------
  |  |  313|      0|#define BIO_CB_RETURN 0x80
  ------------------
  547|      0|            0L, ret, &written);
  548|       |
  549|  10.4M|    if (ret > 0) {
  ------------------
  |  Branch (549:9): [True: 10.4M, False: 0]
  ------------------
  550|  10.4M|        if (written > INT_MAX) {
  ------------------
  |  Branch (550:13): [True: 0, False: 10.4M]
  ------------------
  551|      0|            ERR_raise(ERR_LIB_BIO, BIO_R_LENGTH_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  552|      0|            ret = -1;
  553|  10.4M|        } else {
  554|  10.4M|            ret = (int)written;
  555|  10.4M|        }
  556|  10.4M|    }
  557|       |
  558|  10.4M|    return ret;
  559|  10.4M|}
BIO_gets:
  562|  11.3M|{
  563|  11.3M|    int ret;
  564|  11.3M|    size_t readbytes = 0;
  565|       |
  566|  11.3M|    if (b == NULL) {
  ------------------
  |  Branch (566:9): [True: 0, False: 11.3M]
  ------------------
  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|  11.3M|    if (b->method == NULL || b->method->bgets == NULL) {
  ------------------
  |  Branch (570:9): [True: 0, False: 11.3M]
  |  Branch (570:30): [True: 0, False: 11.3M]
  ------------------
  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|  11.3M|    if (size < 0) {
  ------------------
  |  Branch (575:9): [True: 0, False: 11.3M]
  ------------------
  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|  11.3M|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|  11.3M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 11.3M]
  |  |  |  Branch (26:51): [True: 0, False: 11.3M]
  |  |  ------------------
  ------------------
  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|  11.3M|    if (!b->init) {
  ------------------
  |  Branch (586:9): [True: 0, False: 11.3M]
  ------------------
  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|  11.3M|    ret = b->method->bgets(b, buf, size);
  592|       |
  593|  11.3M|    if (ret > 0) {
  ------------------
  |  Branch (593:9): [True: 11.3M, False: 7.17k]
  ------------------
  594|  11.3M|        readbytes = ret;
  595|  11.3M|        ret = 1;
  596|  11.3M|    }
  597|       |
  598|  11.3M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  11.3M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 11.3M]
  |  |  |  Branch (26:51): [True: 0, False: 11.3M]
  |  |  ------------------
  ------------------
  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|  11.3M|    if (ret > 0) {
  ------------------
  |  Branch (602:9): [True: 11.3M, False: 7.17k]
  ------------------
  603|       |        /* Shouldn't happen */
  604|  11.3M|        if (readbytes > (size_t)size)
  ------------------
  |  Branch (604:13): [True: 0, False: 11.3M]
  ------------------
  605|      0|            ret = -1;
  606|  11.3M|        else
  607|  11.3M|            ret = (int)readbytes;
  608|  11.3M|    }
  609|       |
  610|  11.3M|    return ret;
  611|  11.3M|}
BIO_int_ctrl:
  657|  2.32k|{
  658|  2.32k|    int i;
  659|       |
  660|  2.32k|    i = iarg;
  661|  2.32k|    return BIO_ctrl(b, cmd, larg, (char *)&i);
  662|  2.32k|}
BIO_ctrl:
  675|  4.61M|{
  676|  4.61M|    long ret;
  677|       |
  678|  4.61M|    if (b == NULL)
  ------------------
  |  Branch (678:9): [True: 0, False: 4.61M]
  ------------------
  679|      0|        return -1;
  680|  4.61M|    if (b->method == NULL || b->method->ctrl == NULL) {
  ------------------
  |  Branch (680:9): [True: 0, False: 4.61M]
  |  Branch (680:30): [True: 0, False: 4.61M]
  ------------------
  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|  4.61M|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|  4.61M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 4.61M]
  |  |  |  Branch (26:51): [True: 0, False: 4.61M]
  |  |  ------------------
  ------------------
  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|  4.61M|    ret = b->method->ctrl(b, cmd, larg, parg);
  692|       |
  693|  4.61M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  4.61M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 4.61M]
  |  |  |  Branch (26:51): [True: 0, False: 4.61M]
  |  |  ------------------
  ------------------
  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|  4.61M|    return ret;
  698|  4.61M|}
BIO_eof:
  701|  1.90k|{
  702|  1.90k|    if ((b->flags & BIO_FLAGS_AUTO_EOF) != 0)
  ------------------
  |  |   49|  1.90k|#define BIO_FLAGS_AUTO_EOF 0x80
  ------------------
  |  Branch (702:9): [True: 0, False: 1.90k]
  ------------------
  703|      0|        return 1;
  704|  1.90k|    return (int)BIO_ctrl(b, BIO_CTRL_EOF, 0, NULL);
  ------------------
  |  |   91|  1.90k|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  705|  1.90k|}
BIO_push:
  768|  2.32k|{
  769|  2.32k|    BIO *lb;
  770|       |
  771|  2.32k|    if (b == NULL)
  ------------------
  |  Branch (771:9): [True: 0, False: 2.32k]
  ------------------
  772|      0|        return bio;
  773|  2.32k|    lb = b;
  774|  2.32k|    while (lb->next_bio != NULL)
  ------------------
  |  Branch (774:12): [True: 0, False: 2.32k]
  ------------------
  775|      0|        lb = lb->next_bio;
  776|  2.32k|    lb->next_bio = bio;
  777|  2.32k|    if (bio != NULL)
  ------------------
  |  Branch (777:9): [True: 2.32k, False: 0]
  ------------------
  778|  2.32k|        bio->prev_bio = lb;
  779|       |    /* called to do internal processing */
  780|  2.32k|    BIO_ctrl(b, BIO_CTRL_PUSH, 0, lb);
  ------------------
  |  |   95|  2.32k|#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
  ------------------
  781|  2.32k|    return b;
  782|  2.32k|}
BIO_pop:
  786|  2.32k|{
  787|  2.32k|    BIO *ret;
  788|       |
  789|  2.32k|    if (b == NULL)
  ------------------
  |  Branch (789:9): [True: 0, False: 2.32k]
  ------------------
  790|      0|        return NULL;
  791|  2.32k|    ret = b->next_bio;
  792|       |
  793|  2.32k|    BIO_ctrl(b, BIO_CTRL_POP, 0, b);
  ------------------
  |  |   96|  2.32k|#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
  ------------------
  794|       |
  795|  2.32k|    if (b->prev_bio != NULL)
  ------------------
  |  Branch (795:9): [True: 0, False: 2.32k]
  ------------------
  796|      0|        b->prev_bio->next_bio = b->next_bio;
  797|  2.32k|    if (b->next_bio != NULL)
  ------------------
  |  Branch (797:9): [True: 2.32k, False: 0]
  ------------------
  798|  2.32k|        b->next_bio->prev_bio = b->prev_bio;
  799|       |
  800|  2.32k|    b->next_bio = NULL;
  801|       |    b->prev_bio = NULL;
  802|  2.32k|    return ret;
  803|  2.32k|}
BIO_free_all:
  871|  46.4k|{
  872|  46.4k|    BIO *b;
  873|  46.4k|    int ref;
  874|       |
  875|  48.7k|    while (bio != NULL) {
  ------------------
  |  Branch (875:12): [True: 18.5k, False: 30.1k]
  ------------------
  876|  18.5k|        b = bio;
  877|  18.5k|        CRYPTO_GET_REF(&b->references, &ref);
  878|  18.5k|        bio = bio->next_bio;
  879|  18.5k|        BIO_free(b);
  880|       |        /* Since ref count > 1, don't free anyone else. */
  881|  18.5k|        if (ref > 1)
  ------------------
  |  Branch (881:13): [True: 16.2k, False: 2.32k]
  ------------------
  882|  16.2k|            break;
  883|  18.5k|    }
  884|  46.4k|}
BIO_copy_next_retry:
  933|  8.60k|{
  934|  8.60k|    BIO_set_flags(b, BIO_get_retry_flags(b->next_bio));
  ------------------
  |  |  274|  8.60k|    BIO_test_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  8.60k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  8.60k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  8.60k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  8.60k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_test_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  8.60k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  935|  8.60k|    b->retry_reason = b->next_bio->retry_reason;
  936|  8.60k|}
bio_lib.c:bio_read_intern:
  272|  5.38M|{
  273|  5.38M|    int ret;
  274|       |
  275|  5.38M|    if (b == NULL) {
  ------------------
  |  Branch (275:9): [True: 0, False: 5.38M]
  ------------------
  276|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  277|      0|        return -1;
  278|      0|    }
  279|  5.38M|    if (b->method == NULL || b->method->bread == NULL) {
  ------------------
  |  Branch (279:9): [True: 0, False: 5.38M]
  |  Branch (279:30): [True: 0, False: 5.38M]
  ------------------
  280|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  281|      0|        return -2;
  282|      0|    }
  283|       |
  284|  5.38M|    if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |   26|  10.7M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 5.38M]
  |  |  |  Branch (26:51): [True: 0, False: 5.38M]
  |  |  ------------------
  ------------------
                  if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |  301|      0|#define BIO_CB_READ 0x02
  ------------------
  |  Branch (284:28): [True: 0, False: 0]
  ------------------
  285|      0|        return ret;
  286|       |
  287|  5.38M|    if (!b->init) {
  ------------------
  |  Branch (287:9): [True: 0, False: 5.38M]
  ------------------
  288|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  289|      0|        return -1;
  290|      0|    }
  291|       |
  292|  5.38M|    ret = b->method->bread(b, data, dlen, readbytes);
  293|       |
  294|  5.38M|    if (ret > 0)
  ------------------
  |  Branch (294:9): [True: 5.38M, False: 2.28k]
  ------------------
  295|  5.38M|        b->num_read += (uint64_t)*readbytes;
  296|       |
  297|       |    /*
  298|       |     * If method->bread() returned 0 when dlen>0, it can be either EOF or
  299|       |     * an error, and we should distinguish them
  300|       |     */
  301|  5.38M|    if (ret == 0 && dlen > 0 && BIO_eof(b) == 0)
  ------------------
  |  Branch (301:9): [True: 61, False: 5.38M]
  |  Branch (301:21): [True: 61, False: 0]
  |  Branch (301:33): [True: 0, False: 61]
  ------------------
  302|      0|        ret = -1;
  303|       |
  304|  5.38M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  5.38M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 5.38M]
  |  |  |  Branch (26:51): [True: 0, False: 5.38M]
  |  |  ------------------
  ------------------
  305|      0|        ret = (int)bio_call_callback(b, BIO_CB_READ | BIO_CB_RETURN, data,
  ------------------
  |  |  301|      0|#define BIO_CB_READ 0x02
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_READ | BIO_CB_RETURN, data,
  ------------------
  |  |  313|      0|#define BIO_CB_RETURN 0x80
  ------------------
  306|      0|            dlen, 0, 0L, ret, readbytes);
  307|       |
  308|       |    /* Shouldn't happen */
  309|  5.38M|    if (ret > 0 && *readbytes > dlen) {
  ------------------
  |  Branch (309:9): [True: 5.38M, False: 2.28k]
  |  Branch (309:20): [True: 0, False: 5.38M]
  ------------------
  310|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  311|      0|        return -1;
  312|      0|    }
  313|       |
  314|  5.38M|    return ret;
  315|  5.38M|}
bio_lib.c:bio_write_intern:
  344|  10.9k|{
  345|  10.9k|    size_t local_written;
  346|  10.9k|    int ret;
  347|       |
  348|  10.9k|    if (written != NULL)
  ------------------
  |  Branch (348:9): [True: 10.9k, False: 0]
  ------------------
  349|  10.9k|        *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|  10.9k|    if (b == NULL)
  ------------------
  |  Branch (354:9): [True: 0, False: 10.9k]
  ------------------
  355|      0|        return 0;
  356|       |
  357|  10.9k|    if (b->method == NULL || b->method->bwrite == NULL) {
  ------------------
  |  Branch (357:9): [True: 0, False: 10.9k]
  |  Branch (357:30): [True: 0, False: 10.9k]
  ------------------
  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|  10.9k|    if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_WRITE, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |   26|  21.8k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 10.9k]
  |  |  |  Branch (26:51): [True: 0, False: 10.9k]
  |  |  ------------------
  ------------------
                  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|  10.9k|    if (!b->init) {
  ------------------
  |  Branch (365:9): [True: 0, False: 10.9k]
  ------------------
  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|  10.9k|    ret = b->method->bwrite(b, data, dlen, &local_written);
  371|       |
  372|  10.9k|    if (ret > 0)
  ------------------
  |  Branch (372:9): [True: 10.9k, False: 0]
  ------------------
  373|  10.9k|        b->num_write += (uint64_t)local_written;
  374|       |
  375|  10.9k|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  10.9k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 10.9k]
  |  |  |  Branch (26:51): [True: 0, False: 10.9k]
  |  |  ------------------
  ------------------
  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|  10.9k|    if (written != NULL)
  ------------------
  |  Branch (379:9): [True: 10.9k, False: 0]
  ------------------
  380|  10.9k|        *written = local_written;
  381|  10.9k|    return ret;
  382|  10.9k|}

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

BIO_snprintf:
  142|   922k|{
  143|   922k|    va_list args;
  144|   922k|    int ret;
  145|       |
  146|   922k|    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|   922k|    ret = vsnprintf(buf, n, format, args);
  152|   922k|    if ((size_t)ret >= n)
  ------------------
  |  Branch (152:9): [True: 0, False: 922k]
  ------------------
  153|      0|        ret = -1;
  154|   922k|#endif
  155|   922k|    va_end(args);
  156|       |
  157|   922k|    return ret;
  158|   922k|}
BIO_vsnprintf:
  161|  93.7k|{
  162|  93.7k|    int ret;
  163|       |
  164|       |#if defined(_MSC_VER) && _MSC_VER < 1900
  165|       |    ret = _vsnprintf_s(buf, n, _TRUNCATE, format, args);
  166|       |#else
  167|  93.7k|    ret = vsnprintf(buf, n, format, args);
  168|  93.7k|    if ((size_t)ret >= n)
  ------------------
  |  Branch (168:9): [True: 1.21k, False: 92.5k]
  ------------------
  169|  1.21k|        ret = -1;
  170|  93.7k|#endif
  171|  93.7k|    return ret;
  172|  93.7k|}

ossl_bio_core_globals_free:
   26|    768|{
   27|    768|    OPENSSL_free(vbcg);
  ------------------
  |  |  132|    768|    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|    768|}
ossl_bio_core_globals_new:
   31|    769|{
   32|    769|    return OPENSSL_zalloc(sizeof(BIO_CORE_GLOBALS));
  ------------------
  |  |  109|    769|    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|    769|}

BIO_new_file:
   58|  4.84k|{
   59|  4.84k|    BIO *ret;
   60|  4.84k|    FILE *file;
   61|  4.84k|    int fp_flags = BIO_CLOSE;
  ------------------
  |  |   85|  4.84k|#define BIO_CLOSE 0x01
  ------------------
   62|       |
   63|  4.84k|    if (strchr(mode, 'b') == NULL)
  ------------------
  |  Branch (63:9): [True: 4.08k, False: 769]
  ------------------
   64|  4.08k|        fp_flags |= BIO_FP_TEXT;
  ------------------
  |  |  220|  4.08k|#define BIO_FP_TEXT 0x10
  ------------------
   65|       |
   66|  4.84k|    if (filename == NULL) {
  ------------------
  |  Branch (66:9): [True: 0, False: 4.84k]
  ------------------
   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|  4.84k|    file = openssl_fopen(filename, mode);
   72|  4.84k|    if (file == NULL) {
  ------------------
  |  Branch (72:9): [True: 1.04k, False: 3.80k]
  ------------------
   73|  1.04k|        ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  359|  1.04k|    (ERR_new(),                                                  \
  |  |  360|  1.04k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       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.04k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  1.04k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   55|  1.04k|#define ERR_LIB_SYS 2
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|  1.04k|#define get_last_sys_error() errno
  ------------------
   74|  1.04k|            "calling fopen(%s, %s)",
   75|  1.04k|            filename, mode);
   76|  1.04k|        if (errno == ENOENT
  ------------------
  |  Branch (76:13): [True: 1.04k, False: 7]
  ------------------
   77|      7|#ifdef ENXIO
   78|  1.04k|            || errno == ENXIO
  ------------------
  |  Branch (78:16): [True: 0, False: 7]
  ------------------
   79|  1.04k|#endif
   80|  1.04k|        )
   81|  1.04k|            ERR_raise(ERR_LIB_BIO, BIO_R_NO_SUCH_FILE);
  ------------------
  |  |  357|  1.04k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  1.04k|    (ERR_new(),                                                  \
  |  |  |  |  360|  1.04k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       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.04k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  1.04k|        ERR_set_error)
  |  |  ------------------
  ------------------
   82|      7|        else
   83|  1.04k|            ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
  ------------------
  |  |  357|      7|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      7|    (ERR_new(),                                                  \
  |  |  |  |  360|      7|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      7|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      7|        ERR_set_error)
  |  |  ------------------
  ------------------
   84|  1.04k|        return NULL;
   85|  1.04k|    }
   86|  3.80k|    if ((ret = BIO_new(BIO_s_file())) == NULL) {
  ------------------
  |  Branch (86:9): [True: 0, False: 3.80k]
  ------------------
   87|      0|        fclose(file);
   88|      0|        return NULL;
   89|      0|    }
   90|       |
   91|       |    /* we did fopen -> we disengage UPLINK */
   92|  3.80k|    BIO_clear_flags(ret, BIO_FLAGS_UPLINK_INTERNAL);
  ------------------
  |  |   18|  3.80k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
   93|  3.80k|    BIO_set_fp(ret, file, fp_flags);
  ------------------
  |  |  578|  3.80k|#define BIO_set_fp(b, fp, c) BIO_ctrl(b, BIO_C_SET_FILE_PTR, c, (char *)(fp))
  |  |  ------------------
  |  |  |  |  449|  3.80k|#define BIO_C_SET_FILE_PTR 106
  |  |  ------------------
  ------------------
   94|  3.80k|    return ret;
   95|  3.80k|}
BIO_s_file:
  111|  7.19k|{
  112|  7.19k|    return &methods_filep;
  113|  7.19k|}
bss_file.c:file_gets:
  378|  11.3M|{
  379|  11.3M|    int ret = 0;
  380|       |
  381|  11.3M|    buf[0] = '\0';
  382|  11.3M|    if (bp->flags & BIO_FLAGS_UPLINK_INTERNAL) {
  ------------------
  |  |   18|  11.3M|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (382:9): [True: 0, False: 11.3M]
  ------------------
  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|  11.3M|    } else {
  386|  11.3M|        if (!fgets(buf, size, (FILE *)bp->ptr))
  ------------------
  |  Branch (386:13): [True: 7.17k, False: 11.3M]
  ------------------
  387|  7.17k|            goto err;
  388|  11.3M|    }
  389|  11.3M|    if (buf[0] != '\0')
  ------------------
  |  Branch (389:9): [True: 11.3M, False: 0]
  ------------------
  390|  11.3M|        ret = (int)strlen(buf);
  391|  11.3M|err:
  392|  11.3M|    return ret;
  393|  11.3M|}
bss_file.c:file_ctrl:
  186|  7.19k|{
  187|  7.19k|    long ret = 1;
  188|  7.19k|    FILE *fp = (FILE *)b->ptr;
  189|  7.19k|    FILE **fpp;
  190|  7.19k|    char p[4];
  191|  7.19k|    int st;
  192|       |
  193|  7.19k|    switch (cmd) {
  194|      0|    case BIO_C_FILE_SEEK:
  ------------------
  |  |  471|      0|#define BIO_C_FILE_SEEK 128
  ------------------
  |  Branch (194:5): [True: 0, False: 7.19k]
  ------------------
  195|      0|    case BIO_CTRL_RESET:
  ------------------
  |  |   90|      0|#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */
  ------------------
  |  Branch (195:5): [True: 0, False: 7.19k]
  ------------------
  196|      0|        if (b->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (196:13): [True: 0, False: 0]
  ------------------
  197|      0|            ret = (long)UP_fseek(b->ptr, num, 0);
  ------------------
  |  |  160|      0|#define UP_fseek fseek
  ------------------
  198|      0|        else
  199|      0|            ret = (long)fseek(fp, num, 0);
  200|      0|        break;
  201|      0|    case BIO_CTRL_EOF:
  ------------------
  |  |   91|      0|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  |  Branch (201:5): [True: 0, False: 7.19k]
  ------------------
  202|       |        /*
  203|       |         * NOTE feof returns 0 if we're not in an eof condition
  204|       |         * and a non-zero value if we are (i.e. any non-zero value
  205|       |         * so we map the 0:non-0 return value here to 0:1 with a
  206|       |         * double negation
  207|       |         */
  208|      0|        if (b->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (208:13): [True: 0, False: 0]
  ------------------
  209|      0|            ret = !!(long)UP_feof(fp);
  ------------------
  |  |  156|      0|#define UP_feof feof
  ------------------
  210|      0|        else
  211|      0|            ret = !!(long)feof(fp);
  212|       |#if defined(OPENSSL_SYS_WINDOWS)
  213|       |        /*
  214|       |         * Windows gives us an extra issue to contend with.
  215|       |         * In windows feof may return 0 if it is passed an invalid
  216|       |         * stream.  In this event, feof sets errno to EINVAL.
  217|       |         * Check for that here, and set ret to -EINVAL if its the case.
  218|       |         */
  219|       |        if (ret == 0 && errno == EINVAL)
  220|       |            ret = -EINVAL;
  221|       |#endif
  222|      0|        break;
  223|      0|    case BIO_C_FILE_TELL:
  ------------------
  |  |  477|      0|#define BIO_C_FILE_TELL 133
  ------------------
  |  Branch (223:5): [True: 0, False: 7.19k]
  ------------------
  224|      0|    case BIO_CTRL_INFO:
  ------------------
  |  |   92|      0|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  ------------------
  |  Branch (224:5): [True: 0, False: 7.19k]
  ------------------
  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|  3.80k|    case BIO_C_SET_FILE_PTR:
  ------------------
  |  |  449|  3.80k|#define BIO_C_SET_FILE_PTR 106
  ------------------
  |  Branch (241:5): [True: 3.80k, False: 3.39k]
  ------------------
  242|  3.80k|        file_free(b);
  243|  3.80k|        b->shutdown = (int)num & BIO_CLOSE;
  ------------------
  |  |   85|  3.80k|#define BIO_CLOSE 0x01
  ------------------
  244|  3.80k|        b->ptr = ptr;
  245|  3.80k|        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|  3.80k|        {
  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|  3.80k|        }
  290|  3.80k|        break;
  291|  3.39k|    case BIO_C_SET_FILENAME:
  ------------------
  |  |  451|  3.39k|#define BIO_C_SET_FILENAME 108
  ------------------
  |  Branch (291:5): [True: 3.39k, False: 3.80k]
  ------------------
  292|  3.39k|        file_free(b);
  293|  3.39k|        b->shutdown = (int)num & BIO_CLOSE;
  ------------------
  |  |   85|  3.39k|#define BIO_CLOSE 0x01
  ------------------
  294|  3.39k|        if (num & BIO_FP_APPEND) {
  ------------------
  |  |  219|  3.39k|#define BIO_FP_APPEND 0x08
  ------------------
  |  Branch (294:13): [True: 0, False: 3.39k]
  ------------------
  295|      0|            if (num & BIO_FP_READ)
  ------------------
  |  |  217|      0|#define BIO_FP_READ 0x02
  ------------------
  |  Branch (295:17): [True: 0, False: 0]
  ------------------
  296|      0|                OPENSSL_strlcpy(p, "a+", sizeof(p));
  297|      0|            else
  298|      0|                OPENSSL_strlcpy(p, "a", sizeof(p));
  299|  3.39k|        } else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE))
  ------------------
  |  |  217|  3.39k|#define BIO_FP_READ 0x02
  ------------------
                      } else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE))
  ------------------
  |  |  218|  3.39k|#define BIO_FP_WRITE 0x04
  ------------------
  |  Branch (299:20): [True: 3.39k, False: 0]
  |  Branch (299:43): [True: 0, False: 3.39k]
  ------------------
  300|      0|            OPENSSL_strlcpy(p, "r+", sizeof(p));
  301|  3.39k|        else if (num & BIO_FP_WRITE)
  ------------------
  |  |  218|  3.39k|#define BIO_FP_WRITE 0x04
  ------------------
  |  Branch (301:18): [True: 0, False: 3.39k]
  ------------------
  302|      0|            OPENSSL_strlcpy(p, "w", sizeof(p));
  303|  3.39k|        else if (num & BIO_FP_READ)
  ------------------
  |  |  217|  3.39k|#define BIO_FP_READ 0x02
  ------------------
  |  Branch (303:18): [True: 3.39k, False: 0]
  ------------------
  304|  3.39k|            OPENSSL_strlcpy(p, "r", sizeof(p));
  305|      0|        else {
  306|      0|            ERR_raise(ERR_LIB_BIO, BIO_R_BAD_FOPEN_MODE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  307|      0|            ret = 0;
  308|      0|            break;
  309|      0|        }
  310|       |#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS)
  311|       |        if (!(num & BIO_FP_TEXT))
  312|       |            OPENSSL_strlcat(p, "b", sizeof(p));
  313|       |        else
  314|       |            OPENSSL_strlcat(p, "t", sizeof(p));
  315|       |#elif defined(OPENSSL_SYS_WIN32_CYGWIN)
  316|       |        if (!(num & BIO_FP_TEXT))
  317|       |            OPENSSL_strlcat(p, "b", sizeof(p));
  318|       |#endif
  319|  3.39k|        if (ptr == NULL) {
  ------------------
  |  Branch (319:13): [True: 0, False: 3.39k]
  ------------------
  320|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  321|      0|            ret = 0;
  322|      0|            break;
  323|      0|        }
  324|  3.39k|        fp = openssl_fopen(ptr, p);
  325|  3.39k|        if (fp == NULL) {
  ------------------
  |  Branch (325:13): [True: 13, False: 3.37k]
  ------------------
  326|     13|            ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  359|     13|    (ERR_new(),                                                  \
  |  |  360|     13|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     13|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     13|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   55|     13|#define ERR_LIB_SYS 2
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|     13|#define get_last_sys_error() errno
  ------------------
  327|     13|                "calling fopen(%s, %s)",
  328|     13|                (const char *)ptr, p);
  329|     13|            ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
  ------------------
  |  |  357|     13|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|     13|    (ERR_new(),                                                  \
  |  |  |  |  360|     13|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     13|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|     13|        ERR_set_error)
  |  |  ------------------
  ------------------
  330|     13|            ret = 0;
  331|     13|            break;
  332|     13|        }
  333|  3.37k|        b->ptr = fp;
  334|  3.37k|        b->init = 1;
  335|       |        /* we did fopen -> we disengage UPLINK */
  336|  3.37k|        BIO_clear_flags(b, BIO_FLAGS_UPLINK_INTERNAL);
  ------------------
  |  |   18|  3.37k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  337|  3.37k|        break;
  338|      0|    case BIO_C_GET_FILE_PTR:
  ------------------
  |  |  450|      0|#define BIO_C_GET_FILE_PTR 107
  ------------------
  |  Branch (338:5): [True: 0, False: 7.19k]
  ------------------
  339|       |        /* the ptr parameter is actually a FILE ** in this case. */
  340|      0|        if (ptr != NULL) {
  ------------------
  |  Branch (340:13): [True: 0, False: 0]
  ------------------
  341|      0|            fpp = (FILE **)ptr;
  342|      0|            *fpp = (FILE *)b->ptr;
  343|      0|        }
  344|      0|        break;
  345|      0|    case BIO_CTRL_GET_CLOSE:
  ------------------
  |  |   97|      0|#define BIO_CTRL_GET_CLOSE 8 /* man - set the 'close' on free */
  ------------------
  |  Branch (345:5): [True: 0, False: 7.19k]
  ------------------
  346|      0|        ret = (long)b->shutdown;
  347|      0|        break;
  348|      0|    case BIO_CTRL_SET_CLOSE:
  ------------------
  |  |   98|      0|#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
  ------------------
  |  Branch (348:5): [True: 0, False: 7.19k]
  ------------------
  349|      0|        b->shutdown = (int)num;
  350|      0|        break;
  351|      0|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|      0|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (351:5): [True: 0, False: 7.19k]
  ------------------
  352|      0|        st = b->flags & BIO_FLAGS_UPLINK_INTERNAL
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (352:14): [True: 0, False: 0]
  ------------------
  353|      0|            ? UP_fflush(b->ptr)
  ------------------
  |  |  162|      0|#define UP_fflush fflush
  ------------------
  354|      0|            : fflush((FILE *)b->ptr);
  355|      0|        if (st == EOF) {
  ------------------
  |  Branch (355:13): [True: 0, False: 0]
  ------------------
  356|      0|            ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   55|      0|#define ERR_LIB_SYS 2
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      0|#define get_last_sys_error() errno
  ------------------
  357|      0|                "calling fflush()");
  358|      0|            ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  359|      0|            ret = 0;
  360|      0|        }
  361|      0|        break;
  362|      0|    case BIO_CTRL_DUP:
  ------------------
  |  |  101|      0|#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
  ------------------
  |  Branch (362:5): [True: 0, False: 7.19k]
  ------------------
  363|      0|        ret = 1;
  364|      0|        break;
  365|       |
  366|      0|    case BIO_CTRL_WPENDING:
  ------------------
  |  |  102|      0|#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
  ------------------
  |  Branch (366:5): [True: 0, False: 7.19k]
  ------------------
  367|      0|    case BIO_CTRL_PENDING:
  ------------------
  |  |   99|      0|#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
  ------------------
  |  Branch (367:5): [True: 0, False: 7.19k]
  ------------------
  368|      0|    case BIO_CTRL_PUSH:
  ------------------
  |  |   95|      0|#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
  ------------------
  |  Branch (368:5): [True: 0, False: 7.19k]
  ------------------
  369|      0|    case BIO_CTRL_POP:
  ------------------
  |  |   96|      0|#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
  ------------------
  |  Branch (369:5): [True: 0, False: 7.19k]
  ------------------
  370|      0|    default:
  ------------------
  |  Branch (370:5): [True: 0, False: 7.19k]
  ------------------
  371|      0|        ret = 0;
  372|      0|        break;
  373|  7.19k|    }
  374|  7.19k|    return ret;
  375|  7.19k|}
bss_file.c:file_new:
  116|  7.19k|{
  117|  7.19k|    bi->init = 0;
  118|  7.19k|    bi->num = 0;
  119|  7.19k|    bi->ptr = NULL;
  120|  7.19k|    bi->flags = BIO_FLAGS_UPLINK_INTERNAL; /* default to UPLINK */
  ------------------
  |  |   18|  7.19k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  121|  7.19k|    return 1;
  122|  7.19k|}
bss_file.c:file_free:
  125|  14.3k|{
  126|  14.3k|    if (a == NULL)
  ------------------
  |  Branch (126:9): [True: 0, False: 14.3k]
  ------------------
  127|      0|        return 0;
  128|  14.3k|    if (a->shutdown) {
  ------------------
  |  Branch (128:9): [True: 14.3k, False: 0]
  ------------------
  129|  14.3k|        if ((a->init) && (a->ptr != NULL)) {
  ------------------
  |  Branch (129:13): [True: 7.17k, False: 7.20k]
  |  Branch (129:26): [True: 7.17k, False: 0]
  ------------------
  130|  7.17k|            if (a->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|  7.17k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (130:17): [True: 0, False: 7.17k]
  ------------------
  131|      0|                UP_fclose(a->ptr);
  ------------------
  |  |  157|      0|#define UP_fclose fclose
  ------------------
  132|  7.17k|            else
  133|  7.17k|                fclose(a->ptr);
  134|  7.17k|            a->ptr = NULL;
  135|  7.17k|            a->flags = BIO_FLAGS_UPLINK_INTERNAL;
  ------------------
  |  |   18|  7.17k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  136|  7.17k|        }
  137|  14.3k|        a->init = 0;
  138|  14.3k|    }
  139|  14.3k|    return 1;
  140|  14.3k|}

BIO_s_mem:
   73|  1.39M|{
   74|  1.39M|    return &mem_method;
   75|  1.39M|}
BIO_new_mem_buf:
   83|   916k|{
   84|   916k|    BIO *ret;
   85|   916k|    BUF_MEM *b;
   86|   916k|    BIO_BUF_MEM *bb;
   87|   916k|    size_t sz;
   88|       |
   89|   916k|    if (buf == NULL) {
  ------------------
  |  Branch (89:9): [True: 0, False: 916k]
  ------------------
   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|   916k|    sz = (len < 0) ? strlen(buf) : (size_t)len;
  ------------------
  |  Branch (93:10): [True: 0, False: 916k]
  ------------------
   94|   916k|    if ((ret = BIO_new(BIO_s_mem())) == NULL)
  ------------------
  |  Branch (94:9): [True: 0, False: 916k]
  ------------------
   95|      0|        return NULL;
   96|   916k|    bb = (BIO_BUF_MEM *)ret->ptr;
   97|   916k|    b = bb->buf;
   98|       |    /* Cast away const and trust in the MEM_RDONLY flag. */
   99|   916k|    b->data = (void *)buf;
  100|   916k|    b->length = sz;
  101|   916k|    b->max = sz;
  102|   916k|    *bb->readp = *bb->buf;
  103|   916k|    ret->flags |= BIO_FLAGS_MEM_RDONLY;
  ------------------
  |  |  250|   916k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  104|       |    /* Since this is static data retrying won't help */
  105|   916k|    ret->num = 0;
  106|   916k|    return ret;
  107|   916k|}
bss_mem.c:mem_write:
  216|  10.4M|{
  217|  10.4M|    int ret = -1;
  218|  10.4M|    size_t blen;
  219|  10.4M|    BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  220|       |
  221|  10.4M|    if (b->flags & BIO_FLAGS_MEM_RDONLY) {
  ------------------
  |  |  250|  10.4M|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (221:9): [True: 0, False: 10.4M]
  ------------------
  222|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_WRITE_TO_READ_ONLY_BIO);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  223|      0|        goto end;
  224|      0|    }
  225|  10.4M|    BIO_clear_retry_flags(b);
  ------------------
  |  |  272|  10.4M|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  10.4M|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  10.4M|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  10.4M|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  10.4M|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  10.4M|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  226|  10.4M|    if (inl <= 0)
  ------------------
  |  Branch (226:9): [True: 0, False: 10.4M]
  ------------------
  227|      0|        return 0;
  228|  10.4M|    if (in == NULL) {
  ------------------
  |  Branch (228:9): [True: 0, False: 10.4M]
  ------------------
  229|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  230|      0|        goto end;
  231|      0|    }
  232|  10.4M|    blen = bbm->readp->length;
  233|  10.4M|    mem_buf_sync(b);
  234|  10.4M|    if (BUF_MEM_grow_clean(bbm->buf, blen + inl) == 0)
  ------------------
  |  Branch (234:9): [True: 0, False: 10.4M]
  ------------------
  235|      0|        goto end;
  236|  10.4M|    memcpy(bbm->buf->data + blen, in, inl);
  237|  10.4M|    *bbm->readp = *bbm->buf;
  238|  10.4M|    ret = inl;
  239|  10.4M|end:
  240|  10.4M|    return ret;
  241|  10.4M|}
bss_mem.c:mem_buf_sync:
  179|  10.9M|{
  180|  10.9M|    if (b != NULL && b->init != 0 && b->ptr != NULL) {
  ------------------
  |  Branch (180:9): [True: 10.9M, False: 0]
  |  Branch (180:22): [True: 10.9M, False: 0]
  |  Branch (180:38): [True: 10.9M, False: 0]
  ------------------
  181|  10.9M|        BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  182|       |
  183|  10.9M|        if (bbm->readp->data != bbm->buf->data) {
  ------------------
  |  Branch (183:13): [True: 0, False: 10.9M]
  ------------------
  184|      0|            memmove(bbm->buf->data, bbm->readp->data, bbm->readp->length);
  185|      0|            bbm->buf->length = bbm->readp->length;
  186|      0|            bbm->readp->data = bbm->buf->data;
  187|      0|        }
  188|  10.9M|    }
  189|  10.9M|    return 0;
  190|  10.9M|}
bss_mem.c:mem_read:
  193|  2.92M|{
  194|  2.92M|    int ret = -1;
  195|  2.92M|    BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  196|  2.92M|    BUF_MEM *bm = bbm->readp;
  197|       |
  198|  2.92M|    if (b->flags & BIO_FLAGS_MEM_RDONLY)
  ------------------
  |  |  250|  2.92M|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (198:9): [True: 2.46M, False: 458k]
  ------------------
  199|  2.46M|        bm = bbm->buf;
  200|  2.92M|    BIO_clear_retry_flags(b);
  ------------------
  |  |  272|  2.92M|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  2.92M|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  2.92M|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  2.92M|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  2.92M|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  2.92M|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  201|  2.92M|    ret = (outl >= 0 && (size_t)outl > bm->length) ? (int)bm->length : outl;
  ------------------
  |  Branch (201:12): [True: 2.92M, False: 0]
  |  Branch (201:25): [True: 0, False: 2.92M]
  ------------------
  202|  2.92M|    if ((out != NULL) && (ret > 0)) {
  ------------------
  |  Branch (202:9): [True: 2.92M, False: 0]
  |  Branch (202:26): [True: 2.92M, False: 0]
  ------------------
  203|  2.92M|        memcpy(out, bm->data, ret);
  204|  2.92M|        bm->length -= ret;
  205|  2.92M|        bm->max -= ret;
  206|  2.92M|        bm->data += ret;
  207|  2.92M|    } 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.92M|    return ret;
  213|  2.92M|}
bss_mem.c:mem_puts:
  387|  10.4M|{
  388|  10.4M|    int ret;
  389|  10.4M|    size_t n = strlen(str);
  390|       |
  391|  10.4M|    if (n > INT_MAX)
  ------------------
  |  Branch (391:9): [True: 0, False: 10.4M]
  ------------------
  392|      0|        return -1;
  393|  10.4M|    ret = mem_write(bp, str, (int)n);
  394|       |    /* memory semantics is that it will always work */
  395|  10.4M|    return ret;
  396|  10.4M|}
bss_mem.c:mem_ctrl:
  244|  4.58M|{
  245|  4.58M|    long ret = 1;
  246|  4.58M|    char **pptr;
  247|  4.58M|    BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  248|  4.58M|    BUF_MEM *bm, *bo; /* bio_mem, bio_other */
  249|  4.58M|    ossl_ssize_t off, remain;
  250|       |
  251|  4.58M|    if (b->flags & BIO_FLAGS_MEM_RDONLY) {
  ------------------
  |  |  250|  4.58M|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (251:9): [True: 3.66M, False: 919k]
  ------------------
  252|  3.66M|        bm = bbm->buf;
  253|  3.66M|        bo = bbm->readp;
  254|  3.66M|    } else {
  255|   919k|        bm = bbm->readp;
  256|   919k|        bo = bbm->buf;
  257|   919k|    }
  258|  4.58M|    off = (bm->data == bo->data) ? 0 : bm->data - bo->data;
  ------------------
  |  Branch (258:11): [True: 4.12M, False: 458k]
  ------------------
  259|  4.58M|    remain = bm->length;
  260|       |
  261|  4.58M|    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: 4.58M]
  ------------------
  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|   916k|    case BIO_C_FILE_SEEK:
  ------------------
  |  |  471|   916k|#define BIO_C_FILE_SEEK 128
  ------------------
  |  Branch (277:5): [True: 916k, False: 3.66M]
  ------------------
  278|   916k|        if (num < 0 || num > off + remain)
  ------------------
  |  Branch (278:13): [True: 0, False: 916k]
  |  Branch (278:24): [True: 0, False: 916k]
  ------------------
  279|      0|            return -1; /* Can't see outside of the current buffer */
  280|       |
  281|   916k|        bm->data = (num != 0) ? bo->data + num : bo->data;
  ------------------
  |  Branch (281:20): [True: 0, False: 916k]
  ------------------
  282|   916k|        bm->length = bo->length - num;
  283|   916k|        bm->max = bo->max - num;
  284|   916k|        off = (ossl_ssize_t)num;
  285|       |        /* FALLTHRU */
  286|  3.20M|    case BIO_C_FILE_TELL:
  ------------------
  |  |  477|  3.20M|#define BIO_C_FILE_TELL 133
  ------------------
  |  Branch (286:5): [True: 2.29M, False: 2.29M]
  ------------------
  287|  3.20M|        ret = (long)off;
  288|  3.20M|        if (off > LONG_MAX)
  ------------------
  |  Branch (288:13): [True: 0, False: 3.20M]
  ------------------
  289|      0|            ret = -1;
  290|  3.20M|        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: 4.58M]
  ------------------
  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: 4.58M]
  ------------------
  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|   916k|    case BIO_CTRL_INFO:
  ------------------
  |  |   92|   916k|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  ------------------
  |  Branch (301:5): [True: 916k, False: 3.66M]
  ------------------
  302|   916k|        ret = (long)bm->length;
  303|   916k|        if (ptr != NULL) {
  ------------------
  |  Branch (303:13): [True: 458k, False: 458k]
  ------------------
  304|   458k|            pptr = (char **)ptr;
  305|   458k|            *pptr = (char *)(bm->data);
  306|   458k|        }
  307|   916k|        break;
  308|      0|    case BIO_C_SET_BUF_MEM:
  ------------------
  |  |  457|      0|#define BIO_C_SET_BUF_MEM 114
  ------------------
  |  Branch (308:5): [True: 0, False: 4.58M]
  ------------------
  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|   458k|    case BIO_C_GET_BUF_MEM_PTR:
  ------------------
  |  |  458|   458k|#define BIO_C_GET_BUF_MEM_PTR 115
  ------------------
  |  Branch (314:5): [True: 458k, False: 4.12M]
  ------------------
  315|   458k|        if (ptr != NULL) {
  ------------------
  |  Branch (315:13): [True: 458k, False: 0]
  ------------------
  316|   458k|            if (!(b->flags & BIO_FLAGS_MEM_RDONLY))
  ------------------
  |  |  250|   458k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (316:17): [True: 458k, False: 0]
  ------------------
  317|   458k|                mem_buf_sync(b);
  318|   458k|            bm = bbm->buf;
  319|   458k|            pptr = (char **)ptr;
  320|   458k|            *pptr = (char *)bm;
  321|   458k|        }
  322|   458k|        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: 4.58M]
  ------------------
  324|      0|        ret = (long)b->shutdown;
  325|      0|        break;
  326|  2.32k|    case BIO_CTRL_SET_CLOSE:
  ------------------
  |  |   98|  2.32k|#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
  ------------------
  |  Branch (326:5): [True: 2.32k, False: 4.58M]
  ------------------
  327|  2.32k|        b->shutdown = (int)num;
  328|  2.32k|        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: 4.58M]
  ------------------
  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: 4.58M]
  ------------------
  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: 4.58M]
  ------------------
  336|      0|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|      0|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (336:5): [True: 0, False: 4.58M]
  ------------------
  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: 4.58M]
  ------------------
  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: 4.58M]
  ------------------
  341|      0|    default:
  ------------------
  |  Branch (341:5): [True: 0, False: 4.58M]
  ------------------
  342|      0|        ret = 0;
  343|      0|        break;
  344|  4.58M|    }
  345|  4.58M|    return ret;
  346|  4.58M|}
bss_mem.c:mem_buf_free:
  159|  1.85M|{
  160|  1.85M|    if (a == NULL)
  ------------------
  |  Branch (160:9): [True: 0, False: 1.85M]
  ------------------
  161|      0|        return 0;
  162|       |
  163|  1.85M|    if (a->shutdown && a->init && a->ptr != NULL) {
  ------------------
  |  Branch (163:9): [True: 1.85M, False: 0]
  |  Branch (163:24): [True: 1.85M, False: 0]
  |  Branch (163:35): [True: 1.85M, False: 0]
  ------------------
  164|  1.85M|        BIO_BUF_MEM *bb = (BIO_BUF_MEM *)a->ptr;
  165|  1.85M|        BUF_MEM *b = bb->buf;
  166|       |
  167|  1.85M|        if (a->flags & BIO_FLAGS_MEM_RDONLY)
  ------------------
  |  |  250|  1.85M|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (167:13): [True: 916k, False: 940k]
  ------------------
  168|   916k|            b->data = NULL;
  169|  1.85M|        BUF_MEM_free(b);
  170|  1.85M|    }
  171|  1.85M|    return 1;
  172|  1.85M|}
bss_mem.c:mem_new:
  134|  1.85M|{
  135|  1.85M|    return mem_init(bi, 0L);
  136|  1.85M|}
bss_mem.c:mem_init:
  110|  1.85M|{
  111|  1.85M|    BIO_BUF_MEM *bb = OPENSSL_zalloc(sizeof(*bb));
  ------------------
  |  |  109|  1.85M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|       |
  113|  1.85M|    if (bb == NULL)
  ------------------
  |  Branch (113:9): [True: 0, False: 1.85M]
  ------------------
  114|      0|        return 0;
  115|  1.85M|    if ((bb->buf = BUF_MEM_new_ex(flags)) == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 1.85M]
  ------------------
  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.85M|    if ((bb->readp = OPENSSL_zalloc(sizeof(*bb->readp))) == NULL) {
  ------------------
  |  |  109|  1.85M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (119:9): [True: 0, False: 1.85M]
  ------------------
  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.85M|    *bb->readp = *bb->buf;
  125|  1.85M|    bi->shutdown = 1;
  126|  1.85M|    bi->init = 1;
  127|  1.85M|    bi->num = -1;
  128|  1.85M|    bi->flags |= BIO_FLAGS_MEM_LEGACY_EOF;
  ------------------
  |  |   55|  1.85M|#define BIO_FLAGS_MEM_LEGACY_EOF 0x1000
  ------------------
  129|  1.85M|    bi->ptr = (char *)bb;
  130|  1.85M|    return 1;
  131|  1.85M|}
bss_mem.c:mem_free:
  144|  1.85M|{
  145|  1.85M|    BIO_BUF_MEM *bb;
  146|       |
  147|  1.85M|    if (a == NULL)
  ------------------
  |  Branch (147:9): [True: 0, False: 1.85M]
  ------------------
  148|      0|        return 0;
  149|       |
  150|  1.85M|    bb = (BIO_BUF_MEM *)a->ptr;
  151|  1.85M|    if (!mem_buf_free(a))
  ------------------
  |  Branch (151:9): [True: 0, False: 1.85M]
  ------------------
  152|      0|        return 0;
  153|  1.85M|    OPENSSL_free(bb->readp);
  ------------------
  |  |  132|  1.85M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|  1.85M|    OPENSSL_free(bb);
  ------------------
  |  |  132|  1.85M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  155|  1.85M|    return 1;
  156|  1.85M|}

ossl_core_bio_up_ref:
   35|   916k|{
   36|   916k|    int ref = 0;
   37|       |
   38|   916k|    return CRYPTO_UP_REF(&cb->ref_cnt, &ref);
   39|   916k|}
ossl_core_bio_free:
   42|  2.29M|{
   43|  2.29M|    int ref = 0, res = 1;
   44|       |
   45|  2.29M|    if (cb != NULL) {
  ------------------
  |  Branch (45:9): [True: 1.83M, False: 458k]
  ------------------
   46|  1.83M|        CRYPTO_DOWN_REF(&cb->ref_cnt, &ref);
   47|  1.83M|        if (ref <= 0) {
  ------------------
  |  Branch (47:13): [True: 916k, False: 916k]
  ------------------
   48|   916k|            res = BIO_free(cb->bio);
   49|   916k|            CRYPTO_FREE_REF(&cb->ref_cnt);
   50|   916k|            OPENSSL_free(cb);
  ------------------
  |  |  132|   916k|    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|   916k|        }
   52|  1.83M|    }
   53|  2.29M|    return res;
   54|  2.29M|}
ossl_core_bio_new_from_bio:
   57|   916k|{
   58|   916k|    OSSL_CORE_BIO *cb = core_bio_new();
   59|       |
   60|   916k|    if (cb == NULL || !BIO_up_ref(bio)) {
  ------------------
  |  Branch (60:9): [True: 0, False: 916k]
  |  Branch (60:23): [True: 0, False: 916k]
  ------------------
   61|      0|        ossl_core_bio_free(cb);
   62|      0|        return NULL;
   63|      0|    }
   64|   916k|    cb->bio = bio;
   65|   916k|    return cb;
   66|   916k|}
ossl_core_bio_read_ex:
   94|  2.46M|{
   95|  2.46M|    return BIO_read_ex(cb->bio, data, dlen, readbytes);
   96|  2.46M|}
ossl_core_bio.c:core_bio_new:
   24|   916k|{
   25|   916k|    OSSL_CORE_BIO *cb = OPENSSL_malloc(sizeof(*cb));
  ------------------
  |  |  107|   916k|    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|   916k|    if (cb == NULL || !CRYPTO_NEW_REF(&cb->ref_cnt, 1)) {
  ------------------
  |  Branch (27:9): [True: 0, False: 916k]
  |  Branch (27:23): [True: 0, False: 916k]
  ------------------
   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|   916k|    return cb;
   32|   916k|}

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

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

BN_CTX_new_ex:
  123|   740k|{
  124|   740k|    BN_CTX *ret;
  125|       |
  126|   740k|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  109|   740k|    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: 740k]
  ------------------
  127|      0|        return NULL;
  128|       |    /* Initialise the structure */
  129|   740k|    BN_POOL_init(&ret->pool);
  130|   740k|    BN_STACK_init(&ret->stack);
  131|   740k|    ret->libctx = ctx;
  132|   740k|    return ret;
  133|   740k|}
BN_CTX_secure_new_ex:
  143|    243|{
  144|    243|    BN_CTX *ret = BN_CTX_new_ex(ctx);
  145|       |
  146|    243|    if (ret != NULL)
  ------------------
  |  Branch (146:9): [True: 243, False: 0]
  ------------------
  147|    243|        ret->flags = BN_FLG_SECURE;
  ------------------
  |  |   68|    243|#define BN_FLG_SECURE 0x08
  ------------------
  148|    243|    return ret;
  149|    243|}
BN_CTX_free:
  159|  2.57M|{
  160|  2.57M|    if (ctx == NULL)
  ------------------
  |  Branch (160:9): [True: 1.83M, False: 740k]
  ------------------
  161|  1.83M|        return;
  162|   740k|#ifndef FIPS_MODULE
  163|   740k|    OSSL_TRACE_BEGIN(BN_CTX)
  ------------------
  |  |  219|   740k|    do {                           \
  |  |  220|   740k|        BIO *trc_out = NULL;       \
  |  |  221|   740k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 740k]
  |  |  ------------------
  ------------------
  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|   740k|    OSSL_TRACE_END(BN_CTX);
  ------------------
  |  |  224|   740k|    }                            \
  |  |  225|   740k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 740k]
  |  |  ------------------
  ------------------
  179|   740k|#endif
  180|   740k|    BN_STACK_finish(&ctx->stack);
  181|   740k|    BN_POOL_finish(&ctx->pool);
  182|   740k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   740k|    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|   740k|}
BN_CTX_start:
  186|  3.76M|{
  187|  3.76M|    CTXDBG("ENTER BN_CTX_start()", ctx);
  ------------------
  |  |  110|  3.76M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  219|  3.76M|    do {                           \
  |  |  |  |  220|  3.76M|        BIO *trc_out = NULL;       \
  |  |  |  |  221|  3.76M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded, False: 3.76M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  3.76M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  3.76M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  3.76M|    }                            \
  |  |  |  |  225|  3.76M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:12): [Folded, False: 3.76M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  188|       |    /* If we're already overflowing ... */
  189|  3.76M|    if (ctx->err_stack || ctx->too_many)
  ------------------
  |  Branch (189:9): [True: 0, False: 3.76M]
  |  Branch (189:27): [True: 0, False: 3.76M]
  ------------------
  190|      0|        ctx->err_stack++;
  191|       |    /* (Try to) get a new frame pointer */
  192|  3.76M|    else if (!BN_STACK_push(&ctx->stack, ctx->used)) {
  ------------------
  |  Branch (192:14): [True: 0, False: 3.76M]
  ------------------
  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|  3.76M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  219|  3.76M|    do {                           \
  |  |  |  |  220|  3.76M|        BIO *trc_out = NULL;       \
  |  |  |  |  221|  3.76M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded, False: 3.76M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  3.76M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  3.76M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  3.76M|    }                            \
  |  |  |  |  225|  3.76M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:12): [Folded, False: 3.76M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  197|  3.76M|}
BN_CTX_end:
  200|  3.76M|{
  201|  3.76M|    if (ctx == NULL)
  ------------------
  |  Branch (201:9): [True: 0, False: 3.76M]
  ------------------
  202|      0|        return;
  203|  3.76M|    CTXDBG("ENTER BN_CTX_end()", ctx);
  ------------------
  |  |  110|  3.76M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  219|  3.76M|    do {                           \
  |  |  |  |  220|  3.76M|        BIO *trc_out = NULL;       \
  |  |  |  |  221|  3.76M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded, False: 3.76M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  3.76M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  3.76M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  3.76M|    }                            \
  |  |  |  |  225|  3.76M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:12): [Folded, False: 3.76M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  204|  3.76M|    if (ctx->err_stack)
  ------------------
  |  Branch (204:9): [True: 0, False: 3.76M]
  ------------------
  205|      0|        ctx->err_stack--;
  206|  3.76M|    else {
  207|  3.76M|        unsigned int fp = BN_STACK_pop(&ctx->stack);
  208|       |        /* Does this stack frame have anything to release? */
  209|  3.76M|        if (fp < ctx->used)
  ------------------
  |  Branch (209:13): [True: 3.60M, False: 160k]
  ------------------
  210|  3.60M|            BN_POOL_release(&ctx->pool, ctx->used - fp);
  211|  3.76M|        ctx->used = fp;
  212|       |        /* Unjam "too_many" in case "get" had failed */
  213|  3.76M|        ctx->too_many = 0;
  214|  3.76M|    }
  215|       |    CTXDBG("LEAVE BN_CTX_end()", ctx);
  ------------------
  |  |  110|  3.76M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  219|  3.76M|    do {                           \
  |  |  |  |  220|  3.76M|        BIO *trc_out = NULL;       \
  |  |  |  |  221|  3.76M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded, False: 3.76M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  3.76M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  3.76M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  3.76M|    }                            \
  |  |  |  |  225|  3.76M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:12): [Folded, False: 3.76M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  216|  3.76M|}
BN_CTX_get:
  219|  11.0M|{
  220|  11.0M|    BIGNUM *ret;
  221|       |
  222|  11.0M|    CTXDBG("ENTER BN_CTX_get()", ctx);
  ------------------
  |  |  110|  11.0M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  219|  11.0M|    do {                           \
  |  |  |  |  220|  11.0M|        BIO *trc_out = NULL;       \
  |  |  |  |  221|  11.0M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded, False: 11.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  11.0M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  11.0M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  11.0M|    }                            \
  |  |  |  |  225|  11.0M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:12): [Folded, False: 11.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  223|  11.0M|    if (ctx->err_stack || ctx->too_many)
  ------------------
  |  Branch (223:9): [True: 0, False: 11.0M]
  |  Branch (223:27): [True: 0, False: 11.0M]
  ------------------
  224|      0|        return NULL;
  225|  11.0M|    if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {
  ------------------
  |  Branch (225:9): [True: 0, False: 11.0M]
  ------------------
  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|  11.0M|    BN_zero(ret);
  ------------------
  |  |  201|  11.0M|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  236|       |    /* clear BN_FLG_CONSTTIME if leaked from previous frames */
  237|  11.0M|    ret->flags &= (~BN_FLG_CONSTTIME);
  ------------------
  |  |   67|  11.0M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  238|  11.0M|    ctx->used++;
  239|       |    CTXDBG("LEAVE BN_CTX_get()", ctx);
  ------------------
  |  |  110|  11.0M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  219|  11.0M|    do {                           \
  |  |  |  |  220|  11.0M|        BIO *trc_out = NULL;       \
  |  |  |  |  221|  11.0M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (221:13): [Folded, False: 11.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  11.0M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  11.0M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  224|  11.0M|    }                            \
  |  |  |  |  225|  11.0M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (225:12): [Folded, False: 11.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  240|  11.0M|    return ret;
  241|  11.0M|}
ossl_bn_get_libctx:
  244|    896|{
  245|    896|    if (ctx == NULL)
  ------------------
  |  Branch (245:9): [True: 0, False: 896]
  ------------------
  246|      0|        return NULL;
  247|    896|    return ctx->libctx;
  248|    896|}
bn_ctx.c:BN_STACK_init:
  255|   740k|{
  256|       |    st->indexes = NULL;
  257|   740k|    st->depth = st->size = 0;
  258|   740k|}
bn_ctx.c:BN_STACK_finish:
  261|   740k|{
  262|   740k|    OPENSSL_free(st->indexes);
  ------------------
  |  |  132|   740k|    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|   740k|}
bn_ctx.c:BN_STACK_push:
  267|  3.76M|{
  268|  3.76M|    if (st->depth == st->size) {
  ------------------
  |  Branch (268:9): [True: 581k, False: 3.18M]
  ------------------
  269|       |        /* Need to expand */
  270|   581k|        unsigned int newsize = st->size ? (st->size * 3 / 2) : BN_CTX_START_FRAMES;
  ------------------
  |  |   17|   581k|#define BN_CTX_START_FRAMES 32
  ------------------
  |  Branch (270:32): [True: 0, False: 581k]
  ------------------
  271|   581k|        unsigned int *newitems;
  272|       |
  273|   581k|        if ((newitems = OPENSSL_malloc_array(newsize, sizeof(*newitems))) == NULL)
  ------------------
  |  |  111|   581k|    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: 581k]
  ------------------
  274|      0|            return 0;
  275|   581k|        if (st->depth)
  ------------------
  |  Branch (275:13): [True: 0, False: 581k]
  ------------------
  276|      0|            memcpy(newitems, st->indexes, sizeof(*newitems) * st->depth);
  277|   581k|        OPENSSL_free(st->indexes);
  ------------------
  |  |  132|   581k|    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|   581k|        st->indexes = newitems;
  279|   581k|        st->size = newsize;
  280|   581k|    }
  281|  3.76M|    st->indexes[(st->depth)++] = idx;
  282|  3.76M|    return 1;
  283|  3.76M|}
bn_ctx.c:BN_STACK_pop:
  286|  3.76M|{
  287|  3.76M|    return st->indexes[--(st->depth)];
  288|  3.76M|}
bn_ctx.c:BN_POOL_init:
  295|   740k|{
  296|       |    p->head = p->current = p->tail = NULL;
  297|   740k|    p->used = p->size = 0;
  298|   740k|}
bn_ctx.c:BN_POOL_finish:
  301|   740k|{
  302|   740k|    unsigned int loop;
  303|   740k|    BIGNUM *bn;
  304|       |
  305|  1.17M|    while (p->head) {
  ------------------
  |  Branch (305:12): [True: 432k, False: 740k]
  ------------------
  306|  7.36M|        for (loop = 0, bn = p->head->vals; loop++ < BN_CTX_POOL_SIZE; bn++)
  ------------------
  |  |   15|  7.36M|#define BN_CTX_POOL_SIZE 16
  ------------------
  |  Branch (306:44): [True: 6.92M, False: 432k]
  ------------------
  307|  6.92M|            if (bn->d)
  ------------------
  |  Branch (307:17): [True: 3.54M, False: 3.38M]
  ------------------
  308|  3.54M|                BN_clear_free(bn);
  309|   432k|        p->current = p->head->next;
  310|   432k|        OPENSSL_free(p->head);
  ------------------
  |  |  132|   432k|    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|   432k|        p->head = p->current;
  312|   432k|    }
  313|   740k|}
bn_ctx.c:BN_POOL_get:
  316|  11.0M|{
  317|  11.0M|    BIGNUM *bn;
  318|  11.0M|    unsigned int loop;
  319|       |
  320|       |    /* Full; allocate a new pool item and link it in. */
  321|  11.0M|    if (p->used == p->size) {
  ------------------
  |  Branch (321:9): [True: 432k, False: 10.6M]
  ------------------
  322|   432k|        BN_POOL_ITEM *item;
  323|       |
  324|   432k|        if ((item = OPENSSL_malloc(sizeof(*item))) == NULL)
  ------------------
  |  |  107|   432k|    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: 432k]
  ------------------
  325|      0|            return NULL;
  326|  7.36M|        for (loop = 0, bn = item->vals; loop++ < BN_CTX_POOL_SIZE; bn++) {
  ------------------
  |  |   15|  7.36M|#define BN_CTX_POOL_SIZE 16
  ------------------
  |  Branch (326:41): [True: 6.92M, False: 432k]
  ------------------
  327|  6.92M|            bn_init(bn);
  328|  6.92M|            if ((flag & BN_FLG_SECURE) != 0)
  ------------------
  |  |   68|  6.92M|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (328:17): [True: 5.63k, False: 6.92M]
  ------------------
  329|  5.63k|                BN_set_flags(bn, BN_FLG_SECURE);
  ------------------
  |  |   68|  5.63k|#define BN_FLG_SECURE 0x08
  ------------------
  330|  6.92M|        }
  331|   432k|        item->prev = p->tail;
  332|   432k|        item->next = NULL;
  333|       |
  334|   432k|        if (p->head == NULL)
  ------------------
  |  Branch (334:13): [True: 432k, False: 160]
  ------------------
  335|   432k|            p->head = p->current = p->tail = item;
  336|    160|        else {
  337|    160|            p->tail->next = item;
  338|    160|            p->tail = item;
  339|    160|            p->current = item;
  340|    160|        }
  341|   432k|        p->size += BN_CTX_POOL_SIZE;
  ------------------
  |  |   15|   432k|#define BN_CTX_POOL_SIZE 16
  ------------------
  342|   432k|        p->used++;
  343|       |        /* Return the first bignum from the new pool */
  344|   432k|        return item->vals;
  345|   432k|    }
  346|       |
  347|  10.6M|    if (!p->used)
  ------------------
  |  Branch (347:9): [True: 603k, False: 10.0M]
  ------------------
  348|   603k|        p->current = p->head;
  349|  10.0M|    else if ((p->used % BN_CTX_POOL_SIZE) == 0)
  ------------------
  |  |   15|  10.0M|#define BN_CTX_POOL_SIZE 16
  ------------------
  |  Branch (349:14): [True: 0, False: 10.0M]
  ------------------
  350|      0|        p->current = p->current->next;
  351|  10.6M|    return p->current->vals + ((p->used++) % BN_CTX_POOL_SIZE);
  ------------------
  |  |   15|  10.6M|#define BN_CTX_POOL_SIZE 16
  ------------------
  352|  11.0M|}
bn_ctx.c:BN_POOL_release:
  355|  3.60M|{
  356|  3.60M|    unsigned int offset = (p->used - 1) % BN_CTX_POOL_SIZE;
  ------------------
  |  |   15|  3.60M|#define BN_CTX_POOL_SIZE 16
  ------------------
  357|       |
  358|  3.60M|    p->used -= num;
  359|  14.6M|    while (num--) {
  ------------------
  |  Branch (359:12): [True: 11.0M, False: 3.60M]
  ------------------
  360|  11.0M|        bn_check_top(p->current->vals + offset);
  361|  11.0M|        if (offset == 0) {
  ------------------
  |  Branch (361:13): [True: 1.03M, False: 10.0M]
  ------------------
  362|  1.03M|            offset = BN_CTX_POOL_SIZE - 1;
  ------------------
  |  |   15|  1.03M|#define BN_CTX_POOL_SIZE 16
  ------------------
  363|  1.03M|            p->current = p->current->prev;
  364|  1.03M|        } else
  365|  10.0M|            offset--;
  366|  11.0M|    }
  367|  3.60M|}

BN_div:
  213|  1.73M|{
  214|  1.73M|    int ret;
  215|       |
  216|  1.73M|    if (BN_is_zero(divisor)) {
  ------------------
  |  Branch (216:9): [True: 0, False: 1.73M]
  ------------------
  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.73M|    if (divisor->d[divisor->top - 1] == 0) {
  ------------------
  |  Branch (226:9): [True: 0, False: 1.73M]
  ------------------
  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.73M|    ret = bn_div_fixed_top(dv, rm, num, divisor, ctx);
  232|       |
  233|  1.73M|    if (ret) {
  ------------------
  |  Branch (233:9): [True: 1.73M, False: 0]
  ------------------
  234|  1.73M|        if (dv != NULL)
  ------------------
  |  Branch (234:13): [True: 136k, False: 1.59M]
  ------------------
  235|   136k|            bn_correct_top(dv);
  236|  1.73M|        if (rm != NULL)
  ------------------
  |  Branch (236:13): [True: 1.59M, False: 136k]
  ------------------
  237|  1.59M|            bn_correct_top(rm);
  238|  1.73M|    }
  239|       |
  240|  1.73M|    return ret;
  241|  1.73M|}
bn_div_fixed_top:
  268|  1.73M|{
  269|  1.73M|    int norm_shift, i, j, loop;
  270|  1.73M|    BIGNUM *tmp, *snum, *sdiv, *res;
  271|  1.73M|    BN_ULONG *resp, *wnum, *wnumtop;
  272|  1.73M|    BN_ULONG d0, d1;
  273|  1.73M|    int num_n, div_n, num_neg;
  274|       |
  275|  1.73M|    assert(divisor->top > 0 && divisor->d[divisor->top - 1] != 0);
  ------------------
  |  Branch (275:5): [True: 0, False: 1.73M]
  |  Branch (275:5): [True: 0, False: 0]
  |  Branch (275:5): [True: 1.73M, False: 0]
  |  Branch (275:5): [True: 1.73M, False: 0]
  ------------------
  276|       |
  277|  1.73M|    bn_check_top(num);
  278|  1.73M|    bn_check_top(divisor);
  279|  1.73M|    bn_check_top(dv);
  280|  1.73M|    bn_check_top(rm);
  281|       |
  282|  1.73M|    BN_CTX_start(ctx);
  283|  1.73M|    res = (dv == NULL) ? BN_CTX_get(ctx) : dv;
  ------------------
  |  Branch (283:11): [True: 1.59M, False: 136k]
  ------------------
  284|  1.73M|    tmp = BN_CTX_get(ctx);
  285|  1.73M|    snum = BN_CTX_get(ctx);
  286|  1.73M|    sdiv = BN_CTX_get(ctx);
  287|  1.73M|    if (sdiv == NULL)
  ------------------
  |  Branch (287:9): [True: 0, False: 1.73M]
  ------------------
  288|      0|        goto err;
  289|       |
  290|       |    /* First we normalise the numbers */
  291|  1.73M|    if (!BN_copy(sdiv, divisor))
  ------------------
  |  Branch (291:9): [True: 0, False: 1.73M]
  ------------------
  292|      0|        goto err;
  293|  1.73M|    norm_shift = bn_left_align(sdiv);
  294|  1.73M|    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.73M|    if (!(bn_lshift_fixed_top(snum, num, norm_shift)))
  ------------------
  |  Branch (302:9): [True: 0, False: 1.73M]
  ------------------
  303|      0|        goto err;
  304|       |
  305|  1.73M|    div_n = sdiv->top;
  306|  1.73M|    num_n = snum->top;
  307|       |
  308|  1.73M|    if (num_n <= div_n) {
  ------------------
  |  Branch (308:9): [True: 295k, False: 1.43M]
  ------------------
  309|       |        /* caller didn't pad dividend -> no constant-time guarantee... */
  310|   295k|        if (bn_wexpand(snum, div_n + 1) == NULL)
  ------------------
  |  Branch (310:13): [True: 0, False: 295k]
  ------------------
  311|      0|            goto err;
  312|   295k|        memset(&(snum->d[num_n]), 0, (div_n - num_n + 1) * sizeof(BN_ULONG));
  313|   295k|        snum->top = num_n = div_n + 1;
  314|   295k|    }
  315|       |
  316|  1.73M|    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.73M|    wnum = &(snum->d[loop]);
  322|  1.73M|    wnumtop = &(snum->d[num_n - 1]);
  323|       |
  324|       |    /* Get the top 2 words of sdiv */
  325|  1.73M|    d0 = sdiv->d[div_n - 1];
  326|  1.73M|    d1 = (div_n == 1) ? 0 : sdiv->d[div_n - 2];
  ------------------
  |  Branch (326:10): [True: 410k, False: 1.32M]
  ------------------
  327|       |
  328|       |    /* Setup quotient */
  329|  1.73M|    if (!bn_wexpand(res, loop))
  ------------------
  |  Branch (329:9): [True: 0, False: 1.73M]
  ------------------
  330|      0|        goto err;
  331|  1.73M|    num_neg = num->neg;
  332|  1.73M|    res->neg = (num_neg ^ divisor->neg);
  333|  1.73M|    res->top = loop;
  334|  1.73M|    res->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  1.73M|#define BN_FLG_FIXED_TOP 0
  ------------------
  335|  1.73M|    resp = &(res->d[loop]);
  336|       |
  337|       |    /* space for temp */
  338|  1.73M|    if (!bn_wexpand(tmp, (div_n + 1)))
  ------------------
  |  Branch (338:9): [True: 0, False: 1.73M]
  ------------------
  339|      0|        goto err;
  340|       |
  341|  4.84M|    for (i = 0; i < loop; i++, wnumtop--) {
  ------------------
  |  Branch (341:17): [True: 3.11M, False: 1.73M]
  ------------------
  342|  3.11M|        BN_ULONG q, l0;
  343|       |        /*
  344|       |         * the first part of the loop uses the top two words of snum and sdiv
  345|       |         * to calculate a BN_ULONG q such that | wnum - sdiv * q | < sdiv
  346|       |         */
  347|       |#if defined(BN_DIV3W)
  348|       |        q = bn_div_3_words(wnumtop, d1, d0);
  349|       |#else
  350|  3.11M|        BN_ULONG n0, n1, rem = 0;
  351|       |
  352|  3.11M|        n0 = wnumtop[0];
  353|  3.11M|        n1 = wnumtop[-1];
  354|  3.11M|        if (n0 == d0)
  ------------------
  |  Branch (354:13): [True: 0, False: 3.11M]
  ------------------
  355|      0|            q = BN_MASK2;
  ------------------
  |  |   77|      0|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  356|  3.11M|        else { /* n0 < d0 */
  357|  3.11M|            BN_ULONG n2 = (wnumtop == wnum) ? 0 : wnumtop[-2];
  ------------------
  |  Branch (357:27): [True: 820k, False: 2.29M]
  ------------------
  358|       |#ifdef BN_LLONG
  359|       |            BN_ULLONG t2;
  360|       |
  361|       |#if defined(BN_LLONG) && defined(BN_DIV2W) && !defined(bn_div_words)
  362|       |            q = (BN_ULONG)(((((BN_ULLONG)n0) << BN_BITS2) | n1) / d0);
  363|       |#else
  364|       |            q = bn_div_words(n0, n1, d0);
  365|       |#endif
  366|       |
  367|       |#ifndef REMAINDER_IS_ALREADY_CALCULATED
  368|       |            /*
  369|       |             * rem doesn't have to be BN_ULLONG. The least we
  370|       |             * know it's less that d0, isn't it?
  371|       |             */
  372|       |            rem = (n1 - q * d0) & BN_MASK2;
  373|       |#endif
  374|       |            t2 = (BN_ULLONG)d1 * q;
  375|       |
  376|       |            for (;;) {
  377|       |                if (t2 <= ((((BN_ULLONG)rem) << BN_BITS2) | n2))
  378|       |                    break;
  379|       |                q--;
  380|       |                rem += d0;
  381|       |                if (rem < d0)
  382|       |                    break; /* don't let rem overflow */
  383|       |                t2 -= d1;
  384|       |            }
  385|       |#else /* !BN_LLONG */
  386|  3.11M|            BN_ULONG t2l, t2h;
  387|       |
  388|  3.11M|            q = bn_div_words(n0, n1, d0);
  389|  3.11M|#ifndef REMAINDER_IS_ALREADY_CALCULATED
  390|  3.11M|            rem = (n1 - q * d0) & BN_MASK2;
  ------------------
  |  |   77|  3.11M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  391|  3.11M|#endif
  392|       |
  393|       |#if defined(BN_UMULT_LOHI)
  394|       |            BN_UMULT_LOHI(t2l, t2h, d1, q);
  395|       |#elif defined(BN_UMULT_HIGH)
  396|       |            t2l = d1 * q;
  397|       |            t2h = BN_UMULT_HIGH(d1, q);
  398|       |#else
  399|  3.11M|            {
  400|  3.11M|                BN_ULONG ql, qh;
  401|  3.11M|                t2l = LBITS(d1);
  ------------------
  |  |  560|  3.11M|#define LBITS(a) ((a) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|  3.11M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  402|  3.11M|                t2h = HBITS(d1);
  ------------------
  |  |  561|  3.11M|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   76|  3.11M|#define BN_BITS4 32
  |  |  ------------------
  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|  3.11M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  403|  3.11M|                ql = LBITS(q);
  ------------------
  |  |  560|  3.11M|#define LBITS(a) ((a) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|  3.11M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  404|  3.11M|                qh = HBITS(q);
  ------------------
  |  |  561|  3.11M|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   76|  3.11M|#define BN_BITS4 32
  |  |  ------------------
  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|  3.11M|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  405|  3.11M|                mul64(t2l, t2h, ql, qh); /* t2=(BN_ULLONG)d1*q; */
  ------------------
  |  |  569|  3.11M|    {                                      \
  |  |  570|  3.11M|        BN_ULONG m, m1, lt, ht;            \
  |  |  571|  3.11M|                                           \
  |  |  572|  3.11M|        lt = l;                            \
  |  |  573|  3.11M|        ht = h;                            \
  |  |  574|  3.11M|        m = (bh) * (lt);                   \
  |  |  575|  3.11M|        lt = (bl) * (lt);                  \
  |  |  576|  3.11M|        m1 = (bl) * (ht);                  \
  |  |  577|  3.11M|        ht = (bh) * (ht);                  \
  |  |  578|  3.11M|        m = (m + m1) & BN_MASK2;           \
  |  |  ------------------
  |  |  |  |   77|  3.11M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  ------------------
  |  |  579|  3.11M|        ht += L2HBITS((BN_ULONG)(m < m1)); \
  |  |  ------------------
  |  |  |  |  562|  3.11M|#define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.11M|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  3.11M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  580|  3.11M|        ht += HBITS(m);                    \
  |  |  ------------------
  |  |  |  |  561|  3.11M|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.11M|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|  3.11M|#define BN_MASK2l (0xffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  581|  3.11M|        m1 = L2HBITS(m);                   \
  |  |  ------------------
  |  |  |  |  562|  3.11M|#define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.11M|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  3.11M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  582|  3.11M|        lt = (lt + m1) & BN_MASK2;         \
  |  |  ------------------
  |  |  |  |   77|  3.11M|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  ------------------
  |  |  583|  3.11M|        ht += (lt < m1);                   \
  |  |  584|  3.11M|        (l) = lt;                          \
  |  |  585|  3.11M|        (h) = ht;                          \
  |  |  586|  3.11M|    }
  ------------------
  406|  3.11M|            }
  407|  3.11M|#endif
  408|       |
  409|  3.11M|            for (;;) {
  410|  3.11M|                if ((t2h < rem) || ((t2h == rem) && (t2l <= n2)))
  ------------------
  |  Branch (410:21): [True: 2.24M, False: 867k]
  |  Branch (410:37): [True: 853k, False: 14.2k]
  |  Branch (410:53): [True: 853k, False: 0]
  ------------------
  411|  3.10M|                    break;
  412|  14.2k|                q--;
  413|  14.2k|                rem += d0;
  414|  14.2k|                if (rem < d0)
  ------------------
  |  Branch (414:21): [True: 14.2k, False: 0]
  ------------------
  415|  14.2k|                    break; /* don't let rem overflow */
  416|      0|                if (t2l < d1)
  ------------------
  |  Branch (416:21): [True: 0, False: 0]
  ------------------
  417|      0|                    t2h--;
  418|      0|                t2l -= d1;
  419|      0|            }
  420|  3.11M|#endif /* !BN_LLONG */
  421|  3.11M|        }
  422|  3.11M|#endif /* !BN_DIV3W */
  423|       |
  424|  3.11M|        l0 = bn_mul_words(tmp->d, sdiv->d, div_n, q);
  425|  3.11M|        tmp->d[div_n] = l0;
  426|  3.11M|        wnum--;
  427|       |        /*
  428|       |         * ignore top values of the bignums just sub the two BN_ULONG arrays
  429|       |         * with bn_sub_words
  430|       |         */
  431|  3.11M|        l0 = bn_sub_words(wnum, wnum, tmp->d, div_n + 1);
  432|  3.11M|        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|  18.3M|        for (l0 = 0 - l0, j = 0; j < div_n; j++)
  ------------------
  |  Branch (438:34): [True: 15.2M, False: 3.11M]
  ------------------
  439|  15.2M|            tmp->d[j] = sdiv->d[j] & l0;
  440|  3.11M|        l0 = bn_add_words(wnum, wnum, tmp->d, div_n);
  441|  3.11M|        (*wnumtop) += l0;
  442|  3.11M|        assert((*wnumtop) == 0);
  ------------------
  |  Branch (442:9): [True: 0, False: 3.11M]
  |  Branch (442:9): [True: 3.11M, False: 0]
  ------------------
  443|       |
  444|       |        /* store part of the result */
  445|  3.11M|        *--resp = q;
  446|  3.11M|    }
  447|       |    /* snum holds remainder, it's as wide as divisor */
  448|  1.73M|    snum->neg = num_neg;
  449|  1.73M|    snum->top = div_n;
  450|  1.73M|    snum->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  1.73M|#define BN_FLG_FIXED_TOP 0
  ------------------
  451|       |
  452|  1.73M|    if (rm != NULL && bn_rshift_fixed_top(rm, snum, norm_shift) == 0)
  ------------------
  |  Branch (452:9): [True: 1.59M, False: 136k]
  |  Branch (452:23): [True: 0, False: 1.59M]
  ------------------
  453|      0|        goto err;
  454|       |
  455|  1.73M|    BN_CTX_end(ctx);
  456|  1.73M|    return 1;
  457|      0|err:
  458|      0|    bn_check_top(rm);
  459|      0|    BN_CTX_end(ctx);
  460|      0|    return 0;
  461|  1.73M|}
bn_div.c:bn_left_align:
  142|  1.73M|{
  143|  1.73M|    BN_ULONG *d = num->d, n, m, rmask;
  144|  1.73M|    int top = num->top;
  145|  1.73M|    int rshift = BN_num_bits_word(d[top - 1]), lshift, i;
  146|       |
  147|  1.73M|    lshift = BN_BITS2 - rshift;
  ------------------
  |  |   54|  1.73M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.73M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  148|  1.73M|    rshift %= BN_BITS2; /* say no to undefined behaviour */
  ------------------
  |  |   54|  1.73M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.73M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  149|  1.73M|    rmask = (BN_ULONG)0 - rshift; /* rmask = 0 - (rshift != 0) */
  150|  1.73M|    rmask |= rmask >> 8;
  151|       |
  152|  9.98M|    for (i = 0, m = 0; i < top; i++) {
  ------------------
  |  Branch (152:24): [True: 8.25M, False: 1.73M]
  ------------------
  153|  8.25M|        n = d[i];
  154|  8.25M|        d[i] = ((n << lshift) | m) & BN_MASK2;
  ------------------
  |  |   77|  8.25M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  155|  8.25M|        m = (n >> rshift) & rmask;
  156|  8.25M|    }
  157|       |
  158|  1.73M|    return lshift;
  159|  1.73M|}

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

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

bn_get_top:
  138|    779|{
  139|    779|    return a->top;
  140|    779|}
bn_copy_words:
  156|    153|{
  157|    153|    if (in->top > size)
  ------------------
  |  Branch (157:9): [True: 0, False: 153]
  ------------------
  158|      0|        return 0;
  159|       |
  160|    153|    memset(out, 0, sizeof(*out) * size);
  161|    153|    if (in->d != NULL)
  ------------------
  |  Branch (161:9): [True: 153, False: 0]
  ------------------
  162|    153|        memcpy(out, in->d, sizeof(*out) * in->top);
  163|    153|    return 1;
  164|    153|}
bn_get_words:
  167|    408|{
  168|    408|    return a->d;
  169|    408|}
bn_set_words:
  185|    255|{
  186|    255|    if (bn_wexpand(a, num_words) == NULL) {
  ------------------
  |  Branch (186:9): [True: 0, False: 255]
  ------------------
  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|    255|    memcpy(a->d, words, sizeof(BN_ULONG) * num_words);
  192|    255|    a->top = num_words;
  193|    255|    bn_correct_top(a);
  194|    255|    return 1;
  195|    255|}

BN_value_one:
   83|   307k|{
   84|   307k|    static const BN_ULONG data_one = 1L;
   85|   307k|    static const BIGNUM const_one = {
   86|   307k|        (BN_ULONG *)&data_one, 1, 1, 0, BN_FLG_STATIC_DATA
  ------------------
  |  |   59|   307k|#define BN_FLG_STATIC_DATA 0x02
  ------------------
   87|   307k|    };
   88|       |
   89|   307k|    return &const_one;
   90|   307k|}
BN_num_bits_word:
  102|  4.50M|{
  103|  4.50M|    BN_ULONG x, mask;
  104|  4.50M|    int bits = (l != 0);
  105|       |
  106|  4.50M|#if BN_BITS2 > 32
  107|  4.50M|    x = l >> 32;
  108|  4.50M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  4.50M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  109|  4.50M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  4.50M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.50M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  110|  4.50M|    bits += 32 & mask;
  111|  4.50M|    l ^= (x ^ l) & mask;
  112|  4.50M|#endif
  113|       |
  114|  4.50M|    x = l >> 16;
  115|  4.50M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  4.50M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  116|  4.50M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  4.50M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.50M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  117|  4.50M|    bits += 16 & mask;
  118|  4.50M|    l ^= (x ^ l) & mask;
  119|       |
  120|  4.50M|    x = l >> 8;
  121|  4.50M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  4.50M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  122|  4.50M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  4.50M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.50M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  123|  4.50M|    bits += 8 & mask;
  124|  4.50M|    l ^= (x ^ l) & mask;
  125|       |
  126|  4.50M|    x = l >> 4;
  127|  4.50M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  4.50M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  128|  4.50M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  4.50M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.50M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  129|  4.50M|    bits += 4 & mask;
  130|  4.50M|    l ^= (x ^ l) & mask;
  131|       |
  132|  4.50M|    x = l >> 2;
  133|  4.50M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  4.50M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  134|  4.50M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  4.50M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.50M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  135|  4.50M|    bits += 2 & mask;
  136|  4.50M|    l ^= (x ^ l) & mask;
  137|       |
  138|  4.50M|    x = l >> 1;
  139|  4.50M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|  4.50M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  140|  4.50M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  4.50M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.50M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  141|  4.50M|    bits += 1 & mask;
  142|       |
  143|  4.50M|    return bits;
  144|  4.50M|}
BN_num_bits:
  179|  2.76M|{
  180|  2.76M|    int i = a->top - 1;
  181|  2.76M|    bn_check_top(a);
  182|       |
  183|  2.76M|    if (a->flags & BN_FLG_CONSTTIME) {
  ------------------
  |  |   67|  2.76M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (183:9): [True: 960, False: 2.76M]
  ------------------
  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|    960|        return bn_num_bits_consttime(a);
  194|    960|    }
  195|       |
  196|  2.76M|    if (ossl_unlikely(BN_is_zero(a)))
  ------------------
  |  |   23|  2.76M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.76M]
  |  |  ------------------
  ------------------
  197|      0|        return 0;
  198|       |
  199|  2.76M|    return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
  ------------------
  |  |   54|  2.76M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.76M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  200|  2.76M|}
BN_clear_free:
  213|  6.52M|{
  214|  6.52M|    if (a == NULL)
  ------------------
  |  Branch (214:9): [True: 2.02M, False: 4.50M]
  ------------------
  215|  2.02M|        return;
  216|  4.50M|    if (a->d != NULL && !BN_get_flags(a, BN_FLG_STATIC_DATA))
  ------------------
  |  |   59|  4.18M|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  |  Branch (216:9): [True: 4.18M, False: 319k]
  |  Branch (216:25): [True: 4.18M, False: 132]
  ------------------
  217|  4.18M|        bn_free_d(a, 1);
  218|  4.50M|    if (BN_get_flags(a, BN_FLG_MALLOCED)) {
  ------------------
  |  |   58|  4.50M|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (218:9): [True: 1.11k, False: 4.50M]
  ------------------
  219|  1.11k|        OPENSSL_cleanse(a, sizeof(*a));
  220|  1.11k|        OPENSSL_free(a);
  ------------------
  |  |  132|  1.11k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  221|  1.11k|    }
  222|  4.50M|}
BN_free:
  225|  5.09M|{
  226|  5.09M|    if (a == NULL)
  ------------------
  |  Branch (226:9): [True: 301k, False: 4.78M]
  ------------------
  227|   301k|        return;
  228|  4.78M|    if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  ------------------
  |  |   59|  4.78M|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  |  Branch (228:9): [True: 4.78M, False: 396]
  ------------------
  229|  4.78M|        bn_free_d(a, 0);
  230|  4.78M|    if (a->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|  4.78M|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (230:9): [True: 4.78M, False: 396]
  ------------------
  231|  4.78M|        OPENSSL_free(a);
  ------------------
  |  |  132|  4.78M|    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|  4.78M|}
bn_init:
  235|  8.02M|{
  236|  8.02M|    static BIGNUM nilbn;
  237|       |
  238|  8.02M|    *a = nilbn;
  239|  8.02M|    bn_check_top(a);
  240|  8.02M|}
BN_new:
  243|  4.78M|{
  244|  4.78M|    BIGNUM *ret;
  245|       |
  246|  4.78M|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  109|  4.78M|    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: 4.78M]
  ------------------
  247|      0|        return NULL;
  248|  4.78M|    ret->flags = BN_FLG_MALLOCED;
  ------------------
  |  |   58|  4.78M|#define BN_FLG_MALLOCED 0x01
  ------------------
  249|  4.78M|    bn_check_top(ret);
  250|  4.78M|    return ret;
  251|  4.78M|}
BN_secure_new:
  254|    375|{
  255|    375|    BIGNUM *ret = BN_new();
  256|       |
  257|    375|    if (ret != NULL)
  ------------------
  |  Branch (257:9): [True: 375, False: 0]
  ------------------
  258|    375|        ret->flags |= BN_FLG_SECURE;
  ------------------
  |  |   68|    375|#define BN_FLG_SECURE 0x08
  ------------------
  259|    375|    return ret;
  260|    375|}
bn_expand2:
  299|  11.3M|{
  300|  11.3M|    if (ossl_likely(words > b->dmax)) {
  ------------------
  |  |   22|  11.3M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 11.3M, False: 0]
  |  |  ------------------
  ------------------
  301|  11.3M|        BN_ULONG *a = bn_expand_internal(b, words);
  302|       |
  303|  11.3M|        if (ossl_unlikely(!a))
  ------------------
  |  |   23|  11.3M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.3M]
  |  |  ------------------
  ------------------
  304|      0|            return NULL;
  305|  11.3M|        if (b->d != NULL)
  ------------------
  |  Branch (305:13): [True: 2.35M, False: 8.97M]
  ------------------
  306|  2.35M|            bn_free_d(b, 1);
  307|  11.3M|        b->d = a;
  308|  11.3M|        b->dmax = words;
  309|  11.3M|    }
  310|       |
  311|  11.3M|    return b;
  312|  11.3M|}
BN_dup:
  315|  11.6k|{
  316|  11.6k|    BIGNUM *t;
  317|       |
  318|  11.6k|    if (a == NULL)
  ------------------
  |  Branch (318:9): [True: 0, False: 11.6k]
  ------------------
  319|      0|        return NULL;
  320|  11.6k|    bn_check_top(a);
  321|       |
  322|  11.6k|    t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
  ------------------
  |  |   68|  11.6k|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (322:9): [True: 0, False: 11.6k]
  ------------------
  323|  11.6k|    if (t == NULL)
  ------------------
  |  Branch (323:9): [True: 0, False: 11.6k]
  ------------------
  324|      0|        return NULL;
  325|  11.6k|    if (!BN_copy(t, a)) {
  ------------------
  |  Branch (325:9): [True: 0, False: 11.6k]
  ------------------
  326|      0|        BN_free(t);
  327|      0|        return NULL;
  328|      0|    }
  329|  11.6k|    bn_check_top(t);
  330|  11.6k|    return t;
  331|  11.6k|}
BN_copy:
  334|  5.18M|{
  335|  5.18M|    int bn_words;
  336|       |
  337|  5.18M|    bn_check_top(b);
  338|       |
  339|  5.18M|    bn_words = BN_get_flags(b, BN_FLG_CONSTTIME) ? b->dmax : b->top;
  ------------------
  |  |   67|  5.18M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (339:16): [True: 480, False: 5.18M]
  ------------------
  340|       |
  341|  5.18M|    if (ossl_unlikely(a == b))
  ------------------
  |  |   23|  5.18M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 5.18M]
  |  |  ------------------
  ------------------
  342|      0|        return a;
  343|  5.18M|    if (ossl_unlikely(bn_wexpand(a, bn_words) == NULL))
  ------------------
  |  |   23|  5.18M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 5.18M]
  |  |  ------------------
  ------------------
  344|      0|        return NULL;
  345|       |
  346|  5.18M|    if (ossl_likely(b->top > 0))
  ------------------
  |  |   22|  5.18M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 5.02M, False: 159k]
  |  |  ------------------
  ------------------
  347|  5.02M|        memcpy(a->d, b->d, sizeof(b->d[0]) * bn_words);
  348|       |
  349|  5.18M|    a->neg = b->neg;
  350|  5.18M|    a->top = b->top;
  351|  5.18M|    a->flags |= b->flags & BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  5.18M|#define BN_FLG_FIXED_TOP 0
  ------------------
  352|  5.18M|    bn_check_top(a);
  353|  5.18M|    return a;
  354|  5.18M|}
BN_set_word:
  415|   296k|{
  416|   296k|    bn_check_top(a);
  417|   296k|    if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
  ------------------
  |  Branch (417:9): [True: 0, False: 296k]
  ------------------
  418|      0|        return 0;
  419|   296k|    a->neg = 0;
  420|   296k|    a->d[0] = w;
  421|   296k|    a->top = (w ? 1 : 0);
  ------------------
  |  Branch (421:15): [True: 296k, False: 0]
  ------------------
  422|   296k|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   296k|#define BN_FLG_FIXED_TOP 0
  ------------------
  423|   296k|    bn_check_top(a);
  424|   296k|    return 1;
  425|   296k|}
BN_bin2bn:
  535|  2.23M|{
  536|  2.23M|    return bin2bn(s, len, ret, BIG, UNSIGNED);
  537|  2.23M|}
BN_bn2binpad:
  628|    132|{
  629|    132|    if (tolen < 0)
  ------------------
  |  Branch (629:9): [True: 0, False: 132]
  ------------------
  630|      0|        return -1;
  631|    132|    return bn2binpad(a, to, tolen, BIG, UNSIGNED);
  632|    132|}
BN_bn2bin:
  642|    486|{
  643|    486|    return bn2binpad(a, to, -1, BIG, UNSIGNED);
  644|    486|}
BN_lebin2bn:
  647|    256|{
  648|    256|    return bin2bn(s, len, ret, LITTLE, UNSIGNED);
  649|    256|}
BN_bn2lebinpad:
  657|    128|{
  658|    128|    if (tolen < 0)
  ------------------
  |  Branch (658:9): [True: 0, False: 128]
  ------------------
  659|      0|        return -1;
  660|    128|    return bn2binpad(a, to, tolen, LITTLE, UNSIGNED);
  661|    128|}
BN_ucmp:
  707|  11.8M|{
  708|  11.8M|    int i;
  709|  11.8M|    BN_ULONG t1, t2, *ap, *bp;
  710|       |
  711|  11.8M|    ap = a->d;
  712|  11.8M|    bp = b->d;
  713|       |
  714|  11.8M|    if (BN_get_flags(a, BN_FLG_CONSTTIME)
  ------------------
  |  |   67|  11.8M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (714:9): [True: 42.4k, False: 11.7M]
  ------------------
  715|  42.4k|        && a->top == b->top) {
  ------------------
  |  Branch (715:12): [True: 41.6k, False: 800]
  ------------------
  716|  41.6k|        int res = 0;
  717|       |
  718|   208k|        for (i = 0; i < b->top; i++) {
  ------------------
  |  Branch (718:21): [True: 166k, False: 41.6k]
  ------------------
  719|   166k|            res = constant_time_select_int((int)constant_time_lt_bn(ap[i], bp[i]),
  720|   166k|                -1, res);
  721|   166k|            res = constant_time_select_int((int)constant_time_lt_bn(bp[i], ap[i]),
  722|   166k|                1, res);
  723|   166k|        }
  724|  41.6k|        return res;
  725|  41.6k|    }
  726|       |
  727|  11.7M|    bn_check_top(a);
  728|  11.7M|    bn_check_top(b);
  729|       |
  730|  11.7M|    i = a->top - b->top;
  731|  11.7M|    if (i != 0)
  ------------------
  |  Branch (731:9): [True: 1.13M, False: 10.6M]
  ------------------
  732|  1.13M|        return i;
  733|       |
  734|  12.5M|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (734:26): [True: 12.0M, False: 432k]
  ------------------
  735|  12.0M|        t1 = ap[i];
  736|  12.0M|        t2 = bp[i];
  737|  12.0M|        if (t1 != t2)
  ------------------
  |  Branch (737:13): [True: 10.2M, False: 1.88M]
  ------------------
  738|  10.2M|            return ((t1 > t2) ? 1 : -1);
  ------------------
  |  Branch (738:21): [True: 4.35M, False: 5.84M]
  ------------------
  739|  12.0M|    }
  740|   432k|    return 0;
  741|  10.6M|}
BN_cmp:
  744|   682k|{
  745|   682k|    int i;
  746|   682k|    int gt, lt;
  747|   682k|    BN_ULONG t1, t2;
  748|       |
  749|   682k|    if ((a == NULL) || (b == NULL)) {
  ------------------
  |  Branch (749:9): [True: 0, False: 682k]
  |  Branch (749:24): [True: 0, False: 682k]
  ------------------
  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|   682k|    bn_check_top(a);
  759|   682k|    bn_check_top(b);
  760|       |
  761|   682k|    if (a->neg != b->neg) {
  ------------------
  |  Branch (761:9): [True: 0, False: 682k]
  ------------------
  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|   682k|    if (a->neg == 0) {
  ------------------
  |  Branch (767:9): [True: 682k, False: 0]
  ------------------
  768|   682k|        gt = 1;
  769|   682k|        lt = -1;
  770|   682k|    } else {
  771|      0|        gt = -1;
  772|      0|        lt = 1;
  773|      0|    }
  774|       |
  775|   682k|    if (a->top > b->top)
  ------------------
  |  Branch (775:9): [True: 41.8k, False: 640k]
  ------------------
  776|  41.8k|        return gt;
  777|   640k|    if (a->top < b->top)
  ------------------
  |  Branch (777:9): [True: 135, False: 640k]
  ------------------
  778|    135|        return lt;
  779|  4.00M|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (779:26): [True: 3.44M, False: 557k]
  ------------------
  780|  3.44M|        t1 = a->d[i];
  781|  3.44M|        t2 = b->d[i];
  782|  3.44M|        if (t1 > t2)
  ------------------
  |  Branch (782:13): [True: 265, False: 3.44M]
  ------------------
  783|    265|            return gt;
  784|  3.44M|        if (t1 < t2)
  ------------------
  |  Branch (784:13): [True: 83.0k, False: 3.36M]
  ------------------
  785|  83.0k|            return lt;
  786|  3.44M|    }
  787|   557k|    return 0;
  788|   640k|}
BN_set_bit:
  791|   273k|{
  792|   273k|    int i, j, k;
  793|       |
  794|   273k|    if (n < 0)
  ------------------
  |  Branch (794:9): [True: 0, False: 273k]
  ------------------
  795|      0|        return 0;
  796|       |
  797|   273k|    i = n / BN_BITS2;
  ------------------
  |  |   54|   273k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   273k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  798|   273k|    j = n % BN_BITS2;
  ------------------
  |  |   54|   273k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   273k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  799|   273k|    if (a->top <= i) {
  ------------------
  |  Branch (799:9): [True: 273k, False: 0]
  ------------------
  800|   273k|        if (bn_wexpand(a, i + 1) == NULL)
  ------------------
  |  Branch (800:13): [True: 0, False: 273k]
  ------------------
  801|      0|            return 0;
  802|  2.36M|        for (k = a->top; k < i + 1; k++)
  ------------------
  |  Branch (802:26): [True: 2.08M, False: 273k]
  ------------------
  803|  2.08M|            a->d[k] = 0;
  804|   273k|        a->top = i + 1;
  805|   273k|        a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   273k|#define BN_FLG_FIXED_TOP 0
  ------------------
  806|   273k|    }
  807|       |
  808|   273k|    a->d[i] |= (((BN_ULONG)1) << j);
  809|   273k|    bn_check_top(a);
  810|   273k|    return 1;
  811|   273k|}
BN_is_bit_set:
  832|  26.2M|{
  833|  26.2M|    int i, j;
  834|       |
  835|  26.2M|    bn_check_top(a);
  836|  26.2M|    if (ossl_unlikely(n < 0))
  ------------------
  |  |   23|  26.2M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 26.2M]
  |  |  ------------------
  ------------------
  837|      0|        return 0;
  838|  26.2M|    i = n / BN_BITS2;
  ------------------
  |  |   54|  26.2M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  26.2M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  839|  26.2M|    j = n % BN_BITS2;
  ------------------
  |  |   54|  26.2M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  26.2M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  840|  26.2M|    if (ossl_unlikely(a->top <= i))
  ------------------
  |  |   23|  26.2M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 26.2M]
  |  |  ------------------
  ------------------
  841|      0|        return 0;
  842|  26.2M|    return (int)(((a->d[i]) >> j) & ((BN_ULONG)1));
  843|  26.2M|}
BN_set_negative:
  878|   147k|{
  879|   147k|    if (b && !BN_is_zero(a))
  ------------------
  |  Branch (879:9): [True: 0, False: 147k]
  |  Branch (879:14): [True: 0, False: 0]
  ------------------
  880|      0|        a->neg = 1;
  881|   147k|    else
  882|   147k|        a->neg = 0;
  883|   147k|}
BN_consttime_swap:
  943|   123k|{
  944|   123k|    BN_ULONG t;
  945|   123k|    int i;
  946|       |
  947|   123k|    bn_wcheck_size(a, nwords);
  948|   123k|    bn_wcheck_size(b, nwords);
  949|       |
  950|   123k|    condition = ((~condition & ((condition - 1))) >> (BN_BITS2 - 1)) - 1;
  ------------------
  |  |   54|   123k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   123k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  951|       |
  952|   123k|    t = (a->top ^ b->top) & condition;
  953|   123k|    a->top ^= t;
  954|   123k|    b->top ^= t;
  955|       |
  956|   123k|    t = (a->neg ^ b->neg) & condition;
  957|   123k|    a->neg ^= t;
  958|   123k|    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|   123k|#define BN_CONSTTIME_SWAP_FLAGS (BN_FLG_CONSTTIME | BN_FLG_FIXED_TOP)
  983|       |
  984|   123k|    t = ((a->flags ^ b->flags) & BN_CONSTTIME_SWAP_FLAGS) & condition;
  ------------------
  |  |  982|   123k|#define BN_CONSTTIME_SWAP_FLAGS (BN_FLG_CONSTTIME | BN_FLG_FIXED_TOP)
  |  |  ------------------
  |  |  |  |   67|   123k|#define BN_FLG_CONSTTIME 0x04
  |  |  ------------------
  |  |               #define BN_CONSTTIME_SWAP_FLAGS (BN_FLG_CONSTTIME | BN_FLG_FIXED_TOP)
  |  |  ------------------
  |  |  |  |  213|   123k|#define BN_FLG_FIXED_TOP 0
  |  |  ------------------
  ------------------
  985|   123k|    a->flags ^= t;
  986|   123k|    b->flags ^= t;
  987|       |
  988|       |    /* conditionally swap the data */
  989|   617k|    for (i = 0; i < nwords; i++) {
  ------------------
  |  Branch (989:17): [True: 494k, False: 123k]
  ------------------
  990|   494k|        t = (a->d[i] ^ b->d[i]) & condition;
  991|   494k|        a->d[i] ^= t;
  992|   494k|        b->d[i] ^= t;
  993|   494k|    }
  994|   123k|}
BN_security_bits:
 1001|    132|{
 1002|    132|    int secbits, bits;
 1003|    132|    if (L >= 15360)
  ------------------
  |  Branch (1003:9): [True: 0, False: 132]
  ------------------
 1004|      0|        secbits = 256;
 1005|    132|    else if (L >= 7680)
  ------------------
  |  Branch (1005:14): [True: 22, False: 110]
  ------------------
 1006|     22|        secbits = 192;
 1007|    110|    else if (L >= 3072)
  ------------------
  |  Branch (1007:14): [True: 48, False: 62]
  ------------------
 1008|     48|        secbits = 128;
 1009|     62|    else if (L >= 2048)
  ------------------
  |  Branch (1009:14): [True: 62, False: 0]
  ------------------
 1010|     62|        secbits = 112;
 1011|      0|    else if (L >= 1024)
  ------------------
  |  Branch (1011:14): [True: 0, False: 0]
  ------------------
 1012|      0|        secbits = 80;
 1013|      0|    else
 1014|      0|        return 0;
 1015|    132|    if (N == -1)
  ------------------
  |  Branch (1015:9): [True: 0, False: 132]
  ------------------
 1016|      0|        return secbits;
 1017|    132|    bits = N / 2;
 1018|    132|    if (bits < 80)
  ------------------
  |  Branch (1018:9): [True: 0, False: 132]
  ------------------
 1019|      0|        return 0;
 1020|    132|    return bits >= secbits ? secbits : bits;
  ------------------
  |  Branch (1020:12): [True: 132, False: 0]
  ------------------
 1021|    132|}
BN_zero_ex:
 1024|  11.4M|{
 1025|  11.4M|    a->neg = 0;
 1026|  11.4M|    a->top = 0;
 1027|  11.4M|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  11.4M|#define BN_FLG_FIXED_TOP 0
  ------------------
 1028|  11.4M|}
BN_abs_is_word:
 1031|   706k|{
 1032|   706k|    return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0));
  ------------------
  |  Branch (1032:13): [True: 706k, False: 32]
  |  Branch (1032:30): [True: 432k, False: 273k]
  |  Branch (1032:50): [True: 0, False: 273k]
  |  Branch (1032:62): [True: 0, False: 0]
  ------------------
 1033|   706k|}
BN_is_zero:
 1036|  23.4M|{
 1037|  23.4M|    return a->top == 0;
 1038|  23.4M|}
BN_is_one:
 1041|   569k|{
 1042|   569k|    return BN_abs_is_word(a, 1) && !a->neg;
  ------------------
  |  Branch (1042:12): [True: 432k, False: 136k]
  |  Branch (1042:36): [True: 432k, False: 0]
  ------------------
 1043|   569k|}
BN_is_odd:
 1067|  9.04M|{
 1068|  9.04M|    return (a->top > 0) && (a->d[0] & 1);
  ------------------
  |  Branch (1068:12): [True: 9.04M, False: 0]
  |  Branch (1068:28): [True: 4.70M, False: 4.33M]
  ------------------
 1069|  9.04M|}
BN_is_negative:
 1072|  1.52M|{
 1073|  1.52M|    return (a->neg != 0);
 1074|  1.52M|}
BN_to_montgomery:
 1078|  81.0k|{
 1079|  81.0k|    return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
 1080|  81.0k|}
BN_with_flags:
 1083|    132|{
 1084|    132|    dest->d = b->d;
 1085|    132|    dest->top = b->top;
 1086|    132|    dest->dmax = b->dmax;
 1087|    132|    dest->neg = b->neg;
 1088|    132|    dest->flags = ((dest->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|    132|#define BN_FLG_MALLOCED 0x01
  ------------------
 1089|    132|        | (b->flags & ~BN_FLG_MALLOCED)
  ------------------
  |  |   58|    132|#define BN_FLG_MALLOCED 0x01
  ------------------
 1090|    132|        | BN_FLG_STATIC_DATA | flags);
  ------------------
  |  |   59|    132|#define BN_FLG_STATIC_DATA 0x02
  ------------------
 1091|    132|}
BN_GENCB_free:
 1104|    132|{
 1105|    132|    if (cb == NULL)
  ------------------
  |  Branch (1105:9): [True: 132, False: 0]
  ------------------
 1106|    132|        return;
 1107|      0|    OPENSSL_free(cb);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1108|      0|}
BN_set_flags:
 1111|  7.39k|{
 1112|  7.39k|    b->flags |= n;
 1113|  7.39k|}
BN_get_flags:
 1116|  65.0M|{
 1117|  65.0M|    return b->flags & n;
 1118|  65.0M|}
bn_wexpand:
 1146|  40.2M|{
 1147|  40.2M|    return (words <= a->dmax) ? a : bn_expand2(a, words);
  ------------------
  |  Branch (1147:12): [True: 29.0M, False: 11.1M]
  ------------------
 1148|  40.2M|}
bn_correct_top:
 1173|  16.2M|{
 1174|  16.2M|    BN_ULONG *ftl;
 1175|  16.2M|    int tmp_top = a->top;
 1176|       |
 1177|  16.2M|    if (ossl_likely(tmp_top > 0)) {
  ------------------
  |  |   22|  16.2M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 16.2M, False: 0]
  |  |  ------------------
  ------------------
 1178|  18.0M|        for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
  ------------------
  |  Branch (1178:38): [True: 18.0M, False: 0]
  ------------------
 1179|  18.0M|            ftl--;
 1180|  18.0M|            if (*ftl != 0)
  ------------------
  |  Branch (1180:17): [True: 16.2M, False: 1.79M]
  ------------------
 1181|  16.2M|                break;
 1182|  18.0M|        }
 1183|  16.2M|        a->top = tmp_top;
 1184|  16.2M|    }
 1185|  16.2M|    if (a->top == 0)
  ------------------
  |  Branch (1185:9): [True: 0, False: 16.2M]
  ------------------
 1186|      0|        a->neg = 0;
 1187|  16.2M|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  16.2M|#define BN_FLG_FIXED_TOP 0
  ------------------
 1188|  16.2M|    bn_pollute(a);
 1189|  16.2M|}
bn_lib.c:bn_num_bits_consttime:
  154|    960|{
  155|    960|    int j, ret;
  156|    960|    unsigned int mask, past_i;
  157|    960|    int i = a->top - 1;
  158|    960|    bn_check_top(a);
  159|       |
  160|  5.60k|    for (j = 0, past_i = 0, ret = 0; j < a->dmax; j++) {
  ------------------
  |  Branch (160:38): [True: 4.64k, False: 960]
  ------------------
  161|  4.64k|        mask = constant_time_eq_int(i, j); /* 0xff..ff if i==j, 0x0 otherwise */
  162|       |
  163|  4.64k|        ret += BN_BITS2 & (~mask & ~past_i);
  ------------------
  |  |   54|  4.64k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  4.64k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  164|  4.64k|        ret += BN_num_bits_word(a->d[j]) & mask;
  165|       |
  166|  4.64k|        past_i |= mask; /* past_i will become 0xff..ff after i==j */
  167|  4.64k|    }
  168|       |
  169|       |    /*
  170|       |     * if BN_is_zero(a) => i is -1 and ret contains garbage, so we mask the
  171|       |     * final result.
  172|       |     */
  173|    960|    mask = ~(constant_time_eq_int(i, ((int)-1)));
  174|       |
  175|    960|    return ret & mask;
  176|    960|}
bn_lib.c:bn_free_d:
  203|  11.3M|{
  204|  11.3M|    if (BN_get_flags(a, BN_FLG_SECURE))
  ------------------
  |  |   68|  11.3M|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (204:9): [True: 6.39k, False: 11.3M]
  ------------------
  205|  6.39k|        OPENSSL_secure_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  150|  6.39k|    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|  11.3M|    else if (clear != 0)
  ------------------
  |  Branch (206:14): [True: 6.53M, False: 4.78M]
  ------------------
  207|  6.53M|        OPENSSL_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  130|  6.53M|    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|  4.78M|    else
  209|  4.78M|        OPENSSL_free(a->d);
  ------------------
  |  |  132|  4.78M|    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|  11.3M|}
bn_lib.c:bn_expand_internal:
  265|  11.3M|{
  266|  11.3M|    BN_ULONG *a = NULL;
  267|       |
  268|  11.3M|    if (ossl_unlikely(words > (INT_MAX / (4 * BN_BITS2)))) {
  ------------------
  |  |   23|  11.3M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.3M]
  |  |  ------------------
  ------------------
  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|  11.3M|    if (ossl_unlikely(BN_get_flags(b, BN_FLG_STATIC_DATA))) {
  ------------------
  |  |   23|  11.3M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.3M]
  |  |  ------------------
  ------------------
  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|  11.3M|    if (BN_get_flags(b, BN_FLG_SECURE))
  ------------------
  |  |   68|  11.3M|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (276:9): [True: 6.39k, False: 11.3M]
  ------------------
  277|  6.39k|        a = OPENSSL_secure_calloc(words, sizeof(*a));
  ------------------
  |  |  146|  6.39k|    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|  11.3M|    else
  279|  11.3M|        a = OPENSSL_calloc(words, sizeof(*a));
  ------------------
  |  |  113|  11.3M|    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|  11.3M|    if (ossl_unlikely(a == NULL))
  ------------------
  |  |   23|  11.3M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.3M]
  |  |  ------------------
  ------------------
  281|      0|        return NULL;
  282|       |
  283|  11.3M|    assert(b->top <= words);
  ------------------
  |  Branch (283:5): [True: 0, False: 11.3M]
  |  Branch (283:5): [True: 11.3M, False: 0]
  ------------------
  284|  11.3M|    if (b->top > 0)
  ------------------
  |  Branch (284:9): [True: 559k, False: 10.7M]
  ------------------
  285|   559k|        memcpy(a, b->d, sizeof(*a) * b->top);
  286|       |
  287|  11.3M|    return a;
  288|  11.3M|}
bn_lib.c:bin2bn:
  434|  2.23M|{
  435|  2.23M|    int inc;
  436|  2.23M|    const unsigned char *s2;
  437|  2.23M|    int inc2;
  438|  2.23M|    int neg = 0, xor = 0, carry = 0;
  439|  2.23M|    unsigned int i;
  440|  2.23M|    unsigned int n;
  441|  2.23M|    BIGNUM *bn = NULL;
  442|       |
  443|       |    /* Negative length is not acceptable */
  444|  2.23M|    if (len < 0)
  ------------------
  |  Branch (444:9): [True: 0, False: 2.23M]
  ------------------
  445|      0|        return NULL;
  446|       |
  447|  2.23M|    if (ret == NULL)
  ------------------
  |  Branch (447:9): [True: 887k, False: 1.34M]
  ------------------
  448|   887k|        ret = bn = BN_new();
  449|  2.23M|    if (ret == NULL)
  ------------------
  |  Branch (449:9): [True: 0, False: 2.23M]
  ------------------
  450|      0|        return NULL;
  451|  2.23M|    bn_check_top(ret);
  452|       |
  453|       |    /*
  454|       |     * If the input has no bits, the number is considered zero.
  455|       |     * This makes calls with s==NULL and len==0 safe.
  456|       |     */
  457|  2.23M|    if (len == 0) {
  ------------------
  |  Branch (457:9): [True: 0, False: 2.23M]
  ------------------
  458|      0|        BN_clear(ret);
  459|      0|        return ret;
  460|      0|    }
  461|       |
  462|       |    /*
  463|       |     * The loop that does the work iterates from least to most
  464|       |     * significant BIGNUM chunk, so we adapt parameters to transfer
  465|       |     * input bytes accordingly.
  466|       |     */
  467|  2.23M|    if (endianness == LITTLE) {
  ------------------
  |  Branch (467:9): [True: 256, False: 2.23M]
  ------------------
  468|    256|        s2 = s + len - 1;
  469|    256|        inc2 = -1;
  470|    256|        inc = 1;
  471|  2.23M|    } else {
  472|  2.23M|        s2 = s;
  473|  2.23M|        inc2 = 1;
  474|  2.23M|        inc = -1;
  475|  2.23M|        s += len - 1;
  476|  2.23M|    }
  477|       |
  478|       |    /* Take note of the signedness of the input bytes*/
  479|  2.23M|    if (signedness == SIGNED) {
  ------------------
  |  Branch (479:9): [True: 0, False: 2.23M]
  ------------------
  480|      0|        neg = !!(*s2 & 0x80);
  481|      0|        xor = neg ? 0xff : 0x00;
  ------------------
  |  Branch (481:15): [True: 0, False: 0]
  ------------------
  482|      0|        carry = neg;
  483|      0|    }
  484|       |
  485|       |    /*
  486|       |     * Skip leading sign extensions (the value of |xor|).
  487|       |     * This is the only spot where |s2| and |inc2| are used.
  488|       |     */
  489|  2.60M|    for (; len > 0 && *s2 == xor; s2 += inc2, len--)
  ------------------
  |  Branch (489:12): [True: 2.60M, False: 0]
  |  Branch (489:23): [True: 369k, False: 2.23M]
  ------------------
  490|   369k|        continue;
  491|       |
  492|       |    /*
  493|       |     * If there was a set of 0xff, we backtrack one byte unless the next
  494|       |     * one has a sign bit, as the last 0xff is then part of the actual
  495|       |     * number, rather then a mere sign extension.
  496|       |     */
  497|  2.23M|    if (xor == 0xff) {
  ------------------
  |  Branch (497:9): [True: 0, False: 2.23M]
  ------------------
  498|      0|        if (len == 0 || !(*s2 & 0x80))
  ------------------
  |  Branch (498:13): [True: 0, False: 0]
  |  Branch (498:25): [True: 0, False: 0]
  ------------------
  499|      0|            len++;
  500|      0|    }
  501|       |    /* If it was all zeros, we're done */
  502|  2.23M|    if (len == 0) {
  ------------------
  |  Branch (502:9): [True: 0, False: 2.23M]
  ------------------
  503|      0|        ret->top = 0;
  504|      0|        return ret;
  505|      0|    }
  506|  2.23M|    n = ((len - 1) / BN_BYTES) + 1; /* Number of resulting bignum chunks */
  ------------------
  |  |   38|  2.23M|#define BN_BYTES 8
  ------------------
  507|  2.23M|    if (bn_wexpand(ret, (int)n) == NULL) {
  ------------------
  |  Branch (507:9): [True: 0, False: 2.23M]
  ------------------
  508|      0|        BN_free(bn);
  509|      0|        return NULL;
  510|      0|    }
  511|  2.23M|    ret->top = n;
  512|  2.23M|    ret->neg = neg;
  513|  29.1M|    for (i = 0; n-- > 0; i++) {
  ------------------
  |  Branch (513:17): [True: 26.8M, False: 2.23M]
  ------------------
  514|  26.8M|        BN_ULONG l = 0; /* Accumulator */
  515|  26.8M|        unsigned int m = 0; /* Offset in a bignum chunk, in bits */
  516|       |
  517|   239M|        for (; len > 0 && m < BN_BYTES * 8; len--, s += inc, m += 8) {
  ------------------
  |  |   38|   237M|#define BN_BYTES 8
  ------------------
  |  Branch (517:16): [True: 237M, False: 2.23M]
  |  Branch (517:27): [True: 213M, False: 24.6M]
  ------------------
  518|   213M|            BN_ULONG byte_xored = *s ^ xor;
  519|   213M|            BN_ULONG byte = (byte_xored + carry) & 0xff;
  520|       |
  521|   213M|            carry = byte_xored > byte; /* Implicit 1 or 0 */
  522|   213M|            l |= (byte << m);
  523|   213M|        }
  524|  26.8M|        ret->d[i] = l;
  525|  26.8M|    }
  526|       |    /*
  527|       |     * need to call this due to clear byte at top if avoiding having the top
  528|       |     * bit set (-ve number)
  529|       |     */
  530|  2.23M|    bn_correct_top(ret);
  531|  2.23M|    return ret;
  532|  2.23M|}
bn_lib.c:bn2binpad:
  546|    746|{
  547|    746|    int inc;
  548|    746|    int n, n8;
  549|    746|    int xor = 0, carry = 0, ext = 0;
  550|    746|    size_t i, lasti, j, atop, mask;
  551|    746|    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|    746|    n8 = BN_num_bits(a);
  559|    746|    n = (n8 + 7) / 8; /* This is what BN_num_bytes() does */
  560|       |
  561|       |    /* Take note of the signedness of the bignum */
  562|    746|    if (signedness == SIGNED) {
  ------------------
  |  Branch (562:9): [True: 0, False: 746]
  ------------------
  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|    746|    if (tolen == -1) {
  ------------------
  |  Branch (577:9): [True: 486, False: 260]
  ------------------
  578|    486|        tolen = n + ext;
  579|    486|    } else if (tolen < n + ext) { /* uncommon/unlike case */
  ------------------
  |  Branch (579:16): [True: 0, False: 260]
  ------------------
  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|    746|    atop = a->dmax * BN_BYTES;
  ------------------
  |  |   38|    746|#define BN_BYTES 8
  ------------------
  591|    746|    if (atop == 0) {
  ------------------
  |  Branch (591:9): [True: 0, False: 746]
  ------------------
  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|    746|    if (endianness == LITTLE) {
  ------------------
  |  Branch (602:9): [True: 128, False: 618]
  ------------------
  603|    128|        inc = 1;
  604|    618|    } else {
  605|    618|        inc = -1;
  606|    618|        to += tolen - 1; /* Move to the last byte, not beyond */
  607|    618|    }
  608|       |
  609|    746|    lasti = atop - 1;
  610|    746|    atop = a->top * BN_BYTES;
  ------------------
  |  |   38|    746|#define BN_BYTES 8
  ------------------
  611|  90.6k|    for (i = 0, j = 0; j < (size_t)tolen; j++) {
  ------------------
  |  Branch (611:24): [True: 89.9k, False: 746]
  ------------------
  612|  89.9k|        unsigned char byte, byte_xored;
  613|       |
  614|  89.9k|        l = a->d[i / BN_BYTES];
  ------------------
  |  |   38|  89.9k|#define BN_BYTES 8
  ------------------
  615|  89.9k|        mask = 0 - ((j - atop) >> (8 * sizeof(i) - 1));
  616|  89.9k|        byte = (unsigned char)(l >> (8 * (i % BN_BYTES)) & mask);
  ------------------
  |  |   38|  89.9k|#define BN_BYTES 8
  ------------------
  617|  89.9k|        byte_xored = byte ^ xor;
  618|  89.9k|        *to = (unsigned char)(byte_xored + carry);
  619|  89.9k|        carry = byte_xored > *to; /* Implicit 1 or 0 */
  620|  89.9k|        to += inc;
  621|  89.9k|        i += (i - lasti) >> (8 * sizeof(i) - 1); /* stay on last limb */
  622|  89.9k|    }
  623|       |
  624|    746|    return tolen;
  625|    746|}

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

BN_nnmod:
   15|  1.45M|{
   16|       |    /*
   17|       |     * like BN_mod, but returns non-negative remainder (i.e., 0 <= r < |m|
   18|       |     * always holds)
   19|       |     */
   20|       |
   21|  1.45M|    if (r == m) {
  ------------------
  |  Branch (21:9): [True: 0, False: 1.45M]
  ------------------
   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.45M|    if (!(BN_mod(r, a, m, ctx)))
  ------------------
  |  |  276|  1.45M|#define BN_mod(rem, a, m, ctx) BN_div(NULL, (rem), (a), (m), (ctx))
  ------------------
  |  Branch (26:9): [True: 0, False: 1.45M]
  ------------------
   27|      0|        return 0;
   28|  1.45M|    if (!r->neg)
  ------------------
  |  Branch (28:9): [True: 1.32M, False: 136k]
  ------------------
   29|  1.32M|        return 1;
   30|       |    /* now   -|m| < r < 0,  so we have to set  r := r + |m| */
   31|   136k|    return (m->neg ? BN_sub : BN_add)(r, r, m);
  ------------------
  |  Branch (31:13): [True: 0, False: 136k]
  ------------------
   32|  1.45M|}
bn_mod_add_fixed_top:
   56|   837k|{
   57|   837k|    size_t i, ai, bi, mtop = m->top;
   58|   837k|    BN_ULONG storage[1024 / BN_BITS2];
   59|   837k|    BN_ULONG carry, temp, mask, *rp, *tp = storage;
   60|   837k|    const BN_ULONG *ap, *bp;
   61|       |
   62|   837k|    if (bn_wexpand(r, (int)mtop) == NULL)
  ------------------
  |  Branch (62:9): [True: 0, False: 837k]
  ------------------
   63|      0|        return 0;
   64|       |
   65|   837k|    if (mtop > OSSL_NELEM(storage)) {
  ------------------
  |  |   14|   837k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (65:9): [True: 0, False: 837k]
  ------------------
   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|   837k|    ap = a->d != NULL ? a->d : tp;
  ------------------
  |  Branch (71:10): [True: 837k, False: 0]
  ------------------
   72|   837k|    bp = b->d != NULL ? b->d : tp;
  ------------------
  |  Branch (72:10): [True: 837k, False: 0]
  ------------------
   73|       |
   74|  5.32M|    for (i = 0, ai = 0, bi = 0, carry = 0; i < mtop;) {
  ------------------
  |  Branch (74:44): [True: 4.48M, False: 837k]
  ------------------
   75|  4.48M|        mask = (BN_ULONG)0 - ((i - a->top) >> (8 * sizeof(i) - 1));
   76|  4.48M|        temp = ((ap[ai] & mask) + carry) & BN_MASK2;
  ------------------
  |  |   77|  4.48M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
   77|  4.48M|        carry = (temp < carry);
   78|       |
   79|  4.48M|        mask = (BN_ULONG)0 - ((i - b->top) >> (8 * sizeof(i) - 1));
   80|  4.48M|        tp[i] = ((bp[bi] & mask) + temp) & BN_MASK2;
  ------------------
  |  |   77|  4.48M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
   81|  4.48M|        carry += (tp[i] < temp);
   82|       |
   83|  4.48M|        i++;
   84|  4.48M|        ai += (i - a->dmax) >> (8 * sizeof(i) - 1);
   85|  4.48M|        bi += (i - b->dmax) >> (8 * sizeof(i) - 1);
   86|  4.48M|    }
   87|   837k|    rp = r->d;
   88|   837k|    carry -= bn_sub_words(rp, tp, m->d, (int)mtop);
   89|  5.32M|    for (i = 0; i < mtop; i++) {
  ------------------
  |  Branch (89:17): [True: 4.48M, False: 837k]
  ------------------
   90|  4.48M|        rp[i] = (carry & tp[i]) | (~carry & rp[i]);
   91|  4.48M|        ((volatile BN_ULONG *)tp)[i] = 0;
   92|  4.48M|    }
   93|   837k|    r->top = (int)mtop;
   94|   837k|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   837k|#define BN_FLG_FIXED_TOP 0
  ------------------
   95|   837k|    r->neg = 0;
   96|       |
   97|   837k|    if (tp != storage)
  ------------------
  |  Branch (97:9): [True: 0, False: 837k]
  ------------------
   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|   837k|    return 1;
  101|   837k|}
BN_mod_add_quick:
  105|   837k|{
  106|   837k|    int ret = bn_mod_add_fixed_top(r, a, b, m);
  107|       |
  108|   837k|    if (ret)
  ------------------
  |  Branch (108:9): [True: 837k, False: 0]
  ------------------
  109|   837k|        bn_correct_top(r);
  110|       |
  111|   837k|    return ret;
  112|   837k|}
BN_mod_sub_quick:
  192|   246k|{
  193|   246k|    if (r == m) {
  ------------------
  |  Branch (193:9): [True: 0, False: 246k]
  ------------------
  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|   246k|    if (!BN_sub(r, a, b))
  ------------------
  |  Branch (198:9): [True: 0, False: 246k]
  ------------------
  199|      0|        return 0;
  200|   246k|    if (r->neg)
  ------------------
  |  Branch (200:9): [True: 123k, False: 123k]
  ------------------
  201|   123k|        return BN_add(r, r, m);
  202|   123k|    return 1;
  203|   246k|}
BN_mod_lshift1_quick:
  256|  82.2k|{
  257|  82.2k|    if (!BN_lshift1(r, a))
  ------------------
  |  Branch (257:9): [True: 0, False: 82.2k]
  ------------------
  258|      0|        return 0;
  259|  82.2k|    bn_check_top(r);
  260|  82.2k|    if (BN_cmp(r, m) >= 0)
  ------------------
  |  Branch (260:9): [True: 41.0k, False: 41.1k]
  ------------------
  261|  41.0k|        return BN_sub(r, r, m);
  262|  41.1k|    return 1;
  263|  82.2k|}
BN_mod_lshift_quick:
  293|  41.2k|{
  294|  41.2k|    if (r != a) {
  ------------------
  |  Branch (294:9): [True: 40.9k, False: 320]
  ------------------
  295|  40.9k|        if (BN_copy(r, a) == NULL)
  ------------------
  |  Branch (295:13): [True: 0, False: 40.9k]
  ------------------
  296|      0|            return 0;
  297|  40.9k|    }
  298|       |
  299|  83.0k|    while (n > 0) {
  ------------------
  |  Branch (299:12): [True: 41.7k, False: 41.2k]
  ------------------
  300|  41.7k|        int max_shift;
  301|       |
  302|       |        /* 0 < r < m */
  303|  41.7k|        max_shift = BN_num_bits(m) - BN_num_bits(r);
  304|       |        /* max_shift >= 0 */
  305|       |
  306|  41.7k|        if (max_shift < 0) {
  ------------------
  |  Branch (306:13): [True: 0, False: 41.7k]
  ------------------
  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|  41.7k|        if (max_shift > n)
  ------------------
  |  Branch (311:13): [True: 0, False: 41.7k]
  ------------------
  312|      0|            max_shift = n;
  313|       |
  314|  41.7k|        if (max_shift) {
  ------------------
  |  Branch (314:13): [True: 40.9k, False: 800]
  ------------------
  315|  40.9k|            if (!BN_lshift(r, r, max_shift))
  ------------------
  |  Branch (315:17): [True: 0, False: 40.9k]
  ------------------
  316|      0|                return 0;
  317|  40.9k|            n -= max_shift;
  318|  40.9k|        } else {
  319|    800|            if (!BN_lshift1(r, r))
  ------------------
  |  Branch (319:17): [True: 0, False: 800]
  ------------------
  320|      0|                return 0;
  321|    800|            --n;
  322|    800|        }
  323|       |
  324|       |        /* BN_num_bits(r) <= BN_num_bits(m) */
  325|       |
  326|  41.7k|        if (BN_cmp(r, m) >= 0) {
  ------------------
  |  Branch (326:13): [True: 800, False: 40.9k]
  ------------------
  327|    800|            if (!BN_sub(r, r, m))
  ------------------
  |  Branch (327:17): [True: 0, False: 800]
  ------------------
  328|      0|                return 0;
  329|    800|        }
  330|  41.7k|    }
  331|  41.2k|    bn_check_top(r);
  332|       |
  333|  41.2k|    return 1;
  334|  41.2k|}

BN_mod_mul_montgomery:
   27|   972k|{
   28|   972k|    int ret = bn_mul_mont_fixed_top(r, a, b, mont, ctx);
   29|       |
   30|   972k|    bn_correct_top(r);
   31|   972k|    bn_check_top(r);
   32|       |
   33|   972k|    return ret;
   34|   972k|}
bn_mul_mont_fixed_top:
   38|  1.04M|{
   39|  1.04M|    BIGNUM *tmp;
   40|  1.04M|    int ret = 0;
   41|  1.04M|    int num = mont->N.top;
   42|       |
   43|  1.04M|#if defined(OPENSSL_BN_ASM_MONT) && defined(MONT_WORD)
   44|  1.04M|    if (num > 1 && num <= BN_SOFT_LIMIT && a->top == num && b->top == num) {
  ------------------
  |  |   52|  2.08M|#define BN_SOFT_LIMIT (4096 / BN_BYTES)
  |  |  ------------------
  |  |  |  |   38|  1.04M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (44:9): [True: 1.04M, False: 0]
  |  Branch (44:20): [True: 1.04M, False: 0]
  |  Branch (44:44): [True: 1.03M, False: 11.7k]
  |  Branch (44:61): [True: 1.03M, False: 0]
  ------------------
   45|  1.03M|        if (bn_wexpand(r, num) == NULL)
  ------------------
  |  Branch (45:13): [True: 0, False: 1.03M]
  ------------------
   46|      0|            return 0;
   47|  1.03M|        if (bn_mul_mont(r->d, a->d, b->d, mont->N.d, mont->n0, num)) {
  ------------------
  |  Branch (47:13): [True: 1.03M, False: 0]
  ------------------
   48|  1.03M|            r->neg = a->neg ^ b->neg;
   49|  1.03M|            r->top = num;
   50|  1.03M|            r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  1.03M|#define BN_FLG_FIXED_TOP 0
  ------------------
   51|  1.03M|            return 1;
   52|  1.03M|        }
   53|  1.03M|    }
   54|  11.7k|#endif
   55|       |
   56|  11.7k|    if ((a->top + b->top) > 2 * num)
  ------------------
  |  Branch (56:9): [True: 0, False: 11.7k]
  ------------------
   57|      0|        return 0;
   58|       |
   59|  11.7k|    BN_CTX_start(ctx);
   60|  11.7k|    tmp = BN_CTX_get(ctx);
   61|  11.7k|    if (tmp == NULL)
  ------------------
  |  Branch (61:9): [True: 0, False: 11.7k]
  ------------------
   62|      0|        goto err;
   63|       |
   64|  11.7k|    bn_check_top(tmp);
   65|  11.7k|    if (a == b) {
  ------------------
  |  Branch (65:9): [True: 0, False: 11.7k]
  ------------------
   66|      0|        if (!bn_sqr_fixed_top(tmp, a, ctx))
  ------------------
  |  Branch (66:13): [True: 0, False: 0]
  ------------------
   67|      0|            goto err;
   68|  11.7k|    } else {
   69|  11.7k|        if (!bn_mul_fixed_top(tmp, a, b, ctx))
  ------------------
  |  Branch (69:13): [True: 0, False: 11.7k]
  ------------------
   70|      0|            goto err;
   71|  11.7k|    }
   72|       |    /* reduce from aRR to aR */
   73|  11.7k|#ifdef MONT_WORD
   74|  11.7k|    if (!bn_from_montgomery_word(r, tmp, mont))
  ------------------
  |  Branch (74:9): [True: 0, False: 11.7k]
  ------------------
   75|      0|        goto err;
   76|       |#else
   77|       |    if (!BN_from_montgomery(r, tmp, mont, ctx))
   78|       |        goto err;
   79|       |#endif
   80|  11.7k|    ret = 1;
   81|  11.7k|err:
   82|  11.7k|    BN_CTX_end(ctx);
   83|  11.7k|    return ret;
   84|  11.7k|}
BN_from_montgomery:
  163|    800|{
  164|    800|    int retn;
  165|       |
  166|    800|    retn = bn_from_mont_fixed_top(ret, a, mont, ctx);
  167|    800|    bn_correct_top(ret);
  168|    800|    bn_check_top(ret);
  169|       |
  170|    800|    return retn;
  171|    800|}
bn_from_mont_fixed_top:
  175|    932|{
  176|    932|    int retn = 0;
  177|    932|#ifdef MONT_WORD
  178|    932|    BIGNUM *t;
  179|       |
  180|    932|    BN_CTX_start(ctx);
  181|    932|    if ((t = BN_CTX_get(ctx)) && BN_copy(t, a)) {
  ------------------
  |  Branch (181:9): [True: 932, False: 0]
  |  Branch (181:34): [True: 932, False: 0]
  ------------------
  182|    932|        retn = bn_from_montgomery_word(ret, t, mont);
  183|    932|    }
  184|    932|    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|    932|    return retn;
  219|    932|}
bn_to_mont_fixed_top:
  223|    292|{
  224|    292|    return bn_mul_mont_fixed_top(r, a, &(mont->RR), mont, ctx);
  225|    292|}
BN_MONT_CTX_new:
  228|   319k|{
  229|   319k|    BN_MONT_CTX *ret;
  230|       |
  231|   319k|    if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  107|   319k|    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: 319k]
  ------------------
  232|      0|        return NULL;
  233|       |
  234|   319k|    BN_MONT_CTX_init(ret);
  235|   319k|    ret->flags = BN_FLG_MALLOCED;
  ------------------
  |  |   58|   319k|#define BN_FLG_MALLOCED 0x01
  ------------------
  236|   319k|    return ret;
  237|   319k|}
BN_MONT_CTX_init:
  240|   319k|{
  241|   319k|    ctx->ri = 0;
  242|   319k|    bn_init(&ctx->RR);
  243|   319k|    bn_init(&ctx->N);
  244|   319k|    bn_init(&ctx->Ni);
  245|   319k|    ctx->n0[0] = ctx->n0[1] = 0;
  246|   319k|    ctx->flags = 0;
  247|   319k|}
BN_MONT_CTX_free:
  250|  1.42M|{
  251|  1.42M|    if (mont == NULL)
  ------------------
  |  Branch (251:9): [True: 1.10M, False: 319k]
  ------------------
  252|  1.10M|        return;
  253|   319k|    BN_clear_free(&mont->RR);
  254|   319k|    BN_clear_free(&mont->N);
  255|   319k|    BN_clear_free(&mont->Ni);
  256|   319k|    if (mont->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|   319k|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (256:9): [True: 319k, False: 0]
  ------------------
  257|   319k|        OPENSSL_free(mont);
  ------------------
  |  |  132|   319k|    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|   319k|}
BN_MONT_CTX_set:
  261|   136k|{
  262|   136k|    int i, ret = 0;
  263|   136k|    BIGNUM *Ri, *R;
  264|       |
  265|   136k|    if (BN_is_zero(mod))
  ------------------
  |  Branch (265:9): [True: 0, False: 136k]
  ------------------
  266|      0|        return 0;
  267|       |
  268|   136k|    BN_CTX_start(ctx);
  269|   136k|    if ((Ri = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (269:9): [True: 0, False: 136k]
  ------------------
  270|      0|        goto err;
  271|   136k|    R = &(mont->RR); /* grab RR as a temp */
  272|   136k|    if (!BN_copy(&(mont->N), mod))
  ------------------
  |  Branch (272:9): [True: 0, False: 136k]
  ------------------
  273|      0|        goto err; /* Set N */
  274|   136k|    if (BN_get_flags(mod, BN_FLG_CONSTTIME) != 0)
  ------------------
  |  |   67|   136k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (274:9): [True: 0, False: 136k]
  ------------------
  275|      0|        BN_set_flags(&(mont->N), BN_FLG_CONSTTIME);
  ------------------
  |  |   67|      0|#define BN_FLG_CONSTTIME 0x04
  ------------------
  276|   136k|    mont->N.neg = 0;
  277|       |
  278|   136k|#ifdef MONT_WORD
  279|   136k|    {
  280|   136k|        BIGNUM tmod;
  281|   136k|        BN_ULONG buf[2];
  282|       |
  283|   136k|        bn_init(&tmod);
  284|   136k|        tmod.d = buf;
  285|   136k|        tmod.dmax = 2;
  286|   136k|        tmod.neg = 0;
  287|       |
  288|   136k|        if (BN_get_flags(mod, BN_FLG_CONSTTIME) != 0)
  ------------------
  |  |   67|   136k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (288:13): [True: 0, False: 136k]
  ------------------
  289|      0|            BN_set_flags(&tmod, BN_FLG_CONSTTIME);
  ------------------
  |  |   67|      0|#define BN_FLG_CONSTTIME 0x04
  ------------------
  290|       |
  291|   136k|        mont->ri = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2;
  ------------------
  |  |   54|   136k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   136k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                      mont->ri = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2;
  ------------------
  |  |   54|   136k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   136k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                      mont->ri = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2;
  ------------------
  |  |   54|   136k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   136k|#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|   136k|        BN_zero(R);
  ------------------
  |  |  201|   136k|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  339|   136k|        if (!(BN_set_bit(R, BN_BITS2)))
  ------------------
  |  |   54|   136k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   136k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (339:13): [True: 0, False: 136k]
  ------------------
  340|      0|            goto err; /* R */
  341|       |
  342|   136k|        buf[0] = mod->d[0]; /* tmod = N mod word size */
  343|   136k|        buf[1] = 0;
  344|   136k|        tmod.top = buf[0] != 0 ? 1 : 0;
  ------------------
  |  Branch (344:20): [True: 136k, False: 0]
  ------------------
  345|       |        /* Ri = R^-1 mod N */
  346|   136k|        if (BN_is_one(&tmod))
  ------------------
  |  Branch (346:13): [True: 0, False: 136k]
  ------------------
  347|      0|            BN_zero(Ri);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  348|   136k|        else if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
  ------------------
  |  Branch (348:18): [True: 0, False: 136k]
  ------------------
  349|      0|            goto err;
  350|   136k|        if (!BN_lshift(Ri, Ri, BN_BITS2))
  ------------------
  |  |   54|   136k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   136k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (350:13): [True: 0, False: 136k]
  ------------------
  351|      0|            goto err; /* R*Ri */
  352|   136k|        if (!BN_is_zero(Ri)) {
  ------------------
  |  Branch (352:13): [True: 136k, False: 0]
  ------------------
  353|   136k|            if (!BN_sub_word(Ri, 1))
  ------------------
  |  Branch (353:17): [True: 0, False: 136k]
  ------------------
  354|      0|                goto err;
  355|   136k|        } 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|   136k|        if (!BN_div(Ri, NULL, Ri, &tmod, ctx))
  ------------------
  |  Branch (360:13): [True: 0, False: 136k]
  ------------------
  361|      0|            goto err;
  362|       |        /*
  363|       |         * Ni = (R*Ri-1)/N, keep only least significant word:
  364|       |         */
  365|   136k|        mont->n0[0] = (Ri->top > 0) ? Ri->d[0] : 0;
  ------------------
  |  Branch (365:23): [True: 136k, False: 0]
  ------------------
  366|   136k|        mont->n0[1] = 0;
  367|   136k|#endif
  368|   136k|    }
  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|   136k|    BN_zero(&(mont->RR));
  ------------------
  |  |  201|   136k|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  392|   136k|    if (!BN_set_bit(&(mont->RR), mont->ri * 2))
  ------------------
  |  Branch (392:9): [True: 0, False: 136k]
  ------------------
  393|      0|        goto err;
  394|   136k|    if (!BN_mod(&(mont->RR), &(mont->RR), &(mont->N), ctx))
  ------------------
  |  |  276|   136k|#define BN_mod(rem, a, m, ctx) BN_div(NULL, (rem), (a), (m), (ctx))
  ------------------
  |  Branch (394:9): [True: 0, False: 136k]
  ------------------
  395|      0|        goto err;
  396|       |
  397|   136k|    for (i = mont->RR.top, ret = mont->N.top; i < ret; i++)
  ------------------
  |  Branch (397:47): [True: 0, False: 136k]
  ------------------
  398|      0|        mont->RR.d[i] = 0;
  399|   136k|    mont->RR.top = ret;
  400|   136k|    mont->RR.flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   136k|#define BN_FLG_FIXED_TOP 0
  ------------------
  401|       |
  402|   136k|    ret = 1;
  403|   136k|err:
  404|   136k|    BN_CTX_end(ctx);
  405|   136k|    return ret;
  406|   136k|}
BN_MONT_CTX_copy:
  409|   159k|{
  410|   159k|    if (to == from)
  ------------------
  |  Branch (410:9): [True: 0, False: 159k]
  ------------------
  411|      0|        return to;
  412|       |
  413|   159k|    if (!BN_copy(&(to->RR), &(from->RR)))
  ------------------
  |  Branch (413:9): [True: 0, False: 159k]
  ------------------
  414|      0|        return NULL;
  415|   159k|    if (!BN_copy(&(to->N), &(from->N)))
  ------------------
  |  Branch (415:9): [True: 0, False: 159k]
  ------------------
  416|      0|        return NULL;
  417|   159k|    if (!BN_copy(&(to->Ni), &(from->Ni)))
  ------------------
  |  Branch (417:9): [True: 0, False: 159k]
  ------------------
  418|      0|        return NULL;
  419|   159k|    to->ri = from->ri;
  420|   159k|    to->n0[0] = from->n0[0];
  421|   159k|    to->n0[1] = from->n0[1];
  422|   159k|    return to;
  423|   159k|}
BN_MONT_CTX_set_locked:
  427|    132|{
  428|    132|    BN_MONT_CTX *ret;
  429|       |
  430|    132|    if (!CRYPTO_THREAD_read_lock(lock))
  ------------------
  |  Branch (430:9): [True: 0, False: 132]
  ------------------
  431|      0|        return NULL;
  432|    132|    ret = *pmont;
  433|    132|    CRYPTO_THREAD_unlock(lock);
  434|    132|    if (ret)
  ------------------
  |  Branch (434:9): [True: 0, False: 132]
  ------------------
  435|      0|        return ret;
  436|       |
  437|       |    /*
  438|       |     * We don't want to serialize globally while doing our lazy-init math in
  439|       |     * BN_MONT_CTX_set. That punishes threads that are doing independent
  440|       |     * things. Instead, punish the case where more than one thread tries to
  441|       |     * lazy-init the same 'pmont', by having each do the lazy-init math work
  442|       |     * independently and only use the one from the thread that wins the race
  443|       |     * (the losers throw away the work they've done).
  444|       |     */
  445|    132|    ret = BN_MONT_CTX_new();
  446|    132|    if (ret == NULL)
  ------------------
  |  Branch (446:9): [True: 0, False: 132]
  ------------------
  447|      0|        return NULL;
  448|    132|    if (!BN_MONT_CTX_set(ret, mod, ctx)) {
  ------------------
  |  Branch (448:9): [True: 0, False: 132]
  ------------------
  449|      0|        BN_MONT_CTX_free(ret);
  450|      0|        return NULL;
  451|      0|    }
  452|       |
  453|       |    /* The locked compare-and-set, after the local work is done. */
  454|    132|    if (!CRYPTO_THREAD_write_lock(lock)) {
  ------------------
  |  Branch (454:9): [True: 0, False: 132]
  ------------------
  455|      0|        BN_MONT_CTX_free(ret);
  456|      0|        return NULL;
  457|      0|    }
  458|       |
  459|    132|    if (*pmont) {
  ------------------
  |  Branch (459:9): [True: 0, False: 132]
  ------------------
  460|      0|        BN_MONT_CTX_free(ret);
  461|      0|        ret = *pmont;
  462|      0|    } else
  463|    132|        *pmont = ret;
  464|    132|    CRYPTO_THREAD_unlock(lock);
  465|    132|    return ret;
  466|    132|}
ossl_bn_mont_ctx_set:
  470|  22.8k|{
  471|  22.8k|    if (BN_copy(&ctx->N, modulus) == NULL)
  ------------------
  |  Branch (471:9): [True: 0, False: 22.8k]
  ------------------
  472|      0|        return 0;
  473|  22.8k|    if (BN_bin2bn(rr, rrlen, &ctx->RR) == NULL)
  ------------------
  |  Branch (473:9): [True: 0, False: 22.8k]
  ------------------
  474|      0|        return 0;
  475|  22.8k|    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|  22.8k|    ctx->n0[0] = ((BN_ULONG)nhi << 32) | nlo;
  484|  22.8k|    ctx->n0[1] = 0;
  485|  22.8k|#endif
  486|       |
  487|  22.8k|    return 1;
  488|  22.8k|}
bn_mont.c:bn_from_montgomery_word:
   88|  12.6k|{
   89|  12.6k|    BIGNUM *n;
   90|  12.6k|    BN_ULONG *ap, *np, *rp, n0, v, carry;
   91|  12.6k|    int nl, max, i;
   92|  12.6k|    unsigned int rtop;
   93|       |
   94|  12.6k|    n = &(mont->N);
   95|  12.6k|    nl = n->top;
   96|  12.6k|    if (nl == 0) {
  ------------------
  |  Branch (96:9): [True: 0, False: 12.6k]
  ------------------
   97|      0|        ret->top = 0;
   98|      0|        return 1;
   99|      0|    }
  100|       |
  101|  12.6k|    max = (2 * nl); /* carry is stored separately */
  102|  12.6k|    if (bn_wexpand(r, max) == NULL)
  ------------------
  |  Branch (102:9): [True: 0, False: 12.6k]
  ------------------
  103|      0|        return 0;
  104|       |
  105|  12.6k|    r->neg ^= n->neg;
  106|  12.6k|    np = n->d;
  107|  12.6k|    rp = r->d;
  108|       |
  109|       |    /* clear the top words of T */
  110|   144k|    for (rtop = r->top, i = 0; i < max; i++) {
  ------------------
  |  Branch (110:32): [True: 131k, False: 12.6k]
  ------------------
  111|   131k|        v = (BN_ULONG)0 - ((i - rtop) >> (8 * sizeof(rtop) - 1));
  112|   131k|        rp[i] &= v;
  113|   131k|    }
  114|       |
  115|  12.6k|    r->top = max;
  116|  12.6k|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  12.6k|#define BN_FLG_FIXED_TOP 0
  ------------------
  117|  12.6k|    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|  78.4k|    for (carry = 0, i = 0; i < nl; i++, rp++) {
  ------------------
  |  Branch (124:28): [True: 65.8k, False: 12.6k]
  ------------------
  125|  65.8k|        v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
  ------------------
  |  |   77|  65.8k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  126|  65.8k|        v = (v + carry + rp[nl]) & BN_MASK2;
  ------------------
  |  |   77|  65.8k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  127|  65.8k|        carry |= (v != rp[nl]);
  128|  65.8k|        carry &= (v <= rp[nl]);
  129|  65.8k|        rp[nl] = v;
  130|  65.8k|    }
  131|       |
  132|  12.6k|    if (bn_wexpand(ret, nl) == NULL)
  ------------------
  |  Branch (132:9): [True: 0, False: 12.6k]
  ------------------
  133|      0|        return 0;
  134|  12.6k|    ret->top = nl;
  135|  12.6k|    ret->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  12.6k|#define BN_FLG_FIXED_TOP 0
  ------------------
  136|  12.6k|    ret->neg = r->neg;
  137|       |
  138|  12.6k|    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|  12.6k|    ap = &(r->d[nl]);
  145|       |
  146|  12.6k|    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|  78.4k|    for (i = 0; i < nl; i++) {
  ------------------
  |  Branch (152:17): [True: 65.8k, False: 12.6k]
  ------------------
  153|  65.8k|        rp[i] = (carry & ap[i]) | (~carry & rp[i]);
  154|  65.8k|        ap[i] = 0;
  155|  65.8k|    }
  156|       |
  157|  12.6k|    return 1;
  158|  12.6k|}

BN_mul:
  488|   272k|{
  489|   272k|    int ret = bn_mul_fixed_top(r, a, b, ctx);
  490|       |
  491|   272k|    bn_correct_top(r);
  492|   272k|    bn_check_top(r);
  493|       |
  494|   272k|    return ret;
  495|   272k|}
bn_mul_fixed_top:
  498|   284k|{
  499|   284k|    int ret = 0;
  500|   284k|    int top, al, bl;
  501|   284k|    BIGNUM *rr;
  502|   284k|#if !defined(OPENSSL_SMALL_FOOTPRINT)
  503|   284k|    int i;
  504|   284k|    BIGNUM *t = NULL;
  505|   284k|    int j = 0, k;
  506|   284k|#endif
  507|       |
  508|   284k|    bn_check_top(a);
  509|   284k|    bn_check_top(b);
  510|   284k|    bn_check_top(r);
  511|       |
  512|   284k|    al = a->top;
  513|   284k|    bl = b->top;
  514|       |
  515|   284k|    if ((al == 0) || (bl == 0)) {
  ------------------
  |  Branch (515:9): [True: 0, False: 284k]
  |  Branch (515:22): [True: 0, False: 284k]
  ------------------
  516|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  517|      0|        return 1;
  518|      0|    }
  519|   284k|    top = al + bl;
  520|       |
  521|   284k|    BN_CTX_start(ctx);
  522|   284k|    if ((r == a) || (r == b)) {
  ------------------
  |  Branch (522:9): [True: 272k, False: 11.8k]
  |  Branch (522:21): [True: 0, False: 11.8k]
  ------------------
  523|   272k|        if ((rr = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (523:13): [True: 0, False: 272k]
  ------------------
  524|      0|            goto err;
  525|   272k|    } else
  526|  11.8k|        rr = r;
  527|       |
  528|   284k|#if !defined(OPENSSL_SMALL_FOOTPRINT)
  529|   284k|    i = al - bl;
  530|       |
  531|   284k|    if (i == 0) {
  ------------------
  |  Branch (531:9): [True: 272k, False: 11.8k]
  ------------------
  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|   272k|        if (al == 8) {
  ------------------
  |  Branch (541:13): [True: 0, False: 272k]
  ------------------
  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|   272k|    }
  549|       |
  550|   284k|    if ((al >= BN_MULL_SIZE_NORMAL) && (bl >= BN_MULL_SIZE_NORMAL)) {
  ------------------
  |  |  351|   284k|#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: 284k]
  |  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|   284k|#endif /* OPENSSL_SMALL_FOOTPRINT */
  588|   284k|    if (bn_wexpand(rr, top) == NULL)
  ------------------
  |  Branch (588:9): [True: 0, False: 284k]
  ------------------
  589|      0|        goto err;
  590|   284k|    rr->top = top;
  591|   284k|    bn_mul_normal(rr->d, a->d, al, b->d, bl);
  592|       |
  593|   284k|#if !defined(OPENSSL_SMALL_FOOTPRINT)
  594|   284k|end:
  595|   284k|#endif
  596|   284k|    rr->neg = a->neg ^ b->neg;
  597|   284k|    rr->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   284k|#define BN_FLG_FIXED_TOP 0
  ------------------
  598|   284k|    if (r != rr && BN_copy(r, rr) == NULL)
  ------------------
  |  Branch (598:9): [True: 272k, False: 11.8k]
  |  Branch (598:20): [True: 0, False: 272k]
  ------------------
  599|      0|        goto err;
  600|       |
  601|   284k|    ret = 1;
  602|   284k|err:
  603|   284k|    bn_check_top(r);
  604|   284k|    BN_CTX_end(ctx);
  605|   284k|    return ret;
  606|   284k|}
bn_mul_normal:
  609|   284k|{
  610|   284k|    BN_ULONG *rr;
  611|       |
  612|   284k|    if (na < nb) {
  ------------------
  |  Branch (612:9): [True: 11.7k, False: 272k]
  ------------------
  613|  11.7k|        int itmp;
  614|  11.7k|        BN_ULONG *ltmp;
  615|       |
  616|  11.7k|        itmp = na;
  617|  11.7k|        na = nb;
  618|  11.7k|        nb = itmp;
  619|  11.7k|        ltmp = a;
  620|  11.7k|        a = b;
  621|  11.7k|        b = ltmp;
  622|  11.7k|    }
  623|   284k|    rr = &(r[na]);
  624|   284k|    if (nb <= 0) {
  ------------------
  |  Branch (624:9): [True: 0, False: 284k]
  ------------------
  625|      0|        (void)bn_mul_words(r, a, na, 0);
  626|      0|        return;
  627|      0|    } else
  628|   284k|        rr[0] = bn_mul_words(r, a, na, b[0]);
  629|       |
  630|   564k|    for (;;) {
  631|   564k|        if (--nb <= 0)
  ------------------
  |  Branch (631:13): [True: 19.4k, False: 545k]
  ------------------
  632|  19.4k|            return;
  633|   545k|        rr[1] = bn_mul_add_words(&(r[1]), a, na, b[1]);
  634|   545k|        if (--nb <= 0)
  ------------------
  |  Branch (634:13): [True: 265k, False: 280k]
  ------------------
  635|   265k|            return;
  636|   280k|        rr[2] = bn_mul_add_words(&(r[2]), a, na, b[2]);
  637|   280k|        if (--nb <= 0)
  ------------------
  |  Branch (637:13): [True: 0, False: 280k]
  ------------------
  638|      0|            return;
  639|   280k|        rr[3] = bn_mul_add_words(&(r[3]), a, na, b[3]);
  640|   280k|        if (--nb <= 0)
  ------------------
  |  Branch (640:13): [True: 0, False: 280k]
  ------------------
  641|      0|            return;
  642|   280k|        rr[4] = bn_mul_add_words(&(r[4]), a, na, b[4]);
  643|   280k|        rr += 4;
  644|   280k|        r += 4;
  645|   280k|        b += 4;
  646|   280k|    }
  647|   284k|}

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

BN_priv_rand_range_ex:
  218|    695|{
  219|    695|    return bnrand_range(PRIVATE, r, range, strength, ctx);
  220|    695|}
bn_rand.c:bnrand:
   27|    736|{
   28|    736|    unsigned char *buf = NULL;
   29|    736|    int b, ret = 0, bit, bytes, mask;
   30|    736|    OSSL_LIB_CTX *libctx = ossl_bn_get_libctx(ctx);
   31|       |
   32|    736|    if (bits == 0) {
  ------------------
  |  Branch (32:9): [True: 0, False: 736]
  ------------------
   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|    736|    if (bits < 0 || (bits == 1 && top > 0))
  ------------------
  |  Branch (38:9): [True: 0, False: 736]
  |  Branch (38:22): [True: 0, False: 736]
  |  Branch (38:35): [True: 0, False: 0]
  ------------------
   39|      0|        goto toosmall;
   40|       |
   41|    736|    bytes = (bits + 7) / 8;
   42|    736|    bit = (bits - 1) % 8;
   43|    736|    mask = 0xff << (bit + 1);
   44|       |
   45|    736|    buf = OPENSSL_malloc(bytes);
  ------------------
  |  |  107|    736|    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|    736|    if (buf == NULL)
  ------------------
  |  Branch (46:9): [True: 0, False: 736]
  ------------------
   47|      0|        goto err;
   48|       |
   49|       |    /* make a random number and set the top and bottom bits */
   50|    736|    b = flag == NORMAL ? RAND_bytes_ex(libctx, buf, bytes, strength)
  ------------------
  |  Branch (50:9): [True: 0, False: 736]
  ------------------
   51|    736|                       : RAND_priv_bytes_ex(libctx, buf, bytes, strength);
   52|    736|    if (b <= 0)
  ------------------
  |  Branch (52:9): [True: 0, False: 736]
  ------------------
   53|      0|        goto err;
   54|       |
   55|    736|    if (flag == TESTING) {
  ------------------
  |  Branch (55:9): [True: 0, False: 736]
  ------------------
   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|    736|    if (top >= 0) {
  ------------------
  |  Branch (74:9): [True: 0, False: 736]
  ------------------
   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|    736|    buf[0] &= ~mask;
   87|    736|    if (bottom) /* set bottom bit if requested */
  ------------------
  |  Branch (87:9): [True: 0, False: 736]
  ------------------
   88|      0|        buf[bytes - 1] |= 1;
   89|    736|    if (!BN_bin2bn(buf, bytes, rnd))
  ------------------
  |  Branch (89:9): [True: 0, False: 736]
  ------------------
   90|      0|        goto err;
   91|    736|    ret = 1;
   92|    736|err:
   93|    736|    OPENSSL_clear_free(buf, bytes);
  ------------------
  |  |  130|    736|    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|    736|    bn_check_top(rnd);
   95|    736|    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|    736|}
bn_rand.c:bnrand_range:
  135|    695|{
  136|    695|    int n;
  137|    695|    int count = 100;
  138|       |
  139|    695|    if (r == NULL) {
  ------------------
  |  Branch (139:9): [True: 0, False: 695]
  ------------------
  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|    695|    if (range->neg || BN_is_zero(range)) {
  ------------------
  |  Branch (144:9): [True: 0, False: 695]
  |  Branch (144:23): [True: 0, False: 695]
  ------------------
  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|    695|    n = BN_num_bits(range); /* n > 0 */
  150|       |
  151|       |    /* BN_is_bit_set(range, n - 1) always holds */
  152|       |
  153|    695|    if (n == 1)
  ------------------
  |  Branch (153:9): [True: 0, False: 695]
  ------------------
  154|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  155|    695|    else if (!BN_is_bit_set(range, n - 2) && !BN_is_bit_set(range, n - 3)) {
  ------------------
  |  Branch (155:14): [True: 132, False: 563]
  |  Branch (155:46): [True: 132, False: 0]
  ------------------
  156|       |        /*
  157|       |         * range = 100..._2, so 3*range (= 11..._2) is exactly one bit longer
  158|       |         * than range
  159|       |         */
  160|    173|        do {
  161|    173|            if (!bnrand(flag, r, n + 1, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY,
  ------------------
  |  |   80|    173|#define BN_RAND_TOP_ANY -1
  ------------------
                          if (!bnrand(flag, r, n + 1, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY,
  ------------------
  |  |   85|    173|#define BN_RAND_BOTTOM_ANY 0
  ------------------
  |  Branch (161:17): [True: 0, False: 173]
  ------------------
  162|    173|                    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|    173|            if (BN_cmp(r, range) >= 0) {
  ------------------
  |  Branch (171:17): [True: 134, False: 39]
  ------------------
  172|    134|                if (!BN_sub(r, r, range))
  ------------------
  |  Branch (172:21): [True: 0, False: 134]
  ------------------
  173|      0|                    return 0;
  174|    134|                if (BN_cmp(r, range) >= 0)
  ------------------
  |  Branch (174:21): [True: 90, False: 44]
  ------------------
  175|     90|                    if (!BN_sub(r, r, range))
  ------------------
  |  Branch (175:25): [True: 0, False: 90]
  ------------------
  176|      0|                        return 0;
  177|    134|            }
  178|       |
  179|    173|            if (!--count) {
  ------------------
  |  Branch (179:17): [True: 0, False: 173]
  ------------------
  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|    173|        } while (BN_cmp(r, range) >= 0);
  ------------------
  |  Branch (184:18): [True: 41, False: 132]
  ------------------
  185|    563|    } else {
  186|    563|        do {
  187|       |            /* range = 11..._2  or  range = 101..._2 */
  188|    563|            if (!bnrand(flag, r, n, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY,
  ------------------
  |  |   80|    563|#define BN_RAND_TOP_ANY -1
  ------------------
                          if (!bnrand(flag, r, n, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY,
  ------------------
  |  |   85|    563|#define BN_RAND_BOTTOM_ANY 0
  ------------------
  |  Branch (188:17): [True: 0, False: 563]
  ------------------
  189|    563|                    strength, ctx))
  190|      0|                return 0;
  191|       |
  192|    563|            if (!--count) {
  ------------------
  |  Branch (192:17): [True: 0, False: 563]
  ------------------
  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|    563|        } while (BN_cmp(r, range) >= 0);
  ------------------
  |  Branch (196:18): [True: 0, False: 563]
  ------------------
  197|    563|    }
  198|       |
  199|    695|    bn_check_top(r);
  200|    695|    return 1;
  201|    695|}

BN_lshift1:
   15|  83.0k|{
   16|  83.0k|    register BN_ULONG *ap, *rp, t, c;
   17|  83.0k|    int i;
   18|       |
   19|  83.0k|    bn_check_top(r);
   20|  83.0k|    bn_check_top(a);
   21|       |
   22|  83.0k|    if (r != a) {
  ------------------
  |  Branch (22:9): [True: 320, False: 82.7k]
  ------------------
   23|    320|        r->neg = a->neg;
   24|    320|        if (bn_wexpand(r, a->top + 1) == NULL)
  ------------------
  |  Branch (24:13): [True: 0, False: 320]
  ------------------
   25|      0|            return 0;
   26|    320|        r->top = a->top;
   27|  82.7k|    } else {
   28|  82.7k|        if (bn_wexpand(r, a->top + 1) == NULL)
  ------------------
  |  Branch (28:13): [True: 0, False: 82.7k]
  ------------------
   29|      0|            return 0;
   30|  82.7k|    }
   31|  83.0k|    ap = a->d;
   32|  83.0k|    rp = r->d;
   33|  83.0k|    c = 0;
   34|   415k|    for (i = 0; i < a->top; i++) {
  ------------------
  |  Branch (34:17): [True: 332k, False: 83.0k]
  ------------------
   35|   332k|        t = *(ap++);
   36|   332k|        *(rp++) = ((t << 1) | c) & BN_MASK2;
  ------------------
  |  |   77|   332k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
   37|   332k|        c = t >> (BN_BITS2 - 1);
  ------------------
  |  |   54|   332k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   332k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
   38|   332k|    }
   39|  83.0k|    *rp = c;
   40|  83.0k|    r->top += (int)c;
   41|  83.0k|    bn_check_top(r);
   42|  83.0k|    return 1;
   43|  83.0k|}
BN_rshift1:
   46|  8.62M|{
   47|  8.62M|    BN_ULONG *ap, *rp, t, c;
   48|  8.62M|    int i;
   49|       |
   50|  8.62M|    bn_check_top(r);
   51|  8.62M|    bn_check_top(a);
   52|       |
   53|  8.62M|    if (BN_is_zero(a)) {
  ------------------
  |  Branch (53:9): [True: 0, False: 8.62M]
  ------------------
   54|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
   55|      0|        return 1;
   56|      0|    }
   57|  8.62M|    i = a->top;
   58|  8.62M|    ap = a->d;
   59|  8.62M|    if (a != r) {
  ------------------
  |  Branch (59:9): [True: 0, False: 8.62M]
  ------------------
   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|  8.62M|    rp = r->d;
   65|  8.62M|    r->top = i;
   66|  8.62M|    t = ap[--i];
   67|  8.62M|    rp[i] = t >> 1;
   68|  8.62M|    c = t << (BN_BITS2 - 1);
  ------------------
  |  |   54|  8.62M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  8.62M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
   69|  8.62M|    r->top -= (t == 1);
   70|  16.8M|    while (i > 0) {
  ------------------
  |  Branch (70:12): [True: 8.21M, False: 8.62M]
  ------------------
   71|  8.21M|        t = ap[--i];
   72|  8.21M|        rp[i] = ((t >> 1) & BN_MASK2) | c;
  ------------------
  |  |   77|  8.21M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
   73|  8.21M|        c = t << (BN_BITS2 - 1);
  ------------------
  |  |   54|  8.21M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  8.21M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
   74|  8.21M|    }
   75|  8.62M|    if (!r->top)
  ------------------
  |  Branch (75:9): [True: 0, False: 8.62M]
  ------------------
   76|      0|        r->neg = 0; /* don't allow negative zero */
   77|  8.62M|    bn_check_top(r);
   78|  8.62M|    return 1;
   79|  8.62M|}
BN_lshift:
   82|   177k|{
   83|   177k|    int ret;
   84|       |
   85|   177k|    if (n < 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 177k]
  ------------------
   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|   177k|    ret = bn_lshift_fixed_top(r, a, n);
   91|       |
   92|   177k|    bn_correct_top(r);
   93|   177k|    bn_check_top(r);
   94|       |
   95|   177k|    return ret;
   96|   177k|}
bn_lshift_fixed_top:
  105|  1.90M|{
  106|  1.90M|    int i, nw;
  107|  1.90M|    unsigned int lb, rb;
  108|  1.90M|    BN_ULONG *t, *f;
  109|  1.90M|    BN_ULONG l, m, rmask = 0;
  110|       |
  111|  1.90M|    assert(n >= 0);
  ------------------
  |  Branch (111:5): [True: 0, False: 1.90M]
  |  Branch (111:5): [True: 1.90M, False: 0]
  ------------------
  112|       |
  113|  1.90M|    bn_check_top(r);
  114|  1.90M|    bn_check_top(a);
  115|       |
  116|  1.90M|    nw = n / BN_BITS2;
  ------------------
  |  |   54|  1.90M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.90M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  117|  1.90M|    if (bn_wexpand(r, a->top + nw + 1) == NULL)
  ------------------
  |  Branch (117:9): [True: 0, False: 1.90M]
  ------------------
  118|      0|        return 0;
  119|       |
  120|  1.90M|    if (a->top != 0) {
  ------------------
  |  Branch (120:9): [True: 1.90M, False: 0]
  ------------------
  121|  1.90M|        lb = (unsigned int)n % BN_BITS2;
  ------------------
  |  |   54|  1.90M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.90M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  122|  1.90M|        rb = BN_BITS2 - lb;
  ------------------
  |  |   54|  1.90M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.90M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  123|  1.90M|        rb %= BN_BITS2; /* say no to undefined behaviour */
  ------------------
  |  |   54|  1.90M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.90M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  124|  1.90M|        rmask = (BN_ULONG)0 - rb; /* rmask = 0 - (rb != 0) */
  125|  1.90M|        rmask |= rmask >> 8;
  126|  1.90M|        f = &(a->d[0]);
  127|  1.90M|        t = &(r->d[nw]);
  128|  1.90M|        l = f[a->top - 1];
  129|  1.90M|        t[a->top] = (l >> rb) & rmask;
  130|  8.48M|        for (i = a->top - 1; i > 0; i--) {
  ------------------
  |  Branch (130:30): [True: 6.57M, False: 1.90M]
  ------------------
  131|  6.57M|            m = l << lb;
  132|  6.57M|            l = f[i - 1];
  133|  6.57M|            t[i] = (m | ((l >> rb) & rmask)) & BN_MASK2;
  ------------------
  |  |   77|  6.57M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  134|  6.57M|        }
  135|  1.90M|        t[0] = (l << lb) & BN_MASK2;
  ------------------
  |  |   77|  1.90M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  136|  1.90M|    } else {
  137|       |        /* shouldn't happen, but formally required */
  138|      0|        r->d[nw] = 0;
  139|      0|    }
  140|  1.90M|    if (nw != 0)
  ------------------
  |  Branch (140:9): [True: 136k, False: 1.77M]
  ------------------
  141|   136k|        memset(r->d, 0, sizeof(*t) * nw);
  142|       |
  143|  1.90M|    r->neg = a->neg;
  144|  1.90M|    r->top = a->top + nw + 1;
  145|  1.90M|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  1.90M|#define BN_FLG_FIXED_TOP 0
  ------------------
  146|       |
  147|  1.90M|    return 1;
  148|  1.90M|}
BN_rshift:
  151|  8.62M|{
  152|  8.62M|    int ret = 0;
  153|       |
  154|  8.62M|    if (n < 0) {
  ------------------
  |  Branch (154:9): [True: 0, False: 8.62M]
  ------------------
  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|  8.62M|    bn_check_top(r);
  160|  8.62M|    bn_check_top(a);
  161|       |
  162|  8.62M|    ret = bn_rshift_fixed_top(r, a, n);
  163|       |
  164|  8.62M|    bn_correct_top(r);
  165|  8.62M|    bn_check_top(r);
  166|       |
  167|  8.62M|    return ret;
  168|  8.62M|}
bn_rshift_fixed_top:
  177|  10.2M|{
  178|  10.2M|    int i, top, nw;
  179|  10.2M|    unsigned int lb, rb;
  180|  10.2M|    BN_ULONG *t, *f;
  181|  10.2M|    BN_ULONG l, m, mask;
  182|       |
  183|  10.2M|    assert(n >= 0);
  ------------------
  |  Branch (183:5): [True: 0, False: 10.2M]
  |  Branch (183:5): [True: 10.2M, False: 0]
  ------------------
  184|       |
  185|  10.2M|    nw = n / BN_BITS2;
  ------------------
  |  |   54|  10.2M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  10.2M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  186|  10.2M|    if (nw >= a->top) {
  ------------------
  |  Branch (186:9): [True: 0, False: 10.2M]
  ------------------
  187|       |        /* shouldn't happen, but formally required */
  188|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  189|      0|        return 1;
  190|      0|    }
  191|       |
  192|  10.2M|    rb = (unsigned int)n % BN_BITS2;
  ------------------
  |  |   54|  10.2M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  10.2M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  193|  10.2M|    lb = BN_BITS2 - rb;
  ------------------
  |  |   54|  10.2M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  10.2M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  194|  10.2M|    lb %= BN_BITS2; /* say no to undefined behaviour */
  ------------------
  |  |   54|  10.2M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  10.2M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  195|  10.2M|    mask = (BN_ULONG)0 - lb; /* mask = 0 - (lb != 0) */
  196|  10.2M|    mask |= mask >> 8;
  197|  10.2M|    top = a->top - nw;
  198|  10.2M|    if (r != a && bn_wexpand(r, top) == NULL)
  ------------------
  |  Branch (198:9): [True: 1.59M, False: 8.62M]
  |  Branch (198:19): [True: 0, False: 1.59M]
  ------------------
  199|      0|        return 0;
  200|       |
  201|  10.2M|    t = &(r->d[0]);
  202|  10.2M|    f = &(a->d[nw]);
  203|  10.2M|    l = f[0];
  204|  16.7M|    for (i = 0; i < top - 1; i++) {
  ------------------
  |  Branch (204:17): [True: 6.52M, False: 10.2M]
  ------------------
  205|  6.52M|        m = f[i + 1];
  206|  6.52M|        t[i] = (l >> rb) | ((m << lb) & mask);
  207|  6.52M|        l = m;
  208|  6.52M|    }
  209|  10.2M|    t[i] = l >> rb;
  210|       |
  211|  10.2M|    r->neg = a->neg;
  212|  10.2M|    r->top = top;
  213|  10.2M|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  10.2M|#define BN_FLG_FIXED_TOP 0
  ------------------
  214|       |
  215|  10.2M|    return 1;
  216|  10.2M|}

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

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

ossl_bsearch:
   18|  12.3M|{
   19|  12.3M|    const char *base_ = base;
   20|  12.3M|    int l, h, i = 0, c = 0;
   21|  12.3M|    const char *p = NULL;
   22|       |
   23|  12.3M|    if (num == 0)
  ------------------
  |  Branch (23:9): [True: 0, False: 12.3M]
  ------------------
   24|      0|        return NULL;
   25|  12.3M|    l = 0;
   26|  12.3M|    h = num;
   27|  94.9M|    while (l < h) {
  ------------------
  |  Branch (27:12): [True: 94.4M, False: 500k]
  ------------------
   28|  94.4M|        i = l + (h - l) / 2;
   29|  94.4M|        p = &(base_[i * size]);
   30|  94.4M|        if (cmp_thunk != NULL)
  ------------------
  |  Branch (30:13): [True: 208k, False: 94.2M]
  ------------------
   31|   208k|            c = cmp_thunk((cmpthunk_fn)cmp, key, (const void *)p);
   32|  94.2M|        else
   33|  94.2M|            c = cmp(key, p);
   34|  94.4M|        if (c < 0)
  ------------------
  |  Branch (34:13): [True: 55.1M, False: 39.2M]
  ------------------
   35|  55.1M|            h = i;
   36|  39.2M|        else if (c > 0)
  ------------------
  |  Branch (36:18): [True: 27.4M, False: 11.8M]
  ------------------
   37|  27.4M|            l = i + 1;
   38|  11.8M|        else
   39|  11.8M|            break;
   40|  94.4M|    }
   41|  12.3M|    if (c != 0 && !(flags & OSSL_BSEARCH_VALUE_ON_NOMATCH))
  ------------------
  |  |  149|   500k|#define OSSL_BSEARCH_VALUE_ON_NOMATCH 0x01
  ------------------
  |  Branch (41:9): [True: 500k, False: 11.8M]
  |  Branch (41:19): [True: 500k, False: 0]
  ------------------
   42|   500k|        p = NULL;
   43|  11.8M|    else if (c == 0 && (flags & OSSL_BSEARCH_FIRST_VALUE_ON_MATCH)) {
  ------------------
  |  |  150|  11.8M|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  |  Branch (43:14): [True: 11.8M, False: 0]
  |  Branch (43:24): [True: 205k, False: 11.6M]
  ------------------
   44|   205k|        while (i > 0) {
  ------------------
  |  Branch (44:16): [True: 1.63k, False: 203k]
  ------------------
   45|  1.63k|            if (cmp_thunk != NULL) {
  ------------------
  |  Branch (45:17): [True: 1.63k, False: 1]
  ------------------
   46|  1.63k|                if (cmp_thunk((cmpthunk_fn)cmp, key, (const void *)&(base_[(i - 1) * size])))
  ------------------
  |  Branch (46:21): [True: 1.63k, False: 0]
  ------------------
   47|  1.63k|                    break;
   48|  1.63k|            } else {
   49|      1|                if (cmp(key, &(base_[(i - 1) * size])))
  ------------------
  |  Branch (49:21): [True: 1, False: 0]
  ------------------
   50|      1|                    break;
   51|      1|            }
   52|      0|            i--;
   53|      0|        }
   54|   205k|        p = &(base_[i * size]);
   55|   205k|    }
   56|  12.3M|    return p;
   57|  12.3M|}

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

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|    769|{
  311|    769|    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|    769|    return meth;
  319|    769|}

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|    769|{
   42|    769|    if (meth == NULL)
  ------------------
  |  Branch (42:9): [True: 769, False: 0]
  ------------------
   43|    769|        return NID_undef;
  ------------------
  |  |   18|    769|#define NID_undef                       0
  ------------------
   44|      0|    return meth->type;
   45|    769|}
COMP_CTX_free:
   55|  13.9k|{
   56|  13.9k|    if (ctx == NULL)
  ------------------
  |  Branch (56:9): [True: 13.9k, False: 0]
  ------------------
   57|  13.9k|        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|    769|{
   30|    769|    STACK_OF(SSL_COMP) *comp_methods = NULL;
  ------------------
  |  |   33|    769|#define STACK_OF(type) struct stack_st_##type
  ------------------
   31|    769|#ifndef OPENSSL_NO_COMP
   32|    769|    SSL_COMP *comp = NULL;
   33|    769|    COMP_METHOD *method = COMP_zlib();
   34|       |
   35|    769|    comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
  ------------------
  |  |   72|    769|#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|    769|    if (COMP_get_type(method) != NID_undef && comp_methods != NULL) {
  ------------------
  |  |   18|  1.53k|#define NID_undef                       0
  ------------------
  |  Branch (37:9): [True: 0, False: 769]
  |  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|    769|#endif
   48|    769|    return comp_methods;
   49|    769|}
ossl_free_compression_methods_int:
   57|    768|{
   58|    768|    sk_SSL_COMP_pop_free(methods, cmeth_free);
  ------------------
  |  |   84|    768|#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|    768|}

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

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|    769|{
  184|    769|    CONF *ret;
  185|       |
  186|    769|    if (meth == NULL)
  ------------------
  |  Branch (186:9): [True: 769, False: 0]
  ------------------
  187|    769|        meth = NCONF_default();
  188|       |
  189|    769|    ret = meth->create(meth);
  190|    769|    if (ret == NULL) {
  ------------------
  |  Branch (190:9): [True: 0, False: 769]
  ------------------
  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|    769|    ret->libctx = libctx;
  195|       |
  196|    769|    return ret;
  197|    769|}
NCONF_free:
  205|    769|{
  206|    769|    if (conf == NULL)
  ------------------
  |  Branch (206:9): [True: 0, False: 769]
  ------------------
  207|      0|        return;
  208|    769|    conf->meth->destroy(conf);
  209|    769|}
NCONF_load:
  252|    769|{
  253|    769|    if (conf == NULL) {
  ------------------
  |  Branch (253:9): [True: 0, False: 769]
  ------------------
  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|    769|    return conf->meth->load(conf, file, eline);
  259|    769|}

CONF_modules_load_file_ex:
  156|    769|{
  157|    769|    char *file = NULL;
  158|    769|    CONF *conf = NULL;
  159|    769|    int ret = 0, diagnostics = OSSL_LIB_CTX_get_conf_diagnostics(libctx);
  160|       |
  161|    769|    ERR_set_mark();
  162|       |
  163|    769|    if (filename == NULL) {
  ------------------
  |  Branch (163:9): [True: 769, False: 0]
  ------------------
  164|    769|        file = CONF_get1_default_config_file();
  165|    769|        if (file == NULL)
  ------------------
  |  Branch (165:13): [True: 0, False: 769]
  ------------------
  166|      0|            goto err;
  167|    769|        if (*file == '\0') {
  ------------------
  |  Branch (167:13): [True: 0, False: 769]
  ------------------
  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|    769|    } else {
  173|      0|        file = (char *)filename;
  174|      0|    }
  175|       |
  176|    769|    conf = NCONF_new_ex(libctx, NULL);
  177|    769|    if (conf == NULL)
  ------------------
  |  Branch (177:9): [True: 0, False: 769]
  ------------------
  178|      0|        goto err;
  179|       |
  180|    769|    if (NCONF_load(conf, file, NULL) <= 0) {
  ------------------
  |  Branch (180:9): [True: 769, False: 0]
  ------------------
  181|    769|        if ((flags & CONF_MFLAGS_IGNORE_MISSING_FILE) && (ERR_GET_REASON(ERR_peek_last_error()) == CONF_R_NO_SUCH_FILE)) {
  ------------------
  |  |  114|    769|#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: 768]
  |  Branch (181:58): [True: 1, False: 0]
  ------------------
  182|      1|            ret = 1;
  183|      1|        }
  184|    769|        goto err;
  185|    769|    }
  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|    769|err:
  192|    769|    if (filename == NULL)
  ------------------
  |  Branch (192:9): [True: 769, False: 0]
  ------------------
  193|    769|        OPENSSL_free(file);
  ------------------
  |  |  132|    769|    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|    769|    NCONF_free(conf);
  195|       |
  196|    769|    if ((flags & CONF_MFLAGS_IGNORE_RETURN_CODES) != 0 && !diagnostics)
  ------------------
  |  |  111|    769|#define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
  ------------------
  |  Branch (196:9): [True: 1, False: 768]
  |  Branch (196:59): [True: 1, False: 0]
  ------------------
  197|      1|        ret = 1;
  198|       |
  199|    769|    if (ret > 0)
  ------------------
  |  Branch (199:9): [True: 1, False: 768]
  ------------------
  200|      1|        ERR_pop_to_mark();
  201|    768|    else
  202|    768|        ERR_clear_last_mark();
  203|       |
  204|    769|    return ret;
  205|      0|}
CONF_get1_default_config_file:
  646|    769|{
  647|    769|    const char *t;
  648|    769|    char *file, *sep = "";
  649|    769|    size_t size;
  650|       |
  651|    769|    if ((file = ossl_safe_getenv("OPENSSL_CONF")) != NULL)
  ------------------
  |  Branch (651:9): [True: 0, False: 769]
  ------------------
  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|    769|    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|    769|    if (t == NULL)
  ------------------
  |  Branch (664:9): [True: 0, False: 769]
  ------------------
  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|    769|#ifndef OPENSSL_SYS_VMS
  668|    769|    sep = "/";
  669|    769|#endif
  670|    769|    size = strlen(t) + strlen(sep) + strlen(OPENSSL_CONF) + 1;
  ------------------
  |  |   80|    769|#define OPENSSL_CONF "openssl.cnf"
  ------------------
  671|    769|    file = OPENSSL_malloc(size);
  ------------------
  |  |  107|    769|    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|    769|    if (file == NULL)
  ------------------
  |  Branch (673:9): [True: 0, False: 769]
  ------------------
  674|      0|        return NULL;
  675|    769|    BIO_snprintf(file, size, "%s%s%s", t, sep, OPENSSL_CONF);
  ------------------
  |  |   80|    769|#define OPENSSL_CONF "openssl.cnf"
  ------------------
  676|       |
  677|    769|    return file;
  678|    769|}
CONF_parse_list:
  690|  25.2k|{
  691|  25.2k|    int ret;
  692|  25.2k|    const char *lstart, *tmpend, *p;
  693|       |
  694|  25.2k|    if (list_ == NULL) {
  ------------------
  |  Branch (694:9): [True: 0, False: 25.2k]
  ------------------
  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|  25.2k|    lstart = list_;
  700|  80.7k|    for (;;) {
  701|  80.7k|        if (nospc) {
  ------------------
  |  Branch (701:13): [True: 80.7k, False: 0]
  ------------------
  702|   128k|            while (*lstart && isspace((unsigned char)*lstart))
  ------------------
  |  Branch (702:20): [True: 128k, False: 30]
  |  Branch (702:31): [True: 47.3k, False: 80.7k]
  ------------------
  703|  47.3k|                lstart++;
  704|  80.7k|        }
  705|  80.7k|        p = strchr(lstart, sep);
  706|  80.7k|        if (p == lstart || *lstart == '\0')
  ------------------
  |  Branch (706:13): [True: 6.56k, False: 74.2k]
  |  Branch (706:28): [True: 30, False: 74.1k]
  ------------------
  707|  6.59k|            ret = list_cb(NULL, 0, arg);
  708|  74.1k|        else {
  709|  74.1k|            if (p)
  ------------------
  |  Branch (709:17): [True: 48.9k, False: 25.1k]
  ------------------
  710|  48.9k|                tmpend = p - 1;
  711|  25.1k|            else
  712|  25.1k|                tmpend = lstart + strlen(lstart) - 1;
  713|  74.1k|            if (nospc) {
  ------------------
  |  Branch (713:17): [True: 74.1k, False: 0]
  ------------------
  714|  74.1k|                while (isspace((unsigned char)*tmpend))
  ------------------
  |  Branch (714:24): [True: 38.7k, False: 74.1k]
  ------------------
  715|  38.7k|                    tmpend--;
  716|  74.1k|            }
  717|  74.1k|            ret = list_cb(lstart, (int)(tmpend - lstart + 1), arg);
  718|  74.1k|        }
  719|  80.7k|        if (ret <= 0)
  ------------------
  |  Branch (719:13): [True: 218, False: 80.5k]
  ------------------
  720|    218|            return ret;
  721|  80.5k|        if (p == NULL)
  ------------------
  |  Branch (721:13): [True: 25.0k, False: 55.5k]
  ------------------
  722|  25.0k|            return 1;
  723|  55.5k|        lstart = p + 1;
  724|  55.5k|    }
  725|  25.2k|}

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

conf_ssl_name_find:
  154|  3.03k|{
  155|  3.03k|    SSL_MODULE *ssl = md != NULL ? CONF_imodule_get_usr_data(md) : NULL;
  ------------------
  |  Branch (155:23): [True: 0, False: 3.03k]
  ------------------
  156|  3.03k|    const struct ssl_conf_name_st *nm;
  157|  3.03k|    size_t i;
  158|       |
  159|  3.03k|    if (ssl == NULL || ssl->names == NULL)
  ------------------
  |  Branch (159:9): [True: 3.03k, False: 0]
  |  Branch (159:24): [True: 0, False: 0]
  ------------------
  160|  3.03k|        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.23k|{
   60|  1.23k|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (60:9): [True: 0, False: 1.23k]
  ------------------
   61|      0|        return 0;
   62|  1.23k|    return CRYPTO_THREAD_write_lock(ctx->lock);
   63|  1.23k|}
ossl_lib_ctx_read_lock:
   66|   184k|{
   67|   184k|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (67:9): [True: 0, False: 184k]
  ------------------
   68|      0|        return 0;
   69|   184k|    return CRYPTO_THREAD_read_lock(ctx->lock);
   70|   184k|}
ossl_lib_ctx_unlock:
   73|   185k|{
   74|   185k|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (74:9): [True: 0, False: 185k]
  ------------------
   75|      0|        return 0;
   76|   185k|    return CRYPTO_THREAD_unlock(ctx->lock);
   77|   185k|}
ossl_lib_ctx_detach_ssl_conf_imodule:
   99|    768|{
  100|    768|    if (ctx != NULL && md != NULL)
  ------------------
  |  Branch (100:9): [True: 768, False: 0]
  |  Branch (100:24): [True: 0, False: 768]
  ------------------
  101|      0|        return 0;
  102|       |
  103|    768|    if (ctx != NULL && ctx->ssl_imod) {
  ------------------
  |  Branch (103:9): [True: 768, False: 0]
  |  Branch (103:24): [True: 0, False: 768]
  ------------------
  104|      0|        ctx->ssl_imod->libctx = NULL;
  105|      0|        ctx->ssl_imod = NULL;
  106|      0|    }
  107|       |
  108|    768|    if (md != NULL && md->libctx) {
  ------------------
  |  Branch (108:9): [True: 0, False: 768]
  |  Branch (108:23): [True: 0, False: 0]
  ------------------
  109|      0|        md->libctx->ssl_imod = NULL;
  110|      0|        md->libctx = NULL;
  111|      0|    }
  112|       |
  113|    768|    return 1;
  114|    768|}
OSSL_LIB_CTX_new:
  485|    768|{
  486|    768|    OSSL_LIB_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|    768|    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|    768|    if (ctx != NULL && !context_init(ctx)) {
  ------------------
  |  Branch (488:9): [True: 768, False: 0]
  |  Branch (488:24): [True: 0, False: 768]
  ------------------
  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|    768|    return ctx;
  493|    768|}
OSSL_LIB_CTX_load_config:
  530|    768|{
  531|       |    return CONF_modules_load_file_ex(ctx, config_file, NULL, 0) > 0;
  532|    768|}
OSSL_LIB_CTX_free:
  536|  24.0k|{
  537|  24.0k|    if (ctx == NULL || ossl_lib_ctx_is_default_nocreate(ctx))
  ------------------
  |  Branch (537:9): [True: 23.3k, False: 768]
  |  Branch (537:24): [True: 0, False: 768]
  ------------------
  538|  23.3k|        return;
  539|       |
  540|    768|#ifndef FIPS_MODULE
  541|    768|    if (ctx->ischild)
  ------------------
  |  Branch (541:9): [True: 0, False: 768]
  ------------------
  542|      0|        ossl_provider_deinit_child(ctx);
  543|    768|#endif
  544|    768|    context_deinit(ctx);
  545|    768|    OPENSSL_free(ctx);
  ------------------
  |  |  132|    768|    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|    768|}
OSSL_LIB_CTX_get0_global_default:
  550|  3.03k|{
  551|  3.03k|    if (!RUN_ONCE(&default_context_thread_key_init, default_context_do_thread_key_init))
  ------------------
  |  |  130|  3.03k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 3.03k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (551:9): [True: 0, False: 3.03k]
  ------------------
  552|      0|        return NULL;
  553|       |
  554|  3.03k|    if (!RUN_ONCE(&default_context_init, default_context_do_init))
  ------------------
  |  |  130|  3.03k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 3.03k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (554:9): [True: 0, False: 3.03k]
  ------------------
  555|      0|        return NULL;
  556|       |
  557|  3.03k|    return &default_context_int;
  558|  3.03k|}
OSSL_LIB_CTX_set0_default:
  561|  3.03k|{
  562|  3.03k|    OSSL_LIB_CTX *current_defctx;
  563|       |
  564|  3.03k|    if ((current_defctx = get_default_context()) != NULL) {
  ------------------
  |  Branch (564:9): [True: 3.03k, False: 0]
  ------------------
  565|  3.03k|        if (libctx != NULL)
  ------------------
  |  Branch (565:13): [True: 0, False: 3.03k]
  ------------------
  566|      0|            set_default_context(libctx);
  567|  3.03k|        return current_defctx;
  568|  3.03k|    }
  569|       |
  570|      0|    return NULL;
  571|  3.03k|}
ossl_lib_ctx_get_concrete:
  584|  18.4M|{
  585|  18.4M|#ifndef FIPS_MODULE
  586|  18.4M|    if (ctx == NULL)
  ------------------
  |  Branch (586:9): [True: 12.6M, False: 5.76M]
  ------------------
  587|  12.6M|        return get_default_context();
  588|  5.76M|#endif
  589|  5.76M|    return ctx;
  590|  18.4M|}
ossl_lib_ctx_is_default:
  593|   166k|{
  594|   166k|#ifndef FIPS_MODULE
  595|   166k|    if (ctx == NULL || ctx == get_default_context())
  ------------------
  |  Branch (595:9): [True: 44.2k, False: 122k]
  |  Branch (595:24): [True: 12.3k, False: 109k]
  ------------------
  596|  56.6k|        return 1;
  597|   109k|#endif
  598|   109k|    return 0;
  599|   166k|}
ossl_lib_ctx_is_default_nocreate:
  602|    768|{
  603|    768|#ifndef FIPS_MODULE
  604|    768|    if (ctx == NULL || ctx == check_default_context())
  ------------------
  |  Branch (604:9): [True: 0, False: 768]
  |  Branch (604:24): [True: 0, False: 768]
  ------------------
  605|      0|        return 1;
  606|    768|#endif
  607|    768|    return 0;
  608|    768|}
ossl_lib_ctx_is_global_default:
  611|  55.8k|{
  612|  55.8k|#ifndef FIPS_MODULE
  613|  55.8k|    if (ossl_lib_ctx_get_concrete(ctx) == &default_context_int)
  ------------------
  |  Branch (613:9): [True: 39.3k, False: 16.5k]
  ------------------
  614|  39.3k|        return 1;
  615|  16.5k|#endif
  616|  16.5k|    return 0;
  617|  55.8k|}
ossl_lib_ctx_get_data:
  620|  7.71M|{
  621|  7.71M|    ctx = ossl_lib_ctx_get_concrete(ctx);
  622|  7.71M|    if (ctx == NULL)
  ------------------
  |  Branch (622:9): [True: 0, False: 7.71M]
  ------------------
  623|      0|        return NULL;
  624|       |
  625|  7.71M|    switch (index) {
  626|   114k|    case OSSL_LIB_CTX_PROPERTY_STRING_INDEX:
  ------------------
  |  |   98|   114k|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  |  Branch (626:5): [True: 114k, False: 7.60M]
  ------------------
  627|   114k|        return ctx->property_string_data;
  628|  1.28M|    case OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX:
  ------------------
  |  |   95|  1.28M|#define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX 0
  ------------------
  |  Branch (628:5): [True: 1.28M, False: 6.42M]
  ------------------
  629|  1.28M|        return ctx->evp_method_store;
  630|   104k|    case OSSL_LIB_CTX_PROVIDER_STORE_INDEX:
  ------------------
  |  |   96|   104k|#define OSSL_LIB_CTX_PROVIDER_STORE_INDEX 1
  ------------------
  |  Branch (630:5): [True: 104k, False: 7.61M]
  ------------------
  631|   104k|        return ctx->provider_store;
  632|  5.47M|    case OSSL_LIB_CTX_NAMEMAP_INDEX:
  ------------------
  |  |   99|  5.47M|#define OSSL_LIB_CTX_NAMEMAP_INDEX 4
  ------------------
  |  Branch (632:5): [True: 5.47M, False: 2.24M]
  ------------------
  633|  5.47M|        return ctx->namemap;
  634|   185k|    case OSSL_LIB_CTX_PROPERTY_DEFN_INDEX:
  ------------------
  |  |   97|   185k|#define OSSL_LIB_CTX_PROPERTY_DEFN_INDEX 2
  ------------------
  |  Branch (634:5): [True: 185k, False: 7.53M]
  ------------------
  635|   185k|        return ctx->property_defns;
  636|  38.4k|    case OSSL_LIB_CTX_GLOBAL_PROPERTIES:
  ------------------
  |  |  111|  38.4k|#define OSSL_LIB_CTX_GLOBAL_PROPERTIES 14
  ------------------
  |  Branch (636:5): [True: 38.4k, False: 7.67M]
  ------------------
  637|  38.4k|        return ctx->global_properties;
  638|  36.9k|    case OSSL_LIB_CTX_DRBG_INDEX:
  ------------------
  |  |  100|  36.9k|#define OSSL_LIB_CTX_DRBG_INDEX 5
  ------------------
  |  Branch (638:5): [True: 36.9k, False: 7.68M]
  ------------------
  639|  36.9k|        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: 7.71M]
  ------------------
  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: 7.71M]
  ------------------
  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: 7.71M]
  ------------------
  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: 7.71M]
  ------------------
  648|      0|        return ctx->child_provider;
  649|  1.77k|    case OSSL_LIB_CTX_DECODER_STORE_INDEX:
  ------------------
  |  |  108|  1.77k|#define OSSL_LIB_CTX_DECODER_STORE_INDEX 11
  ------------------
  |  Branch (649:5): [True: 1.77k, False: 7.71M]
  ------------------
  650|  1.77k|        return ctx->decoder_store;
  651|   460k|    case OSSL_LIB_CTX_DECODER_CACHE_INDEX:
  ------------------
  |  |  117|   460k|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  |  Branch (651:5): [True: 460k, False: 7.25M]
  ------------------
  652|   460k|        return ctx->decoder_cache;
  653|  1.68k|    case OSSL_LIB_CTX_ENCODER_STORE_INDEX:
  ------------------
  |  |  107|  1.68k|#define OSSL_LIB_CTX_ENCODER_STORE_INDEX 10
  ------------------
  |  Branch (653:5): [True: 1.68k, False: 7.71M]
  ------------------
  654|  1.68k|        return ctx->encoder_store;
  655|  1.68k|    case OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX:
  ------------------
  |  |  112|  1.68k|#define OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX 15
  ------------------
  |  Branch (655:5): [True: 1.68k, False: 7.71M]
  ------------------
  656|  1.68k|        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: 7.71M]
  ------------------
  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: 7.71M]
  ------------------
  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: 7.71M]
  ------------------
  664|      0|        return ctx->threads;
  665|      0|#endif
  666|       |
  667|       |#ifdef FIPS_MODULE
  668|       |    case OSSL_LIB_CTX_FIPS_PROV_INDEX:
  669|       |        return ctx->fips_prov;
  670|       |#endif
  671|       |
  672|  3.03k|    case OSSL_LIB_CTX_COMP_METHODS:
  ------------------
  |  |  118|  3.03k|#define OSSL_LIB_CTX_COMP_METHODS 21
  ------------------
  |  Branch (672:5): [True: 3.03k, False: 7.71M]
  ------------------
  673|  3.03k|        return (void *)&ctx->comp_methods;
  674|       |
  675|  6.07k|    case OSSL_LIB_CTX_SSL_CONF_IMODULE:
  ------------------
  |  |  120|  6.07k|#define OSSL_LIB_CTX_SSL_CONF_IMODULE 23
  ------------------
  |  Branch (675:5): [True: 6.07k, False: 7.71M]
  ------------------
  676|  6.07k|        return (void *)ctx->ssl_imod;
  677|       |
  678|      0|    default:
  ------------------
  |  Branch (678:5): [True: 0, False: 7.71M]
  ------------------
  679|       |        return NULL;
  680|  7.71M|    }
  681|  7.71M|}
OSSL_LIB_CTX_get_data:
  684|  9.10k|{
  685|  9.10k|    return ossl_lib_ctx_get_data(ctx, index);
  686|  9.10k|}
ossl_lib_ctx_get_ex_data_global:
  689|  10.2M|{
  690|  10.2M|    ctx = ossl_lib_ctx_get_concrete(ctx);
  691|  10.2M|    if (ctx == NULL)
  ------------------
  |  Branch (691:9): [True: 0, False: 10.2M]
  ------------------
  692|      0|        return NULL;
  693|  10.2M|    return &ctx->global;
  694|  10.2M|}
ossl_lib_ctx_get_descriptor:
  697|  55.8k|{
  698|       |#ifdef FIPS_MODULE
  699|       |    return "FIPS internal library context";
  700|       |#else
  701|  55.8k|    if (ossl_lib_ctx_is_global_default(libctx))
  ------------------
  |  Branch (701:9): [True: 39.3k, False: 16.5k]
  ------------------
  702|  39.3k|        return "Global default library context";
  703|  16.5k|    if (ossl_lib_ctx_is_default(libctx))
  ------------------
  |  Branch (703:9): [True: 0, False: 16.5k]
  ------------------
  704|      0|        return "Thread-local default library context";
  705|  16.5k|    return "Non-default library context";
  706|  16.5k|#endif
  707|  16.5k|}
OSSL_LIB_CTX_get_conf_diagnostics:
  710|    769|{
  711|    769|    libctx = ossl_lib_ctx_get_concrete(libctx);
  712|    769|    if (libctx == NULL)
  ------------------
  |  Branch (712:9): [True: 0, False: 769]
  ------------------
  713|      0|        return 0;
  714|    769|    return libctx->conf_diagnostics;
  715|    769|}
context.c:context_deinit:
  387|    768|{
  388|    768|    if (ctx == NULL)
  ------------------
  |  Branch (388:9): [True: 0, False: 768]
  ------------------
  389|      0|        return 1;
  390|       |
  391|    768|    ossl_lib_ctx_detach_ssl_conf_imodule(ctx, NULL);
  392|       |
  393|    768|    ossl_ctx_thread_stop(ctx);
  394|       |
  395|    768|    context_deinit_objs(ctx);
  396|       |
  397|    768|    ossl_crypto_cleanup_all_ex_data_int(ctx);
  398|       |
  399|    768|    CRYPTO_THREAD_lock_free(ctx->lock);
  400|       |    ctx->lock = NULL;
  401|    768|    return 1;
  402|    768|}
context.c:context_deinit_objs:
  257|    768|{
  258|       |    /* P2. We want evp_method_store to be cleaned up before the provider store */
  259|    768|    if (ctx->evp_method_store != NULL) {
  ------------------
  |  Branch (259:9): [True: 768, False: 0]
  ------------------
  260|    768|        ossl_method_store_free(ctx->evp_method_store);
  261|    768|        ctx->evp_method_store = NULL;
  262|    768|    }
  263|       |
  264|       |    /* P2. */
  265|    768|    if (ctx->drbg != NULL) {
  ------------------
  |  Branch (265:9): [True: 768, False: 0]
  ------------------
  266|    768|        ossl_rand_ctx_free(ctx->drbg);
  267|    768|        ctx->drbg = NULL;
  268|    768|    }
  269|       |
  270|    768|#ifndef FIPS_MODULE
  271|       |    /* P2. */
  272|    768|    if (ctx->provider_conf != NULL) {
  ------------------
  |  Branch (272:9): [True: 768, False: 0]
  ------------------
  273|    768|        ossl_prov_conf_ctx_free(ctx->provider_conf);
  274|    768|        ctx->provider_conf = NULL;
  275|    768|    }
  276|       |
  277|       |    /*
  278|       |     * P2. We want decoder_store/decoder_cache to be cleaned up before the
  279|       |     * provider store
  280|       |     */
  281|    768|    if (ctx->decoder_store != NULL) {
  ------------------
  |  Branch (281:9): [True: 768, False: 0]
  ------------------
  282|    768|        ossl_method_store_free(ctx->decoder_store);
  283|    768|        ctx->decoder_store = NULL;
  284|    768|    }
  285|    768|    if (ctx->decoder_cache != NULL) {
  ------------------
  |  Branch (285:9): [True: 768, False: 0]
  ------------------
  286|    768|        ossl_decoder_cache_free(ctx->decoder_cache);
  287|    768|        ctx->decoder_cache = NULL;
  288|    768|    }
  289|       |
  290|       |    /* P2. We want encoder_store to be cleaned up before the provider store */
  291|    768|    if (ctx->encoder_store != NULL) {
  ------------------
  |  Branch (291:9): [True: 768, False: 0]
  ------------------
  292|    768|        ossl_method_store_free(ctx->encoder_store);
  293|    768|        ctx->encoder_store = NULL;
  294|    768|    }
  295|       |
  296|       |    /* P2. We want loader_store to be cleaned up before the provider store */
  297|    768|    if (ctx->store_loader_store != NULL) {
  ------------------
  |  Branch (297:9): [True: 768, False: 0]
  ------------------
  298|    768|        ossl_method_store_free(ctx->store_loader_store);
  299|    768|        ctx->store_loader_store = NULL;
  300|    768|    }
  301|    768|#endif
  302|       |
  303|       |    /* P1. Needs to be freed before the child provider data is freed */
  304|    768|    if (ctx->provider_store != NULL) {
  ------------------
  |  Branch (304:9): [True: 768, False: 0]
  ------------------
  305|    768|        ossl_provider_store_free(ctx->provider_store);
  306|    768|        ctx->provider_store = NULL;
  307|    768|    }
  308|       |
  309|       |    /* Default priority. */
  310|    768|    if (ctx->property_string_data != NULL) {
  ------------------
  |  Branch (310:9): [True: 768, False: 0]
  ------------------
  311|    768|        ossl_property_string_data_free(ctx->property_string_data);
  312|    768|        ctx->property_string_data = NULL;
  313|    768|    }
  314|       |
  315|    768|    if (ctx->namemap != NULL) {
  ------------------
  |  Branch (315:9): [True: 768, False: 0]
  ------------------
  316|    768|        ossl_stored_namemap_free(ctx->namemap);
  317|    768|        ctx->namemap = NULL;
  318|    768|    }
  319|       |
  320|    768|    if (ctx->property_defns != NULL) {
  ------------------
  |  Branch (320:9): [True: 768, False: 0]
  ------------------
  321|    768|        ossl_property_defns_free(ctx->property_defns);
  322|    768|        ctx->property_defns = NULL;
  323|    768|    }
  324|       |
  325|    768|    if (ctx->global_properties != NULL) {
  ------------------
  |  Branch (325:9): [True: 768, False: 0]
  ------------------
  326|    768|        ossl_ctx_global_properties_free(ctx->global_properties);
  327|    768|        ctx->global_properties = NULL;
  328|    768|    }
  329|       |
  330|    768|#ifndef FIPS_MODULE
  331|    768|    if (ctx->bio_core != NULL) {
  ------------------
  |  Branch (331:9): [True: 768, False: 0]
  ------------------
  332|    768|        ossl_bio_core_globals_free(ctx->bio_core);
  333|    768|        ctx->bio_core = NULL;
  334|    768|    }
  335|    768|#endif
  336|       |
  337|    768|    if (ctx->drbg_nonce != NULL) {
  ------------------
  |  Branch (337:9): [True: 768, False: 0]
  ------------------
  338|    768|        ossl_prov_drbg_nonce_ctx_free(ctx->drbg_nonce);
  339|    768|        ctx->drbg_nonce = NULL;
  340|    768|    }
  341|       |
  342|    768|#ifndef FIPS_MODULE
  343|    768|    if (ctx->indicator_cb != NULL) {
  ------------------
  |  Branch (343:9): [True: 768, False: 0]
  ------------------
  344|    768|        ossl_indicator_set_callback_free(ctx->indicator_cb);
  345|    768|        ctx->indicator_cb = NULL;
  346|    768|    }
  347|       |
  348|    768|    if (ctx->self_test_cb != NULL) {
  ------------------
  |  Branch (348:9): [True: 768, False: 0]
  ------------------
  349|    768|        ossl_self_test_set_callback_free(ctx->self_test_cb);
  350|    768|        ctx->self_test_cb = NULL;
  351|    768|    }
  352|    768|#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|    768|#ifndef OPENSSL_NO_THREAD_POOL
  364|    768|    if (ctx->threads != NULL) {
  ------------------
  |  Branch (364:9): [True: 768, False: 0]
  ------------------
  365|    768|        ossl_threads_ctx_free(ctx->threads);
  366|    768|        ctx->threads = NULL;
  367|    768|    }
  368|    768|#endif
  369|       |
  370|       |    /* Low priority. */
  371|    768|#ifndef FIPS_MODULE
  372|    768|    if (ctx->child_provider != NULL) {
  ------------------
  |  Branch (372:9): [True: 768, False: 0]
  ------------------
  373|    768|        ossl_child_prov_ctx_free(ctx->child_provider);
  374|    768|        ctx->child_provider = NULL;
  375|    768|    }
  376|    768|#endif
  377|       |
  378|    768|#ifndef FIPS_MODULE
  379|    768|    if (ctx->comp_methods != NULL) {
  ------------------
  |  Branch (379:9): [True: 768, False: 0]
  ------------------
  380|    768|        ossl_free_compression_methods_int(ctx->comp_methods);
  381|       |        ctx->comp_methods = NULL;
  382|    768|    }
  383|    768|#endif
  384|    768|}
context.c:context_init:
  119|    769|{
  120|    769|    int exdata_done = 0;
  121|       |
  122|    769|    ctx->lock = CRYPTO_THREAD_lock_new();
  123|    769|    if (ctx->lock == NULL)
  ------------------
  |  Branch (123:9): [True: 0, False: 769]
  ------------------
  124|      0|        goto err;
  125|       |
  126|       |    /* Initialize ex_data. */
  127|    769|    if (!ossl_do_ex_data_init(ctx))
  ------------------
  |  Branch (127:9): [True: 0, False: 769]
  ------------------
  128|      0|        goto err;
  129|    769|    exdata_done = 1;
  130|       |
  131|       |    /* P2. We want evp_method_store to be cleaned up before the provider store */
  132|    769|    ctx->evp_method_store = ossl_method_store_new(ctx);
  133|    769|    if (ctx->evp_method_store == NULL)
  ------------------
  |  Branch (133:9): [True: 0, False: 769]
  ------------------
  134|      0|        goto err;
  135|    769|    OSSL_TRACE1(QUERY, "context_init: allocating store %p\n", ctx->evp_method_store);
  ------------------
  |  |  291|    769|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|    769|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  136|       |
  137|    769|#ifndef FIPS_MODULE
  138|       |    /* P2. Must be freed before the provider store is freed */
  139|    769|    ctx->provider_conf = ossl_prov_conf_ctx_new(ctx);
  140|    769|    if (ctx->provider_conf == NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 769]
  ------------------
  141|      0|        goto err;
  142|    769|#endif
  143|       |
  144|       |    /* P2. */
  145|    769|    ctx->drbg = ossl_rand_ctx_new(ctx);
  146|    769|    if (ctx->drbg == NULL)
  ------------------
  |  Branch (146:9): [True: 0, False: 769]
  ------------------
  147|      0|        goto err;
  148|       |
  149|    769|#ifndef FIPS_MODULE
  150|       |    /*
  151|       |     * P2. We want decoder_store/decoder_cache to be cleaned up before the
  152|       |     * provider store
  153|       |     */
  154|    769|    ctx->decoder_store = ossl_method_store_new(ctx);
  155|    769|    if (ctx->decoder_store == NULL)
  ------------------
  |  Branch (155:9): [True: 0, False: 769]
  ------------------
  156|      0|        goto err;
  157|    769|    ctx->decoder_cache = ossl_decoder_cache_new(ctx);
  158|    769|    if (ctx->decoder_cache == NULL)
  ------------------
  |  Branch (158:9): [True: 0, False: 769]
  ------------------
  159|      0|        goto err;
  160|       |
  161|       |    /* P2. We want encoder_store to be cleaned up before the provider store */
  162|    769|    ctx->encoder_store = ossl_method_store_new(ctx);
  163|    769|    if (ctx->encoder_store == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 769]
  ------------------
  164|      0|        goto err;
  165|       |
  166|       |    /* P2. We want loader_store to be cleaned up before the provider store */
  167|    769|    ctx->store_loader_store = ossl_method_store_new(ctx);
  168|    769|    if (ctx->store_loader_store == NULL)
  ------------------
  |  Branch (168:9): [True: 0, False: 769]
  ------------------
  169|      0|        goto err;
  170|    769|#endif
  171|       |
  172|       |    /* P1. Needs to be freed before the child provider data is freed */
  173|    769|    ctx->provider_store = ossl_provider_store_new(ctx);
  174|    769|    if (ctx->provider_store == NULL)
  ------------------
  |  Branch (174:9): [True: 0, False: 769]
  ------------------
  175|      0|        goto err;
  176|       |
  177|       |    /* Default priority. */
  178|    769|    ctx->property_string_data = ossl_property_string_data_new(ctx);
  179|    769|    if (ctx->property_string_data == NULL)
  ------------------
  |  Branch (179:9): [True: 0, False: 769]
  ------------------
  180|      0|        goto err;
  181|       |
  182|    769|    ctx->namemap = ossl_stored_namemap_new(ctx);
  183|    769|    if (ctx->namemap == NULL)
  ------------------
  |  Branch (183:9): [True: 0, False: 769]
  ------------------
  184|      0|        goto err;
  185|       |
  186|    769|    ctx->property_defns = ossl_property_defns_new(ctx);
  187|    769|    if (ctx->property_defns == NULL)
  ------------------
  |  Branch (187:9): [True: 0, False: 769]
  ------------------
  188|      0|        goto err;
  189|       |
  190|    769|    ctx->global_properties = ossl_ctx_global_properties_new(ctx);
  191|    769|    if (ctx->global_properties == NULL)
  ------------------
  |  Branch (191:9): [True: 0, False: 769]
  ------------------
  192|      0|        goto err;
  193|       |
  194|    769|#ifndef FIPS_MODULE
  195|    769|    ctx->bio_core = ossl_bio_core_globals_new(ctx);
  196|    769|    if (ctx->bio_core == NULL)
  ------------------
  |  Branch (196:9): [True: 0, False: 769]
  ------------------
  197|      0|        goto err;
  198|    769|#endif
  199|       |
  200|    769|    ctx->drbg_nonce = ossl_prov_drbg_nonce_ctx_new(ctx);
  201|    769|    if (ctx->drbg_nonce == NULL)
  ------------------
  |  Branch (201:9): [True: 0, False: 769]
  ------------------
  202|      0|        goto err;
  203|       |
  204|    769|#ifndef FIPS_MODULE
  205|    769|    ctx->self_test_cb = ossl_self_test_set_callback_new(ctx);
  206|    769|    if (ctx->self_test_cb == NULL)
  ------------------
  |  Branch (206:9): [True: 0, False: 769]
  ------------------
  207|      0|        goto err;
  208|    769|    ctx->indicator_cb = ossl_indicator_set_callback_new(ctx);
  209|    769|    if (ctx->indicator_cb == NULL)
  ------------------
  |  Branch (209:9): [True: 0, False: 769]
  ------------------
  210|      0|        goto err;
  211|    769|#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|    769|#ifndef OPENSSL_NO_THREAD_POOL
  223|    769|    ctx->threads = ossl_threads_ctx_new(ctx);
  224|    769|    if (ctx->threads == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 769]
  ------------------
  225|      0|        goto err;
  226|    769|#endif
  227|       |
  228|       |    /* Low priority. */
  229|    769|#ifndef FIPS_MODULE
  230|    769|    ctx->child_provider = ossl_child_prov_ctx_new(ctx);
  231|    769|    if (ctx->child_provider == NULL)
  ------------------
  |  Branch (231:9): [True: 0, False: 769]
  ------------------
  232|      0|        goto err;
  233|    769|#endif
  234|       |
  235|       |    /* Everything depends on properties, so we also pre-initialise that */
  236|    769|    if (!ossl_property_parse_init(ctx))
  ------------------
  |  Branch (236:9): [True: 0, False: 769]
  ------------------
  237|      0|        goto err;
  238|       |
  239|    769|#ifndef FIPS_MODULE
  240|    769|    ctx->comp_methods = ossl_load_builtin_compressions();
  241|    769|#endif
  242|       |
  243|    769|    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|    769|}
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|  12.7M|{
  459|  12.7M|    OSSL_LIB_CTX *current_defctx = get_thread_default_context();
  460|       |
  461|  12.7M|    if (current_defctx == NULL && default_context_inited)
  ------------------
  |  Branch (461:9): [True: 12.7M, False: 0]
  |  Branch (461:35): [True: 12.7M, False: 0]
  ------------------
  462|  12.7M|        current_defctx = &default_context_int;
  463|  12.7M|    return current_defctx;
  464|  12.7M|}
context.c:get_thread_default_context:
  439|  12.7M|{
  440|  12.7M|    if (!RUN_ONCE(&default_context_thread_key_init, default_context_do_thread_key_init))
  ------------------
  |  |  130|  12.7M|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 12.7M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (440:9): [True: 0, False: 12.7M]
  ------------------
  441|      0|        return NULL;
  442|       |
  443|  12.7M|    if (!RUN_ONCE(&default_context_init, default_context_do_init))
  ------------------
  |  |  130|  12.7M|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 12.7M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (443:9): [True: 0, False: 12.7M]
  ------------------
  444|      0|        return NULL;
  445|       |
  446|  12.7M|    return CRYPTO_THREAD_get_local(&default_context_thread_local);
  447|  12.7M|}
context.c:check_default_context:
  467|    768|{
  468|    768|    OSSL_LIB_CTX *current_defctx = check_thread_default_context();
  469|       |
  470|    768|    if (current_defctx == NULL && default_context_inited)
  ------------------
  |  Branch (470:9): [True: 768, False: 0]
  |  Branch (470:35): [True: 768, False: 0]
  ------------------
  471|    768|        current_defctx = &default_context_int;
  472|    768|    return current_defctx;
  473|    768|}
context.c:check_thread_default_context:
  450|    768|{
  451|    768|    if (!RUN_ONCE(&default_context_thread_key_init, default_context_do_thread_key_init))
  ------------------
  |  |  130|    768|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 768, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (451:9): [True: 0, False: 768]
  ------------------
  452|      0|        return NULL;
  453|       |
  454|    768|    return CRYPTO_THREAD_get_local(&default_context_thread_local);
  455|    768|}

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

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

ossl_stored_namemap_new:
   58|    769|{
   59|    769|    OSSL_NAMEMAP *namemap = ossl_namemap_new(libctx);
   60|       |
   61|    769|    if (namemap != NULL)
  ------------------
  |  Branch (61:9): [True: 769, False: 0]
  ------------------
   62|    769|        namemap->stored = 1;
   63|       |
   64|    769|    return namemap;
   65|    769|}
ossl_stored_namemap_free:
   68|    768|{
   69|    768|    OSSL_NAMEMAP *namemap = vnamemap;
   70|       |
   71|    768|    if (namemap != NULL) {
  ------------------
  |  Branch (71:9): [True: 768, False: 0]
  ------------------
   72|       |        /* Pretend it isn't stored, or ossl_namemap_free() will do nothing */
   73|    768|        namemap->stored = 0;
   74|    768|        ossl_namemap_free(namemap);
   75|    768|    }
   76|    768|}
ossl_namemap_empty:
   84|  5.47M|{
   85|       |#ifdef TSAN_REQUIRES_LOCKING
   86|       |    /* No TSAN support */
   87|       |    int rv;
   88|       |
   89|       |    if (namemap == NULL)
   90|       |        return 1;
   91|       |
   92|       |    if (!CRYPTO_THREAD_read_lock(namemap->lock))
   93|       |        return -1;
   94|       |    rv = namemap->max_number == 0;
   95|       |    CRYPTO_THREAD_unlock(namemap->lock);
   96|       |    return rv;
   97|       |#else
   98|       |    /* Have TSAN support */
   99|  5.47M|    return namemap == NULL || tsan_load(&namemap->max_number) == 0;
  ------------------
  |  |   61|  5.47M|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  |  Branch (99:12): [True: 0, False: 5.47M]
  |  Branch (99:31): [True: 674, False: 5.47M]
  ------------------
  100|  5.47M|#endif
  101|  5.47M|}
ossl_namemap_doall_names:
  111|   602k|{
  112|   602k|    int i;
  113|   602k|    NAMES *names;
  114|       |
  115|   602k|    if (namemap == NULL || number <= 0)
  ------------------
  |  Branch (115:9): [True: 0, False: 602k]
  |  Branch (115:28): [True: 0, False: 602k]
  ------------------
  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|   602k|    if (!CRYPTO_THREAD_read_lock(namemap->lock))
  ------------------
  |  Branch (123:9): [True: 0, False: 602k]
  ------------------
  124|      0|        return 0;
  125|       |
  126|   602k|    names = sk_NAMES_value(namemap->numnames, number - 1);
  127|   602k|    if (names != NULL)
  ------------------
  |  Branch (127:9): [True: 602k, False: 0]
  ------------------
  128|   602k|        names = sk_OPENSSL_STRING_dup(names);
  ------------------
  |  |  278|   602k|#define sk_OPENSSL_STRING_dup(sk) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_dup(ossl_check_const_OPENSSL_STRING_sk_type(sk)))
  ------------------
  129|       |
  130|   602k|    CRYPTO_THREAD_unlock(namemap->lock);
  131|       |
  132|   602k|    if (names == NULL)
  ------------------
  |  Branch (132:9): [True: 0, False: 602k]
  ------------------
  133|      0|        return 0;
  134|       |
  135|  2.59M|    for (i = 0; i < sk_OPENSSL_STRING_num(names); i++)
  ------------------
  |  |  256|  2.59M|#define sk_OPENSSL_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_STRING_sk_type(sk))
  ------------------
  |  Branch (135:17): [True: 1.99M, False: 602k]
  ------------------
  136|  1.99M|        fn(sk_OPENSSL_STRING_value(names, i), data);
  ------------------
  |  |  257|  1.99M|#define sk_OPENSSL_STRING_value(sk, idx) ((char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_STRING_sk_type(sk), (idx)))
  ------------------
  137|       |
  138|   602k|    sk_OPENSSL_STRING_free(names);
  ------------------
  |  |  262|   602k|#define sk_OPENSSL_STRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_STRING_sk_type(sk))
  ------------------
  139|   602k|    return i > 0;
  140|   602k|}
ossl_namemap_name2num:
  143|  6.15M|{
  144|  6.15M|    int number = 0;
  145|  6.15M|    HT_VALUE *val;
  146|  6.15M|    NAMENUM_KEY key;
  147|       |
  148|  6.15M|#ifndef FIPS_MODULE
  149|  6.15M|    if (namemap == NULL)
  ------------------
  |  Branch (149:9): [True: 0, False: 6.15M]
  ------------------
  150|      0|        namemap = ossl_namemap_stored(NULL);
  151|  6.15M|#endif
  152|       |
  153|  6.15M|    if (namemap == NULL || name == NULL)
  ------------------
  |  Branch (153:9): [True: 0, False: 6.15M]
  |  Branch (153:28): [True: 2, False: 6.15M]
  ------------------
  154|      2|        return 0;
  155|       |
  156|  6.15M|    HT_INIT_RAW_KEY(&key);
  ------------------
  |  |  130|  6.15M|    do {                               \
  |  |  131|  6.15M|        HT_INIT_KEY((key));            \
  |  |  ------------------
  |  |  |  |  112|  6.15M|    do {                                                                                           \
  |  |  |  |  113|  6.15M|        memset((key), 0, sizeof(*(key)));                                                          \
  |  |  |  |  114|  6.15M|        (key)->key_header.keysize = (key)->key_header.bufsize = (sizeof(*(key)) - sizeof(HT_KEY)); \
  |  |  |  |  115|  6.15M|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY));                            \
  |  |  |  |  116|  6.15M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (116:14): [Folded, False: 6.15M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  132|  6.15M|        (key)->key_header.keysize = 0; \
  |  |  133|  6.15M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (133:14): [Folded, False: 6.15M]
  |  |  ------------------
  ------------------
  157|  6.15M|    HT_COPY_RAW_KEY_CASE(TO_HT_KEY(&key), name, strlen(name));
  ------------------
  |  |  164|  6.15M|    do {                                                                               \
  |  |  165|  6.15M|        size_t tmplen = (size_t)(len);                                                 \
  |  |  166|  6.15M|        if (tmplen > (key)->bufsize - (key)->keysize)                                  \
  |  |  ------------------
  |  |  |  Branch (166:13): [True: 0, False: 6.15M]
  |  |  ------------------
  |  |  167|  6.15M|            tmplen = (key)->bufsize - (key)->keysize;                                  \
  |  |  168|  6.15M|        ossl_ht_strcase((key), (char *)&((key)->keybuf[(key)->keysize]), buf, tmplen); \
  |  |  169|  6.15M|        (key)->keysize += tmplen;                                                      \
  |  |  170|  6.15M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (170:14): [Folded, False: 6.15M]
  |  |  ------------------
  ------------------
  158|       |
  159|  6.15M|    val = ossl_ht_get(namemap->namenum_ht, TO_HT_KEY(&key));
  ------------------
  |  |  237|  6.15M|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  160|       |
  161|  6.15M|    if (val != NULL)
  ------------------
  |  Branch (161:9): [True: 5.49M, False: 665k]
  ------------------
  162|       |        /* We store a (small) int directly instead of a pointer to it. */
  163|  5.49M|        number = (int)(intptr_t)val->value;
  164|       |
  165|  6.15M|    return number;
  166|  6.15M|}
ossl_namemap_name2num_n:
  170|   219k|{
  171|   219k|    int number = 0;
  172|   219k|    HT_VALUE *val;
  173|   219k|    NAMENUM_KEY key;
  174|       |
  175|   219k|#ifndef FIPS_MODULE
  176|   219k|    if (namemap == NULL)
  ------------------
  |  Branch (176:9): [True: 0, False: 219k]
  ------------------
  177|      0|        namemap = ossl_namemap_stored(NULL);
  178|   219k|#endif
  179|       |
  180|   219k|    if (namemap == NULL)
  ------------------
  |  Branch (180:9): [True: 0, False: 219k]
  ------------------
  181|      0|        return 0;
  182|       |
  183|   219k|    if (name_len > NAMEMAP_NAME_LEN)
  ------------------
  |  |   19|   219k|#define NAMEMAP_NAME_LEN 64
  ------------------
  |  Branch (183:9): [True: 0, False: 219k]
  ------------------
  184|      0|        name_len = NAMEMAP_NAME_LEN;
  ------------------
  |  |   19|      0|#define NAMEMAP_NAME_LEN 64
  ------------------
  185|       |
  186|   219k|    HT_INIT_RAW_KEY(&key);
  ------------------
  |  |  130|   219k|    do {                               \
  |  |  131|   219k|        HT_INIT_KEY((key));            \
  |  |  ------------------
  |  |  |  |  112|   219k|    do {                                                                                           \
  |  |  |  |  113|   219k|        memset((key), 0, sizeof(*(key)));                                                          \
  |  |  |  |  114|   219k|        (key)->key_header.keysize = (key)->key_header.bufsize = (sizeof(*(key)) - sizeof(HT_KEY)); \
  |  |  |  |  115|   219k|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY));                            \
  |  |  |  |  116|   219k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (116:14): [Folded, False: 219k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  132|   219k|        (key)->key_header.keysize = 0; \
  |  |  133|   219k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (133:14): [Folded, False: 219k]
  |  |  ------------------
  ------------------
  187|   219k|    HT_COPY_RAW_KEY_CASE(TO_HT_KEY(&key), name, name_len);
  ------------------
  |  |  164|   219k|    do {                                                                               \
  |  |  165|   219k|        size_t tmplen = (size_t)(len);                                                 \
  |  |  166|   219k|        if (tmplen > (key)->bufsize - (key)->keysize)                                  \
  |  |  ------------------
  |  |  |  Branch (166:13): [True: 0, False: 219k]
  |  |  ------------------
  |  |  167|   219k|            tmplen = (key)->bufsize - (key)->keysize;                                  \
  |  |  168|   219k|        ossl_ht_strcase((key), (char *)&((key)->keybuf[(key)->keysize]), buf, tmplen); \
  |  |  169|   219k|        (key)->keysize += tmplen;                                                      \
  |  |  170|   219k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (170:14): [Folded, False: 219k]
  |  |  ------------------
  ------------------
  188|       |
  189|   219k|    val = ossl_ht_get(namemap->namenum_ht, TO_HT_KEY(&key));
  ------------------
  |  |  237|   219k|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  190|       |
  191|   219k|    if (val != NULL)
  ------------------
  |  Branch (191:9): [True: 185k, False: 34.4k]
  ------------------
  192|       |        /* We store a (small) int directly instead of a pointer to it. */
  193|   185k|        number = (int)(intptr_t)val->value;
  194|       |
  195|   219k|    return number;
  196|   219k|}
ossl_namemap_add_name:
  296|   437k|{
  297|   437k|    int tmp_number;
  298|       |
  299|   437k|#ifndef FIPS_MODULE
  300|   437k|    if (namemap == NULL)
  ------------------
  |  Branch (300:9): [True: 0, False: 437k]
  ------------------
  301|      0|        namemap = ossl_namemap_stored(NULL);
  302|   437k|#endif
  303|       |
  304|   437k|    if (name == NULL || *name == 0 || namemap == NULL)
  ------------------
  |  Branch (304:9): [True: 0, False: 437k]
  |  Branch (304:25): [True: 0, False: 437k]
  |  Branch (304:39): [True: 0, False: 437k]
  ------------------
  305|      0|        return 0;
  306|       |
  307|   437k|    if (!CRYPTO_THREAD_write_lock(namemap->lock))
  ------------------
  |  Branch (307:9): [True: 0, False: 437k]
  ------------------
  308|      0|        return 0;
  309|   437k|    tmp_number = namemap_add_name(namemap, number, name);
  310|   437k|    CRYPTO_THREAD_unlock(namemap->lock);
  311|   437k|    return tmp_number;
  312|   437k|}
ossl_namemap_add_names:
  316|   184k|{
  317|   184k|    char *tmp, *p, *q, *endp;
  318|       |
  319|       |    /* Check that we have a namemap */
  320|   184k|    if (!ossl_assert(namemap != NULL)) {
  ------------------
  |  |   52|   184k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   184k|    __FILE__, __LINE__)
  ------------------
  |  Branch (320:9): [True: 0, False: 184k]
  ------------------
  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|   184k|    if ((tmp = OPENSSL_strdup(names)) == NULL)
  ------------------
  |  |  136|   184k|    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: 184k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|   184k|    if (!CRYPTO_THREAD_write_lock(namemap->lock)) {
  ------------------
  |  Branch (328:9): [True: 0, False: 184k]
  ------------------
  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|   610k|    for (p = tmp; *p != '\0'; p = q) {
  ------------------
  |  Branch (336:19): [True: 426k, False: 184k]
  ------------------
  337|   426k|        int this_number;
  338|   426k|        size_t l;
  339|       |
  340|   426k|        if ((q = strchr(p, separator)) == NULL) {
  ------------------
  |  Branch (340:13): [True: 184k, False: 241k]
  ------------------
  341|   184k|            l = strlen(p); /* offset to \0 */
  342|   184k|            q = p + l;
  343|   241k|        } else {
  344|   241k|            l = q - p; /* offset to the next separator */
  345|   241k|            *q++ = '\0';
  346|   241k|        }
  347|       |
  348|   426k|        if (*p == '\0') {
  ------------------
  |  Branch (348:13): [True: 0, False: 426k]
  ------------------
  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|   426k|        this_number = ossl_namemap_name2num(namemap, p);
  355|       |
  356|   426k|        if (number == 0) {
  ------------------
  |  Branch (356:13): [True: 300k, False: 125k]
  ------------------
  357|   300k|            number = this_number;
  358|   300k|        } else if (this_number != 0 && this_number != number) {
  ------------------
  |  Branch (358:20): [True: 108k, False: 16.8k]
  |  Branch (358:40): [True: 0, False: 108k]
  ------------------
  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|   426k|    }
  366|   184k|    endp = p;
  367|       |
  368|       |    /* Now that we have checked, register all names */
  369|   610k|    for (p = tmp; p < endp; p = q) {
  ------------------
  |  Branch (369:19): [True: 426k, False: 184k]
  ------------------
  370|   426k|        int this_number;
  371|       |
  372|   426k|        q = p + strlen(p) + 1;
  373|       |
  374|   426k|        this_number = namemap_add_name(namemap, number, p);
  375|   426k|        if (number == 0) {
  ------------------
  |  Branch (375:13): [True: 93.8k, False: 332k]
  ------------------
  376|  93.8k|            number = this_number;
  377|   332k|        } else if (this_number != number) {
  ------------------
  |  Branch (377:20): [True: 0, False: 332k]
  ------------------
  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|   426k|    }
  385|       |
  386|   184k|end:
  387|   184k|    CRYPTO_THREAD_unlock(namemap->lock);
  388|   184k|    OPENSSL_free(tmp);
  ------------------
  |  |  132|   184k|    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|   184k|    return number;
  390|   184k|}
ossl_namemap_stored:
  490|  5.47M|{
  491|  5.47M|#ifndef FIPS_MODULE
  492|  5.47M|    int nms;
  493|  5.47M|#endif
  494|  5.47M|    OSSL_NAMEMAP *namemap = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_NAMEMAP_INDEX);
  ------------------
  |  |   99|  5.47M|#define OSSL_LIB_CTX_NAMEMAP_INDEX 4
  ------------------
  495|       |
  496|  5.47M|    if (namemap == NULL)
  ------------------
  |  Branch (496:9): [True: 0, False: 5.47M]
  ------------------
  497|      0|        return NULL;
  498|       |
  499|  5.47M|#ifndef FIPS_MODULE
  500|  5.47M|    nms = ossl_namemap_empty(namemap);
  501|  5.47M|    if (nms < 0) {
  ------------------
  |  Branch (501:9): [True: 0, False: 5.47M]
  ------------------
  502|       |        /*
  503|       |         * Could not get lock to make the count, so maybe internal objects
  504|       |         * weren't added. This seems safest.
  505|       |         */
  506|      0|        return NULL;
  507|      0|    }
  508|  5.47M|    if (nms == 1) {
  ------------------
  |  Branch (508:9): [True: 674, False: 5.47M]
  ------------------
  509|    674|        int num;
  510|       |
  511|       |        /* Before pilfering, we make sure the legacy database is populated */
  512|    674|        OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS
  ------------------
  |  |  507|    674|#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
  ------------------
  513|    674|                | OPENSSL_INIT_ADD_ALL_DIGESTS,
  ------------------
  |  |  508|    674|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
  514|    674|            NULL);
  515|       |
  516|    674|        OBJ_NAME_do_all(OBJ_NAME_TYPE_CIPHER_METH,
  ------------------
  |  |   26|    674|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
  517|    674|            get_legacy_cipher_names, namemap);
  518|    674|        OBJ_NAME_do_all(OBJ_NAME_TYPE_MD_METH,
  ------------------
  |  |   25|    674|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  519|    674|            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|    674|        num = ossl_namemap_add_name(namemap, 0, "RSA-PSS");
  526|    674|        if (num != 0) {
  ------------------
  |  Branch (526:13): [True: 674, False: 0]
  ------------------
  527|    674|            ossl_namemap_add_name(namemap, num, "rsassaPss");
  528|       |            /* Add other RSA-PSS aliases as well */
  529|    674|            ossl_namemap_add_name(namemap, num, "RSASSA-PSS");
  530|    674|            ossl_namemap_add_name(namemap, num, "1.2.840.113549.1.1.10");
  531|    674|        }
  532|    674|#ifndef OPENSSL_NO_DEPRECATED_3_6
  533|    674|        {
  534|    674|            int i, end;
  535|       |
  536|       |            /* We also pilfer data from the legacy EVP_PKEY_ASN1_METHODs */
  537|  10.7k|            for (i = 0, end = evp_pkey_asn1_get_count(); i < end; i++)
  ------------------
  |  Branch (537:58): [True: 10.1k, False: 674]
  ------------------
  538|  10.1k|                get_legacy_pkey_meth_names(evp_pkey_asn1_get0(i), namemap);
  539|    674|        }
  540|    674|#endif
  541|    674|    }
  542|  5.47M|#endif
  543|       |
  544|  5.47M|    return namemap;
  545|  5.47M|}
ossl_namemap_new:
  548|    769|{
  549|    769|    OSSL_NAMEMAP *namemap;
  550|    769|    HT_CONFIG htconf = { NULL, NULL, NULL, NAMEMAP_HT_BUCKETS, 1, 1, 0 };
  ------------------
  |  |   17|    769|#define NAMEMAP_HT_BUCKETS 512
  ------------------
  551|       |
  552|    769|    htconf.ctx = libctx;
  553|       |
  554|    769|    if ((namemap = OPENSSL_zalloc(sizeof(*namemap))) == NULL)
  ------------------
  |  |  109|    769|    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: 769]
  ------------------
  555|      0|        goto err;
  556|       |
  557|    769|    if ((namemap->lock = CRYPTO_THREAD_lock_new()) == NULL)
  ------------------
  |  Branch (557:9): [True: 0, False: 769]
  ------------------
  558|      0|        goto err;
  559|       |
  560|    769|    if ((namemap->namenum_ht = ossl_ht_new(&htconf)) == NULL)
  ------------------
  |  Branch (560:9): [True: 0, False: 769]
  ------------------
  561|      0|        goto err;
  562|       |
  563|    769|    if ((namemap->numnames = sk_NAMES_new_null()) == NULL)
  ------------------
  |  Branch (563:9): [True: 0, False: 769]
  ------------------
  564|      0|        goto err;
  565|       |
  566|    769|    return namemap;
  567|       |
  568|      0|err:
  569|      0|    ossl_namemap_free(namemap);
  570|       |    return NULL;
  571|    769|}
ossl_namemap_free:
  574|    768|{
  575|    768|    if (namemap == NULL || namemap->stored)
  ------------------
  |  Branch (575:9): [True: 0, False: 768]
  |  Branch (575:28): [True: 0, False: 768]
  ------------------
  576|      0|        return;
  577|       |
  578|    768|    sk_NAMES_pop_free(namemap->numnames, names_free);
  579|       |
  580|    768|    ossl_ht_free(namemap->namenum_ht);
  581|       |
  582|    768|    CRYPTO_THREAD_lock_free(namemap->lock);
  583|    768|    OPENSSL_free(namemap);
  ------------------
  |  |  132|    768|    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|    768|}
core_namemap.c:namemap_add_name:
  263|   863k|{
  264|   863k|    int ret;
  265|   863k|    HT_VALUE val = { 0 };
  266|   863k|    NAMENUM_KEY key;
  267|       |
  268|       |    /* If it already exists, we don't add it */
  269|   863k|    if ((ret = ossl_namemap_name2num(namemap, name)) != 0)
  ------------------
  |  Branch (269:9): [True: 460k, False: 402k]
  ------------------
  270|   460k|        return ret;
  271|       |
  272|   402k|    if ((number = numname_insert(namemap, number, name)) == 0)
  ------------------
  |  Branch (272:9): [True: 0, False: 402k]
  ------------------
  273|      0|        return 0;
  274|       |
  275|       |    /* Using tsan_store alone here is safe since we're under lock */
  276|   402k|    tsan_store(&namemap->max_number, number);
  ------------------
  |  |   62|   402k|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  277|       |
  278|   402k|    HT_INIT_RAW_KEY(&key);
  ------------------
  |  |  130|   402k|    do {                               \
  |  |  131|   402k|        HT_INIT_KEY((key));            \
  |  |  ------------------
  |  |  |  |  112|   402k|    do {                                                                                           \
  |  |  |  |  113|   402k|        memset((key), 0, sizeof(*(key)));                                                          \
  |  |  |  |  114|   402k|        (key)->key_header.keysize = (key)->key_header.bufsize = (sizeof(*(key)) - sizeof(HT_KEY)); \
  |  |  |  |  115|   402k|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY));                            \
  |  |  |  |  116|   402k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (116:14): [Folded, False: 402k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  132|   402k|        (key)->key_header.keysize = 0; \
  |  |  133|   402k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (133:14): [Folded, False: 402k]
  |  |  ------------------
  ------------------
  279|   402k|    HT_COPY_RAW_KEY_CASE(TO_HT_KEY(&key), name, strlen(name));
  ------------------
  |  |  164|   402k|    do {                                                                               \
  |  |  165|   402k|        size_t tmplen = (size_t)(len);                                                 \
  |  |  166|   402k|        if (tmplen > (key)->bufsize - (key)->keysize)                                  \
  |  |  ------------------
  |  |  |  Branch (166:13): [True: 0, False: 402k]
  |  |  ------------------
  |  |  167|   402k|            tmplen = (key)->bufsize - (key)->keysize;                                  \
  |  |  168|   402k|        ossl_ht_strcase((key), (char *)&((key)->keybuf[(key)->keysize]), buf, tmplen); \
  |  |  169|   402k|        (key)->keysize += tmplen;                                                      \
  |  |  170|   402k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (170:14): [Folded, False: 402k]
  |  |  ------------------
  ------------------
  280|       |
  281|   402k|    val.value = (void *)(intptr_t)number;
  282|   402k|    ret = ossl_ht_insert(namemap->namenum_ht, TO_HT_KEY(&key), &val, NULL);
  ------------------
  |  |  237|   402k|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  283|   402k|    if (ret <= 0) {
  ------------------
  |  Branch (283:9): [True: 0, False: 402k]
  ------------------
  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|   402k|    return number;
  292|   402k|}
core_namemap.c:numname_insert:
  222|   402k|{
  223|   402k|    NAMES *names;
  224|   402k|    char *tmpname;
  225|       |
  226|   402k|    if (number > 0) {
  ------------------
  |  Branch (226:9): [True: 228k, False: 174k]
  ------------------
  227|   228k|        names = sk_NAMES_value(namemap->numnames, number - 1);
  228|   228k|        if (!ossl_assert(names != NULL)) {
  ------------------
  |  |   52|   228k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   228k|    __FILE__, __LINE__)
  ------------------
  |  Branch (228:13): [True: 0, False: 228k]
  ------------------
  229|       |            /* cannot happen */
  230|      0|            return 0;
  231|      0|        }
  232|   228k|    } else {
  233|       |        /* a completely new entry */
  234|   174k|        names = sk_OPENSSL_STRING_new_null();
  ------------------
  |  |  259|   174k|#define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OPENSSL_STRING_freefunc_thunk))
  ------------------
  235|   174k|        if (names == NULL)
  ------------------
  |  Branch (235:13): [True: 0, False: 174k]
  ------------------
  236|      0|            return 0;
  237|   174k|    }
  238|       |
  239|   402k|    if ((tmpname = OPENSSL_strdup(name)) == NULL)
  ------------------
  |  |  136|   402k|    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: 402k]
  ------------------
  240|      0|        goto err;
  241|       |
  242|   402k|    if (!sk_OPENSSL_STRING_push(names, tmpname))
  ------------------
  |  |  266|   402k|#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: 402k]
  ------------------
  243|      0|        goto err;
  244|   402k|    tmpname = NULL;
  245|       |
  246|   402k|    if (number <= 0) {
  ------------------
  |  Branch (246:9): [True: 174k, False: 228k]
  ------------------
  247|   174k|        if (!sk_NAMES_push(namemap->numnames, names))
  ------------------
  |  Branch (247:13): [True: 0, False: 174k]
  ------------------
  248|      0|            goto err;
  249|   174k|        number = sk_NAMES_num(namemap->numnames);
  250|   174k|    }
  251|   402k|    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|   402k|}
core_namemap.c:name_string_free:
   46|   401k|{
   47|   401k|    OPENSSL_free(name);
  ------------------
  |  |  132|   401k|    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|   401k|}
core_namemap.c:get_legacy_cipher_names:
  427|   123k|{
  428|   123k|    const EVP_CIPHER *cipher = (void *)OBJ_NAME_get(on->name, on->type);
  429|       |
  430|   123k|    if (cipher != NULL)
  ------------------
  |  Branch (430:9): [True: 123k, False: 0]
  ------------------
  431|   123k|        get_legacy_evp_names(NID_undef, EVP_CIPHER_get_type(cipher), NULL, arg);
  ------------------
  |  |   18|   123k|#define NID_undef                       0
  ------------------
  432|   123k|}
core_namemap.c:get_legacy_evp_names:
  403|   173k|{
  404|   173k|    int num = 0;
  405|   173k|    ASN1_OBJECT *obj;
  406|       |
  407|   173k|    if (base_nid != NID_undef) {
  ------------------
  |  |   18|   173k|#define NID_undef                       0
  ------------------
  |  Branch (407:9): [True: 2.69k, False: 171k]
  ------------------
  408|  2.69k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2sn(base_nid));
  409|  2.69k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2ln(base_nid));
  410|  2.69k|    }
  411|       |
  412|   173k|    if (nid != NID_undef) {
  ------------------
  |  |   18|   173k|#define NID_undef                       0
  ------------------
  |  Branch (412:9): [True: 141k, False: 32.3k]
  ------------------
  413|   141k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2sn(nid));
  414|   141k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2ln(nid));
  415|   141k|        if ((obj = OBJ_nid2obj(nid)) != NULL) {
  ------------------
  |  Branch (415:13): [True: 141k, False: 0]
  ------------------
  416|   141k|            char txtoid[OSSL_MAX_NAME_SIZE];
  417|       |
  418|   141k|            if (OBJ_obj2txt(txtoid, sizeof(txtoid), obj, 1) > 0)
  ------------------
  |  Branch (418:17): [True: 138k, False: 2.69k]
  ------------------
  419|   138k|                num = ossl_namemap_add_name(arg, num, txtoid);
  420|   141k|        }
  421|   141k|    }
  422|   173k|    if (pem_name != NULL)
  ------------------
  |  Branch (422:9): [True: 7.41k, False: 166k]
  ------------------
  423|  7.41k|        num = ossl_namemap_add_name(arg, num, pem_name);
  424|   173k|}
core_namemap.c:get_legacy_md_names:
  435|  39.7k|{
  436|  39.7k|    const EVP_MD *md = (void *)OBJ_NAME_get(on->name, on->type);
  437|       |
  438|  39.7k|    if (md != NULL)
  ------------------
  |  Branch (438:9): [True: 39.7k, False: 0]
  ------------------
  439|  39.7k|        get_legacy_evp_names(NID_undef, EVP_MD_get_type(md), NULL, arg);
  ------------------
  |  |   18|  39.7k|#define NID_undef                       0
  ------------------
  440|  39.7k|}
core_namemap.c:get_legacy_pkey_meth_names:
  445|  10.1k|{
  446|  10.1k|    int nid = 0, base_nid = 0, flags = 0;
  447|  10.1k|    const char *pem_name = NULL;
  448|       |
  449|  10.1k|    evp_pkey_asn1_get0_info(&nid, &base_nid, &flags, NULL, &pem_name, ameth);
  450|  10.1k|    if (nid != NID_undef) {
  ------------------
  |  |   18|  10.1k|#define NID_undef                       0
  ------------------
  |  Branch (450:9): [True: 10.1k, False: 0]
  ------------------
  451|  10.1k|        if ((flags & ASN1_PKEY_ALIAS) == 0) {
  ------------------
  |  | 1501|  10.1k|#define ASN1_PKEY_ALIAS 0x1
  ------------------
  |  Branch (451:13): [True: 6.74k, False: 3.37k]
  ------------------
  452|  6.74k|            switch (nid) {
  453|    674|            case EVP_PKEY_DHX:
  ------------------
  |  |   72|    674|#define EVP_PKEY_DHX NID_dhpublicnumber
  |  |  ------------------
  |  |  |  | 5526|    674|#define NID_dhpublicnumber              920
  |  |  ------------------
  ------------------
  |  Branch (453:13): [True: 674, False: 6.06k]
  ------------------
  454|       |                /* We know that the name "DHX" is used too */
  455|    674|                get_legacy_evp_names(0, nid, "DHX", arg);
  456|       |                /* FALLTHRU */
  457|  6.74k|            default:
  ------------------
  |  Branch (457:13): [True: 6.06k, False: 674]
  ------------------
  458|  6.74k|                get_legacy_evp_names(0, nid, pem_name, arg);
  459|  6.74k|            }
  460|  6.74k|        } 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.37k|            switch (nid) {
  467|    674|            case EVP_PKEY_SM2:
  ------------------
  |  |   74|    674|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|    674|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (467:13): [True: 674, False: 2.69k]
  ------------------
  468|       |                /*
  469|       |                 * SM2 is a separate keytype with providers, not an alias for
  470|       |                 * EC.
  471|       |                 */
  472|    674|                get_legacy_evp_names(0, nid, pem_name, arg);
  473|    674|                break;
  474|  2.69k|            default:
  ------------------
  |  Branch (474:13): [True: 2.69k, False: 674]
  ------------------
  475|       |                /* Use the short name of the base nid as the common reference */
  476|  2.69k|                get_legacy_evp_names(base_nid, nid, pem_name, arg);
  477|  3.37k|            }
  478|  3.37k|        }
  479|  10.1k|    }
  480|  10.1k|}
core_namemap.c:names_free:
   51|   173k|{
   52|   173k|    sk_OPENSSL_STRING_pop_free(n, name_string_free);
  ------------------
  |  |  270|   173k|#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|   173k|}

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

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

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

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

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

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

ossl_ctype_check:
  253|  65.2M|{
  254|  65.2M|    const int max = sizeof(ctype_char_map) / sizeof(*ctype_char_map);
  255|  65.2M|    const int a = ossl_toascii(c);
  ------------------
  |  |   56|  65.2M|#define ossl_toascii(c) (c)
  ------------------
  256|       |
  257|  65.2M|    return a >= 0 && a < max && (ctype_char_map[a] & mask) != 0;
  ------------------
  |  Branch (257:12): [True: 65.2M, False: 8.78k]
  |  Branch (257:22): [True: 65.2M, False: 0]
  |  Branch (257:33): [True: 6.54M, False: 58.6M]
  ------------------
  258|  65.2M|}
ossl_isdigit:
  270|   616k|{
  271|   616k|    int a = ossl_toascii(c);
  ------------------
  |  |   56|   616k|#define ossl_toascii(c) (c)
  ------------------
  272|       |
  273|   616k|    return ASCII_IS_DIGIT(a);
  ------------------
  |  |  265|   616k|#define ASCII_IS_DIGIT(c) (c >= 0x30 && c <= 0x39)
  |  |  ------------------
  |  |  |  Branch (265:28): [True: 604k, False: 12.0k]
  |  |  |  Branch (265:41): [True: 586k, False: 17.7k]
  |  |  ------------------
  ------------------
  274|   616k|}
ossl_tolower:
  297|   199M|{
  298|   199M|    int a = ossl_toascii(c);
  ------------------
  |  |   56|   199M|#define ossl_toascii(c) (c)
  ------------------
  299|       |
  300|   199M|    return ASCII_IS_UPPER(a) ? c ^ case_change : c;
  ------------------
  |  |  266|   199M|#define ASCII_IS_UPPER(c) (c >= 0x41 && c <= 0x5A)
  |  |  ------------------
  |  |  |  Branch (266:28): [True: 180M, False: 19.4M]
  |  |  |  Branch (266:41): [True: 79.7M, False: 100M]
  |  |  ------------------
  ------------------
  301|   199M|}

OpenSSL_version:
   75|  3.75k|{
   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.75k|    switch (t) {
  ------------------
  |  Branch (81:13): [True: 3.75k, False: 0]
  ------------------
   82|      0|    case OPENSSL_VERSION:
  ------------------
  |  |  184|      0|#define OPENSSL_VERSION 0
  ------------------
  |  Branch (82:5): [True: 0, False: 3.75k]
  ------------------
   83|      0|        return OPENSSL_VERSION_TEXT;
  ------------------
  |  |  110|      0|# define OPENSSL_VERSION_TEXT "OpenSSL 4.0.1 9 Jun 2026"
  ------------------
   84|  3.75k|    case OPENSSL_VERSION_STRING:
  ------------------
  |  |  190|  3.75k|#define OPENSSL_VERSION_STRING 6
  ------------------
  |  Branch (84:5): [True: 3.75k, False: 0]
  ------------------
   85|  3.75k|        return OPENSSL_VERSION_STR;
  ------------------
  |  |   90|  3.75k|# 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.75k]
  ------------------
   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.75k]
  ------------------
   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.75k]
  ------------------
   91|      0|        return compiler_flags;
   92|      0|    case OPENSSL_PLATFORM:
  ------------------
  |  |  187|      0|#define OPENSSL_PLATFORM 3
  ------------------
  |  Branch (92:5): [True: 0, False: 3.75k]
  ------------------
   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.75k]
  ------------------
  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.75k]
  ------------------
  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.75k]
  ------------------
  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.75k]
  ------------------
  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.75k]
  ------------------
  125|      0|        return "ENGINESDIR: N/A";
  126|  3.75k|    }
  127|      0|    return "not available";
  128|  3.75k|}

ossl_get_modulesdir:
  153|     87|{
  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|     87|    return MODULESDIR;
  160|     87|#endif
  161|     87|}

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

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

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

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

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

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

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

DSA_free:
  186|  3.03k|{
  187|  3.03k|    int i;
  188|       |
  189|  3.03k|    if (r == NULL)
  ------------------
  |  Branch (189:9): [True: 3.03k, False: 0]
  ------------------
  190|  3.03k|        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|     87|{
   63|     87|    return &dso_meth_dlfcn;
   64|     87|}
dso_dlfcn.c:dlfcn_load:
   94|     87|{
   95|     87|    void *ptr = NULL;
   96|       |    /* See applicable comments in dso_dl.c */
   97|     87|    char *filename = DSO_convert_filename(dso, NULL);
   98|     87|    int flags = DLOPEN_FLAG;
  ------------------
  |  |   85|     87|#define DLOPEN_FLAG RTLD_NOW /* Hope this works everywhere else */
  ------------------
   99|     87|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|     87|#define get_last_sys_error() errno
  ------------------
  100|       |
  101|     87|    if (filename == NULL) {
  ------------------
  |  Branch (101:9): [True: 0, False: 87]
  ------------------
  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|     87|#ifdef RTLD_GLOBAL
  106|     87|    if (dso->flags & DSO_FLAG_GLOBAL_SYMBOLS)
  ------------------
  |  |   53|     87|#define DSO_FLAG_GLOBAL_SYMBOLS 0x20
  ------------------
  |  Branch (106:9): [True: 0, False: 87]
  ------------------
  107|      0|        flags |= RTLD_GLOBAL;
  108|     87|#endif
  109|       |#ifdef _AIX
  110|       |    if (filename[strlen(filename) - 1] == ')')
  111|       |        flags |= RTLD_MEMBER;
  112|       |#endif
  113|     87|    ptr = dlopen(filename, flags);
  114|     87|    if (ptr == NULL) {
  ------------------
  |  Branch (114:9): [True: 87, False: 0]
  ------------------
  115|     87|        ERR_raise_data(ERR_LIB_DSO, DSO_R_LOAD_FAILED,
  ------------------
  |  |  359|     87|    (ERR_new(),                                                  \
  |  |  360|     87|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     87|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     87|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_DSO, DSO_R_LOAD_FAILED,
  ------------------
  |  |   81|     87|#define ERR_LIB_DSO 37
  ------------------
                      ERR_raise_data(ERR_LIB_DSO, DSO_R_LOAD_FAILED,
  ------------------
  |  |   34|     87|#define DSO_R_LOAD_FAILED 103
  ------------------
  116|     87|            "filename(%s): %s", filename, dlerror());
  117|     87|        goto err;
  118|     87|    }
  119|       |    /*
  120|       |     * Some dlopen() implementations (e.g. solaris) do no preserve errno, even
  121|       |     * on a successful call.
  122|       |     */
  123|     87|    set_sys_error(saveerrno);
  ------------------
  |  |   32|     87|#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|     87|err:
  132|       |    /* Cleanup! */
  133|     87|    OPENSSL_free(filename);
  ------------------
  |  |  132|     87|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  134|     87|    if (ptr != NULL)
  ------------------
  |  Branch (134:9): [True: 0, False: 87]
  ------------------
  135|      0|        dlclose(ptr);
  136|     87|    return 0;
  137|      0|}
dso_dlfcn.c:dlfcn_unload:
  140|     87|{
  141|     87|    void *ptr;
  142|     87|    if (dso == NULL) {
  ------------------
  |  Branch (142:9): [True: 0, False: 87]
  ------------------
  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|     87|    if (sk_void_num(dso->meth_data) < 1)
  ------------------
  |  |  220|     87|#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
  ------------------
  |  Branch (146:9): [True: 87, False: 0]
  ------------------
  147|     87|        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|    174|{
  246|    174|    char *translated;
  247|    174|    int len, rsize, transform;
  248|       |
  249|    174|    len = strlen(filename);
  250|    174|    rsize = len + 1;
  251|    174|    transform = (strchr(filename, '/') == NULL);
  252|    174|    if (transform) {
  ------------------
  |  Branch (252:9): [True: 84, False: 90]
  ------------------
  253|       |        /* We will convert this to "%s.so" or "lib%s.so" etc */
  254|     84|        rsize += strlen(DSO_EXTENSION); /* The length of ".so" */
  ------------------
  |  |   23|     84|# define DSO_EXTENSION ".so"
  ------------------
  255|     84|        if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
  ------------------
  |  |   41|     84|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
  |  Branch (255:13): [True: 0, False: 84]
  ------------------
  256|      0|            rsize += 3; /* The length of "lib" */
  257|     84|    }
  258|    174|    translated = OPENSSL_malloc(rsize);
  ------------------
  |  |  107|    174|    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|    174|    if (translated == NULL) {
  ------------------
  |  Branch (259:9): [True: 0, False: 174]
  ------------------
  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|    174|    if (transform) {
  ------------------
  |  Branch (263:9): [True: 84, False: 90]
  ------------------
  264|     84|        if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
  ------------------
  |  |   41|     84|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
  |  Branch (264:13): [True: 0, False: 84]
  ------------------
  265|      0|            BIO_snprintf(translated, rsize, "lib%s" DSO_EXTENSION, filename);
  ------------------
  |  |   23|      0|# define DSO_EXTENSION ".so"
  ------------------
  266|     84|        else
  267|     84|            BIO_snprintf(translated, rsize, "%s" DSO_EXTENSION, filename);
  ------------------
  |  |   23|     84|# define DSO_EXTENSION ".so"
  ------------------
  268|     90|    } else {
  269|     90|        BIO_snprintf(translated, rsize, "%s", filename);
  270|     90|    }
  271|    174|    return translated;
  272|    174|}
dso_dlfcn.c:dlfcn_merger:
  194|     87|{
  195|     87|    char *merged;
  196|       |
  197|     87|    if (!filespec1 && !filespec2) {
  ------------------
  |  Branch (197:9): [True: 0, False: 87]
  |  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|     87|    if (!filespec2 || (filespec1 != NULL && filespec1[0] == '/')) {
  ------------------
  |  Branch (205:9): [True: 0, False: 87]
  |  Branch (205:24): [True: 87, False: 0]
  |  Branch (205:45): [True: 2, False: 85]
  ------------------
  206|      2|        merged = OPENSSL_strdup(filespec1);
  ------------------
  |  |  136|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  207|      2|        if (merged == NULL)
  ------------------
  |  Branch (207:13): [True: 0, False: 2]
  ------------------
  208|      0|            return NULL;
  209|      2|    }
  210|       |    /*
  211|       |     * If the first file specification is missing, the second one rules.
  212|       |     */
  213|     85|    else if (!filespec1) {
  ------------------
  |  Branch (213:14): [True: 0, False: 85]
  ------------------
  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|     85|    } 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|     85|        int spec2len, len;
  226|       |
  227|     85|        spec2len = strlen(filespec2);
  228|     85|        len = spec2len + strlen(filespec1);
  229|       |
  230|     85|        if (spec2len && filespec2[spec2len - 1] == '/') {
  ------------------
  |  Branch (230:13): [True: 85, False: 0]
  |  Branch (230:25): [True: 0, False: 85]
  ------------------
  231|      0|            spec2len--;
  232|      0|            len--;
  233|      0|        }
  234|     85|        merged = OPENSSL_malloc(len + 2);
  ------------------
  |  |  107|     85|    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|     85|        if (merged == NULL)
  ------------------
  |  Branch (235:13): [True: 0, False: 85]
  ------------------
  236|      0|            return NULL;
  237|     85|        strcpy(merged, filespec2);
  238|     85|        merged[spec2len] = '/';
  239|     85|        strcpy(&merged[spec2len + 1], filespec1);
  240|     85|    }
  241|     87|    return merged;
  242|     87|}

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|     87|{
   44|       |    return DSO_new_method(NULL);
   45|     87|}
DSO_free:
   48|  1.78k|{
   49|  1.78k|    int i;
   50|       |
   51|  1.78k|    if (dso == NULL)
  ------------------
  |  Branch (51:9): [True: 1.69k, False: 87]
  ------------------
   52|  1.69k|        return 1;
   53|       |
   54|     87|    if (CRYPTO_DOWN_REF(&dso->references, &i) <= 0)
  ------------------
  |  Branch (54:9): [True: 0, False: 87]
  ------------------
   55|      0|        return 0;
   56|       |
   57|     87|    REF_PRINT_COUNT("DSO", i, dso);
  ------------------
  |  |  301|     87|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|     87|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|     87|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|     87|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   58|     87|    if (i > 0)
  ------------------
  |  Branch (58:9): [True: 0, False: 87]
  ------------------
   59|      0|        return 1;
   60|     87|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|     87|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 87]
  |  |  ------------------
  ------------------
   61|       |
   62|     87|    if ((dso->flags & DSO_FLAG_NO_UNLOAD_ON_FREE) == 0) {
  ------------------
  |  |   46|     87|#define DSO_FLAG_NO_UNLOAD_ON_FREE 0x04
  ------------------
  |  Branch (62:9): [True: 87, False: 0]
  ------------------
   63|     87|        if ((dso->meth->dso_unload != NULL) && !dso->meth->dso_unload(dso)) {
  ------------------
  |  Branch (63:13): [True: 87, False: 0]
  |  Branch (63:48): [True: 0, False: 87]
  ------------------
   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|     87|    }
   68|       |
   69|     87|    if ((dso->meth->finish != NULL) && !dso->meth->finish(dso)) {
  ------------------
  |  Branch (69:9): [True: 0, False: 87]
  |  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|     87|    sk_void_free(dso->meth_data);
  ------------------
  |  |  226|     87|#define sk_void_free(sk) OPENSSL_sk_free(ossl_check_void_sk_type(sk))
  ------------------
   75|     87|    OPENSSL_free(dso->filename);
  ------------------
  |  |  132|     87|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   76|     87|    OPENSSL_free(dso->loaded_filename);
  ------------------
  |  |  132|     87|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|     87|    CRYPTO_FREE_REF(&dso->references);
   78|     87|    OPENSSL_free(dso);
  ------------------
  |  |  132|     87|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|     87|    return 1;
   80|     87|}
DSO_flags:
   83|    168|{
   84|    168|    return ((dso == NULL) ? 0 : dso->flags);
  ------------------
  |  Branch (84:13): [True: 0, False: 168]
  ------------------
   85|    168|}
DSO_load:
  105|     87|{
  106|     87|    DSO *ret;
  107|     87|    int allocated = 0;
  108|       |
  109|     87|    if (dso == NULL) {
  ------------------
  |  Branch (109:9): [True: 0, False: 87]
  ------------------
  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|     87|        ret = dso;
  123|       |    /* Don't load if we're currently already loaded */
  124|     87|    if (ret->filename != NULL) {
  ------------------
  |  Branch (124:9): [True: 0, False: 87]
  ------------------
  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|     87|    if (filename != NULL)
  ------------------
  |  Branch (132:9): [True: 87, False: 0]
  ------------------
  133|     87|        if (!DSO_set_filename(ret, filename)) {
  ------------------
  |  Branch (133:13): [True: 0, False: 87]
  ------------------
  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|     87|    filename = ret->filename;
  138|     87|    if (filename == NULL) {
  ------------------
  |  Branch (138:9): [True: 0, False: 87]
  ------------------
  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|     87|    if (ret->meth->dso_load == NULL) {
  ------------------
  |  Branch (142:9): [True: 0, False: 87]
  ------------------
  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|     87|    if (!ret->meth->dso_load(ret)) {
  ------------------
  |  Branch (146:9): [True: 87, False: 0]
  ------------------
  147|     87|        ERR_raise(ERR_LIB_DSO, DSO_R_LOAD_FAILED);
  ------------------
  |  |  357|     87|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|     87|    (ERR_new(),                                                  \
  |  |  |  |  360|     87|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     87|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|     87|        ERR_set_error)
  |  |  ------------------
  ------------------
  148|     87|        goto err;
  149|     87|    }
  150|       |    /* Load succeeded */
  151|      0|    return ret;
  152|     87|err:
  153|     87|    if (allocated)
  ------------------
  |  Branch (153:9): [True: 0, False: 87]
  ------------------
  154|      0|        DSO_free(ret);
  155|       |    return NULL;
  156|     87|}
DSO_ctrl:
  188|     87|{
  189|     87|    if (dso == NULL) {
  ------------------
  |  Branch (189:9): [True: 0, False: 87]
  ------------------
  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|     87|    switch (cmd) {
  198|      0|    case DSO_CTRL_GET_FLAGS:
  ------------------
  |  |   18|      0|#define DSO_CTRL_GET_FLAGS 1
  ------------------
  |  Branch (198:5): [True: 0, False: 87]
  ------------------
  199|      0|        return dso->flags;
  200|     87|    case DSO_CTRL_SET_FLAGS:
  ------------------
  |  |   19|     87|#define DSO_CTRL_SET_FLAGS 2
  ------------------
  |  Branch (200:5): [True: 87, False: 0]
  ------------------
  201|     87|        dso->flags = (int)larg;
  202|     87|        return 0;
  203|      0|    case DSO_CTRL_OR_FLAGS:
  ------------------
  |  |   20|      0|#define DSO_CTRL_OR_FLAGS 3
  ------------------
  |  Branch (203:5): [True: 0, False: 87]
  ------------------
  204|      0|        dso->flags |= (int)larg;
  205|      0|        return 0;
  206|      0|    default:
  ------------------
  |  Branch (206:5): [True: 0, False: 87]
  ------------------
  207|      0|        break;
  208|     87|    }
  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|     87|{
  227|     87|    char *copied;
  228|       |
  229|     87|    if ((dso == NULL) || (filename == NULL)) {
  ------------------
  |  Branch (229:9): [True: 0, False: 87]
  |  Branch (229:26): [True: 0, False: 87]
  ------------------
  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|     87|    if (dso->loaded_filename) {
  ------------------
  |  Branch (233:9): [True: 0, False: 87]
  ------------------
  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|     87|    copied = OPENSSL_strdup(filename);
  ------------------
  |  |  136|     87|    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|     87|    if (copied == NULL)
  ------------------
  |  Branch (239:9): [True: 0, False: 87]
  ------------------
  240|      0|        return 0;
  241|     87|    OPENSSL_free(dso->filename);
  ------------------
  |  |  132|     87|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  242|     87|    dso->filename = copied;
  243|     87|    return 1;
  244|     87|}
DSO_merge:
  247|     87|{
  248|     87|    char *result = NULL;
  249|       |
  250|     87|    if (dso == NULL || filespec1 == NULL) {
  ------------------
  |  Branch (250:9): [True: 0, False: 87]
  |  Branch (250:24): [True: 0, False: 87]
  ------------------
  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|     87|    if ((dso->flags & DSO_FLAG_NO_NAME_TRANSLATION) == 0) {
  ------------------
  |  |   33|     87|#define DSO_FLAG_NO_NAME_TRANSLATION 0x01
  ------------------
  |  Branch (254:9): [True: 87, False: 0]
  ------------------
  255|     87|        if (dso->merger != NULL)
  ------------------
  |  Branch (255:13): [True: 0, False: 87]
  ------------------
  256|      0|            result = dso->merger(dso, filespec1, filespec2);
  257|     87|        else if (dso->meth->dso_merger != NULL)
  ------------------
  |  Branch (257:18): [True: 87, False: 0]
  ------------------
  258|     87|            result = dso->meth->dso_merger(dso, filespec1, filespec2);
  259|     87|    }
  260|     87|    return result;
  261|     87|}
DSO_convert_filename:
  264|    174|{
  265|    174|    char *result = NULL;
  266|       |
  267|    174|    if (dso == NULL) {
  ------------------
  |  Branch (267:9): [True: 0, False: 174]
  ------------------
  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|    174|    if (filename == NULL)
  ------------------
  |  Branch (271:9): [True: 87, False: 87]
  ------------------
  272|     87|        filename = dso->filename;
  273|    174|    if (filename == NULL) {
  ------------------
  |  Branch (273:9): [True: 0, False: 174]
  ------------------
  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|    174|    if ((dso->flags & DSO_FLAG_NO_NAME_TRANSLATION) == 0) {
  ------------------
  |  |   33|    174|#define DSO_FLAG_NO_NAME_TRANSLATION 0x01
  ------------------
  |  Branch (277:9): [True: 174, False: 0]
  ------------------
  278|    174|        if (dso->name_converter != NULL)
  ------------------
  |  Branch (278:13): [True: 0, False: 174]
  ------------------
  279|      0|            result = dso->name_converter(dso, filename);
  280|    174|        else if (dso->meth->dso_name_converter != NULL)
  ------------------
  |  Branch (280:18): [True: 174, False: 0]
  ------------------
  281|    174|            result = dso->meth->dso_name_converter(dso, filename);
  282|    174|    }
  283|    174|    if (result == NULL) {
  ------------------
  |  Branch (283:9): [True: 0, False: 174]
  ------------------
  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|    174|    return result;
  289|    174|}
dso_lib.c:DSO_new_method:
   14|     87|{
   15|     87|    DSO *ret;
   16|       |
   17|     87|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|     87|    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|     87|    if (ret == NULL)
  ------------------
  |  Branch (18:9): [True: 0, False: 87]
  ------------------
   19|      0|        return NULL;
   20|     87|    ret->meth_data = sk_void_new_null();
  ------------------
  |  |  223|     87|#define sk_void_new_null() ((STACK_OF(void) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_void_freefunc_thunk))
  ------------------
   21|     87|    if (ret->meth_data == NULL) {
  ------------------
  |  Branch (21:9): [True: 0, False: 87]
  ------------------
   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|     87|    ret->meth = DSO_METHOD_openssl();
   28|     87|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (28:9): [True: 0, False: 87]
  ------------------
   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|     87|    if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
  ------------------
  |  Branch (34:9): [True: 0, False: 87]
  |  Branch (34:38): [True: 0, False: 0]
  ------------------
   35|      0|        DSO_free(ret);
   36|      0|        ret = NULL;
   37|      0|    }
   38|       |
   39|     87|    return ret;
   40|     87|}

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

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

curve448.c:gf_sub_RAW:
   37|  9.54k|{
   38|  9.54k|    uint64_t co1 = ((1ULL << 56) - 1) * 2, co2 = co1 - 2;
   39|  9.54k|    unsigned int i;
   40|       |
   41|  85.8k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|  85.8k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (41:17): [True: 76.3k, False: 9.54k]
  ------------------
   42|  76.3k|        out->limb[i] = a->limb[i] - b->limb[i] + ((i == NLIMBS / 2) ? co2 : co1);
  ------------------
  |  |   21|  76.3k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (42:51): [True: 9.54k, False: 66.7k]
  ------------------
   43|       |
   44|  9.54k|    gf_weak_reduce(out);
   45|  9.54k|}
curve448.c:gf_bias:
   48|  9.54k|{
   49|  9.54k|}
curve448.c:gf_weak_reduce:
   52|  19.0k|{
   53|  19.0k|    uint64_t mask = (1ULL << 56) - 1;
   54|  19.0k|    uint64_t tmp = a->limb[NLIMBS - 1] >> 56;
  ------------------
  |  |   21|  19.0k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
   55|  19.0k|    unsigned int i;
   56|       |
   57|  19.0k|    a->limb[NLIMBS / 2] += tmp;
  ------------------
  |  |   21|  19.0k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
   58|   152k|    for (i = NLIMBS - 1; i > 0; i--)
  ------------------
  |  |   21|  19.0k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (58:26): [True: 133k, False: 19.0k]
  ------------------
   59|   133k|        a->limb[i] = (a->limb[i] & mask) + (a->limb[i - 1] >> 56);
   60|  19.0k|    a->limb[0] = (a->limb[0] & mask) + tmp;
   61|  19.0k|}
curve448.c:gf_add_RAW:
   27|  9.54k|{
   28|  9.54k|    unsigned int i;
   29|       |
   30|  85.8k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|  85.8k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (30:17): [True: 76.3k, False: 9.54k]
  ------------------
   31|  76.3k|        out->limb[i] = a->limb[i] + b->limb[i];
   32|       |
   33|  9.54k|    gf_weak_reduce(out);
   34|  9.54k|}
f_generic.c:gf_weak_reduce:
   52|  5.64k|{
   53|  5.64k|    uint64_t mask = (1ULL << 56) - 1;
   54|  5.64k|    uint64_t tmp = a->limb[NLIMBS - 1] >> 56;
  ------------------
  |  |   21|  5.64k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
   55|  5.64k|    unsigned int i;
   56|       |
   57|  5.64k|    a->limb[NLIMBS / 2] += tmp;
  ------------------
  |  |   21|  5.64k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
   58|  45.1k|    for (i = NLIMBS - 1; i > 0; i--)
  ------------------
  |  |   21|  5.64k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (58:26): [True: 39.4k, False: 5.64k]
  ------------------
   59|  39.4k|        a->limb[i] = (a->limb[i] & mask) + (a->limb[i - 1] >> 56);
   60|  5.64k|    a->limb[0] = (a->limb[0] & mask) + tmp;
   61|  5.64k|}
f_generic.c:gf_sub_RAW:
   37|  2.76k|{
   38|  2.76k|    uint64_t co1 = ((1ULL << 56) - 1) * 2, co2 = co1 - 2;
   39|  2.76k|    unsigned int i;
   40|       |
   41|  24.8k|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|  24.8k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (41:17): [True: 22.0k, False: 2.76k]
  ------------------
   42|  22.0k|        out->limb[i] = a->limb[i] - b->limb[i] + ((i == NLIMBS / 2) ? co2 : co1);
  ------------------
  |  |   21|  22.0k|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (42:51): [True: 2.76k, False: 19.3k]
  ------------------
   43|       |
   44|  2.76k|    gf_weak_reduce(out);
   45|  2.76k|}
f_generic.c:gf_bias:
   48|  2.76k|{
   49|  2.76k|}
f_generic.c:gf_add_RAW:
   27|     30|{
   28|     30|    unsigned int i;
   29|       |
   30|    270|    for (i = 0; i < NLIMBS; i++)
  ------------------
  |  |   21|    270|#define NLIMBS (64 / sizeof(word_t))
  ------------------
  |  Branch (30:17): [True: 240, False: 30]
  ------------------
   31|    240|        out->limb[i] = a->limb[i] + b->limb[i];
   32|       |
   33|     30|    gf_weak_reduce(out);
   34|     30|}

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

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

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

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

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

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

ec_ameth.c:eckey_pub_decode:
  101|   147k|{
  102|   147k|    const unsigned char *p = NULL;
  103|   147k|    int pklen;
  104|   147k|    EC_KEY *eckey = NULL;
  105|   147k|    X509_ALGOR *palg;
  106|   147k|    OSSL_LIB_CTX *libctx = NULL;
  107|   147k|    const char *propq = NULL;
  108|       |
  109|   147k|    if (!ossl_x509_PUBKEY_get0_libctx(&libctx, &propq, pubkey)
  ------------------
  |  Branch (109:9): [True: 0, False: 147k]
  ------------------
  110|   147k|        || !X509_PUBKEY_get0_param(NULL, &p, &pklen, &palg, pubkey))
  ------------------
  |  Branch (110:12): [True: 0, False: 147k]
  ------------------
  111|      0|        return 0;
  112|   147k|    eckey = ossl_ec_key_param_from_x509_algor(palg, libctx, propq);
  113|       |
  114|   147k|    if (!eckey)
  ------------------
  |  Branch (114:9): [True: 0, False: 147k]
  ------------------
  115|      0|        return 0;
  116|       |
  117|       |    /* We have parameters now set public key */
  118|   147k|    if (!o2i_ECPublicKey(&eckey, &p, pklen)) {
  ------------------
  |  Branch (118:9): [True: 0, False: 147k]
  ------------------
  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|   147k|    EVP_PKEY_assign_EC_KEY(pkey, eckey);
  ------------------
  |  |  426|   147k|#define EVP_PKEY_assign_EC_KEY(pkey, eckey) EVP_PKEY_assign((pkey), \
  |  |  427|   147k|    EVP_PKEY_EC,                                                    \
  |  |  ------------------
  |  |  |  |   73|   147k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|   147k|#define NID_X9_62_id_ecPublicKey                408
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  428|   147k|    (eckey))
  ------------------
  124|   147k|    return 1;
  125|       |
  126|      0|ecerr:
  127|      0|    EC_KEY_free(eckey);
  128|      0|    return 0;
  129|   147k|}
ec_ameth.c:int_ec_free:
  261|   147k|{
  262|   147k|    EC_KEY_free(pkey->pkey.ec);
  263|   147k|}

o2i_ECPublicKey:
 1137|   147k|{
 1138|   147k|    EC_KEY *ret = NULL;
 1139|       |
 1140|   147k|    if (a == NULL || (*a) == NULL || (*a)->group == NULL) {
  ------------------
  |  Branch (1140:9): [True: 0, False: 147k]
  |  Branch (1140:22): [True: 0, False: 147k]
  |  Branch (1140:38): [True: 0, False: 147k]
  ------------------
 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|   147k|    ret = *a;
 1148|       |    /* EC_KEY_opt2key updates dirty_cnt */
 1149|   147k|    if (!EC_KEY_oct2key(ret, *in, len, NULL)) {
  ------------------
  |  Branch (1149:9): [True: 0, False: 147k]
  ------------------
 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|   147k|    *in += len;
 1154|   147k|    return ret;
 1155|   147k|}
i2d_ECDSA_SIG:
 1247|   147k|{
 1248|   147k|    BUF_MEM *buf = NULL;
 1249|   147k|    size_t encoded_len;
 1250|   147k|    WPACKET pkt;
 1251|       |
 1252|   147k|    if (ppout == NULL) {
  ------------------
  |  Branch (1252:9): [True: 147k, False: 0]
  ------------------
 1253|   147k|        if (!WPACKET_init_null(&pkt, 0))
  ------------------
  |  Branch (1253:13): [True: 0, False: 147k]
  ------------------
 1254|      0|            return -1;
 1255|   147k|    } 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|   147k|    if (!ossl_encode_der_dsa_sig(&pkt, sig->r, sig->s)
  ------------------
  |  Branch (1266:9): [True: 0, False: 147k]
  ------------------
 1267|   147k|        || !WPACKET_get_total_written(&pkt, &encoded_len)
  ------------------
  |  Branch (1267:12): [True: 0, False: 147k]
  ------------------
 1268|   147k|        || !WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (1268:12): [True: 0, False: 147k]
  ------------------
 1269|      0|        BUF_MEM_free(buf);
 1270|      0|        WPACKET_cleanup(&pkt);
 1271|      0|        return -1;
 1272|      0|    }
 1273|       |
 1274|   147k|    if (ppout != NULL) {
  ------------------
  |  Branch (1274:9): [True: 0, False: 147k]
  ------------------
 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|   147k|    return (int)encoded_len;
 1285|   147k|}
ECDSA_size:
 1317|   147k|{
 1318|   147k|    int ret;
 1319|   147k|    ECDSA_SIG sig;
 1320|   147k|    const EC_GROUP *group;
 1321|   147k|    const BIGNUM *bn;
 1322|       |
 1323|   147k|    if (ec == NULL)
  ------------------
  |  Branch (1323:9): [True: 0, False: 147k]
  ------------------
 1324|      0|        return 0;
 1325|   147k|    group = EC_KEY_get0_group(ec);
 1326|   147k|    if (group == NULL)
  ------------------
  |  Branch (1326:9): [True: 0, False: 147k]
  ------------------
 1327|      0|        return 0;
 1328|       |
 1329|   147k|    bn = EC_GROUP_get0_order(group);
 1330|   147k|    if (bn == NULL)
  ------------------
  |  Branch (1330:9): [True: 0, False: 147k]
  ------------------
 1331|      0|        return 0;
 1332|       |
 1333|   147k|    sig.r = sig.s = (BIGNUM *)bn;
 1334|   147k|    ret = i2d_ECDSA_SIG(&sig, NULL);
 1335|       |
 1336|   147k|    if (ret < 0)
  ------------------
  |  Branch (1336:9): [True: 0, False: 147k]
  ------------------
 1337|      0|        ret = 0;
 1338|   147k|    return ret;
 1339|   147k|}

ossl_ec_check_group_type_id2name:
   77|   148k|{
   78|   148k|    size_t i, sz;
   79|       |
   80|   148k|    for (i = 0, sz = OSSL_NELEM(check_group_type_nameid_map); i < sz; i++) {
  ------------------
  |  |   14|   148k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (80:63): [True: 148k, False: 0]
  ------------------
   81|   148k|        if (id == (int)check_group_type_nameid_map[i].id)
  ------------------
  |  Branch (81:13): [True: 148k, False: 0]
  ------------------
   82|   148k|            return check_group_type_nameid_map[i].ptr;
   83|   148k|    }
   84|      0|    return NULL;
   85|   148k|}
ossl_ec_pt_format_id2name:
  148|   296k|{
  149|   296k|    size_t i, sz;
  150|       |
  151|   296k|    for (i = 0, sz = OSSL_NELEM(format_nameid_map); i < sz; i++) {
  ------------------
  |  |   14|   296k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (151:53): [True: 296k, False: 0]
  ------------------
  152|   296k|        if (id == (int)format_nameid_map[i].id)
  ------------------
  |  Branch (152:13): [True: 296k, False: 0]
  ------------------
  153|   296k|            return format_nameid_map[i].ptr;
  154|   296k|    }
  155|      0|    return NULL;
  156|   296k|}
ossl_ec_group_todata:
  293|   148k|{
  294|   148k|    int ret = 0, curve_nid, encoding_flag;
  295|   148k|    const char *encoding_name, *pt_form_name;
  296|   148k|    point_conversion_form_t genform;
  297|       |
  298|   148k|    if (group == NULL) {
  ------------------
  |  Branch (298:9): [True: 0, False: 148k]
  ------------------
  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|   148k|    genform = EC_GROUP_get_point_conversion_form(group);
  304|   148k|    pt_form_name = ossl_ec_pt_format_id2name(genform);
  305|   148k|    if (pt_form_name == NULL
  ------------------
  |  Branch (305:9): [True: 0, False: 148k]
  ------------------
  306|   148k|        || !ossl_param_build_set_utf8_string(
  ------------------
  |  Branch (306:12): [True: 0, False: 148k]
  ------------------
  307|   148k|            tmpl, params,
  308|   148k|            OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT, pt_form_name)) {
  ------------------
  |  |  403|   148k|# 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|   148k|    encoding_flag = EC_GROUP_get_asn1_flag(group) & OPENSSL_EC_NAMED_CURVE;
  ------------------
  |  |   31|   148k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  313|   148k|    encoding_name = ec_param_encoding_id2name(encoding_flag);
  314|   148k|    if (encoding_name == NULL
  ------------------
  |  Branch (314:9): [True: 0, False: 148k]
  ------------------
  315|   148k|        || !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (315:12): [True: 0, False: 148k]
  ------------------
  316|   148k|            OSSL_PKEY_PARAM_EC_ENCODING,
  ------------------
  |  |  395|   148k|# define OSSL_PKEY_PARAM_EC_ENCODING "encoding"
  ------------------
  317|   148k|            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|   148k|    if (!ossl_param_build_set_int(tmpl, params,
  ------------------
  |  Branch (322:9): [True: 0, False: 148k]
  ------------------
  323|   148k|            OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS,
  ------------------
  |  |  394|   148k|# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
  ------------------
  324|   148k|            group->decoded_from_explicit_params))
  325|      0|        return 0;
  326|       |
  327|   148k|    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|   148k|    if (tmpl == NULL || curve_nid == NID_undef)
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (334:9): [True: 148k, False: 0]
  |  Branch (334:25): [True: 0, False: 0]
  ------------------
  335|   148k|        if (!ec_group_explicit_todata(group, tmpl, params, bnctx, genbuf))
  ------------------
  |  Branch (335:13): [True: 0, False: 148k]
  ------------------
  336|      0|            goto err;
  337|       |
  338|   148k|    if (curve_nid != NID_undef) {
  ------------------
  |  |   18|   148k|#define NID_undef                       0
  ------------------
  |  Branch (338:9): [True: 148k, False: 0]
  ------------------
  339|       |        /* Named curve */
  340|   148k|        const char *curve_name = OSSL_EC_curve_nid2name(curve_nid);
  341|       |
  342|   148k|        if (curve_name == NULL
  ------------------
  |  Branch (342:13): [True: 0, False: 148k]
  ------------------
  343|   148k|            || !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (343:16): [True: 0, False: 148k]
  ------------------
  344|   148k|                OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  428|   148k|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
  345|   148k|                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|   148k|    }
  350|   148k|    ret = 1;
  351|   148k|err:
  352|   148k|    return ret;
  353|   148k|}
ossl_ec_set_ecdh_cofactor_mode:
  361|     83|{
  362|     83|    const EC_GROUP *ecg = EC_KEY_get0_group(ec);
  363|     83|    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|     83|    if (mode < 0 || mode > 1)
  ------------------
  |  Branch (371:9): [True: 0, False: 83]
  |  Branch (371:21): [True: 0, False: 83]
  ------------------
  372|      0|        return 0;
  373|       |
  374|     83|    if ((cofactor = EC_GROUP_get0_cofactor(ecg)) == NULL)
  ------------------
  |  Branch (374:9): [True: 0, False: 83]
  ------------------
  375|      0|        return 0;
  376|       |
  377|       |    /* ECDH cofactor mode has no effect if cofactor is 1 */
  378|     83|    if (BN_is_one(cofactor))
  ------------------
  |  Branch (378:9): [True: 83, False: 0]
  ------------------
  379|     83|        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|     83|}
ossl_ec_key_is_foreign:
  596|   147k|{
  597|   147k|#ifndef FIPS_MODULE
  598|   147k|    if (EC_KEY_get_method(ec) != EC_KEY_OpenSSL())
  ------------------
  |  Branch (598:9): [True: 0, False: 147k]
  ------------------
  599|      0|        return 1;
  600|   147k|#endif
  601|   147k|    return 0;
  602|   147k|}
ossl_x509_algor_is_sm2:
  739|   147k|{
  740|   147k|    int ptype = 0;
  741|   147k|    const void *pval = NULL;
  742|       |
  743|   147k|    X509_ALGOR_get0(NULL, &ptype, &pval, palg);
  744|       |
  745|   147k|    if (ptype == V_ASN1_OBJECT)
  ------------------
  |  |   70|   147k|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (745:9): [True: 147k, False: 0]
  ------------------
  746|   147k|        return OBJ_obj2nid((ASN1_OBJECT *)pval) == NID_sm2;
  ------------------
  |  | 1259|   147k|#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|   147k|{
  770|   147k|    int ptype = 0;
  771|   147k|    const void *pval = NULL;
  772|   147k|    EC_KEY *eckey = NULL;
  773|   147k|    EC_GROUP *group = NULL;
  774|       |
  775|   147k|    X509_ALGOR_get0(NULL, &ptype, &pval, palg);
  776|   147k|    if ((eckey = EC_KEY_new_ex(libctx, propq)) == NULL) {
  ------------------
  |  Branch (776:9): [True: 0, False: 147k]
  ------------------
  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|   147k|    if (ptype == V_ASN1_SEQUENCE) {
  ------------------
  |  |   76|   147k|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (781:9): [True: 0, False: 147k]
  ------------------
  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|   147k|    } else if (ptype == V_ASN1_OBJECT) {
  ------------------
  |  |   70|   147k|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (790:16): [True: 147k, False: 0]
  ------------------
  791|   147k|        const ASN1_OBJECT *poid = pval;
  792|       |
  793|       |        /*
  794|       |         * type == V_ASN1_OBJECT => the parameters are given by an asn1 OID
  795|       |         */
  796|       |
  797|   147k|        group = EC_GROUP_new_by_curve_name_ex(libctx, propq, OBJ_obj2nid(poid));
  798|   147k|        if (group == NULL)
  ------------------
  |  Branch (798:13): [True: 0, False: 147k]
  ------------------
  799|      0|            goto ecerr;
  800|   147k|        EC_GROUP_set_asn1_flag(group, OPENSSL_EC_NAMED_CURVE);
  ------------------
  |  |   31|   147k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  801|   147k|        if (EC_KEY_set_group(eckey, group) == 0)
  ------------------
  |  Branch (801:13): [True: 0, False: 147k]
  ------------------
  802|      0|            goto ecerr;
  803|   147k|        EC_GROUP_free(group);
  804|   147k|    } 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|   147k|    return eckey;
  810|       |
  811|      0|ecerr:
  812|      0|    EC_KEY_free(eckey);
  813|      0|    EC_GROUP_free(group);
  814|       |    return NULL;
  815|   147k|}
ec_backend.c:ec_param_encoding_id2name:
   66|   148k|{
   67|   148k|    size_t i, sz;
   68|       |
   69|   296k|    for (i = 0, sz = OSSL_NELEM(encoding_nameid_map); i < sz; i++) {
  ------------------
  |  |   14|   148k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (69:55): [True: 296k, False: 0]
  ------------------
   70|   296k|        if (id == (int)encoding_nameid_map[i].id)
  ------------------
  |  Branch (70:13): [True: 148k, False: 148k]
  ------------------
   71|   148k|            return encoding_nameid_map[i].ptr;
   72|   296k|    }
   73|      0|    return NULL;
   74|   148k|}
ec_backend.c:ec_group_explicit_todata:
  161|   148k|{
  162|   148k|    int ret = 0, fid;
  163|   148k|    const char *field_type;
  164|   148k|    const OSSL_PARAM *param = NULL;
  165|   148k|    const OSSL_PARAM *param_p = NULL;
  166|   148k|    const OSSL_PARAM *param_a = NULL;
  167|   148k|    const OSSL_PARAM *param_b = NULL;
  168|       |
  169|   148k|    fid = EC_GROUP_get_field_type(group);
  170|       |
  171|   148k|    if (fid == NID_X9_62_prime_field) {
  ------------------
  |  |  152|   148k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (171:9): [True: 148k, False: 0]
  ------------------
  172|   148k|        field_type = SN_X9_62_prime_field;
  ------------------
  |  |  151|   148k|#define SN_X9_62_prime_field            "prime-field"
  ------------------
  173|   148k|    } 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|   148k|    param_p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_P);
  ------------------
  |  |  402|   148k|# define OSSL_PKEY_PARAM_EC_P "p"
  ------------------
  186|   148k|    param_a = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_A);
  ------------------
  |  |  385|   148k|# define OSSL_PKEY_PARAM_EC_A "a"
  ------------------
  187|   148k|    param_b = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_B);
  ------------------
  |  |  386|   148k|# define OSSL_PKEY_PARAM_EC_B "b"
  ------------------
  188|   148k|    if (tmpl != NULL || param_p != NULL || param_a != NULL || param_b != NULL) {
  ------------------
  |  Branch (188:9): [True: 0, False: 148k]
  |  Branch (188:25): [True: 0, False: 148k]
  |  Branch (188:44): [True: 0, False: 148k]
  |  Branch (188:63): [True: 0, False: 148k]
  ------------------
  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|   148k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_ORDER);
  ------------------
  |  |  401|   148k|# define OSSL_PKEY_PARAM_EC_ORDER "order"
  ------------------
  211|   148k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (211:9): [True: 0, False: 148k]
  |  Branch (211:25): [True: 0, False: 148k]
  ------------------
  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|   148k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_FIELD_TYPE);
  ------------------
  |  |  397|   148k|# define OSSL_PKEY_PARAM_EC_FIELD_TYPE "field-type"
  ------------------
  226|   148k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (226:9): [True: 0, False: 148k]
  |  Branch (226:25): [True: 0, False: 148k]
  ------------------
  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|   148k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_GENERATOR);
  ------------------
  |  |  398|   148k|# define OSSL_PKEY_PARAM_EC_GENERATOR "generator"
  ------------------
  236|   148k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (236:9): [True: 0, False: 148k]
  |  Branch (236:25): [True: 0, False: 148k]
  ------------------
  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|   148k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_COFACTOR);
  ------------------
  |  |  393|   148k|# define OSSL_PKEY_PARAM_EC_COFACTOR "cofactor"
  ------------------
  259|   148k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (259:9): [True: 0, False: 148k]
  |  Branch (259:25): [True: 0, False: 148k]
  ------------------
  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|   148k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_SEED);
  ------------------
  |  |  406|   148k|# define OSSL_PKEY_PARAM_EC_SEED "seed"
  ------------------
  271|   148k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (271:9): [True: 0, False: 148k]
  |  Branch (271:25): [True: 0, False: 148k]
  ------------------
  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|   148k|    ret = 1;
  285|   148k|err:
  286|   148k|    return ret;
  287|   148k|}

EC_GROUP_new_by_curve_name_ex:
 3020|   147k|{
 3021|   147k|    EC_GROUP *ret = NULL;
 3022|   147k|    const ec_list_element *curve;
 3023|       |
 3024|   147k|    if ((curve = ec_curve_nid2curve(nid)) == NULL
  ------------------
  |  Branch (3024:9): [True: 0, False: 147k]
  ------------------
 3025|   147k|        || (ret = ec_group_new_from_data(libctx, propq, *curve)) == NULL) {
  ------------------
  |  Branch (3025:12): [True: 0, False: 147k]
  ------------------
 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|   147k|    return ret;
 3036|   147k|}
ec_curve.c:ec_curve_nid2curve:
 2843|   147k|{
 2844|   147k|    size_t i;
 2845|       |
 2846|   147k|    if (nid <= 0)
  ------------------
  |  Branch (2846:9): [True: 0, False: 147k]
  ------------------
 2847|      0|        return NULL;
 2848|       |
 2849|  1.88M|    for (i = 0; i < curve_list_length; i++) {
  ------------------
  |  | 2840|  1.88M|#define curve_list_length OSSL_NELEM(curve_list)
  |  |  ------------------
  |  |  |  |   14|  1.88M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  |  Branch (2849:17): [True: 1.88M, False: 0]
  ------------------
 2850|  1.88M|        if (curve_list[i].nid == nid)
  ------------------
  |  Branch (2850:13): [True: 147k, False: 1.73M]
  ------------------
 2851|   147k|            return &curve_list[i];
 2852|  1.88M|    }
 2853|      0|    return NULL;
 2854|   147k|}
ec_curve.c:ec_group_new_from_data:
 2859|   147k|{
 2860|   147k|    EC_GROUP *group = NULL;
 2861|   147k|    EC_POINT *P = NULL;
 2862|   147k|    BN_CTX *ctx = NULL;
 2863|   147k|    BIGNUM *p = NULL, *a = NULL, *b = NULL, *x = NULL, *y = NULL, *order = NULL;
 2864|   147k|    int ok = 0;
 2865|   147k|    int seed_len, param_len;
 2866|   147k|    const EC_METHOD *meth;
 2867|   147k|    const EC_CURVE_DATA *data;
 2868|   147k|    const unsigned char *params;
 2869|       |
 2870|       |    /* If no curve data curve method must handle everything */
 2871|   147k|    if (curve.data == NULL)
  ------------------
  |  Branch (2871:9): [True: 0, False: 147k]
  ------------------
 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|   147k|    if ((ctx = BN_CTX_new_ex(libctx)) == NULL) {
  ------------------
  |  Branch (2875:9): [True: 0, False: 147k]
  ------------------
 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|   147k|    data = curve.data;
 2881|   147k|    seed_len = data->seed_len;
 2882|   147k|    param_len = data->param_len;
 2883|   147k|    params = (const unsigned char *)(data + 1); /* skip header */
 2884|       |
 2885|   147k|    if (curve.meth != NULL) {
  ------------------
  |  Branch (2885:9): [True: 147k, False: 160]
  ------------------
 2886|   147k|        meth = curve.meth();
 2887|   147k|        if ((group = ossl_ec_group_new_ex(libctx, propq, meth)) == NULL) {
  ------------------
  |  Branch (2887:13): [True: 0, False: 147k]
  ------------------
 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|   147k|        if (group->meth->group_full_init != NULL) {
  ------------------
  |  Branch (2891:13): [True: 11.4k, False: 136k]
  ------------------
 2892|  11.4k|            if (!group->meth->group_full_init(group, params)) {
  ------------------
  |  Branch (2892:17): [True: 0, False: 11.4k]
  ------------------
 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|  11.4k|            EC_GROUP_set_curve_name(group, curve.nid);
 2897|  11.4k|            BN_CTX_free(ctx);
 2898|  11.4k|            return group;
 2899|  11.4k|        }
 2900|   147k|    }
 2901|       |
 2902|   136k|    params += seed_len; /* skip seed */
 2903|       |
 2904|   136k|    if ((p = BN_bin2bn(params + 0 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (2904:9): [True: 0, False: 136k]
  ------------------
 2905|   136k|        || (a = BN_bin2bn(params + 1 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (2905:12): [True: 0, False: 136k]
  ------------------
 2906|   136k|        || (b = BN_bin2bn(params + 2 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (2906:12): [True: 0, False: 136k]
  ------------------
 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|   136k|    if (group != NULL) {
  ------------------
  |  Branch (2911:9): [True: 136k, False: 160]
  ------------------
 2912|   136k|        if (group->meth->group_set_curve(group, p, a, b, ctx) == 0) {
  ------------------
  |  Branch (2912:13): [True: 0, False: 136k]
  ------------------
 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|   136k|    } else if (data->field_type == NID_X9_62_prime_field) {
  ------------------
  |  |  152|    160|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (2916:16): [True: 160, False: 0]
  ------------------
 2917|    160|        if ((group = EC_GROUP_new_curve_GFp(p, a, b, ctx)) == NULL) {
  ------------------
  |  Branch (2917:13): [True: 0, False: 160]
  ------------------
 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|    160|    }
 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|   136k|#endif
 2932|       |
 2933|   136k|    EC_GROUP_set_curve_name(group, curve.nid);
 2934|       |
 2935|   136k|    if ((P = EC_POINT_new(group)) == NULL) {
  ------------------
  |  Branch (2935:9): [True: 0, False: 136k]
  ------------------
 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|   136k|    if ((x = BN_bin2bn(params + 3 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (2940:9): [True: 0, False: 136k]
  ------------------
 2941|   136k|        || (y = BN_bin2bn(params + 4 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (2941:12): [True: 0, False: 136k]
  ------------------
 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|   136k|    if (!EC_POINT_set_affine_coordinates(group, P, x, y, ctx)) {
  ------------------
  |  Branch (2945:9): [True: 0, False: 136k]
  ------------------
 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|   136k|    if ((order = BN_bin2bn(params + 5 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (2949:9): [True: 0, False: 136k]
  ------------------
 2950|   136k|        || !BN_set_word(x, (BN_ULONG)data->cofactor)) {
  ------------------
  |  Branch (2950:12): [True: 0, False: 136k]
  ------------------
 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|   136k|    if (!EC_GROUP_set_generator(group, P, order, x)) {
  ------------------
  |  Branch (2954:9): [True: 0, False: 136k]
  ------------------
 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|   136k|    if (seed_len) {
  ------------------
  |  Branch (2958:9): [True: 136k, False: 160]
  ------------------
 2959|   136k|        if (!EC_GROUP_set_seed(group, params - seed_len, seed_len)) {
  ------------------
  |  Branch (2959:13): [True: 0, False: 136k]
  ------------------
 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|   136k|    }
 2964|       |
 2965|   136k|#ifndef FIPS_MODULE
 2966|   136k|    if (EC_GROUP_get_asn1_flag(group) == OPENSSL_EC_NAMED_CURVE) {
  ------------------
  |  |   31|   136k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  |  Branch (2966:9): [True: 136k, 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|   136k|        ASN1_OBJECT *asn1obj = OBJ_nid2obj(curve.nid);
 2980|       |
 2981|   136k|        if (asn1obj == NULL) {
  ------------------
  |  Branch (2981:13): [True: 0, False: 136k]
  ------------------
 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|   136k|        if (OBJ_length(asn1obj) == 0)
  ------------------
  |  Branch (2985:13): [True: 0, False: 136k]
  ------------------
 2986|      0|            EC_GROUP_set_asn1_flag(group, OPENSSL_EC_EXPLICIT_CURVE);
  ------------------
  |  |   30|      0|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
 2987|       |
 2988|   136k|        ASN1_OBJECT_free(asn1obj);
 2989|   136k|    }
 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|   136k|    ok = 1;
 3002|   136k|err:
 3003|   136k|    if (!ok) {
  ------------------
  |  Branch (3003:9): [True: 0, False: 136k]
  ------------------
 3004|      0|        EC_GROUP_free(group);
 3005|       |        group = NULL;
 3006|      0|    }
 3007|   136k|    EC_POINT_free(P);
 3008|   136k|    BN_CTX_free(ctx);
 3009|   136k|    BN_free(p);
 3010|   136k|    BN_free(a);
 3011|   136k|    BN_free(b);
 3012|   136k|    BN_free(order);
 3013|   136k|    BN_free(x);
 3014|   136k|    BN_free(y);
 3015|   136k|    return group;
 3016|   136k|}

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

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|   147k|{
   39|   147k|    return ossl_ec_key_new_method_int(ctx, propq);
   40|   147k|}
EC_KEY_free:
   69|   443k|{
   70|   443k|    int i;
   71|       |
   72|   443k|    if (r == NULL)
  ------------------
  |  Branch (72:9): [True: 147k, False: 295k]
  ------------------
   73|   147k|        return;
   74|       |
   75|   295k|    CRYPTO_DOWN_REF(&r->references, &i);
   76|   295k|    REF_PRINT_COUNT("EC_KEY", i, r);
  ------------------
  |  |  301|   295k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   295k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   295k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   295k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   77|   295k|    if (i > 0)
  ------------------
  |  Branch (77:9): [True: 147k, False: 147k]
  ------------------
   78|   147k|        return;
   79|   147k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|   147k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 147k]
  |  |  ------------------
  ------------------
   80|       |
   81|   147k|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (81:9): [True: 147k, False: 0]
  |  Branch (81:28): [True: 0, False: 147k]
  ------------------
   82|      0|        r->meth->finish(r);
   83|       |
   84|   147k|    if (r->group && r->group->meth->keyfinish)
  ------------------
  |  Branch (84:9): [True: 147k, False: 0]
  |  Branch (84:21): [True: 0, False: 147k]
  ------------------
   85|      0|        r->group->meth->keyfinish(r);
   86|       |
   87|   147k|#ifndef FIPS_MODULE
   88|   147k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_EC_KEY, r, &r->ex_data);
  ------------------
  |  |  259|   147k|#define CRYPTO_EX_INDEX_EC_KEY 8
  ------------------
   89|   147k|#endif
   90|   147k|    CRYPTO_FREE_REF(&r->references);
   91|   147k|    EC_GROUP_free(r->group);
   92|   147k|    EC_POINT_free(r->pub_key);
   93|   147k|    BN_clear_free(r->priv_key);
   94|   147k|    OPENSSL_free(r->propq);
  ------------------
  |  |  132|   147k|    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|   147k|    OPENSSL_clear_free((void *)r, sizeof(EC_KEY));
  ------------------
  |  |  130|   147k|    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|   147k|}
EC_KEY_up_ref:
  176|   147k|{
  177|   147k|    int i;
  178|       |
  179|   147k|    if (CRYPTO_UP_REF(&r->references, &i) <= 0)
  ------------------
  |  Branch (179:9): [True: 0, False: 147k]
  ------------------
  180|      0|        return 0;
  181|       |
  182|   147k|    REF_PRINT_COUNT("EC_KEY", i, r);
  ------------------
  |  |  301|   147k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   147k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   147k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   147k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  183|   147k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   147k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 147k]
  |  |  ------------------
  ------------------
  184|   147k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (184:13): [True: 147k, False: 0]
  ------------------
  185|   147k|}
EC_KEY_generate_key:
  188|    243|{
  189|    243|    if (eckey == NULL || eckey->group == NULL) {
  ------------------
  |  Branch (189:9): [True: 0, False: 243]
  |  Branch (189:26): [True: 0, False: 243]
  ------------------
  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|    243|    if (eckey->meth->keygen != NULL) {
  ------------------
  |  Branch (193:9): [True: 243, False: 0]
  ------------------
  194|    243|        int ret;
  195|       |
  196|    243|        ret = eckey->meth->keygen(eckey);
  197|    243|        if (ret == 1)
  ------------------
  |  Branch (197:13): [True: 243, False: 0]
  ------------------
  198|    243|            eckey->dirty_cnt++;
  199|       |
  200|    243|        return ret;
  201|    243|    }
  202|    243|    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|    243|}
ossl_ec_key_gen:
  207|    243|{
  208|    243|    int ret;
  209|       |
  210|    243|    ret = eckey->group->meth->keygen(eckey);
  211|       |
  212|    243|    if (ret == 1)
  ------------------
  |  Branch (212:9): [True: 243, False: 0]
  ------------------
  213|    243|        eckey->dirty_cnt++;
  214|    243|    return ret;
  215|    243|}
ossl_ec_key_simple_generate_key:
  420|    243|{
  421|    243|    return ec_generate_key(eckey, 0);
  422|    243|}
ossl_ec_key_get_libctx:
  726|   296k|{
  727|   296k|    return key->libctx;
  728|   296k|}
ossl_ec_key_get0_propq:
  731|   148k|{
  732|   148k|    return key->propq;
  733|   148k|}
ossl_ec_key_set0_libctx:
  736|   147k|{
  737|   147k|    key->libctx = libctx;
  738|       |    /* Do we need to propagate this to the group? */
  739|   147k|}
EC_KEY_get0_group:
  742|   740k|{
  743|   740k|    return key->group;
  744|   740k|}
EC_KEY_set_group:
  747|   147k|{
  748|   147k|    if (key->meth->set_group != NULL && key->meth->set_group(key, group) == 0)
  ------------------
  |  Branch (748:9): [True: 0, False: 147k]
  |  Branch (748:41): [True: 0, False: 0]
  ------------------
  749|      0|        return 0;
  750|   147k|    EC_GROUP_free(key->group);
  751|   147k|    key->group = EC_GROUP_dup(group);
  752|   147k|    if (key->group != NULL && EC_GROUP_get_curve_name(key->group) == NID_sm2)
  ------------------
  |  | 1259|   147k|#define NID_sm2         1172
  ------------------
  |  Branch (752:9): [True: 147k, False: 0]
  |  Branch (752:31): [True: 160, False: 147k]
  ------------------
  753|    160|        EC_KEY_set_flags(key, EC_FLAG_SM2_RANGE);
  ------------------
  |  |  962|    160|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  754|       |
  755|   147k|    key->dirty_cnt++;
  756|   147k|    return (key->group == NULL) ? 0 : 1;
  ------------------
  |  Branch (756:12): [True: 0, False: 147k]
  ------------------
  757|   147k|}
EC_KEY_get0_private_key:
  760|   148k|{
  761|   148k|    return key->priv_key;
  762|   148k|}
EC_KEY_get0_public_key:
  860|   148k|{
  861|   148k|    return key->pub_key;
  862|   148k|}
EC_KEY_get_enc_flags:
  876|   148k|{
  877|   148k|    return key->enc_flag;
  878|   148k|}
EC_KEY_get_conv_form:
  886|   148k|{
  887|   148k|    return key->conv_form;
  888|   148k|}
EC_KEY_get_flags:
  913|   592k|{
  914|   592k|    return key->flags;
  915|   592k|}
EC_KEY_set_flags:
  918|    160|{
  919|    160|    key->flags |= flags;
  920|    160|    key->dirty_cnt++;
  921|    160|}
EC_KEY_oct2key:
  946|   147k|{
  947|   147k|    if (key == NULL || key->group == NULL)
  ------------------
  |  Branch (947:9): [True: 0, False: 147k]
  |  Branch (947:24): [True: 0, False: 147k]
  ------------------
  948|      0|        return 0;
  949|   147k|    if (key->pub_key == NULL)
  ------------------
  |  Branch (949:9): [True: 147k, False: 0]
  ------------------
  950|   147k|        key->pub_key = EC_POINT_new(key->group);
  951|   147k|    if (key->pub_key == NULL)
  ------------------
  |  Branch (951:9): [True: 0, False: 147k]
  ------------------
  952|      0|        return 0;
  953|   147k|    if (EC_POINT_oct2point(key->group, key->pub_key, buf, len, ctx) == 0)
  ------------------
  |  Branch (953:9): [True: 0, False: 147k]
  ------------------
  954|      0|        return 0;
  955|   147k|    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|   147k|    if ((key->group->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0)
  ------------------
  |  |   29|   147k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (963:9): [True: 147k, False: 0]
  ------------------
  964|   147k|        key->conv_form = (point_conversion_form_t)(buf[0] & ~0x01);
  965|   147k|    return 1;
  966|   147k|}
ec_key.c:ec_generate_key:
  280|    243|{
  281|    243|    int ok = 0;
  282|    243|    BIGNUM *priv_key = NULL;
  283|    243|    const BIGNUM *tmp = NULL;
  284|    243|    BIGNUM *order = NULL;
  285|    243|    EC_POINT *pub_key = NULL;
  286|    243|    const EC_GROUP *group = eckey->group;
  287|    243|    BN_CTX *ctx = BN_CTX_secure_new_ex(eckey->libctx);
  288|    243|    int sm2 = EC_KEY_get_flags(eckey) & EC_FLAG_SM2_RANGE ? 1 : 0;
  ------------------
  |  |  962|    243|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  |  Branch (288:15): [True: 160, False: 83]
  ------------------
  289|       |
  290|    243|    if (ctx == NULL)
  ------------------
  |  Branch (290:9): [True: 0, False: 243]
  ------------------
  291|      0|        goto err;
  292|       |
  293|    243|    if (eckey->priv_key == NULL) {
  ------------------
  |  Branch (293:9): [True: 243, False: 0]
  ------------------
  294|    243|        priv_key = BN_secure_new();
  295|    243|        if (priv_key == NULL)
  ------------------
  |  Branch (295:13): [True: 0, False: 243]
  ------------------
  296|      0|            goto err;
  297|    243|    } 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|    243|    tmp = EC_GROUP_get0_order(group);
  307|    243|    if (tmp == NULL)
  ------------------
  |  Branch (307:9): [True: 0, False: 243]
  ------------------
  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|    243|    if (sm2) {
  ------------------
  |  Branch (320:9): [True: 160, False: 83]
  ------------------
  321|    160|        order = BN_new();
  322|    160|        if (order == NULL || !BN_sub(order, tmp, BN_value_one()))
  ------------------
  |  Branch (322:13): [True: 0, False: 160]
  |  Branch (322:30): [True: 0, False: 160]
  ------------------
  323|      0|            goto err;
  324|    160|    } else {
  325|     83|        order = BN_dup(tmp);
  326|     83|        if (order == NULL)
  ------------------
  |  Branch (326:13): [True: 0, False: 83]
  ------------------
  327|      0|            goto err;
  328|     83|    }
  329|       |
  330|    243|    do
  331|    243|        if (!BN_priv_rand_range_ex(priv_key, order, 0, ctx))
  ------------------
  |  Branch (331:13): [True: 0, False: 243]
  ------------------
  332|      0|            goto err;
  333|    243|    while (BN_is_zero(priv_key));
  ------------------
  |  Branch (333:12): [True: 0, False: 243]
  ------------------
  334|       |
  335|    243|    if (eckey->pub_key == NULL) {
  ------------------
  |  Branch (335:9): [True: 243, False: 0]
  ------------------
  336|    243|        pub_key = EC_POINT_new(group);
  337|    243|        if (pub_key == NULL)
  ------------------
  |  Branch (337:13): [True: 0, False: 243]
  ------------------
  338|      0|            goto err;
  339|    243|    } 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|    243|    if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx))
  ------------------
  |  Branch (343:9): [True: 0, False: 243]
  ------------------
  344|      0|        goto err;
  345|       |
  346|    243|    eckey->priv_key = priv_key;
  347|    243|    eckey->pub_key = pub_key;
  348|    243|    priv_key = NULL;
  349|    243|    pub_key = NULL;
  350|       |
  351|    243|    eckey->dirty_cnt++;
  352|       |
  353|       |#ifdef FIPS_MODULE
  354|       |    pairwise_test = 1;
  355|       |#endif /* FIPS_MODULE */
  356|       |
  357|    243|    ok = 1;
  358|    243|    if (pairwise_test) {
  ------------------
  |  Branch (358:9): [True: 0, False: 243]
  ------------------
  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|    243|err:
  367|       |    /* Step (9): If there is an error return an invalid keypair. */
  368|    243|    if (!ok) {
  ------------------
  |  Branch (368:9): [True: 0, False: 243]
  ------------------
  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|    243|    EC_POINT_free(pub_key);
  376|    243|    BN_clear_free(priv_key);
  377|    243|    BN_CTX_free(ctx);
  378|    243|    BN_free(order);
  379|    243|    return ok;
  380|    243|}

EC_KEY_OpenSSL:
   37|   147k|{
   38|   147k|    return &openssl_ec_key_method;
   39|   147k|}
EC_KEY_get_default_method:
   42|   147k|{
   43|   147k|    return default_ec_key_meth;
   44|   147k|}
EC_KEY_get_method:
   55|   147k|{
   56|   147k|    return key->meth;
   57|   147k|}
ossl_ec_key_new_method_int:
   73|   147k|{
   74|   147k|    EC_KEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   147k|    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|   147k|    if (ret == NULL)
  ------------------
  |  Branch (76:9): [True: 0, False: 147k]
  ------------------
   77|      0|        return NULL;
   78|       |
   79|   147k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (79:9): [True: 0, False: 147k]
  ------------------
   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|   147k|    ret->libctx = libctx;
   85|   147k|    if (propq != NULL) {
  ------------------
  |  Branch (85:9): [True: 0, False: 147k]
  ------------------
   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|   147k|    ret->meth = EC_KEY_get_default_method();
   92|   147k|    ret->version = 1;
   93|   147k|    ret->conv_form = POINT_CONVERSION_UNCOMPRESSED;
   94|       |
   95|       |/* No ex_data inside the FIPS provider */
   96|   147k|#ifndef FIPS_MODULE
   97|   147k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_EC_KEY, ret, &ret->ex_data)) {
  ------------------
  |  |  259|   147k|#define CRYPTO_EX_INDEX_EC_KEY 8
  ------------------
  |  Branch (97:9): [True: 0, False: 147k]
  ------------------
   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|   147k|#endif
  102|       |
  103|   147k|    if (ret->meth->init != NULL && ret->meth->init(ret) == 0) {
  ------------------
  |  Branch (103:9): [True: 0, False: 147k]
  |  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|   147k|    return ret;
  108|       |
  109|      0|err:
  110|      0|    EC_KEY_free(ret);
  111|       |    return NULL;
  112|   147k|}

ossl_ec_group_new_ex:
   32|   295k|{
   33|   295k|    EC_GROUP *ret;
   34|       |
   35|   295k|    if (meth == NULL) {
  ------------------
  |  Branch (35:9): [True: 0, False: 295k]
  ------------------
   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|   295k|    if (meth->group_init == 0) {
  ------------------
  |  Branch (39:9): [True: 0, False: 295k]
  ------------------
   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|   295k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   295k|    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|   295k|    if (ret == NULL)
  ------------------
  |  Branch (45:9): [True: 0, False: 295k]
  ------------------
   46|      0|        return NULL;
   47|       |
   48|   295k|    ret->libctx = libctx;
   49|   295k|    if (propq != NULL) {
  ------------------
  |  Branch (49:9): [True: 0, False: 295k]
  ------------------
   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|   295k|    ret->meth = meth;
   55|   295k|    if ((ret->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) {
  ------------------
  |  |   29|   295k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (55:9): [True: 295k, False: 0]
  ------------------
   56|   295k|        ret->order = BN_new();
   57|   295k|        if (ret->order == NULL)
  ------------------
  |  Branch (57:13): [True: 0, False: 295k]
  ------------------
   58|      0|            goto err;
   59|   295k|        ret->cofactor = BN_new();
   60|   295k|        if (ret->cofactor == NULL)
  ------------------
  |  Branch (60:13): [True: 0, False: 295k]
  ------------------
   61|      0|            goto err;
   62|   295k|    }
   63|   295k|    ret->asn1_flag = OPENSSL_EC_EXPLICIT_CURVE;
  ------------------
  |  |   30|   295k|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
   64|   295k|    ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED;
   65|   295k|    if (!meth->group_init(ret))
  ------------------
  |  Branch (65:9): [True: 0, False: 295k]
  ------------------
   66|      0|        goto err;
   67|   295k|    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|   295k|}
EC_pre_comp_free:
   87|   443k|{
   88|   443k|    switch (group->pre_comp_type) {
  ------------------
  |  Branch (88:13): [True: 443k, False: 0]
  ------------------
   89|   443k|    case PCT_none:
  ------------------
  |  Branch (89:5): [True: 443k, False: 0]
  ------------------
   90|   443k|        break;
   91|      0|    case PCT_nistz256:
  ------------------
  |  Branch (91:5): [True: 0, False: 443k]
  ------------------
   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: 443k]
  ------------------
   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: 443k]
  ------------------
  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: 443k]
  ------------------
  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: 443k]
  ------------------
  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: 443k]
  ------------------
  117|      0|        EC_ec_pre_comp_free(group->pre_comp.ec);
  118|      0|        break;
  119|   443k|    }
  120|   443k|    group->pre_comp.ec = NULL;
  121|   443k|}
EC_GROUP_free:
  124|   444k|{
  125|   444k|    if (!group)
  ------------------
  |  Branch (125:9): [True: 148k, False: 295k]
  ------------------
  126|   148k|        return;
  127|       |
  128|   295k|    if (group->meth->group_finish != 0)
  ------------------
  |  Branch (128:9): [True: 295k, False: 0]
  ------------------
  129|   295k|        group->meth->group_finish(group);
  130|       |
  131|   295k|    EC_pre_comp_free(group);
  132|   295k|    BN_MONT_CTX_free(group->mont_data);
  133|   295k|    EC_POINT_free(group->generator);
  134|   295k|    BN_free(group->order);
  135|   295k|    BN_free(group->cofactor);
  136|   295k|    OPENSSL_free(group->seed);
  ------------------
  |  |  132|   295k|    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|   295k|    OPENSSL_free(group->propq);
  ------------------
  |  |  132|   295k|    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|   295k|    OPENSSL_free(group);
  ------------------
  |  |  132|   295k|    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|   295k|}
EC_GROUP_copy:
  163|   147k|{
  164|   147k|    if (dest->meth->group_copy == 0) {
  ------------------
  |  Branch (164:9): [True: 0, False: 147k]
  ------------------
  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|   147k|    if (dest->meth != src->meth) {
  ------------------
  |  Branch (168:9): [True: 0, False: 147k]
  ------------------
  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|   147k|    if (dest == src)
  ------------------
  |  Branch (172:9): [True: 0, False: 147k]
  ------------------
  173|      0|        return 1;
  174|       |
  175|   147k|    dest->libctx = src->libctx;
  176|   147k|    dest->curve_name = src->curve_name;
  177|       |
  178|   147k|    EC_pre_comp_free(dest);
  179|       |
  180|       |    /* Copy precomputed */
  181|   147k|    dest->pre_comp_type = src->pre_comp_type;
  182|   147k|    switch (src->pre_comp_type) {
  ------------------
  |  Branch (182:13): [True: 147k, False: 0]
  ------------------
  183|   147k|    case PCT_none:
  ------------------
  |  Branch (183:5): [True: 147k, False: 0]
  ------------------
  184|   147k|        dest->pre_comp.ec = NULL;
  185|   147k|        break;
  186|      0|    case PCT_nistz256:
  ------------------
  |  Branch (186:5): [True: 0, False: 147k]
  ------------------
  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: 147k]
  ------------------
  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: 147k]
  ------------------
  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: 147k]
  ------------------
  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: 147k]
  ------------------
  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: 147k]
  ------------------
  212|      0|        dest->pre_comp.ec = EC_ec_pre_comp_dup(src->pre_comp.ec);
  213|      0|        break;
  214|   147k|    }
  215|       |
  216|   147k|    if (src->mont_data != NULL) {
  ------------------
  |  Branch (216:9): [True: 147k, False: 0]
  ------------------
  217|   147k|        if (dest->mont_data == NULL) {
  ------------------
  |  Branch (217:13): [True: 147k, False: 0]
  ------------------
  218|   147k|            dest->mont_data = BN_MONT_CTX_new();
  219|   147k|            if (dest->mont_data == NULL)
  ------------------
  |  Branch (219:17): [True: 0, False: 147k]
  ------------------
  220|      0|                return 0;
  221|   147k|        }
  222|   147k|        if (!BN_MONT_CTX_copy(dest->mont_data, src->mont_data))
  ------------------
  |  Branch (222:13): [True: 0, False: 147k]
  ------------------
  223|      0|            return 0;
  224|   147k|    } else {
  225|       |        /* src->generator == NULL */
  226|      0|        BN_MONT_CTX_free(dest->mont_data);
  227|      0|        dest->mont_data = NULL;
  228|      0|    }
  229|       |
  230|   147k|    if (src->generator != NULL) {
  ------------------
  |  Branch (230:9): [True: 147k, False: 0]
  ------------------
  231|   147k|        if (dest->generator == NULL) {
  ------------------
  |  Branch (231:13): [True: 147k, False: 0]
  ------------------
  232|   147k|            dest->generator = EC_POINT_new(dest);
  233|   147k|            if (dest->generator == NULL)
  ------------------
  |  Branch (233:17): [True: 0, False: 147k]
  ------------------
  234|      0|                return 0;
  235|   147k|        }
  236|   147k|        if (!EC_POINT_copy(dest->generator, src->generator))
  ------------------
  |  Branch (236:13): [True: 0, False: 147k]
  ------------------
  237|      0|            return 0;
  238|   147k|    } else {
  239|       |        /* src->generator == NULL */
  240|      0|        EC_POINT_clear_free(dest->generator);
  241|      0|        dest->generator = NULL;
  242|      0|    }
  243|       |
  244|   147k|    if ((src->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) {
  ------------------
  |  |   29|   147k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (244:9): [True: 147k, False: 0]
  ------------------
  245|   147k|        if (!BN_copy(dest->order, src->order))
  ------------------
  |  Branch (245:13): [True: 0, False: 147k]
  ------------------
  246|      0|            return 0;
  247|   147k|        if (!BN_copy(dest->cofactor, src->cofactor))
  ------------------
  |  Branch (247:13): [True: 0, False: 147k]
  ------------------
  248|      0|            return 0;
  249|   147k|    }
  250|       |
  251|   147k|    dest->asn1_flag = src->asn1_flag;
  252|   147k|    dest->asn1_form = src->asn1_form;
  253|   147k|    dest->decoded_from_explicit_params = src->decoded_from_explicit_params;
  254|       |
  255|   147k|    if (src->seed) {
  ------------------
  |  Branch (255:9): [True: 147k, False: 160]
  ------------------
  256|   147k|        OPENSSL_free(dest->seed);
  ------------------
  |  |  132|   147k|    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|   147k|        if ((dest->seed = OPENSSL_malloc(src->seed_len)) == NULL)
  ------------------
  |  |  107|   147k|    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: 147k]
  ------------------
  258|      0|            return 0;
  259|   147k|        if (!memcpy(dest->seed, src->seed, src->seed_len))
  ------------------
  |  Branch (259:13): [True: 0, False: 147k]
  ------------------
  260|      0|            return 0;
  261|   147k|        dest->seed_len = src->seed_len;
  262|   147k|    } else {
  263|    160|        OPENSSL_free(dest->seed);
  ------------------
  |  |  132|    160|    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|    160|        dest->seed = NULL;
  265|    160|        dest->seed_len = 0;
  266|    160|    }
  267|       |
  268|   147k|    return dest->meth->group_copy(dest, src);
  269|   147k|}
EC_GROUP_dup:
  272|   147k|{
  273|   147k|    EC_GROUP *t = NULL;
  274|   147k|    int ok = 0;
  275|       |
  276|   147k|    if (a == NULL)
  ------------------
  |  Branch (276:9): [True: 0, False: 147k]
  ------------------
  277|      0|        return NULL;
  278|       |
  279|   147k|    if ((t = ossl_ec_group_new_ex(a->libctx, a->propq, a->meth)) == NULL)
  ------------------
  |  Branch (279:9): [True: 0, False: 147k]
  ------------------
  280|      0|        return NULL;
  281|   147k|    if (!EC_GROUP_copy(t, a))
  ------------------
  |  Branch (281:9): [True: 0, False: 147k]
  ------------------
  282|      0|        goto err;
  283|       |
  284|   147k|    ok = 1;
  285|       |
  286|   147k|err:
  287|   147k|    if (!ok) {
  ------------------
  |  Branch (287:9): [True: 0, False: 147k]
  ------------------
  288|      0|        EC_GROUP_free(t);
  289|      0|        return NULL;
  290|      0|    }
  291|   147k|    return t;
  292|   147k|}
EC_GROUP_set_generator:
  372|   136k|{
  373|   136k|    if (generator == NULL) {
  ------------------
  |  Branch (373:9): [True: 0, False: 136k]
  ------------------
  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|   136k|    if (group->field == NULL || BN_is_zero(group->field)
  ------------------
  |  Branch (379:9): [True: 0, False: 136k]
  |  Branch (379:33): [True: 0, False: 136k]
  ------------------
  380|   136k|        || BN_is_negative(group->field)) {
  ------------------
  |  Branch (380:12): [True: 0, False: 136k]
  ------------------
  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|   136k|    if (order == NULL || BN_is_zero(order) || BN_is_negative(order)
  ------------------
  |  Branch (390:9): [True: 0, False: 136k]
  |  Branch (390:26): [True: 0, False: 136k]
  |  Branch (390:47): [True: 0, False: 136k]
  ------------------
  391|   136k|        || BN_num_bits(order) > BN_num_bits(group->field) + 1) {
  ------------------
  |  Branch (391:12): [True: 0, False: 136k]
  ------------------
  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|   136k|    if (cofactor != NULL && BN_is_negative(cofactor)) {
  ------------------
  |  Branch (401:9): [True: 136k, False: 0]
  |  Branch (401:29): [True: 0, False: 136k]
  ------------------
  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|   136k|    if (group->generator == NULL) {
  ------------------
  |  Branch (406:9): [True: 136k, False: 0]
  ------------------
  407|   136k|        group->generator = EC_POINT_new(group);
  408|   136k|        if (group->generator == NULL)
  ------------------
  |  Branch (408:13): [True: 0, False: 136k]
  ------------------
  409|      0|            return 0;
  410|   136k|    }
  411|   136k|    if (!EC_POINT_copy(group->generator, generator))
  ------------------
  |  Branch (411:9): [True: 0, False: 136k]
  ------------------
  412|      0|        return 0;
  413|       |
  414|   136k|    if (!BN_copy(group->order, order))
  ------------------
  |  Branch (414:9): [True: 0, False: 136k]
  ------------------
  415|      0|        return 0;
  416|       |
  417|       |    /* Either take the provided positive cofactor, or try to compute it */
  418|   136k|    if (cofactor != NULL && !BN_is_zero(cofactor)) {
  ------------------
  |  Branch (418:9): [True: 136k, False: 0]
  |  Branch (418:29): [True: 136k, False: 0]
  ------------------
  419|   136k|        if (!BN_copy(group->cofactor, cofactor))
  ------------------
  |  Branch (419:13): [True: 0, False: 136k]
  ------------------
  420|      0|            return 0;
  421|   136k|    } 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|   136k|    if (BN_is_odd(group->order)) {
  ------------------
  |  Branch (431:9): [True: 136k, False: 0]
  ------------------
  432|   136k|        return ec_precompute_mont_data(group);
  433|   136k|    }
  434|       |
  435|      0|    BN_MONT_CTX_free(group->mont_data);
  436|       |    group->mont_data = NULL;
  437|      0|    return 1;
  438|   136k|}
EC_GROUP_get0_generator:
  441|     51|{
  442|     51|    return group->generator;
  443|     51|}
EC_GROUP_get0_order:
  461|   148k|{
  462|   148k|    return group->order;
  463|   148k|}
EC_GROUP_order_bits:
  466|   148k|{
  467|   148k|    return group->meth->group_order_bits(group);
  468|   148k|}
EC_GROUP_security_bits:
  471|   147k|{
  472|   147k|    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|   147k|    if (ecbits >= 512)
  ------------------
  |  Branch (484:9): [True: 3.80k, False: 144k]
  ------------------
  485|  3.80k|        return 256;
  486|   144k|    if (ecbits >= 384)
  ------------------
  |  Branch (486:9): [True: 132k, False: 11.5k]
  ------------------
  487|   132k|        return 192;
  488|  11.5k|    if (ecbits >= 256)
  ------------------
  |  Branch (488:9): [True: 11.5k, False: 0]
  ------------------
  489|  11.5k|        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|     83|{
  510|     83|    return group->cofactor;
  511|     83|}
EC_GROUP_set_curve_name:
  514|   147k|{
  515|   147k|    group->curve_name = nid;
  516|   147k|    group->asn1_flag = (nid != NID_undef)
  ------------------
  |  |   18|   147k|#define NID_undef                       0
  ------------------
  |  Branch (516:24): [True: 147k, False: 0]
  ------------------
  517|   147k|        ? OPENSSL_EC_NAMED_CURVE
  ------------------
  |  |   31|   147k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  518|   147k|        : OPENSSL_EC_EXPLICIT_CURVE;
  ------------------
  |  |   30|   147k|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
  519|   147k|}
EC_GROUP_get_curve_name:
  522|   591k|{
  523|   591k|    return group->curve_name;
  524|   591k|}
EC_GROUP_get_field_type:
  532|   296k|{
  533|   296k|    return group->meth->field_type;
  534|   296k|}
EC_GROUP_set_asn1_flag:
  537|   147k|{
  538|   147k|    group->asn1_flag = flag;
  539|   147k|}
EC_GROUP_get_asn1_flag:
  542|   285k|{
  543|   285k|    return group->asn1_flag;
  544|   285k|}
EC_GROUP_get_point_conversion_form:
  554|   148k|{
  555|   148k|    return group->asn1_form;
  556|   148k|}
EC_GROUP_set_seed:
  559|   147k|{
  560|   147k|    OPENSSL_free(group->seed);
  ------------------
  |  |  132|   147k|    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|   147k|    group->seed = NULL;
  562|   147k|    group->seed_len = 0;
  563|       |
  564|   147k|    if (!len || !p)
  ------------------
  |  Branch (564:9): [True: 0, False: 147k]
  |  Branch (564:17): [True: 0, False: 147k]
  ------------------
  565|      0|        return 1;
  566|       |
  567|   147k|    if ((group->seed = OPENSSL_malloc(len)) == NULL)
  ------------------
  |  |  107|   147k|    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: 147k]
  ------------------
  568|      0|        return 0;
  569|   147k|    memcpy(group->seed, p, len);
  570|   147k|    group->seed_len = len;
  571|       |
  572|   147k|    return len;
  573|   147k|}
EC_GROUP_set_curve:
  587|    160|{
  588|    160|    if (group->meth->group_set_curve == 0) {
  ------------------
  |  Branch (588:9): [True: 0, False: 160]
  ------------------
  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|    160|    return group->meth->group_set_curve(group, p, a, b, ctx);
  593|    160|}
EC_POINT_new:
  743|   592k|{
  744|   592k|    EC_POINT *ret;
  745|       |
  746|   592k|    if (group == NULL) {
  ------------------
  |  Branch (746:9): [True: 0, False: 592k]
  ------------------
  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|   592k|    if (group->meth->point_init == NULL) {
  ------------------
  |  Branch (750:9): [True: 0, False: 592k]
  ------------------
  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|   592k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   592k|    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|   592k|    if (ret == NULL)
  ------------------
  |  Branch (756:9): [True: 0, False: 592k]
  ------------------
  757|      0|        return NULL;
  758|       |
  759|   592k|    ret->meth = group->meth;
  760|   592k|    ret->curve_name = group->curve_name;
  761|       |
  762|   592k|    if (!ret->meth->point_init(ret)) {
  ------------------
  |  Branch (762:9): [True: 0, False: 592k]
  ------------------
  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|   592k|    return ret;
  768|   592k|}
EC_POINT_free:
  771|   592k|{
  772|   592k|    if (point == NULL)
  ------------------
  |  Branch (772:9): [True: 243, False: 592k]
  ------------------
  773|    243|        return;
  774|       |
  775|       |#ifdef OPENSSL_PEDANTIC_ZEROIZATION
  776|       |    EC_POINT_clear_free(point);
  777|       |#else
  778|   592k|    if (point->meth->point_finish != 0)
  ------------------
  |  Branch (778:9): [True: 592k, False: 0]
  ------------------
  779|   592k|        point->meth->point_finish(point);
  780|   592k|    OPENSSL_free(point);
  ------------------
  |  |  132|   592k|    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|   592k|#endif
  782|   592k|}
EC_POINT_clear_free:
  785|    160|{
  786|    160|    if (point == NULL)
  ------------------
  |  Branch (786:9): [True: 0, False: 160]
  ------------------
  787|      0|        return;
  788|       |
  789|    160|    if (point->meth->point_clear_finish != 0)
  ------------------
  |  Branch (789:9): [True: 160, False: 0]
  ------------------
  790|    160|        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|    160|    OPENSSL_clear_free(point, sizeof(*point));
  ------------------
  |  |  130|    160|    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|    160|}
EC_POINT_copy:
  797|   296k|{
  798|   296k|    if (dest->meth->point_copy == 0) {
  ------------------
  |  Branch (798:9): [True: 0, False: 296k]
  ------------------
  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|   296k|    if (dest->meth != src->meth
  ------------------
  |  Branch (802:9): [True: 0, False: 296k]
  ------------------
  803|   296k|        || (dest->curve_name != src->curve_name
  ------------------
  |  Branch (803:13): [True: 11.4k, False: 284k]
  ------------------
  804|  11.4k|            && dest->curve_name != 0
  ------------------
  |  Branch (804:16): [True: 11.4k, False: 0]
  ------------------
  805|  11.4k|            && src->curve_name != 0)) {
  ------------------
  |  Branch (805:16): [True: 0, False: 11.4k]
  ------------------
  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|   296k|    if (dest == src)
  ------------------
  |  Branch (809:9): [True: 0, False: 296k]
  ------------------
  810|      0|        return 1;
  811|   296k|    return dest->meth->point_copy(dest, src);
  812|   296k|}
EC_POINT_set_Jprojective_coordinates_GFp:
  858|   295k|{
  859|   295k|    if (group->meth->field_type != NID_X9_62_prime_field) {
  ------------------
  |  |  152|   295k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (859:9): [True: 0, False: 295k]
  ------------------
  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|   295k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (863:9): [True: 0, False: 295k]
  ------------------
  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|   295k|    return ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(group, point,
  868|   295k|        x, y, z, ctx);
  869|   295k|}
EC_POINT_set_affine_coordinates:
  892|   295k|{
  893|   295k|    if (group->meth->point_set_affine_coordinates == NULL) {
  ------------------
  |  Branch (893:9): [True: 0, False: 295k]
  ------------------
  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|   295k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (897:9): [True: 0, False: 295k]
  ------------------
  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|   295k|    if (!group->meth->point_set_affine_coordinates(group, point, x, y, ctx))
  ------------------
  |  Branch (901:9): [True: 0, False: 295k]
  ------------------
  902|      0|        return 0;
  903|       |
  904|   295k|    if (EC_POINT_is_on_curve(group, point, ctx) <= 0) {
  ------------------
  |  Branch (904:9): [True: 0, False: 295k]
  ------------------
  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|   295k|    return 1;
  909|   295k|}
EC_POINT_get_affine_coordinates:
  932|    243|{
  933|    243|    if (group->meth->point_get_affine_coordinates == NULL) {
  ------------------
  |  Branch (933:9): [True: 0, False: 243]
  ------------------
  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|    243|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (937:9): [True: 0, False: 243]
  ------------------
  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|    243|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (941:9): [True: 0, False: 243]
  ------------------
  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|    243|    return group->meth->point_get_affine_coordinates(group, point, x, y, ctx);
  946|    243|}
EC_POINT_is_at_infinity:
 1009|   296k|{
 1010|   296k|    if (group->meth->is_at_infinity == 0) {
  ------------------
  |  Branch (1010:9): [True: 0, False: 296k]
  ------------------
 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|   296k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (1014:9): [True: 0, False: 296k]
  ------------------
 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|   296k|    return group->meth->is_at_infinity(group, point);
 1019|   296k|}
EC_POINT_is_on_curve:
 1030|   295k|{
 1031|   295k|    if (group->meth->is_on_curve == 0) {
  ------------------
  |  Branch (1031:9): [True: 0, False: 295k]
  ------------------
 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|   295k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (1035:9): [True: 0, False: 295k]
  ------------------
 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|   295k|    return group->meth->is_on_curve(group, point, ctx);
 1040|   295k|}
EC_POINT_cmp:
 1044|     32|{
 1045|     32|    if (group->meth->point_cmp == 0) {
  ------------------
  |  Branch (1045:9): [True: 0, False: 32]
  ------------------
 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|     32|    if (!ec_point_is_compat(a, group) || !ec_point_is_compat(b, group)) {
  ------------------
  |  Branch (1049:9): [True: 0, False: 32]
  |  Branch (1049:42): [True: 0, False: 32]
  ------------------
 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|     32|    return group->meth->point_cmp(group, a, b, ctx);
 1054|     32|}
EC_POINT_mul:
 1145|    243|{
 1146|    243|    int ret = 0;
 1147|    243|    size_t num;
 1148|    243|#ifndef FIPS_MODULE
 1149|    243|    BN_CTX *new_ctx = NULL;
 1150|    243|#endif
 1151|       |
 1152|    243|    if (!ec_point_is_compat(r, group)
  ------------------
  |  Branch (1152:9): [True: 0, False: 243]
  ------------------
 1153|    243|        || (point != NULL && !ec_point_is_compat(point, group))) {
  ------------------
  |  Branch (1153:13): [True: 0, False: 243]
  |  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|    243|    if (g_scalar == NULL && p_scalar == NULL)
  ------------------
  |  Branch (1158:9): [True: 0, False: 243]
  |  Branch (1158:29): [True: 0, False: 0]
  ------------------
 1159|      0|        return EC_POINT_set_to_infinity(group, r);
 1160|       |
 1161|    243|#ifndef FIPS_MODULE
 1162|    243|    if (ctx == NULL)
  ------------------
  |  Branch (1162:9): [True: 0, False: 243]
  ------------------
 1163|      0|        ctx = new_ctx = BN_CTX_secure_new();
 1164|    243|#endif
 1165|    243|    if (ctx == NULL) {
  ------------------
  |  Branch (1165:9): [True: 0, False: 243]
  ------------------
 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|    243|    num = (point != NULL && p_scalar != NULL) ? 1 : 0;
  ------------------
  |  Branch (1170:12): [True: 0, False: 243]
  |  Branch (1170:29): [True: 0, False: 0]
  ------------------
 1171|    243|    if (group->meth->mul != NULL)
  ------------------
  |  Branch (1171:9): [True: 83, False: 160]
  ------------------
 1172|     83|        ret = group->meth->mul(group, r, g_scalar, num, &point, &p_scalar, ctx);
 1173|    160|    else
 1174|       |        /* use default */
 1175|    160|        ret = ossl_ec_wNAF_mul(group, r, g_scalar, num, &point, &p_scalar, ctx);
 1176|       |
 1177|    243|#ifndef FIPS_MODULE
 1178|    243|    BN_CTX_free(new_ctx);
 1179|    243|#endif
 1180|    243|    return ret;
 1181|    243|}
ossl_ec_group_simple_order_bits:
 1256|   296k|{
 1257|   296k|    if (group->order == NULL)
  ------------------
  |  Branch (1257:9): [True: 0, False: 296k]
  ------------------
 1258|      0|        return 0;
 1259|   296k|    return BN_num_bits(group->order);
 1260|   296k|}
ossl_ec_group_set_params:
 1532|    243|{
 1533|    243|    int encoding_flag = -1, format = -1;
 1534|    243|    const OSSL_PARAM *p;
 1535|       |
 1536|    243|    p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT);
  ------------------
  |  |  403|    243|# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
  ------------------
 1537|    243|    if (p != NULL) {
  ------------------
  |  Branch (1537:9): [True: 0, False: 243]
  ------------------
 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|    243|    p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_ENCODING);
  ------------------
  |  |  395|    243|# define OSSL_PKEY_PARAM_EC_ENCODING "encoding"
  ------------------
 1546|    243|    if (p != NULL) {
  ------------------
  |  Branch (1546:9): [True: 0, False: 243]
  ------------------
 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|    243|    p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_SEED);
  ------------------
  |  |  406|    243|# define OSSL_PKEY_PARAM_EC_SEED "seed"
  ------------------
 1555|    243|    if (p != NULL) {
  ------------------
  |  Branch (1555:9): [True: 0, False: 243]
  ------------------
 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|    243|    return 1;
 1564|    243|}
EC_GROUP_new_from_params:
 1568|    243|{
 1569|    243|    const OSSL_PARAM *ptmp;
 1570|    243|    EC_GROUP *group = NULL;
 1571|       |
 1572|    243|#ifndef FIPS_MODULE
 1573|    243|    const OSSL_PARAM *pa, *pb;
 1574|    243|    int ok = 0;
 1575|    243|    EC_GROUP *named_group = NULL;
 1576|    243|    BIGNUM *p = NULL, *a = NULL, *b = NULL, *order = NULL, *cofactor = NULL;
 1577|    243|    EC_POINT *point = NULL;
 1578|    243|    int field_bits = 0;
 1579|    243|    int is_prime_field = 1;
 1580|    243|    BN_CTX *bnctx = NULL;
 1581|    243|    const unsigned char *buf = NULL;
 1582|       |#ifndef OPENSSL_NO_EC_EXPLICIT_CURVES
 1583|       |    int encoding_flag = -1;
 1584|       |#endif
 1585|    243|#endif
 1586|       |
 1587|       |    /* This is the simple named group case */
 1588|    243|    ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_GROUP_NAME);
  ------------------
  |  |  428|    243|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
 1589|    243|    if (ptmp != NULL) {
  ------------------
  |  Branch (1589:9): [True: 243, False: 0]
  ------------------
 1590|    243|        int decoded = 0;
 1591|       |
 1592|    243|        if ((group = group_new_from_name(ptmp, libctx, propq)) == NULL)
  ------------------
  |  Branch (1592:13): [True: 0, False: 243]
  ------------------
 1593|      0|            return NULL;
 1594|    243|        if (!ossl_ec_group_set_params(group, params)) {
  ------------------
  |  Branch (1594:13): [True: 0, False: 243]
  ------------------
 1595|      0|            EC_GROUP_free(group);
 1596|      0|            return NULL;
 1597|      0|        }
 1598|       |
 1599|    243|        ptmp = OSSL_PARAM_locate_const(params,
 1600|    243|            OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS);
  ------------------
  |  |  394|    243|# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
  ------------------
 1601|    243|        if (ptmp != NULL && !OSSL_PARAM_get_int(ptmp, &decoded)) {
  ------------------
  |  Branch (1601:13): [True: 0, False: 243]
  |  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|    243|        group->decoded_from_explicit_params = decoded > 0;
 1607|    243|        return group;
 1608|    243|    }
 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|   136k|{
 1216|   136k|    BN_CTX *ctx = BN_CTX_new_ex(group->libctx);
 1217|   136k|    int ret = 0;
 1218|       |
 1219|   136k|    BN_MONT_CTX_free(group->mont_data);
 1220|   136k|    group->mont_data = NULL;
 1221|       |
 1222|   136k|    if (ctx == NULL)
  ------------------
  |  Branch (1222:9): [True: 0, False: 136k]
  ------------------
 1223|      0|        goto err;
 1224|       |
 1225|   136k|    group->mont_data = BN_MONT_CTX_new();
 1226|   136k|    if (group->mont_data == NULL)
  ------------------
  |  Branch (1226:9): [True: 0, False: 136k]
  ------------------
 1227|      0|        goto err;
 1228|       |
 1229|   136k|    if (!BN_MONT_CTX_set(group->mont_data, group->order, ctx)) {
  ------------------
  |  Branch (1229:9): [True: 0, False: 136k]
  ------------------
 1230|      0|        BN_MONT_CTX_free(group->mont_data);
 1231|      0|        group->mont_data = NULL;
 1232|      0|        goto err;
 1233|      0|    }
 1234|       |
 1235|   136k|    ret = 1;
 1236|       |
 1237|   136k|err:
 1238|       |
 1239|   136k|    BN_CTX_free(ctx);
 1240|   136k|    return ret;
 1241|   136k|}
ec_lib.c:group_new_from_name:
 1503|    243|{
 1504|    243|    int ok = 0, nid;
 1505|    243|    const char *curve_name = NULL;
 1506|       |
 1507|    243|    switch (p->data_type) {
  ------------------
  |  Branch (1507:13): [True: 243, False: 0]
  ------------------
 1508|    243|    case OSSL_PARAM_UTF8_STRING:
  ------------------
  |  |  117|    243|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1508:5): [True: 243, False: 0]
  ------------------
 1509|       |        /* The OSSL_PARAM functions have no support for this */
 1510|    243|        curve_name = p->data;
 1511|    243|        ok = (curve_name != NULL);
 1512|    243|        break;
 1513|      0|    case OSSL_PARAM_UTF8_PTR:
  ------------------
  |  |  141|      0|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
  |  Branch (1513:5): [True: 0, False: 243]
  ------------------
 1514|      0|        ok = OSSL_PARAM_get_utf8_ptr(p, &curve_name);
 1515|      0|        break;
 1516|    243|    }
 1517|       |
 1518|    243|    if (ok) {
  ------------------
  |  Branch (1518:9): [True: 243, False: 0]
  ------------------
 1519|    243|        nid = ossl_ec_curve_name2nid(curve_name);
 1520|    243|        if (nid == NID_undef) {
  ------------------
  |  |   18|    243|#define NID_undef                       0
  ------------------
  |  Branch (1520:13): [True: 0, False: 243]
  ------------------
 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|    243|        } else {
 1524|    243|            return EC_GROUP_new_by_curve_name_ex(libctx, propq, nid);
 1525|    243|        }
 1526|    243|    }
 1527|      0|    return NULL;
 1528|    243|}

ec_lib.c:ec_point_is_compat:
  332|  1.18M|{
  333|  1.18M|    return group->meth == point->meth
  ------------------
  |  Branch (333:12): [True: 1.18M, False: 0]
  ------------------
  334|  1.18M|        && (group->curve_name == 0
  ------------------
  |  Branch (334:13): [True: 45.6k, False: 1.13M]
  ------------------
  335|  1.13M|            || point->curve_name == 0
  ------------------
  |  Branch (335:16): [True: 0, False: 1.13M]
  ------------------
  336|  1.13M|            || group->curve_name == point->curve_name);
  ------------------
  |  Branch (336:16): [True: 1.13M, False: 0]
  ------------------
  337|  1.18M|}
ec_mult.c:ec_point_ladder_pre:
  763|    160|{
  764|    160|    if (group->meth->ladder_pre != NULL)
  ------------------
  |  Branch (764:9): [True: 160, False: 0]
  ------------------
  765|    160|        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|  40.9k|{
  778|  40.9k|    if (group->meth->ladder_step != NULL)
  ------------------
  |  Branch (778:9): [True: 40.9k, False: 0]
  ------------------
  779|  40.9k|        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|    160|{
  792|    160|    if (group->meth->ladder_post != NULL)
  ------------------
  |  Branch (792:9): [True: 160, False: 0]
  ------------------
  793|    160|        return group->meth->ladder_post(group, r, s, p, ctx);
  794|       |
  795|      0|    return 1;
  796|    160|}
ec_oct.c:ec_point_is_compat:
  332|   148k|{
  333|   148k|    return group->meth == point->meth
  ------------------
  |  Branch (333:12): [True: 148k, False: 0]
  ------------------
  334|   148k|        && (group->curve_name == 0
  ------------------
  |  Branch (334:13): [True: 0, False: 148k]
  ------------------
  335|   148k|            || point->curve_name == 0
  ------------------
  |  Branch (335:16): [True: 0, False: 148k]
  ------------------
  336|   148k|            || group->curve_name == point->curve_name);
  ------------------
  |  Branch (336:16): [True: 148k, False: 0]
  ------------------
  337|   148k|}

ossl_ec_scalar_mul_ladder:
  143|    160|{
  144|    160|    int i, cardinality_bits, group_top, kbit, pbit, Z_is_one;
  145|    160|    EC_POINT *p = NULL;
  146|    160|    EC_POINT *s = NULL;
  147|    160|    BIGNUM *k = NULL;
  148|    160|    BIGNUM *lambda = NULL;
  149|    160|    BIGNUM *cardinality = NULL;
  150|    160|    int ret = 0;
  151|       |
  152|       |    /* early exit if the input point is the point at infinity */
  153|    160|    if (point != NULL && EC_POINT_is_at_infinity(group, point))
  ------------------
  |  Branch (153:9): [True: 0, False: 160]
  |  Branch (153:26): [True: 0, False: 0]
  ------------------
  154|      0|        return EC_POINT_set_to_infinity(group, r);
  155|       |
  156|    160|    if (BN_is_zero(group->order)) {
  ------------------
  |  Branch (156:9): [True: 0, False: 160]
  ------------------
  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|    160|    if (BN_is_zero(group->cofactor)) {
  ------------------
  |  Branch (160:9): [True: 0, False: 160]
  ------------------
  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|    160|    BN_CTX_start(ctx);
  166|       |
  167|    160|    if (((p = EC_POINT_new(group)) == NULL)
  ------------------
  |  Branch (167:9): [True: 0, False: 160]
  ------------------
  168|    160|        || ((s = EC_POINT_new(group)) == NULL)) {
  ------------------
  |  Branch (168:12): [True: 0, False: 160]
  ------------------
  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|    160|    if (point == NULL) {
  ------------------
  |  Branch (173:9): [True: 160, False: 0]
  ------------------
  174|    160|        if (!EC_POINT_copy(p, group->generator)) {
  ------------------
  |  Branch (174:13): [True: 0, False: 160]
  ------------------
  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|    160|    } 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|    160|    EC_POINT_BN_set_flags(p, BN_FLG_CONSTTIME);
  ------------------
  |  |  105|    160|    do {                                \
  |  |  106|    160|        BN_set_flags((P)->X, (flags));  \
  |  |  107|    160|        BN_set_flags((P)->Y, (flags));  \
  |  |  108|    160|        BN_set_flags((P)->Z, (flags));  \
  |  |  109|    160|    } while (0)
  |  |  ------------------
  |  |  |  Branch (109:14): [Folded, False: 160]
  |  |  ------------------
  ------------------
  186|    160|    EC_POINT_BN_set_flags(r, BN_FLG_CONSTTIME);
  ------------------
  |  |  105|    160|    do {                                \
  |  |  106|    160|        BN_set_flags((P)->X, (flags));  \
  |  |  107|    160|        BN_set_flags((P)->Y, (flags));  \
  |  |  108|    160|        BN_set_flags((P)->Z, (flags));  \
  |  |  109|    160|    } while (0)
  |  |  ------------------
  |  |  |  Branch (109:14): [Folded, False: 160]
  |  |  ------------------
  ------------------
  187|    160|    EC_POINT_BN_set_flags(s, BN_FLG_CONSTTIME);
  ------------------
  |  |  105|    160|    do {                                \
  |  |  106|    160|        BN_set_flags((P)->X, (flags));  \
  |  |  107|    160|        BN_set_flags((P)->Y, (flags));  \
  |  |  108|    160|        BN_set_flags((P)->Z, (flags));  \
  |  |  109|    160|    } while (0)
  |  |  ------------------
  |  |  |  Branch (109:14): [Folded, False: 160]
  |  |  ------------------
  ------------------
  188|       |
  189|    160|    cardinality = BN_CTX_get(ctx);
  190|    160|    lambda = BN_CTX_get(ctx);
  191|    160|    k = BN_CTX_get(ctx);
  192|    160|    if (k == NULL) {
  ------------------
  |  Branch (192:9): [True: 0, False: 160]
  ------------------
  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|    160|    if (!BN_mul(cardinality, group->order, group->cofactor, ctx)) {
  ------------------
  |  Branch (197:9): [True: 0, False: 160]
  ------------------
  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|    160|    cardinality_bits = BN_num_bits(cardinality);
  209|    160|    group_top = bn_get_top(cardinality);
  210|    160|    if ((bn_wexpand(k, group_top + 2) == NULL)
  ------------------
  |  Branch (210:9): [True: 0, False: 160]
  ------------------
  211|    160|        || (bn_wexpand(lambda, group_top + 2) == NULL)) {
  ------------------
  |  Branch (211:12): [True: 0, False: 160]
  ------------------
  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|    160|    if (!BN_copy(k, scalar)) {
  ------------------
  |  Branch (216:9): [True: 0, False: 160]
  ------------------
  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|    160|    BN_set_flags(k, BN_FLG_CONSTTIME);
  ------------------
  |  |   67|    160|#define BN_FLG_CONSTTIME 0x04
  ------------------
  222|       |
  223|    160|    if ((BN_num_bits(k) > cardinality_bits) || (BN_is_negative(k))) {
  ------------------
  |  Branch (223:9): [True: 0, False: 160]
  |  Branch (223:48): [True: 0, False: 160]
  ------------------
  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|    160|    if (!BN_add(lambda, k, cardinality)) {
  ------------------
  |  Branch (234:9): [True: 0, False: 160]
  ------------------
  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|    160|    BN_set_flags(lambda, BN_FLG_CONSTTIME);
  ------------------
  |  |   67|    160|#define BN_FLG_CONSTTIME 0x04
  ------------------
  239|    160|    if (!BN_add(k, lambda, cardinality)) {
  ------------------
  |  Branch (239:9): [True: 0, False: 160]
  ------------------
  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|    160|    kbit = BN_is_bit_set(lambda, cardinality_bits);
  248|    160|    BN_consttime_swap(kbit, k, lambda, group_top + 2);
  249|       |
  250|    160|    group_top = bn_get_top(group->field);
  251|    160|    if ((bn_wexpand(s->X, group_top) == NULL)
  ------------------
  |  Branch (251:9): [True: 0, False: 160]
  ------------------
  252|    160|        || (bn_wexpand(s->Y, group_top) == NULL)
  ------------------
  |  Branch (252:12): [True: 0, False: 160]
  ------------------
  253|    160|        || (bn_wexpand(s->Z, group_top) == NULL)
  ------------------
  |  Branch (253:12): [True: 0, False: 160]
  ------------------
  254|    160|        || (bn_wexpand(r->X, group_top) == NULL)
  ------------------
  |  Branch (254:12): [True: 0, False: 160]
  ------------------
  255|    160|        || (bn_wexpand(r->Y, group_top) == NULL)
  ------------------
  |  Branch (255:12): [True: 0, False: 160]
  ------------------
  256|    160|        || (bn_wexpand(r->Z, group_top) == NULL)
  ------------------
  |  Branch (256:12): [True: 0, False: 160]
  ------------------
  257|    160|        || (bn_wexpand(p->X, group_top) == NULL)
  ------------------
  |  Branch (257:12): [True: 0, False: 160]
  ------------------
  258|    160|        || (bn_wexpand(p->Y, group_top) == NULL)
  ------------------
  |  Branch (258:12): [True: 0, False: 160]
  ------------------
  259|    160|        || (bn_wexpand(p->Z, group_top) == NULL)) {
  ------------------
  |  Branch (259:12): [True: 0, False: 160]
  ------------------
  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|    160|    if (!p->Z_is_one && (group->meth->make_affine == NULL || !group->meth->make_affine(group, p, ctx))) {
  ------------------
  |  Branch (265:9): [True: 0, False: 160]
  |  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|    160|    if (!ec_point_ladder_pre(group, r, s, p, ctx)) {
  ------------------
  |  Branch (271:9): [True: 0, False: 160]
  ------------------
  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|    160|    pbit = 1;
  278|       |
  279|    160|#define EC_POINT_CSWAP(c, a, b, w, t)              \
  280|    160|    do {                                           \
  281|    160|        BN_consttime_swap(c, (a)->X, (b)->X, w);   \
  282|    160|        BN_consttime_swap(c, (a)->Y, (b)->Y, w);   \
  283|    160|        BN_consttime_swap(c, (a)->Z, (b)->Z, w);   \
  284|    160|        t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \
  285|    160|        (a)->Z_is_one ^= (t);                      \
  286|    160|        (b)->Z_is_one ^= (t);                      \
  287|    160|    } 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|  41.1k|    for (i = cardinality_bits - 1; i >= 0; i--) {
  ------------------
  |  Branch (347:36): [True: 40.9k, False: 160]
  ------------------
  348|  40.9k|        kbit = BN_is_bit_set(k, i) ^ pbit;
  349|  40.9k|        EC_POINT_CSWAP(kbit, r, s, group_top, Z_is_one);
  ------------------
  |  |  280|  40.9k|    do {                                           \
  |  |  281|  40.9k|        BN_consttime_swap(c, (a)->X, (b)->X, w);   \
  |  |  282|  40.9k|        BN_consttime_swap(c, (a)->Y, (b)->Y, w);   \
  |  |  283|  40.9k|        BN_consttime_swap(c, (a)->Z, (b)->Z, w);   \
  |  |  284|  40.9k|        t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \
  |  |  285|  40.9k|        (a)->Z_is_one ^= (t);                      \
  |  |  286|  40.9k|        (b)->Z_is_one ^= (t);                      \
  |  |  287|  40.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (287:14): [Folded, False: 40.9k]
  |  |  ------------------
  ------------------
  350|       |
  351|       |        /* Perform a single step of the Montgomery ladder */
  352|  40.9k|        if (!ec_point_ladder_step(group, r, s, p, ctx)) {
  ------------------
  |  Branch (352:13): [True: 0, False: 40.9k]
  ------------------
  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|  40.9k|        pbit ^= kbit;
  361|  40.9k|    }
  362|       |    /* one final cswap to move the right value into r */
  363|    160|    EC_POINT_CSWAP(pbit, r, s, group_top, Z_is_one);
  ------------------
  |  |  280|    160|    do {                                           \
  |  |  281|    160|        BN_consttime_swap(c, (a)->X, (b)->X, w);   \
  |  |  282|    160|        BN_consttime_swap(c, (a)->Y, (b)->Y, w);   \
  |  |  283|    160|        BN_consttime_swap(c, (a)->Z, (b)->Z, w);   \
  |  |  284|    160|        t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \
  |  |  285|    160|        (a)->Z_is_one ^= (t);                      \
  |  |  286|    160|        (b)->Z_is_one ^= (t);                      \
  |  |  287|    160|    } while (0)
  |  |  ------------------
  |  |  |  Branch (287:14): [Folded, False: 160]
  |  |  ------------------
  ------------------
  364|    160|#undef EC_POINT_CSWAP
  365|       |
  366|       |    /* Finalize ladder (and recover full point coordinates) */
  367|    160|    if (!ec_point_ladder_post(group, r, s, p, ctx)) {
  ------------------
  |  Branch (367:9): [True: 0, False: 160]
  ------------------
  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|    160|    ret = 1;
  373|       |
  374|    160|err:
  375|    160|    EC_POINT_free(p);
  376|    160|    EC_POINT_clear_free(s);
  377|    160|    BN_CTX_end(ctx);
  378|       |
  379|    160|    return ret;
  380|    160|}
ossl_ec_wNAF_mul:
  406|    160|{
  407|    160|    const EC_POINT *generator = NULL;
  408|    160|    EC_POINT *tmp = NULL;
  409|    160|    size_t totalnum;
  410|    160|    size_t blocksize = 0, numblocks = 0; /* for wNAF splitting */
  411|    160|    size_t pre_points_per_block = 0;
  412|    160|    size_t i, j;
  413|    160|    int k;
  414|    160|    int r_is_inverted = 0;
  415|    160|    int r_is_at_infinity = 1;
  416|    160|    size_t *wsize = NULL; /* individual window sizes */
  417|    160|    signed char **wNAF = NULL; /* individual wNAFs */
  418|    160|    size_t *wNAF_len = NULL;
  419|    160|    size_t max_len = 0;
  420|    160|    size_t num_val;
  421|    160|    EC_POINT **val = NULL; /* precomputation */
  422|    160|    EC_POINT **v;
  423|    160|    EC_POINT ***val_sub = NULL; /* pointers to sub-arrays of 'val' or
  424|       |                                 * 'pre_comp->points' */
  425|    160|    const EC_PRE_COMP *pre_comp = NULL;
  426|    160|    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|    160|    int ret = 0;
  430|       |
  431|    160|    if (!BN_is_zero(group->order) && !BN_is_zero(group->cofactor)) {
  ------------------
  |  Branch (431:9): [True: 160, False: 0]
  |  Branch (431:38): [True: 160, 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|    160|        if ((scalar != group->order) && (scalar != NULL) && (num == 0)) {
  ------------------
  |  Branch (437:13): [True: 160, False: 0]
  |  Branch (437:41): [True: 160, False: 0]
  |  Branch (437:61): [True: 160, 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|    160|            return ossl_ec_scalar_mul_ladder(group, r, scalar, NULL, ctx);
  447|    160|        }
  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|    486|{
   77|    486|    if (point == NULL) {
  ------------------
  |  Branch (77:9): [True: 0, False: 486]
  ------------------
   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|    486|    if (group->meth->point2oct == 0
  ------------------
  |  Branch (81:9): [True: 486, False: 0]
  ------------------
   82|    486|        && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) {
  ------------------
  |  |   26|    486|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (82:12): [True: 0, False: 486]
  ------------------
   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|    486|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 486]
  ------------------
   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|    486|    if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) {
  ------------------
  |  |   26|    486|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (90:9): [True: 486, False: 0]
  ------------------
   91|    486|        if (group->meth->field_type == NID_X9_62_prime_field)
  ------------------
  |  |  152|    486|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (91:13): [True: 486, False: 0]
  ------------------
   92|    486|            return ossl_ec_GFp_simple_point2oct(group, point, form, buf, len,
   93|    486|                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|    486|#endif
  104|    486|    }
  105|       |
  106|      0|    return group->meth->point2oct(group, point, form, buf, len, ctx);
  107|    486|}
EC_POINT_oct2point:
  111|   147k|{
  112|   147k|    if (group->meth->oct2point == 0
  ------------------
  |  Branch (112:9): [True: 147k, False: 0]
  ------------------
  113|   147k|        && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) {
  ------------------
  |  |   26|   147k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (113:12): [True: 0, False: 147k]
  ------------------
  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|   147k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (117:9): [True: 0, False: 147k]
  ------------------
  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|   147k|    if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) {
  ------------------
  |  |   26|   147k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (121:9): [True: 147k, False: 0]
  ------------------
  122|   147k|        if (group->meth->field_type == NID_X9_62_prime_field)
  ------------------
  |  |  152|   147k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (122:13): [True: 147k, False: 0]
  ------------------
  123|   147k|            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|   147k|#endif
  133|   147k|    }
  134|      0|    return group->meth->oct2point(group, point, buf, len, ctx);
  135|   147k|}

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

ossl_ec_GFp_nist_group_copy:
   86|   136k|{
   87|   136k|    dest->field_mod_func = src->field_mod_func;
   88|       |
   89|   136k|    return ossl_ec_GFp_simple_group_copy(dest, src);
   90|   136k|}
ossl_ec_GFp_nist_field_mul:
  130|   272k|{
  131|   272k|    int ret = 0;
  132|   272k|    BN_CTX *ctx_new = NULL;
  133|       |
  134|   272k|    if (!group || !r || !a || !b) {
  ------------------
  |  Branch (134:9): [True: 0, False: 272k]
  |  Branch (134:19): [True: 0, False: 272k]
  |  Branch (134:25): [True: 0, False: 272k]
  |  Branch (134:31): [True: 0, False: 272k]
  ------------------
  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|   272k|    if (!ctx)
  ------------------
  |  Branch (138:9): [True: 0, False: 272k]
  ------------------
  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|   272k|    if (!BN_mul(r, a, b, ctx))
  ------------------
  |  Branch (142:9): [True: 0, False: 272k]
  ------------------
  143|      0|        goto err;
  144|   272k|    if (!group->field_mod_func(r, r, group->field, ctx))
  ------------------
  |  Branch (144:9): [True: 0, False: 272k]
  ------------------
  145|      0|        goto err;
  146|       |
  147|   272k|    ret = 1;
  148|   272k|err:
  149|   272k|    BN_CTX_free(ctx_new);
  150|   272k|    return ret;
  151|   272k|}
ossl_ec_GFp_nist_field_sqr:
  155|   545k|{
  156|   545k|    int ret = 0;
  157|   545k|    BN_CTX *ctx_new = NULL;
  158|       |
  159|   545k|    if (!group || !r || !a) {
  ------------------
  |  Branch (159:9): [True: 0, False: 545k]
  |  Branch (159:19): [True: 0, False: 545k]
  |  Branch (159:25): [True: 0, False: 545k]
  ------------------
  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|   545k|    if (!ctx)
  ------------------
  |  Branch (163:9): [True: 0, False: 545k]
  ------------------
  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|   545k|    if (!BN_sqr(r, a, ctx))
  ------------------
  |  Branch (167:9): [True: 0, False: 545k]
  ------------------
  168|      0|        goto err;
  169|   545k|    if (!group->field_mod_func(r, r, group->field, ctx))
  ------------------
  |  Branch (169:9): [True: 0, False: 545k]
  ------------------
  170|      0|        goto err;
  171|       |
  172|   545k|    ret = 1;
  173|   545k|err:
  174|   545k|    BN_CTX_free(ctx_new);
  175|   545k|    return ret;
  176|   545k|}

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

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

EC_GFp_nistz256_method:
 1570|  11.4k|{
 1571|  11.4k|    static const EC_METHOD ret = {
 1572|  11.4k|        EC_FLAGS_DEFAULT_OCT,
  ------------------
  |  |   26|  11.4k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
 1573|  11.4k|        NID_X9_62_prime_field,
  ------------------
  |  |  152|  11.4k|#define NID_X9_62_prime_field           406
  ------------------
 1574|  11.4k|        ossl_ec_GFp_mont_group_init,
 1575|  11.4k|        ossl_ec_GFp_mont_group_finish,
 1576|  11.4k|        ossl_ec_GFp_mont_group_clear_finish,
 1577|  11.4k|        ossl_ec_GFp_mont_group_copy,
 1578|  11.4k|        ossl_ec_GFp_mont_group_set_curve,
 1579|  11.4k|        ossl_ec_GFp_simple_group_get_curve,
 1580|  11.4k|        ossl_ec_GFp_simple_group_get_degree,
 1581|  11.4k|        ossl_ec_group_simple_order_bits,
 1582|  11.4k|        ossl_ec_GFp_simple_group_check_discriminant,
 1583|  11.4k|        ossl_ec_GFp_simple_point_init,
 1584|  11.4k|        ossl_ec_GFp_simple_point_finish,
 1585|  11.4k|        ossl_ec_GFp_simple_point_clear_finish,
 1586|  11.4k|        ossl_ec_GFp_simple_point_copy,
 1587|  11.4k|        ossl_ec_GFp_simple_point_set_to_infinity,
 1588|  11.4k|        ossl_ec_GFp_simple_point_set_affine_coordinates,
 1589|  11.4k|        ecp_nistz256_get_affine,
 1590|  11.4k|        0, 0, 0,
 1591|  11.4k|        ossl_ec_GFp_simple_add,
 1592|  11.4k|        ossl_ec_GFp_simple_dbl,
 1593|  11.4k|        ossl_ec_GFp_simple_invert,
 1594|  11.4k|        ossl_ec_GFp_simple_is_at_infinity,
 1595|  11.4k|        ossl_ec_GFp_simple_is_on_curve,
 1596|  11.4k|        ossl_ec_GFp_simple_cmp,
 1597|  11.4k|        ossl_ec_GFp_simple_make_affine,
 1598|  11.4k|        ossl_ec_GFp_simple_points_make_affine,
 1599|  11.4k|        ecp_nistz256_points_mul, /* mul */
 1600|  11.4k|        ecp_nistz256_mult_precompute, /* precompute_mult */
 1601|  11.4k|        ecp_nistz256_window_have_precompute_mult, /* have_precompute_mult */
 1602|  11.4k|        ossl_ec_GFp_mont_field_mul,
 1603|  11.4k|        ossl_ec_GFp_mont_field_sqr,
 1604|  11.4k|        0, /* field_div */
 1605|  11.4k|        ossl_ec_GFp_mont_field_inv,
 1606|  11.4k|        ossl_ec_GFp_mont_field_encode,
 1607|  11.4k|        ossl_ec_GFp_mont_field_decode,
 1608|  11.4k|        ossl_ec_GFp_mont_field_set_to_one,
 1609|  11.4k|        ossl_ec_key_simple_priv2oct,
 1610|  11.4k|        ossl_ec_key_simple_oct2priv,
 1611|  11.4k|        0, /* set private */
 1612|  11.4k|        ossl_ec_key_simple_generate_key,
 1613|  11.4k|        ossl_ec_key_simple_check_key,
 1614|  11.4k|        ossl_ec_key_simple_generate_public_key,
 1615|  11.4k|        0, /* keycopy */
 1616|  11.4k|        0, /* keyfinish */
 1617|  11.4k|        ossl_ecdh_simple_compute_key,
 1618|  11.4k|        ossl_ecdsa_simple_sign_setup,
 1619|  11.4k|        ossl_ecdsa_simple_sign_sig,
 1620|  11.4k|        ossl_ecdsa_simple_verify_sig,
 1621|  11.4k|        ecp_nistz256_inv_mod_ord, /* can be #define-d NULL */
 1622|  11.4k|        0, /* blind_coordinates */
 1623|  11.4k|        0, /* ladder_pre */
 1624|  11.4k|        0, /* ladder_step */
 1625|  11.4k|        0, /* ladder_post */
 1626|  11.4k|        ecp_nistz256group_full_init
 1627|  11.4k|    };
 1628|       |
 1629|  11.4k|    return &ret;
 1630|  11.4k|}
ecp_nistz256.c:ecp_nistz256_get_affine:
 1149|     51|{
 1150|     51|    BN_ULONG z_inv2[P256_LIMBS];
 1151|     51|    BN_ULONG z_inv3[P256_LIMBS];
 1152|     51|    BN_ULONG x_aff[P256_LIMBS];
 1153|     51|    BN_ULONG y_aff[P256_LIMBS];
 1154|     51|    BN_ULONG point_x[P256_LIMBS], point_y[P256_LIMBS], point_z[P256_LIMBS];
 1155|     51|    BN_ULONG x_ret[P256_LIMBS], y_ret[P256_LIMBS];
 1156|       |
 1157|     51|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (1157:9): [True: 0, False: 51]
  ------------------
 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|     51|    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: 51]
  |  Branch (1162:66): [True: 0, False: 51]
  |  Branch (1162:123): [True: 0, False: 51]
  ------------------
 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|     51|    ecp_nistz256_mod_inverse(z_inv3, point_z);
 1168|     51|    ecp_nistz256_sqr_mont(z_inv2, z_inv3);
 1169|     51|    ecp_nistz256_mul_mont(x_aff, z_inv2, point_x);
 1170|       |
 1171|     51|    if (x != NULL) {
  ------------------
  |  Branch (1171:9): [True: 51, False: 0]
  ------------------
 1172|     51|        ecp_nistz256_from_mont(x_ret, x_aff);
 1173|     51|        if (!bn_set_words(x, x_ret, P256_LIMBS))
  ------------------
  |  |   40|     51|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     51|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     51|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1173:13): [True: 0, False: 51]
  ------------------
 1174|      0|            return 0;
 1175|     51|    }
 1176|       |
 1177|     51|    if (y != NULL) {
  ------------------
  |  Branch (1177:9): [True: 51, False: 0]
  ------------------
 1178|     51|        ecp_nistz256_mul_mont(z_inv3, z_inv3, z_inv2);
 1179|     51|        ecp_nistz256_mul_mont(y_aff, z_inv3, point_y);
 1180|     51|        ecp_nistz256_from_mont(y_ret, y_aff);
 1181|     51|        if (!bn_set_words(y, y_ret, P256_LIMBS))
  ------------------
  |  |   40|     51|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     51|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     51|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1181:13): [True: 0, False: 51]
  ------------------
 1182|      0|            return 0;
 1183|     51|    }
 1184|       |
 1185|     51|    return 1;
 1186|     51|}
ecp_nistz256.c:ecp_nistz256_bignum_to_field_elem:
  599|    153|{
  600|    153|    return bn_copy_words(out, in, P256_LIMBS);
  ------------------
  |  |   40|    153|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    153|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    153|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  601|    153|}
ecp_nistz256.c:ecp_nistz256_mod_inverse:
  519|     51|{
  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|     51|    BN_ULONG p2[P256_LIMBS];
  525|     51|    BN_ULONG p4[P256_LIMBS];
  526|     51|    BN_ULONG p8[P256_LIMBS];
  527|     51|    BN_ULONG p16[P256_LIMBS];
  528|     51|    BN_ULONG p32[P256_LIMBS];
  529|     51|    BN_ULONG res[P256_LIMBS];
  530|     51|    int i;
  531|       |
  532|     51|    ecp_nistz256_sqr_mont(res, in);
  533|     51|    ecp_nistz256_mul_mont(p2, res, in); /* 3*p */
  534|       |
  535|     51|    ecp_nistz256_sqr_mont(res, p2);
  536|     51|    ecp_nistz256_sqr_mont(res, res);
  537|     51|    ecp_nistz256_mul_mont(p4, res, p2); /* f*p */
  538|       |
  539|     51|    ecp_nistz256_sqr_mont(res, p4);
  540|     51|    ecp_nistz256_sqr_mont(res, res);
  541|     51|    ecp_nistz256_sqr_mont(res, res);
  542|     51|    ecp_nistz256_sqr_mont(res, res);
  543|     51|    ecp_nistz256_mul_mont(p8, res, p4); /* ff*p */
  544|       |
  545|     51|    ecp_nistz256_sqr_mont(res, p8);
  546|    408|    for (i = 0; i < 7; i++)
  ------------------
  |  Branch (546:17): [True: 357, False: 51]
  ------------------
  547|    357|        ecp_nistz256_sqr_mont(res, res);
  548|     51|    ecp_nistz256_mul_mont(p16, res, p8); /* ffff*p */
  549|       |
  550|     51|    ecp_nistz256_sqr_mont(res, p16);
  551|    816|    for (i = 0; i < 15; i++)
  ------------------
  |  Branch (551:17): [True: 765, False: 51]
  ------------------
  552|    765|        ecp_nistz256_sqr_mont(res, res);
  553|     51|    ecp_nistz256_mul_mont(p32, res, p16); /* ffffffff*p */
  554|       |
  555|     51|    ecp_nistz256_sqr_mont(res, p32);
  556|  1.63k|    for (i = 0; i < 31; i++)
  ------------------
  |  Branch (556:17): [True: 1.58k, False: 51]
  ------------------
  557|  1.58k|        ecp_nistz256_sqr_mont(res, res);
  558|     51|    ecp_nistz256_mul_mont(res, res, in);
  559|       |
  560|  6.57k|    for (i = 0; i < 32 * 4; i++)
  ------------------
  |  Branch (560:17): [True: 6.52k, False: 51]
  ------------------
  561|  6.52k|        ecp_nistz256_sqr_mont(res, res);
  562|     51|    ecp_nistz256_mul_mont(res, res, p32);
  563|       |
  564|  1.68k|    for (i = 0; i < 32; i++)
  ------------------
  |  Branch (564:17): [True: 1.63k, False: 51]
  ------------------
  565|  1.63k|        ecp_nistz256_sqr_mont(res, res);
  566|     51|    ecp_nistz256_mul_mont(res, res, p32);
  567|       |
  568|    867|    for (i = 0; i < 16; i++)
  ------------------
  |  Branch (568:17): [True: 816, False: 51]
  ------------------
  569|    816|        ecp_nistz256_sqr_mont(res, res);
  570|     51|    ecp_nistz256_mul_mont(res, res, p16);
  571|       |
  572|    459|    for (i = 0; i < 8; i++)
  ------------------
  |  Branch (572:17): [True: 408, False: 51]
  ------------------
  573|    408|        ecp_nistz256_sqr_mont(res, res);
  574|     51|    ecp_nistz256_mul_mont(res, res, p8);
  575|       |
  576|     51|    ecp_nistz256_sqr_mont(res, res);
  577|     51|    ecp_nistz256_sqr_mont(res, res);
  578|     51|    ecp_nistz256_sqr_mont(res, res);
  579|     51|    ecp_nistz256_sqr_mont(res, res);
  580|     51|    ecp_nistz256_mul_mont(res, res, p4);
  581|       |
  582|     51|    ecp_nistz256_sqr_mont(res, res);
  583|     51|    ecp_nistz256_sqr_mont(res, res);
  584|     51|    ecp_nistz256_mul_mont(res, res, p2);
  585|       |
  586|     51|    ecp_nistz256_sqr_mont(res, res);
  587|     51|    ecp_nistz256_sqr_mont(res, res);
  588|     51|    ecp_nistz256_mul_mont(res, res, in);
  589|       |
  590|     51|    memcpy(r, res, sizeof(res));
  591|     51|}
ecp_nistz256.c:ecp_nistz256_points_mul:
  936|     51|{
  937|     51|    int i = 0, ret = 0, no_precomp_for_generator = 0, p_is_infinity = 0;
  938|     51|    unsigned char p_str[33] = { 0 };
  939|     51|    const PRECOMP256_ROW *preComputedTable = NULL;
  940|     51|    const NISTZ256_PRE_COMP *pre_comp = NULL;
  941|     51|    const EC_POINT *generator = NULL;
  942|     51|    const BIGNUM **new_scalars = NULL;
  943|     51|    const EC_POINT **new_points = NULL;
  944|     51|    unsigned int idx = 0;
  945|     51|    const unsigned int window_size = 7;
  946|     51|    const unsigned int mask = (1 << (window_size + 1)) - 1;
  947|     51|    unsigned int wvalue;
  948|     51|    ALIGN32 union {
  ------------------
  |  |   30|     51|#define ALIGN32 __attribute((aligned(32)))
  ------------------
  949|     51|        P256_POINT p;
  950|     51|        P256_POINT_AFFINE a;
  951|     51|    } t, p;
  952|     51|    BIGNUM *tmp_scalar;
  953|       |
  954|     51|    if ((num + 1) == 0 || (num + 1) > OPENSSL_MALLOC_MAX_NELEMS(void *)) {
  ------------------
  |  |  169|     51|#define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U << (sizeof(int) * 8 - 1)) - 1) / sizeof(type))
  ------------------
  |  Branch (954:9): [True: 0, False: 51]
  |  Branch (954:27): [True: 0, False: 51]
  ------------------
  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|     51|    memset(&p, 0, sizeof(p));
  960|     51|    BN_CTX_start(ctx);
  961|       |
  962|     51|    if (scalar) {
  ------------------
  |  Branch (962:9): [True: 51, False: 0]
  ------------------
  963|     51|        generator = EC_GROUP_get0_generator(group);
  964|     51|        if (generator == NULL) {
  ------------------
  |  Branch (964:13): [True: 0, False: 51]
  ------------------
  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|     51|        pre_comp = group->pre_comp.nistz256;
  971|       |
  972|     51|        if (pre_comp) {
  ------------------
  |  Branch (972:13): [True: 0, False: 51]
  ------------------
  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|     51|        if (preComputedTable == NULL && ecp_nistz256_is_affine_G(generator)) {
  ------------------
  |  Branch (994:13): [True: 51, False: 0]
  |  Branch (994:41): [True: 51, 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|     51|            preComputedTable = ecp_nistz256_precomputed;
 1002|     51|        }
 1003|       |
 1004|     51|        if (preComputedTable) {
  ------------------
  |  Branch (1004:13): [True: 51, False: 0]
  ------------------
 1005|     51|            BN_ULONG infty;
 1006|       |
 1007|     51|            if ((BN_num_bits(scalar) > 256)
  ------------------
  |  Branch (1007:17): [True: 0, False: 51]
  ------------------
 1008|     51|                || BN_is_negative(scalar)) {
  ------------------
  |  Branch (1008:20): [True: 0, False: 51]
  ------------------
 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|    255|            for (i = 0; i < bn_get_top(scalar) * BN_BYTES; i += BN_BYTES) {
  ------------------
  |  |   38|    255|#define BN_BYTES 8
  ------------------
                          for (i = 0; i < bn_get_top(scalar) * BN_BYTES; i += BN_BYTES) {
  ------------------
  |  |   38|    204|#define BN_BYTES 8
  ------------------
  |  Branch (1019:25): [True: 204, False: 51]
  ------------------
 1020|    204|                BN_ULONG d = bn_get_words(scalar)[i / BN_BYTES];
  ------------------
  |  |   38|    204|#define BN_BYTES 8
  ------------------
 1021|       |
 1022|    204|                p_str[i + 0] = (unsigned char)d;
 1023|    204|                p_str[i + 1] = (unsigned char)(d >> 8);
 1024|    204|                p_str[i + 2] = (unsigned char)(d >> 16);
 1025|    204|                p_str[i + 3] = (unsigned char)(d >>= 24);
 1026|    204|                if (BN_BYTES == 8) {
  ------------------
  |  |   38|    204|#define BN_BYTES 8
  ------------------
  |  Branch (1026:21): [True: 204, Folded]
  ------------------
 1027|    204|                    d >>= 8;
 1028|    204|                    p_str[i + 4] = (unsigned char)d;
 1029|    204|                    p_str[i + 5] = (unsigned char)(d >> 8);
 1030|    204|                    p_str[i + 6] = (unsigned char)(d >> 16);
 1031|    204|                    p_str[i + 7] = (unsigned char)(d >> 24);
 1032|    204|                }
 1033|    204|            }
 1034|       |
 1035|    102|            for (; i < 33; i++)
  ------------------
  |  Branch (1035:20): [True: 51, False: 51]
  ------------------
 1036|     51|                p_str[i] = 0;
 1037|       |
 1038|       |            /* First window */
 1039|     51|            wvalue = (p_str[0] << 1) & mask;
 1040|     51|            idx += window_size;
 1041|       |
 1042|     51|            wvalue = _booth_recode_w7(wvalue);
 1043|       |
 1044|     51|            ecp_nistz256_gather_w7(&p.a, preComputedTable[0],
 1045|     51|                wvalue >> 1);
 1046|       |
 1047|     51|            ecp_nistz256_neg(p.p.Z, p.p.Y);
 1048|     51|            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|     51|            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|     51|            if (P256_LIMBS == 8)
  ------------------
  |  |   40|     51|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     51|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     51|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1056:17): [Folded, False: 51]
  ------------------
 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|     51|            infty = 0 - is_zero(infty);
 1060|     51|            infty = ~infty;
 1061|       |
 1062|     51|            p.p.Z[0] = ONE[0] & infty;
 1063|     51|            p.p.Z[1] = ONE[1] & infty;
 1064|     51|            p.p.Z[2] = ONE[2] & infty;
 1065|     51|            p.p.Z[3] = ONE[3] & infty;
 1066|     51|            if (P256_LIMBS == 8) {
  ------------------
  |  |   40|     51|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     51|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     51|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1066:17): [Folded, False: 51]
  ------------------
 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|  1.88k|            for (i = 1; i < 37; i++) {
  ------------------
  |  Branch (1073:25): [True: 1.83k, False: 51]
  ------------------
 1074|  1.83k|                unsigned int off = (idx - 1) / 8;
 1075|  1.83k|                wvalue = p_str[off] | p_str[off + 1] << 8;
 1076|  1.83k|                wvalue = (wvalue >> ((idx - 1) % 8)) & mask;
 1077|  1.83k|                idx += window_size;
 1078|       |
 1079|  1.83k|                wvalue = _booth_recode_w7(wvalue);
 1080|       |
 1081|  1.83k|                ecp_nistz256_gather_w7(&t.a,
 1082|  1.83k|                    preComputedTable[i], wvalue >> 1);
 1083|       |
 1084|  1.83k|                ecp_nistz256_neg(t.p.Z, t.a.Y);
 1085|  1.83k|                copy_conditional(t.a.Y, t.p.Z, wvalue & 1);
 1086|       |
 1087|  1.83k|                ecp_nistz256_point_add_affine(&p.p, &p.p, &t.a);
 1088|  1.83k|            }
 1089|     51|        } else {
 1090|      0|            p_is_infinity = 1;
 1091|      0|            no_precomp_for_generator = 1;
 1092|      0|        }
 1093|     51|    } else
 1094|      0|        p_is_infinity = 1;
 1095|       |
 1096|     51|    if (no_precomp_for_generator) {
  ------------------
  |  Branch (1096:9): [True: 0, False: 51]
  ------------------
 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|     51|    if (num) {
  ------------------
  |  Branch (1119:9): [True: 0, False: 51]
  ------------------
 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|     51|    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|     51|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     51|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     51|#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|     51|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     51|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     51|#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|     51|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     51|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     51|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1132:9): [True: 0, False: 51]
  |  Branch (1132:51): [True: 0, False: 51]
  |  Branch (1132:93): [True: 0, False: 51]
  ------------------
 1133|      0|        goto err;
 1134|      0|    }
 1135|     51|    r->Z_is_one = is_one(r->Z) & 1;
 1136|       |
 1137|     51|    ret = 1;
 1138|       |
 1139|     51|err:
 1140|     51|    BN_CTX_end(ctx);
 1141|     51|    OPENSSL_free(new_points);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
 1142|     51|    OPENSSL_free(new_scalars);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
 1143|     51|    return ret;
 1144|     51|}
ecp_nistz256.c:ecp_nistz256_is_affine_G:
  791|     51|{
  792|     51|    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|     51|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     51|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     51|#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|     51|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|     51|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|     51|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (792:12): [True: 51, False: 0]
  |  Branch (792:56): [True: 51, False: 0]
  |  Branch (792:100): [True: 51, False: 0]
  |  Branch (792:148): [True: 51, False: 0]
  |  Branch (792:196): [True: 51, False: 0]
  ------------------
  793|     51|}
ecp_nistz256.c:is_equal:
  195|    102|{
  196|    102|    BN_ULONG res;
  197|       |
  198|    102|    res = a[0] ^ b[0];
  199|    102|    res |= a[1] ^ b[1];
  200|    102|    res |= a[2] ^ b[2];
  201|    102|    res |= a[3] ^ b[3];
  202|    102|    if (P256_LIMBS == 8) {
  ------------------
  |  |   40|    102|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    102|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    102|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (202:9): [Folded, False: 102]
  ------------------
  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|    102|    return is_zero(res);
  210|    102|}
ecp_nistz256.c:_booth_recode_w7:
  156|  1.88k|{
  157|  1.88k|    unsigned int s, d;
  158|       |
  159|  1.88k|    s = ~((in >> 7) - 1);
  160|  1.88k|    d = (1 << 8) - in - 1;
  161|  1.88k|    d = (d & s) | (in & ~s);
  162|  1.88k|    d = (d >> 1) + (d & 1);
  163|       |
  164|  1.88k|    return (d << 1) + (s & 1);
  165|  1.88k|}
ecp_nistz256.c:copy_conditional:
  169|  1.88k|{
  170|  1.88k|    BN_ULONG mask1 = 0 - move;
  171|  1.88k|    BN_ULONG mask2 = ~mask1;
  172|       |
  173|  1.88k|    dst[0] = (src[0] & mask1) ^ (dst[0] & mask2);
  174|  1.88k|    dst[1] = (src[1] & mask1) ^ (dst[1] & mask2);
  175|  1.88k|    dst[2] = (src[2] & mask1) ^ (dst[2] & mask2);
  176|  1.88k|    dst[3] = (src[3] & mask1) ^ (dst[3] & mask2);
  177|  1.88k|    if (P256_LIMBS == 8) {
  ------------------
  |  |   40|  1.88k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  1.88k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  1.88k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (177:9): [Folded, False: 1.88k]
  ------------------
  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|  1.88k|}
ecp_nistz256.c:is_zero:
  186|    255|{
  187|    255|    in |= (0 - in);
  188|    255|    in = ~in;
  189|    255|    in >>= BN_BITS2 - 1;
  ------------------
  |  |   54|    255|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|    255|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  190|    255|    return in;
  191|    255|}
ecp_nistz256.c:is_one:
  213|    102|{
  214|    102|    BN_ULONG res = 0;
  215|    102|    BN_ULONG *a = bn_get_words(z);
  216|       |
  217|    102|    if (bn_get_top(z) == (P256_LIMBS - P256_LIMBS / 8)) {
  ------------------
  |  |   40|    102|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    102|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    102|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (bn_get_top(z) == (P256_LIMBS - P256_LIMBS / 8)) {
  ------------------
  |  |   40|    102|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    102|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    102|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (217:9): [True: 102, False: 0]
  ------------------
  218|    102|        res = a[0] ^ ONE[0];
  219|    102|        res |= a[1] ^ ONE[1];
  220|    102|        res |= a[2] ^ ONE[2];
  221|    102|        res |= a[3] ^ ONE[3];
  222|    102|        if (P256_LIMBS == 8) {
  ------------------
  |  |   40|    102|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|    102|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|    102|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (222:13): [Folded, False: 102]
  ------------------
  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|    102|        res = is_zero(res);
  232|    102|    }
  233|       |
  234|    102|    return res;
  235|    102|}
ecp_nistz256.c:ecp_nistz256group_full_init:
 1445|  11.4k|{
 1446|  11.4k|    BN_CTX *ctx = NULL;
 1447|  11.4k|    BN_MONT_CTX *mont = NULL, *ordmont = NULL;
 1448|  11.4k|    const int param_len = 32;
 1449|  11.4k|    const int seed_len = 20;
 1450|  11.4k|    int ok = 0;
 1451|  11.4k|    uint32_t hi_order_n = 0xccd1c8aa;
 1452|  11.4k|    uint32_t lo_order_n = 0xee00bc4f;
 1453|  11.4k|    BIGNUM *p = NULL, *a = NULL, *b = NULL, *x = NULL, *y = NULL, *one = NULL,
 1454|  11.4k|           *order = NULL;
 1455|  11.4k|    EC_POINT *P = NULL;
 1456|       |
 1457|  11.4k|    if ((ctx = BN_CTX_new_ex(group->libctx)) == NULL) {
  ------------------
  |  Branch (1457:9): [True: 0, False: 11.4k]
  ------------------
 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|  11.4k|    if (!EC_GROUP_set_seed(group, params, seed_len)) {
  ------------------
  |  Branch (1462:9): [True: 0, False: 11.4k]
  ------------------
 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|  11.4k|    params += seed_len;
 1467|       |
 1468|  11.4k|    if ((p = BN_bin2bn(params + 0 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1468:9): [True: 0, False: 11.4k]
  ------------------
 1469|  11.4k|        || (a = BN_bin2bn(params + 1 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1469:12): [True: 0, False: 11.4k]
  ------------------
 1470|  11.4k|        || (b = BN_bin2bn(params + 2 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (1470:12): [True: 0, False: 11.4k]
  ------------------
 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|  11.4k|    mont = BN_MONT_CTX_new();
 1480|  11.4k|    if (mont == NULL)
  ------------------
  |  Branch (1480:9): [True: 0, False: 11.4k]
  ------------------
 1481|      0|        goto err;
 1482|       |
 1483|  11.4k|    if (!ossl_bn_mont_ctx_set(mont, p, 256, params + 6 * param_len, param_len,
  ------------------
  |  Branch (1483:9): [True: 0, False: 11.4k]
  ------------------
 1484|  11.4k|            1, 0))
 1485|      0|        goto err;
 1486|       |
 1487|  11.4k|    one = BN_new();
 1488|  11.4k|    if (one == NULL) {
  ------------------
  |  Branch (1488:9): [True: 0, False: 11.4k]
  ------------------
 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|  11.4k|    if (!BN_to_montgomery(one, BN_value_one(), mont, ctx)) {
  ------------------
  |  Branch (1492:9): [True: 0, False: 11.4k]
  ------------------
 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|  11.4k|    group->field_data1 = mont;
 1497|  11.4k|    mont = NULL;
 1498|  11.4k|    group->field_data2 = one;
 1499|  11.4k|    one = NULL;
 1500|       |
 1501|  11.4k|    if (!ossl_ec_GFp_simple_group_set_curve(group, p, a, b, ctx)) {
  ------------------
  |  Branch (1501:9): [True: 0, False: 11.4k]
  ------------------
 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|  11.4k|    if ((P = EC_POINT_new(group)) == NULL) {
  ------------------
  |  Branch (1506:9): [True: 0, False: 11.4k]
  ------------------
 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|  11.4k|    if ((x = BN_bin2bn(params + 3 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1511:9): [True: 0, False: 11.4k]
  ------------------
 1512|  11.4k|        || (y = BN_bin2bn(params + 4 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (1512:12): [True: 0, False: 11.4k]
  ------------------
 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|  11.4k|    if (!EC_POINT_set_affine_coordinates(group, P, x, y, ctx)) {
  ------------------
  |  Branch (1516:9): [True: 0, False: 11.4k]
  ------------------
 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|  11.4k|    if ((order = BN_bin2bn(params + 5 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1520:9): [True: 0, False: 11.4k]
  ------------------
 1521|  11.4k|        || !BN_set_word(x, (BN_ULONG)1)) { /* cofactor is 1 */
  ------------------
  |  Branch (1521:12): [True: 0, False: 11.4k]
  ------------------
 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|  11.4k|    group->generator = EC_POINT_new(group);
 1530|  11.4k|    if (group->generator == NULL) {
  ------------------
  |  Branch (1530:9): [True: 0, False: 11.4k]
  ------------------
 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|  11.4k|    if (!EC_POINT_copy(group->generator, P))
  ------------------
  |  Branch (1534:9): [True: 0, False: 11.4k]
  ------------------
 1535|      0|        goto err;
 1536|  11.4k|    if (!BN_copy(group->order, order))
  ------------------
  |  Branch (1536:9): [True: 0, False: 11.4k]
  ------------------
 1537|      0|        goto err;
 1538|  11.4k|    if (!BN_set_word(group->cofactor, 1))
  ------------------
  |  Branch (1538:9): [True: 0, False: 11.4k]
  ------------------
 1539|      0|        goto err;
 1540|       |
 1541|  11.4k|    ordmont = BN_MONT_CTX_new();
 1542|  11.4k|    if (ordmont == NULL)
  ------------------
  |  Branch (1542:9): [True: 0, False: 11.4k]
  ------------------
 1543|      0|        goto err;
 1544|  11.4k|    if (!ossl_bn_mont_ctx_set(ordmont, order, 256, params + 7 * param_len,
  ------------------
  |  Branch (1544:9): [True: 0, False: 11.4k]
  ------------------
 1545|  11.4k|            param_len, lo_order_n, hi_order_n))
 1546|      0|        goto err;
 1547|       |
 1548|  11.4k|    group->mont_data = ordmont;
 1549|  11.4k|    ordmont = NULL;
 1550|       |
 1551|  11.4k|    ok = 1;
 1552|       |
 1553|  11.4k|err:
 1554|  11.4k|    EC_POINT_free(P);
 1555|  11.4k|    BN_CTX_free(ctx);
 1556|  11.4k|    BN_MONT_CTX_free(mont);
 1557|  11.4k|    BN_MONT_CTX_free(ordmont);
 1558|  11.4k|    BN_free(p);
 1559|  11.4k|    BN_free(one);
 1560|  11.4k|    BN_free(a);
 1561|  11.4k|    BN_free(b);
 1562|  11.4k|    BN_free(order);
 1563|  11.4k|    BN_free(x);
 1564|  11.4k|    BN_free(y);
 1565|       |
 1566|  11.4k|    return ok;
 1567|  11.4k|}

ossl_ec_GFp_simple_point2oct:
  162|    486|{
  163|    486|    size_t ret;
  164|    486|    BN_CTX *new_ctx = NULL;
  165|    486|    int used_ctx = 0;
  166|    486|    BIGNUM *x, *y;
  167|    486|    size_t field_len, i, skip;
  168|       |
  169|    486|    if ((form != POINT_CONVERSION_COMPRESSED)
  ------------------
  |  Branch (169:9): [True: 486, False: 0]
  ------------------
  170|    486|        && (form != POINT_CONVERSION_UNCOMPRESSED)
  ------------------
  |  Branch (170:12): [True: 0, False: 486]
  ------------------
  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|    486|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (176:9): [True: 0, False: 486]
  ------------------
  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|    486|    field_len = BN_num_bytes(group->field);
  ------------------
  |  |  188|    486|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  190|    486|    ret = (form == POINT_CONVERSION_COMPRESSED) ? 1 + field_len : 1 + 2 * field_len;
  ------------------
  |  Branch (190:11): [True: 0, False: 486]
  ------------------
  191|       |
  192|       |    /* if 'buf' is NULL, just return required length */
  193|    486|    if (buf != NULL) {
  ------------------
  |  Branch (193:9): [True: 243, False: 243]
  ------------------
  194|    243|        if (len < ret) {
  ------------------
  |  Branch (194:13): [True: 0, False: 243]
  ------------------
  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|    243|        if (ctx == NULL) {
  ------------------
  |  Branch (199:13): [True: 0, False: 243]
  ------------------
  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|    243|        BN_CTX_start(ctx);
  206|    243|        used_ctx = 1;
  207|    243|        x = BN_CTX_get(ctx);
  208|    243|        y = BN_CTX_get(ctx);
  209|    243|        if (y == NULL)
  ------------------
  |  Branch (209:13): [True: 0, False: 243]
  ------------------
  210|      0|            goto err;
  211|       |
  212|    243|        if (!EC_POINT_get_affine_coordinates(group, point, x, y, ctx))
  ------------------
  |  Branch (212:13): [True: 0, False: 243]
  ------------------
  213|      0|            goto err;
  214|       |
  215|    243|        if ((form == POINT_CONVERSION_COMPRESSED
  ------------------
  |  Branch (215:14): [True: 0, False: 243]
  ------------------
  216|    243|                || form == POINT_CONVERSION_HYBRID)
  ------------------
  |  Branch (216:20): [True: 0, False: 243]
  ------------------
  217|      0|            && BN_is_odd(y))
  ------------------
  |  Branch (217:16): [True: 0, False: 0]
  ------------------
  218|      0|            buf[0] = form + 1;
  219|    243|        else
  220|    243|            buf[0] = form;
  221|       |
  222|    243|        i = 1;
  223|       |
  224|    243|        skip = field_len - BN_num_bytes(x);
  ------------------
  |  |  188|    243|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  225|    243|        if (skip > field_len) {
  ------------------
  |  Branch (225:13): [True: 0, False: 243]
  ------------------
  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|    255|        while (skip > 0) {
  ------------------
  |  Branch (229:16): [True: 12, False: 243]
  ------------------
  230|     12|            buf[i++] = 0;
  231|     12|            skip--;
  232|     12|        }
  233|    243|        skip = BN_bn2bin(x, buf + i);
  234|    243|        i += skip;
  235|    243|        if (i != 1 + field_len) {
  ------------------
  |  Branch (235:13): [True: 0, False: 243]
  ------------------
  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|    243|        if (form == POINT_CONVERSION_UNCOMPRESSED
  ------------------
  |  Branch (240:13): [True: 243, False: 0]
  ------------------
  241|    243|            || form == POINT_CONVERSION_HYBRID) {
  ------------------
  |  Branch (241:16): [True: 0, False: 0]
  ------------------
  242|    243|            skip = field_len - BN_num_bytes(y);
  ------------------
  |  |  188|    243|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  243|    243|            if (skip > field_len) {
  ------------------
  |  Branch (243:17): [True: 0, False: 243]
  ------------------
  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|    259|            while (skip > 0) {
  ------------------
  |  Branch (247:20): [True: 16, False: 243]
  ------------------
  248|     16|                buf[i++] = 0;
  249|     16|                skip--;
  250|     16|            }
  251|    243|            skip = BN_bn2bin(y, buf + i);
  252|    243|            i += skip;
  253|    243|        }
  254|       |
  255|    243|        if (i != ret) {
  ------------------
  |  Branch (255:13): [True: 0, False: 243]
  ------------------
  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|    243|    }
  260|       |
  261|    486|    if (used_ctx)
  ------------------
  |  Branch (261:9): [True: 243, False: 243]
  ------------------
  262|    243|        BN_CTX_end(ctx);
  263|    486|    BN_CTX_free(new_ctx);
  264|    486|    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|    486|}
ossl_ec_GFp_simple_oct2point:
  276|   147k|{
  277|   147k|    point_conversion_form_t form;
  278|   147k|    int y_bit;
  279|   147k|    BN_CTX *new_ctx = NULL;
  280|   147k|    BIGNUM *x, *y;
  281|   147k|    int field_len, enc_len;
  282|   147k|    int ret = 0;
  283|       |
  284|   147k|    if (len == 0) {
  ------------------
  |  Branch (284:9): [True: 0, False: 147k]
  ------------------
  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|   147k|    form = buf[0];
  289|   147k|    y_bit = form & 1;
  290|   147k|    form = form & ~1U;
  291|   147k|    if ((form != 0) && (form != POINT_CONVERSION_COMPRESSED)
  ------------------
  |  Branch (291:9): [True: 147k, False: 0]
  |  Branch (291:24): [True: 147k, False: 0]
  ------------------
  292|   147k|        && (form != POINT_CONVERSION_UNCOMPRESSED)
  ------------------
  |  Branch (292:12): [True: 0, False: 147k]
  ------------------
  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|   147k|    if ((form == 0 || form == POINT_CONVERSION_UNCOMPRESSED) && y_bit) {
  ------------------
  |  Branch (297:10): [True: 0, False: 147k]
  |  Branch (297:23): [True: 147k, False: 0]
  |  Branch (297:65): [True: 0, False: 147k]
  ------------------
  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|   147k|    if (form == 0) {
  ------------------
  |  Branch (302:9): [True: 0, False: 147k]
  ------------------
  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|   147k|    field_len = BN_num_bytes(group->field);
  ------------------
  |  |  188|   147k|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  312|   147k|    enc_len = (form == POINT_CONVERSION_COMPRESSED) ? 1 + field_len : 1 + 2 * field_len;
  ------------------
  |  Branch (312:15): [True: 0, False: 147k]
  ------------------
  313|       |
  314|   147k|    if (len != (size_t)enc_len) {
  ------------------
  |  Branch (314:9): [True: 0, False: 147k]
  ------------------
  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|   147k|    if (ctx == NULL) {
  ------------------
  |  Branch (319:9): [True: 147k, False: 0]
  ------------------
  320|   147k|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  321|   147k|        if (ctx == NULL)
  ------------------
  |  Branch (321:13): [True: 0, False: 147k]
  ------------------
  322|      0|            return 0;
  323|   147k|    }
  324|       |
  325|   147k|    BN_CTX_start(ctx);
  326|   147k|    x = BN_CTX_get(ctx);
  327|   147k|    y = BN_CTX_get(ctx);
  328|   147k|    if (y == NULL)
  ------------------
  |  Branch (328:9): [True: 0, False: 147k]
  ------------------
  329|      0|        goto err;
  330|       |
  331|   147k|    if (!BN_bin2bn(buf + 1, field_len, x))
  ------------------
  |  Branch (331:9): [True: 0, False: 147k]
  ------------------
  332|      0|        goto err;
  333|   147k|    if (BN_ucmp(x, group->field) >= 0) {
  ------------------
  |  Branch (333:9): [True: 0, False: 147k]
  ------------------
  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|   147k|    if (form == POINT_CONVERSION_COMPRESSED) {
  ------------------
  |  Branch (338:9): [True: 0, False: 147k]
  ------------------
  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|   147k|    } else {
  342|   147k|        if (!BN_bin2bn(buf + 1 + field_len, field_len, y))
  ------------------
  |  Branch (342:13): [True: 0, False: 147k]
  ------------------
  343|      0|            goto err;
  344|   147k|        if (BN_ucmp(y, group->field) >= 0) {
  ------------------
  |  Branch (344:13): [True: 0, False: 147k]
  ------------------
  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|   147k|        if (form == POINT_CONVERSION_HYBRID) {
  ------------------
  |  Branch (348:13): [True: 0, False: 147k]
  ------------------
  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|   147k|        if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx))
  ------------------
  |  Branch (359:13): [True: 0, False: 147k]
  ------------------
  360|      0|            goto err;
  361|   147k|    }
  362|       |
  363|   147k|    ret = 1;
  364|       |
  365|   147k|err:
  366|   147k|    BN_CTX_end(ctx);
  367|   147k|    BN_CTX_free(new_ctx);
  368|   147k|    return ret;
  369|   147k|}

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

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

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

OSSL_DECODER_from_bio:
   48|   458k|{
   49|   458k|    struct decoder_process_data_st data;
   50|   458k|    int ok = 0;
   51|   458k|    BIO *new_bio = NULL;
   52|   458k|    unsigned long lasterr;
   53|       |
   54|   458k|    if (in == NULL) {
  ------------------
  |  Branch (54:9): [True: 0, False: 458k]
  ------------------
   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|   458k|    if (OSSL_DECODER_CTX_get_num_decoders(ctx) == 0) {
  ------------------
  |  Branch (59:9): [True: 0, False: 458k]
  ------------------
   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|   458k|    lasterr = ERR_peek_last_error();
   68|       |
   69|   458k|    if (BIO_tell(in) < 0) {
  ------------------
  |  |  583|   458k|#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
  |  |  ------------------
  |  |  |  |  477|   458k|#define BIO_C_FILE_TELL 133
  |  |  ------------------
  ------------------
  |  Branch (69:9): [True: 0, False: 458k]
  ------------------
   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|   458k|    memset(&data, 0, sizeof(data));
   76|   458k|    data.ctx = ctx;
   77|   458k|    data.bio = in;
   78|       |
   79|       |    /* Enable passphrase caching */
   80|   458k|    (void)ossl_pw_enable_passphrase_caching(&ctx->pwdata);
   81|       |
   82|   458k|    ok = decoder_process(NULL, &data);
   83|       |
   84|   458k|    if (!data.flag_construct_called) {
  ------------------
  |  Branch (84:9): [True: 0, False: 458k]
  ------------------
   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|   458k|    (void)ossl_pw_clear_passphrase_cache(&ctx->pwdata);
  113|       |
  114|   458k|    if (new_bio != NULL) {
  ------------------
  |  Branch (114:9): [True: 0, False: 458k]
  ------------------
  115|      0|        BIO_pop(new_bio);
  116|      0|        BIO_free(new_bio);
  117|      0|    }
  118|   458k|    return ok;
  119|   458k|}
OSSL_DECODER_from_data:
  149|   458k|{
  150|   458k|    BIO *membio;
  151|   458k|    int ret = 0;
  152|       |
  153|   458k|    if (pdata == NULL || *pdata == NULL || pdata_len == NULL) {
  ------------------
  |  Branch (153:9): [True: 0, False: 458k]
  |  Branch (153:26): [True: 0, False: 458k]
  |  Branch (153:44): [True: 0, False: 458k]
  ------------------
  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|   458k|    membio = BIO_new_mem_buf(*pdata, (int)*pdata_len);
  159|   458k|    if (OSSL_DECODER_from_bio(ctx, membio)) {
  ------------------
  |  Branch (159:9): [True: 458k, False: 0]
  ------------------
  160|   458k|        *pdata_len = (size_t)BIO_get_mem_data(membio, pdata);
  ------------------
  |  |  625|   458k|#define BIO_get_mem_data(b, pp) BIO_ctrl(b, BIO_CTRL_INFO, 0, (char *)(pp))
  |  |  ------------------
  |  |  |  |   92|   458k|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  |  |  ------------------
  ------------------
  161|   458k|        ret = 1;
  162|   458k|    }
  163|   458k|    BIO_free(membio);
  164|       |
  165|   458k|    return ret;
  166|   458k|}
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|   458k|{
  191|   458k|    if (ctx == NULL) {
  ------------------
  |  Branch (191:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    if (ctx->frozen != 0) {
  ------------------
  |  Branch (196:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    ctx->start_input_type = input_type;
  206|   458k|    return 1;
  207|   458k|}
OSSL_DECODER_CTX_set_input_structure:
  211|   458k|{
  212|   458k|    if (ctx == NULL) {
  ------------------
  |  Branch (212:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    if (ctx->frozen != 0) {
  ------------------
  |  Branch (217:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    ctx->input_structure = input_structure;
  227|   458k|    return 1;
  228|   458k|}
ossl_decoder_instance_new:
  259|     17|{
  260|     17|    OSSL_DECODER_INSTANCE *decoder_inst = NULL;
  261|     17|    const OSSL_PROVIDER *prov;
  262|     17|    OSSL_LIB_CTX *libctx;
  263|     17|    const OSSL_PROPERTY_LIST *props;
  264|     17|    const OSSL_PROPERTY_DEFINITION *prop;
  265|       |
  266|     17|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|     17|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     17|    __FILE__, __LINE__)
  ------------------
  |  Branch (266:9): [True: 0, False: 17]
  ------------------
  267|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  268|      0|        return 0;
  269|      0|    }
  270|       |
  271|     17|    if ((decoder_inst = OPENSSL_zalloc(sizeof(*decoder_inst))) == NULL)
  ------------------
  |  |  109|     17|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (271:9): [True: 0, False: 17]
  ------------------
  272|      0|        return 0;
  273|       |
  274|     17|    prov = OSSL_DECODER_get0_provider(decoder);
  275|     17|    libctx = ossl_provider_libctx(prov);
  276|     17|    props = ossl_decoder_parsed_properties(decoder);
  277|     17|    if (props == NULL) {
  ------------------
  |  Branch (277:9): [True: 0, False: 17]
  ------------------
  278|      0|        ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  104|      0|#define ERR_LIB_OSSL_DECODER 60
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  319|      0|#define ERR_R_INVALID_PROPERTY_DEFINITION (270 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  279|      0|            "there are no property definitions with decoder %s",
  280|      0|            OSSL_DECODER_get0_name(decoder));
  281|      0|        goto err;
  282|      0|    }
  283|       |
  284|       |    /* The "input" property is mandatory */
  285|     17|    prop = ossl_property_find_property(props, libctx, "input");
  286|     17|    decoder_inst->input_type = ossl_property_get_string_value(libctx, prop);
  287|     17|    decoder_inst->input_type_id = 0;
  288|     17|    if (decoder_inst->input_type == NULL) {
  ------------------
  |  Branch (288:9): [True: 0, False: 17]
  ------------------
  289|      0|        ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  104|      0|#define ERR_LIB_OSSL_DECODER 60
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  319|      0|#define ERR_R_INVALID_PROPERTY_DEFINITION (270 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  290|      0|            "the mandatory 'input' property is missing "
  291|      0|            "for decoder %s (properties: %s)",
  292|      0|            OSSL_DECODER_get0_name(decoder),
  293|      0|            OSSL_DECODER_get0_properties(decoder));
  294|      0|        goto err;
  295|      0|    }
  296|       |
  297|       |    /* The "structure" property is optional */
  298|     17|    prop = ossl_property_find_property(props, libctx, "structure");
  299|     17|    if (prop != NULL) {
  ------------------
  |  Branch (299:9): [True: 9, False: 8]
  ------------------
  300|      9|        decoder_inst->input_structure
  301|      9|            = ossl_property_get_string_value(libctx, prop);
  302|      9|    }
  303|       |
  304|     17|    if (!OSSL_DECODER_up_ref(decoder)) {
  ------------------
  |  Branch (304:9): [True: 0, False: 17]
  ------------------
  305|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  306|      0|        goto err;
  307|      0|    }
  308|     17|    decoder_inst->decoder = decoder;
  309|     17|    decoder_inst->decoderctx = decoderctx;
  310|     17|    return decoder_inst;
  311|      0|err:
  312|      0|    ossl_decoder_instance_free(decoder_inst);
  313|       |    return NULL;
  314|     17|}
ossl_decoder_instance_free:
  317|  2.60M|{
  318|  2.60M|    if (decoder_inst != NULL) {
  ------------------
  |  Branch (318:9): [True: 2.60M, False: 0]
  ------------------
  319|  2.60M|        if (decoder_inst->decoder != NULL)
  ------------------
  |  Branch (319:13): [True: 2.60M, False: 0]
  ------------------
  320|  2.60M|            decoder_inst->decoder->freectx(decoder_inst->decoderctx);
  321|  2.60M|        decoder_inst->decoderctx = NULL;
  322|  2.60M|        OSSL_DECODER_free(decoder_inst->decoder);
  323|  2.60M|        decoder_inst->decoder = NULL;
  324|  2.60M|        OPENSSL_free(decoder_inst);
  ------------------
  |  |  132|  2.60M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  325|  2.60M|    }
  326|  2.60M|}
ossl_decoder_instance_dup:
  329|  2.60M|{
  330|  2.60M|    OSSL_DECODER_INSTANCE *dest;
  331|  2.60M|    const OSSL_PROVIDER *prov;
  332|  2.60M|    void *provctx;
  333|       |
  334|  2.60M|    if ((dest = OPENSSL_zalloc(sizeof(*dest))) == NULL)
  ------------------
  |  |  109|  2.60M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (334:9): [True: 0, False: 2.60M]
  ------------------
  335|      0|        return NULL;
  336|       |
  337|  2.60M|    *dest = *src;
  338|  2.60M|    if (!OSSL_DECODER_up_ref(dest->decoder)) {
  ------------------
  |  Branch (338:9): [True: 0, False: 2.60M]
  ------------------
  339|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  340|      0|        goto err;
  341|      0|    }
  342|  2.60M|    prov = OSSL_DECODER_get0_provider(dest->decoder);
  343|  2.60M|    provctx = OSSL_PROVIDER_get0_provider_ctx(prov);
  344|       |
  345|  2.60M|    dest->decoderctx = dest->decoder->newctx(provctx);
  346|  2.60M|    if (dest->decoderctx == NULL) {
  ------------------
  |  Branch (346:9): [True: 0, False: 2.60M]
  ------------------
  347|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  348|      0|        OSSL_DECODER_free(dest->decoder);
  349|      0|        goto err;
  350|      0|    }
  351|       |
  352|  2.60M|    return dest;
  353|       |
  354|      0|err:
  355|      0|    OPENSSL_free(dest);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  356|       |    return NULL;
  357|  2.60M|}
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|   916k|{
  709|   916k|    if (ctx == NULL || ctx->decoder_insts == NULL)
  ------------------
  |  Branch (709:9): [True: 0, False: 916k]
  |  Branch (709:24): [True: 0, False: 916k]
  ------------------
  710|      0|        return 0;
  711|   916k|    return sk_OSSL_DECODER_INSTANCE_num(ctx->decoder_insts);
  712|   916k|}
OSSL_DECODER_CTX_set_construct:
  716|   458k|{
  717|   458k|    if (ctx == NULL) {
  ------------------
  |  Branch (717:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    if (ctx->frozen != 0) {
  ------------------
  |  Branch (722:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    ctx->construct = construct;
  728|   458k|    return 1;
  729|   458k|}
OSSL_DECODER_CTX_set_construct_data:
  733|   458k|{
  734|   458k|    if (ctx == NULL) {
  ------------------
  |  Branch (734:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    if (ctx->frozen != 0) {
  ------------------
  |  Branch (739:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    ctx->construct_data = construct_data;
  745|   458k|    return 1;
  746|   458k|}
OSSL_DECODER_CTX_set_cleanup:
  750|   458k|{
  751|   458k|    if (ctx == NULL) {
  ------------------
  |  Branch (751:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    if (ctx->frozen != 0) {
  ------------------
  |  Branch (756:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    ctx->cleanup = cleanup;
  762|   458k|    return 1;
  763|   458k|}
OSSL_DECODER_CTX_get_construct:
  767|   458k|{
  768|   458k|    if (ctx == NULL)
  ------------------
  |  Branch (768:9): [True: 0, False: 458k]
  ------------------
  769|      0|        return NULL;
  770|   458k|    return ctx->construct;
  771|   458k|}
OSSL_DECODER_CTX_get_construct_data:
  774|   458k|{
  775|   458k|    if (ctx == NULL)
  ------------------
  |  Branch (775:9): [True: 0, False: 458k]
  ------------------
  776|      0|        return NULL;
  777|   458k|    return ctx->construct_data;
  778|   458k|}
OSSL_DECODER_CTX_get_cleanup:
  782|   458k|{
  783|   458k|    if (ctx == NULL)
  ------------------
  |  Branch (783:9): [True: 0, False: 458k]
  ------------------
  784|      0|        return NULL;
  785|   458k|    return ctx->cleanup;
  786|   458k|}
OSSL_DECODER_INSTANCE_get_decoder:
  809|  4.43M|{
  810|  4.43M|    if (decoder_inst == NULL)
  ------------------
  |  Branch (810:9): [True: 0, False: 4.43M]
  ------------------
  811|      0|        return NULL;
  812|  4.43M|    return decoder_inst->decoder;
  813|  4.43M|}
OSSL_DECODER_INSTANCE_get_decoder_ctx:
  817|  3.51M|{
  818|  3.51M|    if (decoder_inst == NULL)
  ------------------
  |  Branch (818:9): [True: 0, False: 3.51M]
  ------------------
  819|      0|        return NULL;
  820|  3.51M|    return decoder_inst->decoderctx;
  821|  3.51M|}
OSSL_DECODER_INSTANCE_get_input_type:
  825|  2.60M|{
  826|  2.60M|    if (decoder_inst == NULL)
  ------------------
  |  Branch (826:9): [True: 0, False: 2.60M]
  ------------------
  827|      0|        return NULL;
  828|  2.60M|    return decoder_inst->input_type;
  829|  2.60M|}
OSSL_DECODER_INSTANCE_get_input_structure:
  834|  2.60M|{
  835|  2.60M|    if (decoder_inst == NULL)
  ------------------
  |  Branch (835:9): [True: 0, False: 2.60M]
  ------------------
  836|      0|        return NULL;
  837|  2.60M|    *was_set = decoder_inst->flag_input_structure_was_set;
  838|  2.60M|    return decoder_inst->input_structure;
  839|  2.60M|}
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.37M|{
  843|  1.37M|    struct decoder_process_data_st *data = arg;
  844|  1.37M|    OSSL_DECODER_CTX *ctx = data->ctx;
  845|  1.37M|    OSSL_DECODER_INSTANCE *decoder_inst = NULL;
  846|  1.37M|    OSSL_DECODER *decoder = NULL;
  847|  1.37M|    OSSL_CORE_BIO *cbio = NULL;
  848|  1.37M|    BIO *bio = data->bio;
  849|  1.37M|    long loc;
  850|  1.37M|    int i;
  851|  1.37M|    int ok = 0;
  852|       |    /* For recursions */
  853|  1.37M|    struct decoder_process_data_st new_data;
  854|  1.37M|    const char *data_type = NULL;
  855|  1.37M|    const char *data_structure = NULL;
  856|       |    /* Saved to restore on return, mutated in PEM->DER transition. */
  857|  1.37M|    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.37M|    data->flag_next_level_called = 1;
  864|       |
  865|  1.37M|    memset(&new_data, 0, sizeof(new_data));
  866|  1.37M|    new_data.ctx = data->ctx;
  867|  1.37M|    new_data.recursion = data->recursion + 1;
  868|       |
  869|  1.37M|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  870|  1.37M|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  871|  1.37M|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  872|  1.37M|        : LEVEL_STR "...")
  873|       |
  874|  1.37M|    if (params == NULL) {
  ------------------
  |  Branch (874:9): [True: 458k, False: 916k]
  ------------------
  875|       |        /* First iteration, where we prepare for what is to come */
  876|       |
  877|   458k|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   458k|    do {                           \
  |  |  220|   458k|        BIO *trc_out = NULL;       \
  |  |  221|   458k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 458k]
  |  |  ------------------
  ------------------
  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|   458k|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   458k|    }                            \
  |  |  225|   458k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 458k]
  |  |  ------------------
  ------------------
  884|       |
  885|   458k|        data->current_decoder_inst_index = OSSL_DECODER_CTX_get_num_decoders(ctx);
  886|       |
  887|   458k|        bio = data->bio;
  888|   916k|    } else {
  889|   916k|        const OSSL_PARAM *p;
  890|   916k|        const char *trace_data_structure;
  891|       |
  892|   916k|        decoder_inst = sk_OSSL_DECODER_INSTANCE_value(ctx->decoder_insts,
  893|   916k|            data->current_decoder_inst_index);
  894|   916k|        decoder = OSSL_DECODER_INSTANCE_get_decoder(decoder_inst);
  895|       |
  896|   916k|        data->flag_construct_called = 0;
  897|   916k|        if (ctx->construct != NULL) {
  ------------------
  |  Branch (897:13): [True: 916k, False: 0]
  ------------------
  898|   916k|            int rv;
  899|       |
  900|   916k|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   916k|    do {                           \
  |  |  220|   916k|        BIO *trc_out = NULL;       \
  |  |  221|   916k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 916k]
  |  |  ------------------
  ------------------
  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|   916k|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   916k|    }                            \
  |  |  225|   916k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 916k]
  |  |  ------------------
  ------------------
  907|       |
  908|   916k|            rv = ctx->construct(decoder_inst, params, ctx->construct_data);
  909|       |
  910|   916k|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   916k|    do {                           \
  |  |  220|   916k|        BIO *trc_out = NULL;       \
  |  |  221|   916k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 916k]
  |  |  ------------------
  ------------------
  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|   916k|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   916k|    }                            \
  |  |  225|   916k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 916k]
  |  |  ------------------
  ------------------
  917|       |
  918|   916k|            ok = (rv > 0);
  919|   916k|            if (ok) {
  ------------------
  |  Branch (919:17): [True: 458k, False: 458k]
  ------------------
  920|   458k|                data->flag_construct_called = 1;
  921|   458k|                goto end;
  922|   458k|            }
  923|   916k|        }
  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|   458k|        p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA);
  ------------------
  |  |  364|   458k|# define OSSL_OBJECT_PARAM_DATA "data"
  ------------------
  935|   458k|        if (p == NULL || p->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|   458k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (935:13): [True: 0, False: 458k]
  |  Branch (935:26): [True: 0, False: 458k]
  ------------------
  936|      0|            goto end;
  937|   458k|        new_data.bio = BIO_new_mem_buf(p->data, (int)p->data_size);
  938|   458k|        if (new_data.bio == NULL)
  ------------------
  |  Branch (938:13): [True: 0, False: 458k]
  ------------------
  939|      0|            goto end;
  940|   458k|        bio = new_data.bio;
  941|       |
  942|       |        /* Get the data type if there is one */
  943|   458k|        p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA_TYPE);
  ------------------
  |  |  366|   458k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  944|   458k|        if (p != NULL && !OSSL_PARAM_get_utf8_string_ptr(p, &data_type))
  ------------------
  |  Branch (944:13): [True: 458k, False: 0]
  |  Branch (944:26): [True: 0, False: 458k]
  ------------------
  945|      0|            goto end;
  946|       |
  947|       |        /* Get the data structure if there is one */
  948|   458k|        p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA_STRUCTURE);
  ------------------
  |  |  365|   458k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  949|   458k|        if (p != NULL && !OSSL_PARAM_get_utf8_string_ptr(p, &data_structure))
  ------------------
  |  Branch (949:13): [True: 458k, False: 0]
  |  Branch (949:26): [True: 0, False: 458k]
  ------------------
  950|      0|            goto end;
  951|       |
  952|       |        /* Get the new input type if there is one */
  953|   458k|        p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_INPUT_TYPE);
  ------------------
  |  |  368|   458k|# define OSSL_OBJECT_PARAM_INPUT_TYPE "input-type"
  ------------------
  954|   458k|        if (p != NULL) {
  ------------------
  |  Branch (954:13): [True: 458k, False: 0]
  ------------------
  955|   458k|            if (!OSSL_PARAM_get_utf8_string_ptr(p, &ctx->start_input_type))
  ------------------
  |  Branch (955:17): [True: 0, False: 458k]
  ------------------
  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|   458k|            if (ctx->input_structure != NULL
  ------------------
  |  Branch (962:17): [True: 458k, False: 0]
  ------------------
  963|   458k|                && (OPENSSL_strcasecmp(ctx->input_structure, "SubjectPublicKeyInfo") == 0
  ------------------
  |  Branch (963:21): [True: 458k, 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|   458k|                data->flag_input_structure_checked = 1;
  967|   458k|        }
  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|   458k|        trace_data_structure = data_structure;
  982|   458k|        if (data_type != NULL && data_structure != NULL
  ------------------
  |  Branch (982:13): [True: 458k, False: 0]
  |  Branch (982:34): [True: 458k, False: 0]
  ------------------
  983|   458k|            && OPENSSL_strcasecmp(data_structure, "type-specific") == 0)
  ------------------
  |  Branch (983:16): [True: 0, False: 458k]
  ------------------
  984|      0|            data_structure = NULL;
  985|       |
  986|   458k|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   458k|    do {                           \
  |  |  220|   458k|        BIO *trc_out = NULL;       \
  |  |  221|   458k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 458k]
  |  |  ------------------
  ------------------
  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|   458k|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   458k|    }                            \
  |  |  225|   458k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 458k]
  |  |  ------------------
  ------------------
  999|   458k|    }
 1000|       |
 1001|       |    /*
 1002|       |     * If we have no more decoders to look through at this point,
 1003|       |     * we failed
 1004|       |     */
 1005|   916k|    if (data->current_decoder_inst_index == 0)
  ------------------
  |  Branch (1005:9): [True: 0, False: 916k]
  ------------------
 1006|      0|        goto end;
 1007|       |
 1008|   916k|    if ((loc = BIO_tell(bio)) < 0) {
  ------------------
  |  |  583|   916k|#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
  |  |  ------------------
  |  |  |  |  477|   916k|#define BIO_C_FILE_TELL 133
  |  |  ------------------
  ------------------
  |  Branch (1008:9): [True: 0, False: 916k]
  ------------------
 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|   916k|    if ((cbio = ossl_core_bio_new_from_bio(bio)) == NULL) {
  ------------------
  |  Branch (1013:9): [True: 0, False: 916k]
  ------------------
 1014|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_BIO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1015|      0|        goto end;
 1016|      0|    }
 1017|       |
 1018|  2.60M|    for (i = data->current_decoder_inst_index; i-- > 0;) {
  ------------------
  |  Branch (1018:48): [True: 2.60M, False: 0]
  ------------------
 1019|  2.60M|        OSSL_DECODER_INSTANCE *new_decoder_inst = sk_OSSL_DECODER_INSTANCE_value(ctx->decoder_insts, i);
 1020|  2.60M|        OSSL_DECODER *new_decoder = OSSL_DECODER_INSTANCE_get_decoder(new_decoder_inst);
 1021|  2.60M|        const char *new_decoder_name = NULL;
 1022|  2.60M|        void *new_decoderctx = OSSL_DECODER_INSTANCE_get_decoder_ctx(new_decoder_inst);
 1023|  2.60M|        const char *new_input_type = OSSL_DECODER_INSTANCE_get_input_type(new_decoder_inst);
 1024|  2.60M|        int n_i_s_was_set = 0; /* We don't care here */
 1025|  2.60M|        const char *new_input_structure = OSSL_DECODER_INSTANCE_get_input_structure(new_decoder_inst,
 1026|  2.60M|            &n_i_s_was_set);
 1027|       |
 1028|  2.60M|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|  2.60M|    do {                           \
  |  |  220|  2.60M|        BIO *trc_out = NULL;       \
  |  |  221|  2.60M|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 2.60M]
  |  |  ------------------
  ------------------
 1029|      0|        {
 1030|      0|            new_decoder_name = OSSL_DECODER_get0_name(new_decoder);
 1031|      0|            BIO_printf(trc_out,
 1032|      0|                "(ctx %p) %s [%u] Considering decoder instance %p (decoder %p %s):\n"
 1033|      0|                "    %s with %s\n",
 1034|      0|                (void *)new_data.ctx, LEVEL, (unsigned int)i,
  ------------------
  |  |  870|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (870:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  871|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  872|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1035|      0|                (void *)new_decoder_inst, (void *)new_decoder,
 1036|      0|                OSSL_DECODER_get0_description(new_decoder),
 1037|      0|                new_decoder_name,
 1038|      0|                OSSL_DECODER_get0_properties(new_decoder));
 1039|      0|        }
 1040|  2.60M|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|  2.60M|    }                            \
  |  |  225|  2.60M|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 2.60M]
  |  |  ------------------
  ------------------
 1041|       |
 1042|       |        /*
 1043|       |         * If |decoder| is NULL, it means we've just started, and the caller
 1044|       |         * may have specified what it expects the initial input to be.  If
 1045|       |         * that's the case, we do this extra check.
 1046|       |         */
 1047|  2.60M|        if (decoder == NULL && ctx->start_input_type != NULL
  ------------------
  |  Branch (1047:13): [True: 1.37M, False: 1.22M]
  |  Branch (1047:32): [True: 1.37M, False: 0]
  ------------------
 1048|  1.37M|            && OPENSSL_strcasecmp(ctx->start_input_type, new_input_type) != 0) {
  ------------------
  |  Branch (1048:16): [True: 458k, False: 916k]
  ------------------
 1049|   458k|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   458k|    do {                           \
  |  |  220|   458k|        BIO *trc_out = NULL;       \
  |  |  221|   458k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 458k]
  |  |  ------------------
  ------------------
 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|   458k|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   458k|    }                            \
  |  |  225|   458k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 458k]
  |  |  ------------------
  ------------------
 1057|   458k|            continue;
 1058|   458k|        }
 1059|       |
 1060|       |        /*
 1061|       |         * If we have a previous decoder, we check that the input type
 1062|       |         * of the next to be used matches the type of this previous one.
 1063|       |         * |new_input_type| holds the value of the "input-type" parameter
 1064|       |         * for the decoder we're currently considering.
 1065|       |         */
 1066|  2.14M|        if (decoder != NULL && !ossl_decoder_fast_is_a(decoder, new_input_type, &new_decoder_inst->input_type_id)) {
  ------------------
  |  Branch (1066:13): [True: 1.22M, False: 916k]
  |  Branch (1066:32): [True: 0, False: 1.22M]
  ------------------
 1067|      0|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1068|      0|            {
 1069|      0|                BIO_printf(trc_out,
 1070|      0|                    "(ctx %p) %s [%u] the input type doesn't match the name of the previous decoder (%p %s), skipping...\n",
 1071|      0|                    (void *)new_data.ctx, LEVEL, (unsigned int)i,
  ------------------
  |  |  870|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (870:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  871|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  872|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  869|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1072|      0|                    (void *)decoder,
 1073|      0|                    OSSL_DECODER_get0_description(decoder));
 1074|      0|            }
 1075|      0|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1076|      0|            continue;
 1077|      0|        }
 1078|       |
 1079|       |        /*
 1080|       |         * If the previous decoder gave us a data type, we check to see
 1081|       |         * if that matches the decoder we're currently considering.
 1082|       |         */
 1083|  2.14M|        if (data_type != NULL && !OSSL_DECODER_is_a(new_decoder, data_type)) {
  ------------------
  |  Branch (1083:13): [True: 1.22M, False: 916k]
  |  Branch (1083:34): [True: 147k, False: 1.07M]
  ------------------
 1084|   147k|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   147k|    do {                           \
  |  |  220|   147k|        BIO *trc_out = NULL;       \
  |  |  221|   147k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 147k]
  |  |  ------------------
  ------------------
 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|   147k|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   147k|    }                            \
  |  |  225|   147k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 147k]
  |  |  ------------------
  ------------------
 1091|   147k|            continue;
 1092|   147k|        }
 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.99M|        if (data_structure != NULL
  ------------------
  |  Branch (1099:13): [True: 1.07M, False: 916k]
  ------------------
 1100|  1.07M|            && (new_input_structure == NULL
  ------------------
  |  Branch (1100:17): [True: 0, False: 1.07M]
  ------------------
 1101|  1.07M|                || OPENSSL_strcasecmp(data_structure,
  ------------------
  |  Branch (1101:20): [True: 621k, False: 458k]
  ------------------
 1102|  1.07M|                       new_input_structure)
 1103|  1.07M|                    != 0)) {
 1104|   621k|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   621k|    do {                           \
  |  |  220|   621k|        BIO *trc_out = NULL;       \
  |  |  221|   621k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 621k]
  |  |  ------------------
  ------------------
 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|   621k|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   621k|    }                            \
  |  |  225|   621k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 621k]
  |  |  ------------------
  ------------------
 1111|   621k|            continue;
 1112|   621k|        }
 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.37M|        if (!data->flag_input_structure_checked
  ------------------
  |  Branch (1120:13): [True: 458k, False: 916k]
  ------------------
 1121|   458k|            && ctx->input_structure != NULL
  ------------------
  |  Branch (1121:16): [True: 458k, False: 0]
  ------------------
 1122|   458k|            && new_input_structure != NULL) {
  ------------------
  |  Branch (1122:16): [True: 458k, False: 0]
  ------------------
 1123|   458k|            data->flag_input_structure_checked = 1;
 1124|   458k|            if (OPENSSL_strcasecmp(new_input_structure,
  ------------------
  |  Branch (1124:17): [True: 458k, False: 0]
  ------------------
 1125|   458k|                    ctx->input_structure)
 1126|   458k|                != 0) {
 1127|   458k|                OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   458k|    do {                           \
  |  |  220|   458k|        BIO *trc_out = NULL;       \
  |  |  221|   458k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 458k]
  |  |  ------------------
  ------------------
 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|   458k|                OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   458k|    }                            \
  |  |  225|   458k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 458k]
  |  |  ------------------
  ------------------
 1134|   458k|                continue;
 1135|   458k|            }
 1136|   458k|        }
 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|   916k|        (void)BIO_seek(bio, loc);
  ------------------
  |  |  582|   916k|#define BIO_seek(b, ofs) (int)BIO_ctrl(b, BIO_C_FILE_SEEK, ofs, NULL)
  |  |  ------------------
  |  |  |  |  471|   916k|#define BIO_C_FILE_SEEK 128
  |  |  ------------------
  ------------------
 1149|   916k|        if (BIO_tell(bio) != loc)
  ------------------
  |  |  583|   916k|#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
  |  |  ------------------
  |  |  |  |  477|   916k|#define BIO_C_FILE_TELL 133
  |  |  ------------------
  ------------------
  |  Branch (1149:13): [True: 0, False: 916k]
  ------------------
 1150|      0|            goto end;
 1151|       |
 1152|       |        /* Recurse */
 1153|   916k|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   916k|    do {                           \
  |  |  220|   916k|        BIO *trc_out = NULL;       \
  |  |  221|   916k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 916k]
  |  |  ------------------
  ------------------
 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|   916k|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   916k|    }                            \
  |  |  225|   916k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 916k]
  |  |  ------------------
  ------------------
 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|   916k|        ERR_set_mark();
 1167|       |
 1168|   916k|        new_data.current_decoder_inst_index = i;
 1169|   916k|        new_data.flag_input_structure_checked
 1170|   916k|            = data->flag_input_structure_checked;
 1171|   916k|        ok = new_decoder->decode(new_decoderctx, cbio,
 1172|   916k|            new_data.ctx->selection,
 1173|   916k|            decoder_process, &new_data,
 1174|   916k|            ossl_pw_passphrase_callback_dec,
 1175|   916k|            &new_data.ctx->pwdata);
 1176|       |
 1177|   916k|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|   916k|    do {                           \
  |  |  220|   916k|        BIO *trc_out = NULL;       \
  |  |  221|   916k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 916k]
  |  |  ------------------
  ------------------
 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|   916k|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|   916k|    }                            \
  |  |  225|   916k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 916k]
  |  |  ------------------
  ------------------
 1188|       |
 1189|   916k|        data->flag_construct_called = new_data.flag_construct_called;
 1190|       |
 1191|       |        /* Break on error or if we tried to construct an object already */
 1192|   916k|        if (!ok || data->flag_construct_called) {
  ------------------
  |  Branch (1192:13): [True: 0, False: 916k]
  |  Branch (1192:20): [True: 916k, False: 0]
  ------------------
 1193|   916k|            ERR_clear_last_mark();
 1194|   916k|            break;
 1195|   916k|        }
 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.37M|end:
 1207|  1.37M|    ossl_core_bio_free(cbio);
 1208|  1.37M|    BIO_free(new_data.bio);
 1209|  1.37M|    ctx->start_input_type = start_input_type;
 1210|  1.37M|    return ok;
 1211|   916k|}

OSSL_DECODER_up_ref:
   53|  2.60M|{
   54|  2.60M|    int ref = 0;
   55|       |
   56|  2.60M|    CRYPTO_UP_REF(&decoder->base.refcnt, &ref);
   57|  2.60M|    return 1;
   58|  2.60M|}
OSSL_DECODER_free:
   61|  2.60M|{
   62|  2.60M|    int ref = 0;
   63|       |
   64|  2.60M|    if (decoder == NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 2.60M]
  ------------------
   65|      0|        return;
   66|       |
   67|  2.60M|    CRYPTO_DOWN_REF(&decoder->base.refcnt, &ref);
   68|  2.60M|    if (ref > 0)
  ------------------
  |  Branch (68:9): [True: 2.60M, False: 0]
  ------------------
   69|  2.60M|        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|    843|{
  439|    843|    OSSL_METHOD_STORE *store = get_decoder_store(libctx);
  440|       |
  441|    843|    if (store != NULL)
  ------------------
  |  Branch (441:9): [True: 843, False: 0]
  ------------------
  442|    843|        return ossl_method_store_cache_flush_all(store);
  443|      0|    return 1;
  444|    843|}
ossl_decoder_store_remove_all_provided:
  447|    843|{
  448|    843|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  449|    843|    OSSL_METHOD_STORE *store = get_decoder_store(libctx);
  450|       |
  451|    843|    if (store != NULL)
  ------------------
  |  Branch (451:9): [True: 843, False: 0]
  ------------------
  452|    843|        return ossl_method_store_remove_all_provided(store, prov);
  453|      0|    return 1;
  454|    843|}
OSSL_DECODER_get0_provider:
  461|  3.52M|{
  462|  3.52M|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|  3.52M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.52M|    __FILE__, __LINE__)
  ------------------
  |  Branch (462:9): [True: 0, False: 3.52M]
  ------------------
  463|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  464|      0|        return 0;
  465|      0|    }
  466|       |
  467|  3.52M|    return decoder->base.prov;
  468|  3.52M|}
ossl_decoder_parsed_properties:
  482|     22|{
  483|     22|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|     22|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     22|    __FILE__, __LINE__)
  ------------------
  |  Branch (483:9): [True: 0, False: 22]
  ------------------
  484|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  485|      0|        return 0;
  486|      0|    }
  487|       |
  488|     22|    return decoder->base.parsed_propdef;
  489|     22|}
ossl_decoder_get_number:
  492|  1.22M|{
  493|  1.22M|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|  1.22M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.22M|    __FILE__, __LINE__)
  ------------------
  |  Branch (493:9): [True: 0, False: 1.22M]
  ------------------
  494|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  495|      0|        return 0;
  496|      0|    }
  497|       |
  498|  1.22M|    return decoder->base.id;
  499|  1.22M|}
OSSL_DECODER_is_a:
  512|  1.22M|{
  513|  1.22M|    if (decoder->base.prov != NULL) {
  ------------------
  |  Branch (513:9): [True: 1.22M, False: 0]
  ------------------
  514|  1.22M|        OSSL_LIB_CTX *libctx = ossl_provider_libctx(decoder->base.prov);
  515|  1.22M|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  516|       |
  517|  1.22M|        return ossl_namemap_name2num(namemap, name) == decoder->base.id;
  518|  1.22M|    }
  519|      0|    return 0;
  520|  1.22M|}
ossl_decoder_fast_is_a:
  531|  1.22M|{
  532|  1.22M|    int id = *id_cache;
  533|       |
  534|  1.22M|    if (id <= 0)
  ------------------
  |  Branch (534:9): [True: 1.22M, False: 1.35k]
  ------------------
  535|  1.22M|        *id_cache = id = resolve_name(decoder, name);
  536|       |
  537|  1.22M|    return id > 0 && ossl_decoder_get_number(decoder) == id;
  ------------------
  |  Branch (537:12): [True: 1.22M, False: 311]
  |  Branch (537:22): [True: 1.22M, False: 1.31k]
  ------------------
  538|  1.22M|}
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|   458k|{
  630|   458k|    OSSL_DECODER_CTX *ctx;
  631|       |
  632|   458k|    ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|   458k|    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|   458k|    return ctx;
  634|   458k|}
OSSL_DECODER_CTX_free:
  666|   916k|{
  667|   916k|    if (ctx != NULL) {
  ------------------
  |  Branch (667:9): [True: 458k, False: 458k]
  ------------------
  668|   458k|        if (ctx->cleanup != NULL)
  ------------------
  |  Branch (668:13): [True: 458k, False: 0]
  ------------------
  669|   458k|            ctx->cleanup(ctx->construct_data);
  670|   458k|        sk_OSSL_DECODER_INSTANCE_pop_free(ctx->decoder_insts,
  671|   458k|            ossl_decoder_instance_free);
  672|   458k|        ossl_pw_clear_passphrase_data(&ctx->pwdata);
  673|   458k|        OPENSSL_free(ctx);
  ------------------
  |  |  132|   458k|    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|   458k|    }
  675|   916k|}
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.77k|{
  113|  1.77k|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_STORE_INDEX);
  ------------------
  |  |  108|  1.77k|#define OSSL_LIB_CTX_DECODER_STORE_INDEX 11
  ------------------
  114|  1.77k|}
decoder_meth.c:resolve_name:
  523|  1.22M|{
  524|  1.22M|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(decoder->base.prov);
  525|  1.22M|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  526|       |
  527|  1.22M|    return ossl_namemap_name2num(namemap, name);
  528|  1.22M|}
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|    769|{
  775|    769|    DECODER_CACHE *cache = OPENSSL_malloc(sizeof(*cache));
  ------------------
  |  |  107|    769|    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|    769|    if (cache == NULL)
  ------------------
  |  Branch (777:9): [True: 0, False: 769]
  ------------------
  778|      0|        return NULL;
  779|       |
  780|    769|    cache->lock = CRYPTO_THREAD_lock_new();
  781|    769|    if (cache->lock == NULL) {
  ------------------
  |  Branch (781:9): [True: 0, False: 769]
  ------------------
  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|    769|    cache->hashtable = lh_DECODER_CACHE_ENTRY_new(decoder_cache_entry_hash,
  786|    769|        decoder_cache_entry_cmp);
  787|    769|    if (cache->hashtable == NULL) {
  ------------------
  |  Branch (787:9): [True: 0, False: 769]
  ------------------
  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|    769|    return cache;
  794|    769|}
ossl_decoder_cache_free:
  797|    768|{
  798|    768|    DECODER_CACHE *cache = (DECODER_CACHE *)vcache;
  799|       |
  800|    768|    lh_DECODER_CACHE_ENTRY_doall(cache->hashtable, decoder_cache_entry_free);
  801|    768|    lh_DECODER_CACHE_ENTRY_free(cache->hashtable);
  802|    768|    CRYPTO_THREAD_lock_free(cache->lock);
  803|    768|    OPENSSL_free(cache);
  ------------------
  |  |  132|    768|    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|    768|}
ossl_decoder_cache_flush:
  811|  2.45k|{
  812|  2.45k|    DECODER_CACHE *cache
  813|  2.45k|        = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_CACHE_INDEX);
  ------------------
  |  |  117|  2.45k|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  814|       |
  815|  2.45k|    if (cache == NULL)
  ------------------
  |  Branch (815:9): [True: 768, False: 1.68k]
  ------------------
  816|    768|        return 0;
  817|       |
  818|  1.68k|    if (!CRYPTO_THREAD_write_lock(cache->lock)) {
  ------------------
  |  Branch (818:9): [True: 0, False: 1.68k]
  ------------------
  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.68k|    lh_DECODER_CACHE_ENTRY_doall(cache->hashtable, decoder_cache_entry_free);
  824|  1.68k|    lh_DECODER_CACHE_ENTRY_flush(cache->hashtable);
  825|       |
  826|  1.68k|    CRYPTO_THREAD_unlock(cache->lock);
  827|  1.68k|    return 1;
  828|  1.68k|}
OSSL_DECODER_CTX_new_for_pkey:
  836|   458k|{
  837|   458k|    OSSL_DECODER_CTX *ctx = NULL;
  838|   458k|    OSSL_PARAM decoder_params[] = {
  839|   458k|        OSSL_PARAM_END,
  ------------------
  |  |   25|   458k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  840|   458k|        OSSL_PARAM_END,
  ------------------
  |  |   25|   458k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  841|   458k|        OSSL_PARAM_END
  ------------------
  |  |   25|   458k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  842|   458k|    };
  843|   458k|    DECODER_CACHE *cache
  844|   458k|        = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_CACHE_INDEX);
  ------------------
  |  |  117|   458k|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  845|   458k|    DECODER_CACHE_ENTRY cacheent, *res, *newcache = NULL;
  846|   458k|    int i = 0;
  847|       |
  848|   458k|    if (cache == NULL) {
  ------------------
  |  Branch (848:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    if (input_structure != NULL)
  ------------------
  |  Branch (852:9): [True: 458k, False: 0]
  ------------------
  853|   458k|        decoder_params[i++] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  365|   458k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  854|   458k|            (char *)input_structure, 0);
  855|   458k|    if (propquery != NULL)
  ------------------
  |  Branch (855:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    cacheent.input_type = (char *)input_type;
  861|   458k|    cacheent.input_structure = (char *)input_structure;
  862|   458k|    cacheent.keytype = (char *)keytype;
  863|   458k|    cacheent.selection = selection;
  864|   458k|    cacheent.propquery = (char *)propquery;
  865|       |
  866|   458k|    if (!CRYPTO_THREAD_read_lock(cache->lock)) {
  ------------------
  |  Branch (866:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    res = lh_DECODER_CACHE_ENTRY_retrieve(cache->hashtable, &cacheent);
  873|       |
  874|   458k|    if (res == NULL) {
  ------------------
  |  Branch (874:9): [True: 2, False: 458k]
  ------------------
  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|   458k|    } else {
  969|   458k|        ctx = res->template;
  970|   458k|    }
  971|       |
  972|   458k|    ctx = ossl_decoder_ctx_for_pkey_dup(ctx, pkey, input_type, input_structure);
  973|   458k|    CRYPTO_THREAD_unlock(cache->lock);
  974|       |
  975|   458k|    return ctx;
  976|      0|err:
  977|      0|    decoder_cache_entry_free(newcache);
  978|      0|    OSSL_DECODER_CTX_free(ctx);
  979|       |    return NULL;
  980|   458k|}
decoder_pkey.c:decoder_cache_entry_hash:
  704|   458k|{
  705|   458k|    unsigned long hash = 17;
  706|       |
  707|   458k|    hash = (hash * 23)
  708|   458k|        + (cache->propquery == NULL
  ------------------
  |  Branch (708:12): [True: 458k, False: 0]
  ------------------
  709|   458k|                ? 0
  710|   458k|                : ossl_lh_strcasehash(cache->propquery));
  711|   458k|    hash = (hash * 23)
  712|   458k|        + (cache->input_structure == NULL
  ------------------
  |  Branch (712:12): [True: 0, False: 458k]
  ------------------
  713|   458k|                ? 0
  714|   458k|                : ossl_lh_strcasehash(cache->input_structure));
  715|   458k|    hash = (hash * 23)
  716|   458k|        + (cache->input_type == NULL
  ------------------
  |  Branch (716:12): [True: 0, False: 458k]
  ------------------
  717|   458k|                ? 0
  718|   458k|                : ossl_lh_strcasehash(cache->input_type));
  719|   458k|    hash = (hash * 23)
  720|   458k|        + (cache->keytype == NULL
  ------------------
  |  Branch (720:12): [True: 0, False: 458k]
  ------------------
  721|   458k|                ? 0
  722|   458k|                : ossl_lh_strcasehash(cache->keytype));
  723|       |
  724|   458k|    hash ^= cache->selection;
  725|       |
  726|   458k|    return hash;
  727|   458k|}
decoder_pkey.c:decoder_cache_entry_cmp:
  750|   458k|{
  751|   458k|    int cmp;
  752|       |
  753|   458k|    if (a->selection != b->selection)
  ------------------
  |  Branch (753:9): [True: 0, False: 458k]
  ------------------
  754|      0|        return (a->selection < b->selection) ? -1 : 1;
  ------------------
  |  Branch (754:16): [True: 0, False: 0]
  ------------------
  755|       |
  756|   458k|    cmp = nullstrcmp(a->keytype, b->keytype, 1);
  757|   458k|    if (cmp != 0)
  ------------------
  |  Branch (757:9): [True: 0, False: 458k]
  ------------------
  758|      0|        return cmp;
  759|       |
  760|   458k|    cmp = nullstrcmp(a->input_type, b->input_type, 1);
  761|   458k|    if (cmp != 0)
  ------------------
  |  Branch (761:9): [True: 0, False: 458k]
  ------------------
  762|      0|        return cmp;
  763|       |
  764|   458k|    cmp = nullstrcmp(a->input_structure, b->input_structure, 1);
  765|   458k|    if (cmp != 0)
  ------------------
  |  Branch (765:9): [True: 0, False: 458k]
  ------------------
  766|      0|        return cmp;
  767|       |
  768|   458k|    cmp = nullstrcmp(a->propquery, b->propquery, 0);
  769|       |
  770|   458k|    return cmp;
  771|   458k|}
decoder_pkey.c:nullstrcmp:
  730|  1.83M|{
  731|  1.83M|    if (a == NULL || b == NULL) {
  ------------------
  |  Branch (731:9): [True: 458k, False: 1.37M]
  |  Branch (731:22): [True: 0, False: 1.37M]
  ------------------
  732|   458k|        if (a == NULL) {
  ------------------
  |  Branch (732:13): [True: 458k, False: 0]
  ------------------
  733|   458k|            if (b == NULL)
  ------------------
  |  Branch (733:17): [True: 458k, False: 0]
  ------------------
  734|   458k|                return 0;
  735|      0|            else
  736|      0|                return 1;
  737|   458k|        } else {
  738|      0|            return -1;
  739|      0|        }
  740|  1.37M|    } else {
  741|  1.37M|        if (casecmp)
  ------------------
  |  Branch (741:13): [True: 1.37M, False: 0]
  ------------------
  742|  1.37M|            return OPENSSL_strcasecmp(a, b);
  743|      0|        else
  744|      0|            return strcmp(a, b);
  745|  1.37M|    }
  746|  1.83M|}
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|   916k|{
   75|   916k|    struct decoder_pkey_data_st *data = construct_data;
   76|   916k|    OSSL_DECODER *decoder = OSSL_DECODER_INSTANCE_get_decoder(decoder_inst);
   77|   916k|    void *decoderctx = OSSL_DECODER_INSTANCE_get_decoder_ctx(decoder_inst);
   78|   916k|    const OSSL_PROVIDER *decoder_prov = OSSL_DECODER_get0_provider(decoder);
   79|   916k|    EVP_KEYMGMT *keymgmt = NULL;
   80|   916k|    const OSSL_PROVIDER *keymgmt_prov = NULL;
   81|   916k|    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|   916k|    void *object_ref = NULL;
   91|   916k|    size_t object_ref_sz = 0;
   92|   916k|    const OSSL_PARAM *p;
   93|       |
   94|   916k|    p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA_TYPE);
  ------------------
  |  |  366|   916k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
   95|   916k|    if (p != NULL) {
  ------------------
  |  Branch (95:9): [True: 916k, False: 0]
  ------------------
   96|   916k|        char *object_type = NULL;
   97|       |
   98|   916k|        if (!OSSL_PARAM_get_utf8_string(p, &object_type, 0))
  ------------------
  |  Branch (98:13): [True: 0, False: 916k]
  ------------------
   99|      0|            return 0;
  100|   916k|        OPENSSL_free(data->object_type);
  ------------------
  |  |  132|   916k|    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|   916k|        data->object_type = object_type;
  102|   916k|    }
  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|   916k|    p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_REFERENCE);
  ------------------
  |  |  369|   916k|# define OSSL_OBJECT_PARAM_REFERENCE "reference"
  ------------------
  110|   916k|    if (p == NULL || p->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|   458k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (110:9): [True: 458k, False: 458k]
  |  Branch (110:22): [True: 0, False: 458k]
  ------------------
  111|   458k|        return 0;
  112|   458k|    object_ref = p->data;
  113|   458k|    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|   458k|    end = sk_EVP_KEYMGMT_num(data->keymgmts);
  120|   458k|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (120:17): [True: 458k, False: 0]
  ------------------
  121|   458k|        keymgmt = sk_EVP_KEYMGMT_value(data->keymgmts, i);
  122|   458k|        keymgmt_prov = EVP_KEYMGMT_get0_provider(keymgmt);
  123|       |
  124|   458k|        if (keymgmt_prov == decoder_prov
  ------------------
  |  Branch (124:13): [True: 458k, False: 0]
  ------------------
  125|   458k|            && evp_keymgmt_has_load(keymgmt)
  ------------------
  |  Branch (125:16): [True: 458k, False: 0]
  ------------------
  126|   458k|            && EVP_KEYMGMT_is_a(keymgmt, data->object_type))
  ------------------
  |  Branch (126:16): [True: 458k, False: 0]
  ------------------
  127|   458k|            break;
  128|   458k|    }
  129|   458k|    if (i < end) {
  ------------------
  |  Branch (129:9): [True: 458k, False: 0]
  ------------------
  130|       |        /* To allow it to be freed further down */
  131|   458k|        if (!EVP_KEYMGMT_up_ref(keymgmt))
  ------------------
  |  Branch (131:13): [True: 0, False: 458k]
  ------------------
  132|      0|            return 0;
  133|   458k|    } 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|   458k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (140:9): [True: 458k, False: 0]
  ------------------
  141|   458k|        EVP_PKEY *pkey = NULL;
  142|   458k|        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|   458k|        if (keymgmt_prov == decoder_prov) {
  ------------------
  |  Branch (152:13): [True: 458k, False: 0]
  ------------------
  153|   458k|            keydata = evp_keymgmt_load(keymgmt, object_ref, object_ref_sz);
  154|   458k|        } 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|   458k|        if (keydata == NULL)
  ------------------
  |  Branch (182:13): [True: 0, False: 458k]
  ------------------
  183|      0|            ossl_decoder_ctx_set_harderr(data->ctx);
  184|       |
  185|   458k|        if (keydata != NULL
  ------------------
  |  Branch (185:13): [True: 458k, False: 0]
  ------------------
  186|   458k|            && (pkey = evp_keymgmt_util_make_pkey(keymgmt, keydata)) == NULL)
  ------------------
  |  Branch (186:16): [True: 0, False: 458k]
  ------------------
  187|      0|            evp_keymgmt_freedata(keymgmt, keydata);
  188|       |
  189|   458k|        *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|   458k|        EVP_KEYMGMT_free(keymgmt);
  196|   458k|    }
  197|       |    /*
  198|       |     * We successfully looked through, |*ctx->object| determines if we
  199|       |     * actually found something.
  200|       |     */
  201|       |    return (*data->object != NULL);
  202|   458k|}
decoder_pkey.c:decoder_clean_pkey_construct_arg:
  205|   458k|{
  206|   458k|    struct decoder_pkey_data_st *data = construct_data;
  207|       |
  208|   458k|    if (data != NULL) {
  ------------------
  |  Branch (208:9): [True: 458k, False: 2]
  ------------------
  209|   458k|        sk_EVP_KEYMGMT_pop_free(data->keymgmts, EVP_KEYMGMT_free);
  210|   458k|        OPENSSL_free(data->propq);
  ------------------
  |  |  132|   458k|    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|   458k|        OPENSSL_free(data->object_type);
  ------------------
  |  |  132|   458k|    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|   458k|        OPENSSL_free(data);
  ------------------
  |  |  132|   458k|    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|   458k|    }
  214|   458k|}
decoder_pkey.c:ossl_decoder_ctx_for_pkey_dup:
  588|   458k|{
  589|   458k|    OSSL_DECODER_CTX *dest;
  590|   458k|    struct decoder_pkey_data_st *process_data_src, *process_data_dest = NULL;
  591|       |
  592|   458k|    if (src == NULL)
  ------------------
  |  Branch (592:9): [True: 0, False: 458k]
  ------------------
  593|      0|        return NULL;
  594|       |
  595|   458k|    if ((dest = OSSL_DECODER_CTX_new()) == NULL) {
  ------------------
  |  Branch (595:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    if (!OSSL_DECODER_CTX_set_input_type(dest, input_type)
  ------------------
  |  Branch (600:9): [True: 0, False: 458k]
  ------------------
  601|   458k|        || !OSSL_DECODER_CTX_set_input_structure(dest, input_structure)) {
  ------------------
  |  Branch (601:12): [True: 0, False: 458k]
  ------------------
  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|   458k|    dest->selection = src->selection;
  606|       |
  607|   458k|    if (src->decoder_insts != NULL) {
  ------------------
  |  Branch (607:9): [True: 458k, False: 0]
  ------------------
  608|   458k|        dest->decoder_insts
  609|   458k|            = sk_OSSL_DECODER_INSTANCE_deep_copy(src->decoder_insts,
  610|   458k|                ossl_decoder_instance_dup,
  611|   458k|                ossl_decoder_instance_free);
  612|   458k|        if (dest->decoder_insts == NULL) {
  ------------------
  |  Branch (612:13): [True: 0, False: 458k]
  ------------------
  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|   458k|    }
  617|       |
  618|   458k|    if (!OSSL_DECODER_CTX_set_construct(dest,
  ------------------
  |  Branch (618:9): [True: 0, False: 458k]
  ------------------
  619|   458k|            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|   458k|    process_data_src = OSSL_DECODER_CTX_get_construct_data(src);
  625|   458k|    if (process_data_src != NULL) {
  ------------------
  |  Branch (625:9): [True: 458k, False: 0]
  ------------------
  626|   458k|        process_data_dest = OPENSSL_zalloc(sizeof(*process_data_dest));
  ------------------
  |  |  109|   458k|    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|   458k|        if (process_data_dest == NULL) {
  ------------------
  |  Branch (627:13): [True: 0, False: 458k]
  ------------------
  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|   458k|        if (process_data_src->propq != NULL) {
  ------------------
  |  Branch (631:13): [True: 0, False: 458k]
  ------------------
  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|   458k|        if (process_data_src->keymgmts != NULL) {
  ------------------
  |  Branch (639:13): [True: 458k, False: 0]
  ------------------
  640|   458k|            process_data_dest->keymgmts
  641|   458k|                = sk_EVP_KEYMGMT_deep_copy(process_data_src->keymgmts,
  642|   458k|                    keymgmt_dup,
  643|   458k|                    EVP_KEYMGMT_free);
  644|   458k|            if (process_data_dest->keymgmts == NULL) {
  ------------------
  |  Branch (644:17): [True: 0, False: 458k]
  ------------------
  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|   458k|        }
  649|       |
  650|   458k|        process_data_dest->object = (void **)pkey;
  651|   458k|        process_data_dest->libctx = process_data_src->libctx;
  652|   458k|        process_data_dest->selection = process_data_src->selection;
  653|   458k|        process_data_dest->ctx = dest;
  654|   458k|        if (!OSSL_DECODER_CTX_set_construct_data(dest, process_data_dest)) {
  ------------------
  |  Branch (654:13): [True: 0, False: 458k]
  ------------------
  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|   458k|        process_data_dest = NULL;
  659|   458k|    }
  660|       |
  661|   458k|    if (!OSSL_DECODER_CTX_set_cleanup(dest,
  ------------------
  |  Branch (661:9): [True: 0, False: 458k]
  ------------------
  662|   458k|            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|   458k|    dest->frozen = src->frozen;
  668|   458k|    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|   458k|}
decoder_pkey.c:keymgmt_dup:
  570|   606k|{
  571|   606k|    if (!EVP_KEYMGMT_up_ref((EVP_KEYMGMT *)keymgmt))
  ------------------
  |  Branch (571:9): [True: 0, False: 606k]
  ------------------
  572|      0|        return NULL;
  573|       |
  574|   606k|    return (EVP_KEYMGMT *)keymgmt;
  575|   606k|}

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

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|  5.50k|{
  331|  5.50k|    int i;
  332|  5.50k|    ERR_STATE *es;
  333|       |
  334|  5.50k|    es = ossl_err_get_state_int();
  335|  5.50k|    if (es == NULL)
  ------------------
  |  Branch (335:9): [True: 0, False: 5.50k]
  ------------------
  336|      0|        return;
  337|       |
  338|  93.6k|    for (i = 0; i < ERR_NUM_ERRORS; i++) {
  ------------------
  |  |   14|  93.6k|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (338:17): [True: 88.1k, False: 5.50k]
  ------------------
  339|  88.1k|        err_clear(es, i, 0);
  340|  88.1k|    }
  341|  5.50k|    es->top = es->bottom = 0;
  342|  5.50k|}
ERR_get_error:
  345|    528|{
  346|    528|    return get_error_values(EV_POP, NULL, NULL, NULL, NULL, NULL);
  347|    528|}
ERR_peek_error:
  370|  5.78k|{
  371|  5.78k|    return get_error_values(EV_PEEK, NULL, NULL, NULL, NULL, NULL);
  372|  5.78k|}
ERR_peek_last_error:
  405|  1.38M|{
  406|  1.38M|    return get_error_values(EV_PEEK_LAST, NULL, NULL, NULL, NULL, NULL);
  407|  1.38M|}
ossl_err_string_int:
  518|    622|{
  519|    622|    char lsbuf[64], rsbuf[256];
  520|    622|    const char *ls, *rs = NULL;
  521|    622|    unsigned long l, r;
  522|       |
  523|    622|    if (len == 0)
  ------------------
  |  Branch (523:9): [True: 0, False: 622]
  ------------------
  524|      0|        return;
  525|       |
  526|    622|    l = ERR_GET_LIB(e);
  527|    622|    ls = ERR_lib_error_string(e);
  528|    622|    if (ls == NULL) {
  ------------------
  |  Branch (528:9): [True: 2, False: 620]
  ------------------
  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|    622|    r = ERR_GET_REASON(e);
  540|    622|#ifndef OPENSSL_NO_ERR
  541|    622|    if (ERR_SYSTEM_ERROR(e)) {
  ------------------
  |  |  222|    622|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|    622|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 24, False: 598]
  |  |  ------------------
  ------------------
  542|     24|        if (openssl_strerror_r(r, rsbuf, sizeof(rsbuf)))
  ------------------
  |  Branch (542:13): [True: 24, False: 0]
  ------------------
  543|     24|            rs = rsbuf;
  544|    598|    } else {
  545|    598|        rs = ERR_reason_error_string(e);
  546|    598|    }
  547|    622|#endif
  548|    622|    if (rs == NULL) {
  ------------------
  |  Branch (548:9): [True: 4, False: 618]
  ------------------
  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|    622|    BIO_snprintf(buf, len, "error:%08lX:%s:%s:%s", e, ls, func, rs);
  555|    622|    if (strlen(buf) == len - 1) {
  ------------------
  |  Branch (555:9): [True: 0, False: 622]
  ------------------
  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|    622|}
ERR_error_string_n:
  562|    622|{
  563|    622|    ossl_err_string_int(e, "", buf, len);
  564|    622|}
ERR_lib_error_string:
  581|    622|{
  582|    622|#ifndef OPENSSL_NO_ERR
  583|    622|    ERR_STRING_DATA d, *p;
  584|    622|    unsigned long l;
  585|       |
  586|    622|    if (!RUN_ONCE(&err_string_init, do_err_strings_init)) {
  ------------------
  |  |  130|    622|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 622, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (586:9): [True: 0, False: 622]
  ------------------
  587|      0|        return NULL;
  588|      0|    }
  589|       |
  590|    622|    l = ERR_GET_LIB(e);
  591|    622|    d.error = ERR_PACK(l, 0, 0);
  ------------------
  |  |  262|    622|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  210|    622|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  209|    622|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  213|    622|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  592|    622|    p = int_err_get_item(&d);
  593|    622|    return ((p == NULL) ? NULL : p->string);
  ------------------
  |  Branch (593:13): [True: 2, False: 620]
  ------------------
  594|       |#else
  595|       |    return NULL;
  596|       |#endif
  597|    622|}
ERR_reason_error_string:
  607|    633|{
  608|    633|#ifndef OPENSSL_NO_ERR
  609|    633|    ERR_STRING_DATA d, *p = NULL;
  610|    633|    unsigned long l, r;
  611|       |
  612|    633|    if (!RUN_ONCE(&err_string_init, do_err_strings_init)) {
  ------------------
  |  |  130|    633|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 633, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (612:9): [True: 0, False: 633]
  ------------------
  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|    633|    if (ERR_SYSTEM_ERROR(e))
  ------------------
  |  |  222|    633|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|    633|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 633]
  |  |  ------------------
  ------------------
  622|      0|        return NULL;
  623|       |
  624|    633|    l = ERR_GET_LIB(e);
  625|    633|    r = ERR_GET_REASON(e);
  626|    633|    d.error = ERR_PACK(l, 0, r);
  ------------------
  |  |  262|    633|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  210|    633|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  209|    633|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  213|    633|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  627|    633|    p = int_err_get_item(&d);
  628|    633|    if (p == NULL) {
  ------------------
  |  Branch (628:9): [True: 40, False: 593]
  ------------------
  629|     40|        d.error = ERR_PACK(0, 0, r);
  ------------------
  |  |  262|     40|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  210|     40|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  209|     40|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  213|     40|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  630|     40|        p = int_err_get_item(&d);
  631|     40|    }
  632|    633|    return ((p == NULL) ? NULL : p->string);
  ------------------
  |  Branch (632:13): [True: 39, False: 594]
  ------------------
  633|       |#else
  634|       |    return NULL;
  635|       |#endif
  636|    633|}
ossl_err_get_state_int:
  652|  22.1M|{
  653|  22.1M|    ERR_STATE *state;
  654|  22.1M|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|  22.1M|#define get_last_sys_error() errno
  ------------------
  655|       |
  656|  22.1M|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|  22.1M|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (656:9): [True: 0, False: 22.1M]
  ------------------
  657|      0|        return NULL;
  658|       |
  659|  22.1M|    state = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  660|  22.1M|        CRYPTO_THREAD_NO_CONTEXT);
  ------------------
  |  |   42|  22.1M|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  661|  22.1M|    if (state == (ERR_STATE *)-1)
  ------------------
  |  Branch (661:9): [True: 0, False: 22.1M]
  ------------------
  662|      0|        return NULL;
  663|       |
  664|  22.1M|    if (state == NULL) {
  ------------------
  |  Branch (664:9): [True: 1, False: 22.1M]
  ------------------
  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|  22.1M|    set_sys_error(saveerrno);
  ------------------
  |  |   32|  22.1M|#define set_sys_error(e) errno = (e)
  ------------------
  690|  22.1M|    return state;
  691|  22.1M|}
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.69k|{
  739|  1.69k|    int ret;
  740|       |
  741|  1.69k|    if (!RUN_ONCE(&err_string_init, do_err_strings_init))
  ------------------
  |  |  130|  1.69k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1.69k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (741:9): [True: 0, False: 1.69k]
  ------------------
  742|      0|        return 0;
  743|       |
  744|  1.69k|    if (!CRYPTO_THREAD_write_lock(err_string_lock))
  ------------------
  |  Branch (744:9): [True: 0, False: 1.69k]
  ------------------
  745|      0|        return 0;
  746|  1.69k|    ret = int_err_library_number++;
  747|  1.69k|    CRYPTO_THREAD_unlock(err_string_lock);
  748|  1.69k|    return ret;
  749|  1.69k|}
ERR_add_error_data:
  786|  1.66k|{
  787|  1.66k|    va_list args;
  788|  1.66k|    va_start(args, num);
  789|  1.66k|    ERR_add_error_vdata(num, args);
  790|       |    va_end(args);
  791|  1.66k|}
ERR_add_error_vdata:
  794|  1.66k|{
  795|  1.66k|    int i;
  796|  1.66k|    size_t len, size;
  797|  1.66k|    int flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   50|  1.66k|#define ERR_TXT_MALLOCED 0x01
  ------------------
                  int flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   51|  1.66k|#define ERR_TXT_STRING 0x02
  ------------------
  798|  1.66k|    char *str, *arg;
  799|  1.66k|    ERR_STATE *es;
  800|       |
  801|       |    /* Get the current error data; if an allocated string get it. */
  802|  1.66k|    es = ossl_err_get_state_int();
  803|  1.66k|    if (es == NULL)
  ------------------
  |  Branch (803:9): [True: 0, False: 1.66k]
  ------------------
  804|      0|        return;
  805|  1.66k|    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.66k|    if ((es->err_data_flags[i] & flags) == flags
  ------------------
  |  Branch (811:9): [True: 0, False: 1.66k]
  ------------------
  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.66k|    } else if ((str = OPENSSL_malloc(size = 81)) == NULL) {
  ------------------
  |  |  107|  1.66k|    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.66k]
  ------------------
  826|      0|        return;
  827|  1.66k|    } else {
  828|  1.66k|        str[0] = '\0';
  829|  1.66k|    }
  830|  1.66k|    len = strlen(str);
  831|       |
  832|  4.99k|    while (--num >= 0) {
  ------------------
  |  Branch (832:12): [True: 3.33k, False: 1.66k]
  ------------------
  833|  3.33k|        arg = va_arg(args, char *);
  834|  3.33k|        if (arg == NULL)
  ------------------
  |  Branch (834:13): [True: 0, False: 3.33k]
  ------------------
  835|      0|            arg = "<NULL>";
  836|  3.33k|        len += strlen(arg);
  837|  3.33k|        if (len >= size) {
  ------------------
  |  Branch (837:13): [True: 0, False: 3.33k]
  ------------------
  838|      0|            char *p;
  839|       |
  840|      0|            size = len + 20;
  841|      0|            p = OPENSSL_realloc(str, size);
  ------------------
  |  |  121|      0|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  842|      0|            if (p == NULL) {
  ------------------
  |  Branch (842:17): [True: 0, False: 0]
  ------------------
  843|      0|                OPENSSL_free(str);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  844|      0|                return;
  845|      0|            }
  846|      0|            str = p;
  847|      0|        }
  848|  3.33k|        OPENSSL_strlcat(str, arg, size);
  849|  3.33k|    }
  850|  1.66k|    if (!err_set_error_data_int(str, size, flags, 0))
  ------------------
  |  Branch (850:9): [True: 0, False: 1.66k]
  ------------------
  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.66k|}
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.51k|{
  180|  4.51k|    if (a->error == b->error)
  ------------------
  |  Branch (180:9): [True: 4.08k, False: 432]
  ------------------
  181|  4.08k|        return 0;
  182|    432|    return a->error > b->error ? 1 : -1;
  ------------------
  |  Branch (182:12): [True: 334, False: 98]
  ------------------
  183|  4.51k|}
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.38M|{
  444|  1.38M|    int i = 0;
  445|  1.38M|    ERR_STATE *es;
  446|  1.38M|    unsigned long ret;
  447|       |
  448|  1.38M|    es = ossl_err_get_state_int();
  449|  1.38M|    if (es == NULL)
  ------------------
  |  Branch (449:9): [True: 0, False: 1.38M]
  ------------------
  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.38M|    while (es->bottom != es->top) {
  ------------------
  |  Branch (456:12): [True: 1.13M, False: 251k]
  ------------------
  457|  1.13M|        if (es->err_flags[es->top] & ERR_FLAG_CLEAR) {
  ------------------
  |  |   16|  1.13M|#define ERR_FLAG_CLEAR 0x02
  ------------------
  |  Branch (457:13): [True: 0, False: 1.13M]
  ------------------
  458|      0|            err_clear(es, es->top, 0);
  459|      0|            es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   14|      0|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (459:23): [True: 0, False: 0]
  ------------------
  460|      0|            continue;
  461|      0|        }
  462|  1.13M|        i = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   14|  1.13M|#define ERR_NUM_ERRORS 16
  ------------------
  463|  1.13M|        if (es->err_flags[i] & ERR_FLAG_CLEAR) {
  ------------------
  |  |   16|  1.13M|#define ERR_FLAG_CLEAR 0x02
  ------------------
  |  Branch (463:13): [True: 0, False: 1.13M]
  ------------------
  464|      0|            es->bottom = i;
  465|      0|            err_clear(es, es->bottom, 0);
  466|      0|            continue;
  467|      0|        }
  468|  1.13M|        break;
  469|  1.13M|    }
  470|       |
  471|       |    /* If everything has been cleared, the stack is empty. */
  472|  1.38M|    if (es->bottom == es->top)
  ------------------
  |  Branch (472:9): [True: 251k, False: 1.13M]
  ------------------
  473|   251k|        return 0;
  474|       |
  475|       |    /* Which error, the top of stack (latest one) or the first one? */
  476|  1.13M|    if (g == EV_PEEK_LAST)
  ------------------
  |  Branch (476:9): [True: 1.13M, False: 6.28k]
  ------------------
  477|  1.13M|        i = es->top;
  478|  6.28k|    else
  479|  6.28k|        i = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   14|  6.28k|#define ERR_NUM_ERRORS 16
  ------------------
  480|       |
  481|  1.13M|    ret = es->err_buffer[i];
  482|  1.13M|    if (g == EV_POP) {
  ------------------
  |  Branch (482:9): [True: 526, False: 1.13M]
  ------------------
  483|    526|        es->bottom = i;
  484|    526|        es->err_buffer[i] = 0;
  485|    526|    }
  486|       |
  487|  1.13M|    if (file != NULL) {
  ------------------
  |  Branch (487:9): [True: 0, False: 1.13M]
  ------------------
  488|      0|        *file = es->err_file[i];
  489|      0|        if (*file == NULL)
  ------------------
  |  Branch (489:13): [True: 0, False: 0]
  ------------------
  490|      0|            *file = "";
  491|      0|    }
  492|  1.13M|    if (line != NULL)
  ------------------
  |  Branch (492:9): [True: 0, False: 1.13M]
  ------------------
  493|      0|        *line = es->err_line[i];
  494|  1.13M|    if (func != NULL) {
  ------------------
  |  Branch (494:9): [True: 0, False: 1.13M]
  ------------------
  495|      0|        *func = es->err_func[i];
  496|      0|        if (*func == NULL)
  ------------------
  |  Branch (496:13): [True: 0, False: 0]
  ------------------
  497|      0|            *func = "";
  498|      0|    }
  499|  1.13M|    if (flags != NULL)
  ------------------
  |  Branch (499:9): [True: 0, False: 1.13M]
  ------------------
  500|      0|        *flags = es->err_data_flags[i];
  501|  1.13M|    if (data == NULL) {
  ------------------
  |  Branch (501:9): [True: 1.13M, False: 0]
  ------------------
  502|  1.13M|        if (g == EV_POP) {
  ------------------
  |  Branch (502:13): [True: 526, False: 1.13M]
  ------------------
  503|    526|            err_clear_data(es, i, 0);
  504|    526|        }
  505|  1.13M|    } else {
  506|      0|        *data = es->err_data[i];
  507|      0|        if (*data == NULL) {
  ------------------
  |  Branch (507:13): [True: 0, False: 0]
  ------------------
  508|      0|            *data = "";
  509|      0|            if (flags != NULL)
  ------------------
  |  Branch (509:17): [True: 0, False: 0]
  ------------------
  510|      0|                *flags = 0;
  511|      0|        }
  512|      0|    }
  513|  1.13M|    return ret;
  514|  1.38M|}
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.66k|{
  754|  1.66k|    ERR_STATE *es;
  755|       |
  756|  1.66k|    es = ossl_err_get_state_int();
  757|  1.66k|    if (es == NULL)
  ------------------
  |  Branch (757:9): [True: 0, False: 1.66k]
  ------------------
  758|      0|        return 0;
  759|       |
  760|  1.66k|    err_clear_data(es, es->top, deallocate);
  761|  1.66k|    err_set_data(es, es->top, data, size, flags);
  762|       |
  763|  1.66k|    return 1;
  764|  1.66k|}

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

ERR_new:
   15|  2.28M|{
   16|  2.28M|    ERR_STATE *es;
   17|       |
   18|  2.28M|    es = ossl_err_get_state_int();
   19|  2.28M|    if (es == NULL)
  ------------------
  |  Branch (19:9): [True: 0, False: 2.28M]
  ------------------
   20|      0|        return;
   21|       |
   22|       |    /* Allocate a slot */
   23|  2.28M|    err_get_slot(es);
   24|  2.28M|    err_clear(es, es->top, 0);
   25|  2.28M|}
ERR_set_debug:
   28|  2.28M|{
   29|  2.28M|    ERR_STATE *es;
   30|       |
   31|  2.28M|    es = ossl_err_get_state_int();
   32|  2.28M|    if (es == NULL)
  ------------------
  |  Branch (32:9): [True: 0, False: 2.28M]
  ------------------
   33|      0|        return;
   34|       |
   35|  2.28M|    err_set_debug(es, es->top, file, line, func);
   36|  2.28M|}
ERR_set_error:
   39|  2.28M|{
   40|  2.28M|    va_list args;
   41|       |
   42|  2.28M|    va_start(args, fmt);
   43|  2.28M|    ERR_vset_error(lib, reason, fmt, args);
   44|       |    va_end(args);
   45|  2.28M|}
ERR_vset_error:
   48|  2.28M|{
   49|  2.28M|    ERR_STATE *es;
   50|  2.28M|    char *buf = NULL;
   51|  2.28M|    size_t buf_size = 0;
   52|  2.28M|    unsigned long flags = 0;
   53|  2.28M|    size_t i;
   54|       |
   55|  2.28M|    es = ossl_err_get_state_int();
   56|  2.28M|    if (es == NULL)
  ------------------
  |  Branch (56:9): [True: 0, False: 2.28M]
  ------------------
   57|      0|        return;
   58|  2.28M|    i = es->top;
   59|       |
   60|  2.28M|    if (fmt != NULL) {
  ------------------
  |  Branch (60:9): [True: 93.7k, False: 2.18M]
  ------------------
   61|  93.7k|        int printed_len = 0;
   62|  93.7k|        char *rbuf = NULL;
   63|       |
   64|  93.7k|        buf = es->err_data[i];
   65|  93.7k|        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|  93.7k|        es->err_data[i] = NULL;
   75|  93.7k|        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|  93.7k|        if (buf_size < ERR_MAX_DATA_SIZE
  ------------------
  |  |  348|   187k|#define ERR_MAX_DATA_SIZE 1024
  ------------------
  |  Branch (81:13): [True: 93.5k, False: 144]
  ------------------
   82|  93.5k|            && (rbuf = OPENSSL_realloc(buf, ERR_MAX_DATA_SIZE)) != NULL) {
  ------------------
  |  |  121|  93.5k|    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: 93.5k, False: 0]
  ------------------
   83|  93.5k|            buf = rbuf;
   84|  93.5k|            buf_size = ERR_MAX_DATA_SIZE;
  ------------------
  |  |  348|  93.5k|#define ERR_MAX_DATA_SIZE 1024
  ------------------
   85|  93.5k|        }
   86|       |
   87|  93.7k|        if (buf != NULL) {
  ------------------
  |  Branch (87:13): [True: 93.7k, False: 0]
  ------------------
   88|  93.7k|            printed_len = BIO_vsnprintf(buf, buf_size, fmt, args);
   89|  93.7k|        }
   90|  93.7k|        if (printed_len < 0)
  ------------------
  |  Branch (90:13): [True: 1.21k, False: 92.5k]
  ------------------
   91|  1.21k|            printed_len = 0;
   92|  93.7k|        if (buf != NULL)
  ------------------
  |  Branch (92:13): [True: 93.7k, False: 0]
  ------------------
   93|  93.7k|            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|  93.7k|        if ((rbuf = OPENSSL_realloc(buf, printed_len + 1)) != NULL) {
  ------------------
  |  |  121|  93.7k|    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: 93.7k, False: 0]
  ------------------
  102|  93.7k|            buf = rbuf;
  103|  93.7k|            buf_size = printed_len + 1;
  104|  93.7k|            buf[printed_len] = '\0';
  105|  93.7k|        }
  106|       |
  107|  93.7k|        if (buf != NULL)
  ------------------
  |  Branch (107:13): [True: 93.7k, False: 0]
  ------------------
  108|  93.7k|            flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   50|  93.7k|#define ERR_TXT_MALLOCED 0x01
  ------------------
                          flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   51|  93.7k|#define ERR_TXT_STRING 0x02
  ------------------
  109|  93.7k|    }
  110|       |
  111|  2.28M|    err_clear_data(es, es->top, 0);
  112|  2.28M|    err_set_error(es, es->top, lib, reason);
  113|  2.28M|    if (fmt != NULL)
  ------------------
  |  Branch (113:9): [True: 93.7k, False: 2.18M]
  ------------------
  114|  93.7k|        err_set_data(es, es->top, buf, buf_size, flags);
  115|  2.28M|}

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

ERR_set_mark:
   14|  6.93M|{
   15|  6.93M|    ERR_STATE *es;
   16|       |
   17|  6.93M|    es = ossl_err_get_state_int();
   18|  6.93M|    if (es == NULL)
  ------------------
  |  Branch (18:9): [True: 0, False: 6.93M]
  ------------------
   19|      0|        return 0;
   20|       |
   21|  6.93M|    if (es->bottom == es->top)
  ------------------
  |  Branch (21:9): [True: 3.49M, False: 3.44M]
  ------------------
   22|  3.49M|        return 0;
   23|  3.44M|    es->err_marks[es->top]++;
   24|  3.44M|    return 1;
   25|  6.93M|}
ERR_pop_to_mark:
   41|  4.63M|{
   42|  4.63M|    ERR_STATE *es;
   43|       |
   44|  4.63M|    es = ossl_err_get_state_int();
   45|  4.63M|    if (es == NULL)
  ------------------
  |  Branch (45:9): [True: 0, False: 4.63M]
  ------------------
   46|      0|        return 0;
   47|       |
   48|  6.90M|    while (es->bottom != es->top
  ------------------
  |  Branch (48:12): [True: 4.67M, False: 2.23M]
  ------------------
   49|  4.67M|        && es->err_marks[es->top] == 0) {
  ------------------
  |  Branch (49:12): [True: 2.27M, False: 2.40M]
  ------------------
   50|  2.27M|        err_clear(es, es->top, 0);
   51|  2.27M|        es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   14|    214|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (51:19): [True: 2.27M, False: 214]
  ------------------
   52|  2.27M|    }
   53|       |
   54|  4.63M|    if (es->bottom == es->top)
  ------------------
  |  Branch (54:9): [True: 2.23M, False: 2.40M]
  ------------------
   55|  2.23M|        return 0;
   56|  2.40M|    es->err_marks[es->top]--;
   57|  2.40M|    return 1;
   58|  4.63M|}
ERR_count_to_mark:
   61|    579|{
   62|    579|    ERR_STATE *es;
   63|    579|    int count = 0, top;
   64|       |
   65|    579|    es = ossl_err_get_state_int();
   66|    579|    if (es == NULL)
  ------------------
  |  Branch (66:9): [True: 0, False: 579]
  ------------------
   67|      0|        return 0;
   68|       |
   69|    579|    top = es->top;
   70|    579|    while (es->bottom != top
  ------------------
  |  Branch (70:12): [True: 578, False: 1]
  ------------------
   71|    578|        && es->err_marks[top] == 0) {
  ------------------
  |  Branch (71:12): [True: 0, False: 578]
  ------------------
   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|    579|    return count;
   77|    579|}
ERR_clear_last_mark:
   80|  2.30M|{
   81|  2.30M|    ERR_STATE *es;
   82|  2.30M|    int top;
   83|       |
   84|  2.30M|    es = ossl_err_get_state_int();
   85|  2.30M|    if (es == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 2.30M]
  ------------------
   86|      0|        return 0;
   87|       |
   88|  2.30M|    top = es->top;
   89|  2.30M|    while (es->bottom != top
  ------------------
  |  Branch (89:12): [True: 1.04M, False: 1.26M]
  ------------------
   90|  1.04M|        && es->err_marks[top] == 0) {
  ------------------
  |  Branch (90:12): [True: 2.30k, False: 1.04M]
  ------------------
   91|  2.30k|        top = top > 0 ? top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   14|     16|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (91:15): [True: 2.28k, False: 16]
  ------------------
   92|  2.30k|    }
   93|       |
   94|  2.30M|    if (es->bottom == top)
  ------------------
  |  Branch (94:9): [True: 1.26M, False: 1.04M]
  ------------------
   95|  1.26M|        return 0;
   96|  1.04M|    es->err_marks[top]--;
   97|  1.04M|    return 1;
   98|  2.30M|}

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|   414k|{
   28|   414k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (28:9): [True: 414k, False: 0]
  ------------------
   29|   414k|        if (ctx->digest != NULL && ctx->digest->freectx != NULL)
  ------------------
  |  Branch (29:13): [True: 414k, False: 0]
  |  Branch (29:36): [True: 414k, False: 0]
  ------------------
   30|   414k|            ctx->digest->freectx(ctx->algctx);
   31|   414k|        ctx->algctx = NULL;
   32|   414k|        EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_CLEANED);
  ------------------
  |  |  173|   414k|#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been \
  ------------------
   33|   414k|    }
   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|   414k|    if (force)
  ------------------
  |  Branch (41:9): [True: 0, False: 414k]
  ------------------
   42|      0|        ctx->digest = NULL;
   43|       |
   44|       |    /* Non legacy code, this has to be later than the ctx->digest cleaning */
   45|   414k|    if (!keep_fetched) {
  ------------------
  |  Branch (45:9): [True: 414k, False: 0]
  ------------------
   46|   414k|        EVP_MD_free(ctx->fetched_digest);
   47|   414k|        ctx->fetched_digest = NULL;
   48|       |        ctx->reqdigest = NULL;
   49|   414k|    }
   50|   414k|}
EVP_MD_CTX_reset:
   75|   414k|{
   76|   414k|    return evp_md_ctx_reset_ex(ctx, 0);
   77|   414k|}
EVP_MD_CTX_new:
  106|   414k|{
  107|   414k|    return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
  ------------------
  |  |  109|   414k|    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|   414k|}
EVP_MD_CTX_free:
  111|   448k|{
  112|   448k|    if (ctx == NULL)
  ------------------
  |  Branch (112:9): [True: 34.8k, False: 414k]
  ------------------
  113|  34.8k|        return;
  114|       |
  115|   414k|    EVP_MD_CTX_reset(ctx);
  116|   414k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   414k|    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|   414k|}
evp_md_ctx_free_algctx:
  120|   419k|{
  121|   419k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (121:9): [True: 5.64k, False: 414k]
  ------------------
  122|  5.64k|        if (!ossl_assert(ctx->digest != NULL)) {
  ------------------
  |  |   52|  5.64k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  5.64k|    __FILE__, __LINE__)
  ------------------
  |  Branch (122:13): [True: 0, False: 5.64k]
  ------------------
  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|  5.64k|        if (ctx->digest->freectx != NULL)
  ------------------
  |  Branch (126:13): [True: 5.64k, False: 0]
  ------------------
  127|  5.64k|            ctx->digest->freectx(ctx->algctx);
  128|  5.64k|        ctx->algctx = NULL;
  129|  5.64k|    }
  130|   419k|    return 1;
  131|   419k|}
EVP_DigestInit_ex:
  237|   444k|{
  238|   444k|    if (!ossl_assert(impl == NULL))
  ------------------
  |  |   52|   444k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   444k|    __FILE__, __LINE__)
  ------------------
  |  Branch (238:9): [True: 0, False: 444k]
  ------------------
  239|      0|        return 0;
  240|   444k|    return evp_md_init_internal(ctx, type, NULL);
  241|   444k|}
EVP_DigestUpdate:
  244|  1.11M|{
  245|  1.11M|    if (ossl_unlikely(count == 0))
  ------------------
  |  |   23|  1.11M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 1.05k, False: 1.10M]
  |  |  ------------------
  ------------------
  246|  1.05k|        return 1;
  247|       |
  248|  1.10M|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|  1.10M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.10M]
  |  |  ------------------
  ------------------
  249|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  250|      0|        return 0;
  251|      0|    }
  252|       |
  253|  1.10M|    if (ossl_unlikely(ctx->pctx != NULL)
  ------------------
  |  |   23|  2.21M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.10M]
  |  |  ------------------
  ------------------
  254|      0|        && EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx->pctx)
  ------------------
  |  |  473|  1.10M|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|      0|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|      0|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|      0|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|      0|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|      0|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|      0|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|      0|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|      0|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|      0|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  255|      0|        && ctx->pctx->op.sig.algctx != NULL) {
  ------------------
  |  Branch (255:12): [True: 0, False: 0]
  ------------------
  256|      0|#ifndef FIPS_MODULE
  257|       |        /*
  258|       |         * Prior to OpenSSL 3.0 EVP_DigestSignUpdate() and
  259|       |         * EVP_DigestVerifyUpdate() were just macros for EVP_DigestUpdate().
  260|       |         * Some code calls EVP_DigestUpdate() directly even when initialised
  261|       |         * with EVP_DigestSignInit_ex() or
  262|       |         * EVP_DigestVerifyInit_ex(), so we detect that and redirect to
  263|       |         * the correct EVP_Digest*Update() function
  264|       |         */
  265|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (265:13): [True: 0, False: 0]
  ------------------
  266|      0|            return EVP_DigestSignUpdate(ctx, data, count);
  267|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_VERIFYCTX)
  ------------------
  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (267:13): [True: 0, False: 0]
  ------------------
  268|      0|            return EVP_DigestVerifyUpdate(ctx, data, count);
  269|      0|#endif
  270|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  271|      0|        return 0;
  272|      0|    }
  273|       |
  274|  1.10M|    if (ctx->digest == NULL || ctx->digest->prov == NULL) {
  ------------------
  |  Branch (274:9): [True: 0, False: 1.10M]
  |  Branch (274:32): [True: 0, False: 1.10M]
  ------------------
  275|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  276|      0|        return 0;
  277|      0|    }
  278|       |
  279|  1.10M|    if (ossl_unlikely(ctx->digest->dupdate == NULL)) {
  ------------------
  |  |   23|  1.10M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.10M]
  |  |  ------------------
  ------------------
  280|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  281|      0|        return 0;
  282|      0|    }
  283|  1.10M|    return ctx->digest->dupdate(ctx->algctx, data, count);
  284|  1.10M|}
EVP_DigestFinal_ex:
  297|   415k|{
  298|   415k|    int ret, sz;
  299|   415k|    size_t size = 0;
  300|   415k|    size_t mdsize = 0;
  301|       |
  302|   415k|    if (ossl_unlikely(ctx->digest == NULL))
  ------------------
  |  |   23|   415k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 415k]
  |  |  ------------------
  ------------------
  303|      0|        return 0;
  304|       |
  305|   415k|    sz = EVP_MD_CTX_get_size(ctx);
  ------------------
  |  |  482|   415k|#define EVP_MD_CTX_get_size(e) EVP_MD_CTX_get_size_ex(e)
  ------------------
  306|   415k|    if (ossl_unlikely(sz < 0))
  ------------------
  |  |   23|   415k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 415k]
  |  |  ------------------
  ------------------
  307|      0|        return 0;
  308|   415k|    mdsize = sz;
  309|   415k|    if (ossl_unlikely(ctx->digest->prov == NULL)) {
  ------------------
  |  |   23|   415k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 415k]
  |  |  ------------------
  ------------------
  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|   415k|    if (ossl_unlikely(ctx->digest->dfinal == NULL)) {
  ------------------
  |  |   23|   415k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 415k]
  |  |  ------------------
  ------------------
  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|   415k|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|   415k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 415k]
  |  |  ------------------
  ------------------
  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|   415k|    ret = ctx->digest->dfinal(ctx->algctx, md, &size, mdsize);
  325|       |
  326|   415k|    ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|   415k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  327|       |
  328|   415k|    if (isize != NULL) {
  ------------------
  |  Branch (328:9): [True: 3.76k, False: 412k]
  ------------------
  329|  3.76k|        if (ossl_likely(size <= UINT_MAX)) {
  ------------------
  |  |   22|  3.76k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.76k, False: 0]
  |  |  ------------------
  ------------------
  330|  3.76k|            *isize = (unsigned int)size;
  331|  3.76k|        } 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|  3.76k|    }
  336|       |
  337|   415k|    return ret;
  338|   415k|}
EVP_DigestFinalXOF:
  342|  11.2k|{
  343|  11.2k|    int ret = 0;
  344|  11.2k|    OSSL_PARAM params[2];
  345|  11.2k|    size_t i = 0;
  346|       |
  347|  11.2k|    if (ossl_unlikely(ctx->digest == NULL)) {
  ------------------
  |  |   23|  11.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.2k]
  |  |  ------------------
  ------------------
  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|  11.2k|    if (ossl_unlikely(ctx->digest->prov == NULL)) {
  ------------------
  |  |   23|  11.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.2k]
  |  |  ------------------
  ------------------
  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|  11.2k|    if (ossl_unlikely(ctx->digest->dfinal == NULL)) {
  ------------------
  |  |   23|  11.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.2k]
  |  |  ------------------
  ------------------
  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|  11.2k|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|  11.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.2k]
  |  |  ------------------
  ------------------
  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|  11.2k|    params[i++] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_XOFLEN, &size);
  ------------------
  |  |  236|  11.2k|# define OSSL_DIGEST_PARAM_XOFLEN "xoflen"
  ------------------
  373|  11.2k|    params[i++] = OSSL_PARAM_construct_end();
  374|       |
  375|  11.2k|    if (ossl_likely(EVP_MD_CTX_set_params(ctx, params) >= 0))
  ------------------
  |  |   22|  11.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 11.2k, False: 0]
  |  |  ------------------
  ------------------
  376|  11.2k|        ret = ctx->digest->dfinal(ctx->algctx, md, &size, size);
  377|       |
  378|  11.2k|    ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|  11.2k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  379|       |
  380|  11.2k|    return ret;
  381|  11.2k|}
EVP_DigestSqueeze:
  385|  50.8k|{
  386|  50.8k|    if (ctx->digest == NULL) {
  ------------------
  |  Branch (386:9): [True: 0, False: 50.8k]
  ------------------
  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|  50.8k|    if (ctx->digest->prov == NULL) {
  ------------------
  |  Branch (391:9): [True: 0, False: 50.8k]
  ------------------
  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|  50.8k|    if (ctx->digest->dsqueeze == NULL) {
  ------------------
  |  Branch (396:9): [True: 0, False: 50.8k]
  ------------------
  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|  50.8k|    return ctx->digest->dsqueeze(ctx->algctx, md, &size, size);
  402|  50.8k|}
EVP_Digest:
  546|   399k|{
  547|   399k|    EVP_MD_CTX *ctx;
  548|   399k|    int ret;
  549|       |
  550|   399k|    if (!ossl_assert(impl == NULL))
  ------------------
  |  |   52|   399k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   399k|    __FILE__, __LINE__)
  ------------------
  |  Branch (550:9): [True: 0, False: 399k]
  ------------------
  551|      0|        return 0;
  552|       |
  553|   399k|    ctx = EVP_MD_CTX_new();
  554|   399k|    if (ctx == NULL)
  ------------------
  |  Branch (554:9): [True: 0, False: 399k]
  ------------------
  555|      0|        return 0;
  556|   399k|    EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_ONESHOT);
  ------------------
  |  |  171|   399k|#define EVP_MD_CTX_FLAG_ONESHOT 0x0001 /* digest update will be \
  ------------------
  557|   399k|    ret = EVP_DigestInit_ex(ctx, type, NULL)
  ------------------
  |  Branch (557:11): [True: 399k, False: 0]
  ------------------
  558|   399k|        && EVP_DigestUpdate(ctx, data, count)
  ------------------
  |  Branch (558:12): [True: 399k, False: 0]
  ------------------
  559|   399k|        && EVP_DigestFinal_ex(ctx, md, size);
  ------------------
  |  Branch (559:12): [True: 399k, False: 0]
  ------------------
  560|   399k|    EVP_MD_CTX_free(ctx);
  561|       |
  562|   399k|    return ret;
  563|   399k|}
EVP_MD_CTX_set_params:
  598|  11.2k|{
  599|  11.2k|    EVP_PKEY_CTX *pctx = ctx->pctx;
  600|       |
  601|       |    /* If we have a pctx then we should try that first */
  602|  11.2k|    if (ossl_unlikely(pctx != NULL)
  ------------------
  |  |   23|  22.5k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.2k]
  |  |  ------------------
  ------------------
  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|  11.2k|    if (ossl_likely(ctx->digest != NULL && ctx->digest->set_ctx_params != NULL))
  ------------------
  |  |   22|  22.5k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 11.2k, False: 0]
  |  |  |  Branch (22:44): [True: 11.2k, False: 0]
  |  |  |  Branch (22:44): [True: 11.2k, False: 0]
  |  |  ------------------
  ------------------
  611|  11.2k|        return ctx->digest->set_ctx_params(ctx->algctx, params);
  612|       |
  613|      0|    return 0;
  614|  11.2k|}
EVP_MD_CTX_gettable_params:
  684|   415k|{
  685|   415k|    EVP_PKEY_CTX *pctx;
  686|   415k|    void *provctx;
  687|       |
  688|   415k|    if (ossl_unlikely(ctx == NULL))
  ------------------
  |  |   23|   415k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 415k]
  |  |  ------------------
  ------------------
  689|      0|        return NULL;
  690|       |
  691|       |    /* If we have a pctx then we should try that first */
  692|   415k|    pctx = ctx->pctx;
  693|   415k|    if (ossl_unlikely(pctx != NULL)
  ------------------
  |  |   23|   831k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 415k]
  |  |  ------------------
  ------------------
  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|   415k|    if (ossl_unlikely(ctx->digest != NULL
  ------------------
  |  |   23|   831k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 415k]
  |  |  |  Branch (23:46): [True: 415k, False: 0]
  |  |  |  Branch (23:46): [True: 0, False: 415k]
  |  |  ------------------
  ------------------
  703|   415k|            && 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|   415k|    return NULL;
  708|   415k|}
evp_md_new:
  757|  20.2k|{
  758|  20.2k|    EVP_MD *md = OPENSSL_zalloc(sizeof(*md));
  ------------------
  |  |  109|  20.2k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  759|       |
  760|  20.2k|    if (md != NULL && !CRYPTO_NEW_REF(&md->refcnt, 1)) {
  ------------------
  |  Branch (760:9): [True: 20.2k, False: 0]
  |  Branch (760:23): [True: 0, False: 20.2k]
  ------------------
  761|      0|        OPENSSL_free(md);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  762|      0|        return NULL;
  763|      0|    }
  764|  20.2k|    return md;
  765|  20.2k|}
EVP_MD_fetch:
  984|   472k|{
  985|   472k|    EVP_MD *md = evp_generic_fetch(ctx, OSSL_OP_DIGEST, algorithm, properties,
  ------------------
  |  |  283|   472k|#define OSSL_OP_DIGEST 1
  ------------------
  986|   472k|        evp_md_from_algorithm, evp_md_up_ref, evp_md_free);
  987|       |
  988|   472k|    return md;
  989|   472k|}
EVP_MD_up_ref:
  992|   884k|{
  993|   884k|    int ref = 0;
  994|       |
  995|   884k|    if (md->origin == EVP_ORIG_DYNAMIC)
  ------------------
  |  |  186|   884k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (995:9): [True: 884k, False: 0]
  ------------------
  996|   884k|        CRYPTO_UP_REF(&md->refcnt, &ref);
  997|   884k|    return 1;
  998|   884k|}
EVP_MD_free:
 1001|  1.31M|{
 1002|  1.31M|    int i;
 1003|       |
 1004|  1.31M|    if (md == NULL || md->origin != EVP_ORIG_DYNAMIC)
  ------------------
  |  |  186|   904k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (1004:9): [True: 414k, False: 904k]
  |  Branch (1004:23): [True: 0, False: 904k]
  ------------------
 1005|   414k|        return;
 1006|       |
 1007|   904k|    CRYPTO_DOWN_REF(&md->refcnt, &i);
 1008|   904k|    if (i > 0)
  ------------------
  |  Branch (1008:9): [True: 884k, False: 20.1k]
  ------------------
 1009|   884k|        return;
 1010|       |
 1011|  20.1k|    OPENSSL_free(md->type_name);
  ------------------
  |  |  132|  20.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__
  |  |  ------------------
  ------------------
 1012|  20.1k|    ossl_provider_free(md->prov);
 1013|  20.1k|    CRYPTO_FREE_REF(&md->refcnt);
 1014|  20.1k|    OPENSSL_free(md);
  ------------------
  |  |  132|  20.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__
  |  |  ------------------
  ------------------
 1015|  20.1k|}
digest.c:evp_md_ctx_reset_ex:
   53|   414k|{
   54|   414k|    if (ctx == NULL)
  ------------------
  |  Branch (54:9): [True: 0, False: 414k]
  ------------------
   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|   414k|    if (!EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX)) {
  ------------------
  |  |   32|   414k|#define EVP_MD_CTX_FLAG_KEEP_PKEY_CTX 0x0400
  ------------------
  |  Branch (61:9): [True: 414k, False: 0]
  ------------------
   62|   414k|        EVP_PKEY_CTX_free(ctx->pctx);
   63|   414k|        ctx->pctx = NULL;
   64|   414k|    }
   65|       |
   66|   414k|    evp_md_ctx_clear_digest(ctx, 0, keep_fetched);
   67|   414k|    if (!keep_fetched)
  ------------------
  |  Branch (67:9): [True: 414k, False: 0]
  ------------------
   68|   414k|        OPENSSL_cleanse(ctx, sizeof(*ctx));
   69|       |
   70|   414k|    return 1;
   71|   414k|}
digest.c:evp_md_init_internal:
  135|   444k|{
  136|   444k|#if !defined(FIPS_MODULE)
  137|   444k|    if (ctx->pctx != NULL
  ------------------
  |  Branch (137:9): [True: 0, False: 444k]
  ------------------
  138|      0|        && EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx->pctx)
  ------------------
  |  |  473|   444k|    (((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|   444k|#endif
  154|       |
  155|   444k|    EVP_MD_CTX_clear_flags(ctx, EVP_MD_CTX_FLAG_CLEANED | EVP_MD_CTX_FLAG_FINALISED);
  ------------------
  |  |  173|   444k|#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|   444k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  156|       |
  157|   444k|    if (type != NULL) {
  ------------------
  |  Branch (157:9): [True: 444k, False: 0]
  ------------------
  158|   444k|        ctx->reqdigest = type;
  159|   444k|    } 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|   444k|    if (ossl_likely(ctx->digest == type)) {
  ------------------
  |  |   22|   444k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 24.4k, False: 419k]
  |  |  ------------------
  ------------------
  168|  24.4k|        if (ossl_unlikely(!ossl_assert(type->prov != NULL))) {
  ------------------
  |  |   23|  24.4k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 24.4k]
  |  |  ------------------
  ------------------
  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|   419k|    } else {
  173|   419k|        if (!evp_md_ctx_free_algctx(ctx))
  ------------------
  |  Branch (173:13): [True: 0, False: 419k]
  ------------------
  174|      0|            return 0;
  175|   419k|    }
  176|       |
  177|   444k|    if (ossl_unlikely(type->prov == NULL)) {
  ------------------
  |  |   23|   444k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 12.3k, False: 431k]
  |  |  ------------------
  ------------------
  178|       |#ifdef FIPS_MODULE
  179|       |        /* We only do explicit fetches inside the FIPS module */
  180|       |        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  181|       |        return 0;
  182|       |#else
  183|       |        /* The NULL digest is a special case */
  184|  12.3k|        EVP_MD *provmd = EVP_MD_fetch(NULL,
  185|  12.3k|            type->type != NID_undef ? OBJ_nid2sn(type->type)
  ------------------
  |  |   18|  12.3k|#define NID_undef                       0
  ------------------
  |  Branch (185:13): [True: 12.3k, False: 0]
  ------------------
  186|  12.3k|                                    : "NULL",
  187|  12.3k|            "");
  188|       |
  189|  12.3k|        if (provmd == NULL) {
  ------------------
  |  Branch (189:13): [True: 0, False: 12.3k]
  ------------------
  190|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  191|      0|            return 0;
  192|      0|        }
  193|  12.3k|        type = provmd;
  194|  12.3k|        EVP_MD_free(ctx->fetched_digest);
  195|  12.3k|        ctx->fetched_digest = provmd;
  196|  12.3k|#endif
  197|  12.3k|    }
  198|       |
  199|   444k|    if (ossl_unlikely(type->prov != NULL && ctx->fetched_digest != type)) {
  ------------------
  |  |   23|   888k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 407k, False: 36.8k]
  |  |  |  Branch (23:46): [True: 444k, False: 0]
  |  |  |  Branch (23:46): [True: 407k, False: 36.8k]
  |  |  ------------------
  ------------------
  200|   407k|        if (ossl_unlikely(!EVP_MD_up_ref((EVP_MD *)type))) {
  ------------------
  |  |   23|   407k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 407k]
  |  |  ------------------
  ------------------
  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|   407k|        EVP_MD_free(ctx->fetched_digest);
  205|   407k|        ctx->fetched_digest = (EVP_MD *)type;
  206|   407k|    }
  207|   444k|    ctx->digest = type;
  208|   444k|    if (ctx->algctx == NULL) {
  ------------------
  |  Branch (208:9): [True: 419k, False: 24.4k]
  ------------------
  209|   419k|        ctx->algctx = ctx->digest->newctx(ossl_provider_ctx(type->prov));
  210|   419k|        if (ctx->algctx == NULL) {
  ------------------
  |  Branch (210:13): [True: 0, False: 419k]
  ------------------
  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|   419k|    }
  215|       |
  216|   444k|    if (ctx->digest->dinit == NULL) {
  ------------------
  |  Branch (216:9): [True: 0, False: 444k]
  ------------------
  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|   444k|    return ctx->digest->dinit(ctx->algctx, params);
  222|   444k|}
digest.c:evp_md_from_algorithm:
  833|  20.2k|{
  834|  20.2k|    const OSSL_DISPATCH *fns = algodef->implementation;
  835|  20.2k|    EVP_MD *md = NULL;
  836|  20.2k|    int fncnt = 0;
  837|       |
  838|       |    /* EVP_MD_fetch() will set the legacy NID if available */
  839|  20.2k|    if ((md = evp_md_new()) == NULL) {
  ------------------
  |  Branch (839:9): [True: 0, False: 20.2k]
  ------------------
  840|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  841|      0|        return NULL;
  842|      0|    }
  843|       |
  844|  20.2k|#ifndef FIPS_MODULE
  845|  20.2k|    md->type = NID_undef;
  ------------------
  |  |   18|  20.2k|#define NID_undef                       0
  ------------------
  846|  20.2k|    if (!evp_names_do_all(prov, name_id, set_legacy_nid, &md->type)
  ------------------
  |  Branch (846:9): [True: 0, False: 20.2k]
  ------------------
  847|  20.2k|        || md->type == -1) {
  ------------------
  |  Branch (847:12): [True: 0, False: 20.2k]
  ------------------
  848|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  849|      0|        goto err;
  850|      0|    }
  851|  20.2k|#endif
  852|       |
  853|  20.2k|    md->name_id = name_id;
  854|  20.2k|    if ((md->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (854:9): [True: 0, False: 20.2k]
  ------------------
  855|      0|        goto err;
  856|       |
  857|  20.2k|    md->description = algodef->algorithm_description;
  858|       |
  859|   256k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (859:12): [True: 236k, False: 20.2k]
  ------------------
  860|   236k|        switch (fns->function_id) {
  ------------------
  |  Branch (860:17): [True: 236k, False: 0]
  ------------------
  861|  20.2k|        case OSSL_FUNC_DIGEST_NEWCTX:
  ------------------
  |  |  303|  20.2k|#define OSSL_FUNC_DIGEST_NEWCTX 1
  ------------------
  |  Branch (861:9): [True: 20.2k, False: 216k]
  ------------------
  862|  20.2k|            if (md->newctx == NULL) {
  ------------------
  |  Branch (862:17): [True: 20.2k, False: 0]
  ------------------
  863|  20.2k|                md->newctx = OSSL_FUNC_digest_newctx(fns);
  864|  20.2k|                fncnt++;
  865|  20.2k|            }
  866|  20.2k|            break;
  867|  20.2k|        case OSSL_FUNC_DIGEST_INIT:
  ------------------
  |  |  304|  20.2k|#define OSSL_FUNC_DIGEST_INIT 2
  ------------------
  |  Branch (867:9): [True: 20.2k, False: 216k]
  ------------------
  868|  20.2k|            if (md->dinit == NULL) {
  ------------------
  |  Branch (868:17): [True: 20.2k, False: 0]
  ------------------
  869|  20.2k|                md->dinit = OSSL_FUNC_digest_init(fns);
  870|  20.2k|                fncnt++;
  871|  20.2k|            }
  872|  20.2k|            break;
  873|  20.2k|        case OSSL_FUNC_DIGEST_UPDATE:
  ------------------
  |  |  305|  20.2k|#define OSSL_FUNC_DIGEST_UPDATE 3
  ------------------
  |  Branch (873:9): [True: 20.2k, False: 216k]
  ------------------
  874|  20.2k|            if (md->dupdate == NULL) {
  ------------------
  |  Branch (874:17): [True: 20.2k, False: 0]
  ------------------
  875|  20.2k|                md->dupdate = OSSL_FUNC_digest_update(fns);
  876|  20.2k|                fncnt++;
  877|  20.2k|            }
  878|  20.2k|            break;
  879|  20.2k|        case OSSL_FUNC_DIGEST_FINAL:
  ------------------
  |  |  306|  20.2k|#define OSSL_FUNC_DIGEST_FINAL 4
  ------------------
  |  Branch (879:9): [True: 20.2k, False: 216k]
  ------------------
  880|  20.2k|            if (md->dfinal == NULL) {
  ------------------
  |  Branch (880:17): [True: 20.2k, False: 0]
  ------------------
  881|  20.2k|                md->dfinal = OSSL_FUNC_digest_final(fns);
  882|  20.2k|                fncnt++;
  883|  20.2k|            }
  884|  20.2k|            break;
  885|  4.04k|        case OSSL_FUNC_DIGEST_SQUEEZE:
  ------------------
  |  |  316|  4.04k|#define OSSL_FUNC_DIGEST_SQUEEZE 14
  ------------------
  |  Branch (885:9): [True: 4.04k, False: 232k]
  ------------------
  886|  4.04k|            if (md->dsqueeze == NULL) {
  ------------------
  |  Branch (886:17): [True: 4.04k, False: 0]
  ------------------
  887|  4.04k|                md->dsqueeze = OSSL_FUNC_digest_squeeze(fns);
  888|  4.04k|                fncnt++;
  889|  4.04k|            }
  890|  4.04k|            break;
  891|      0|        case OSSL_FUNC_DIGEST_DIGEST:
  ------------------
  |  |  307|      0|#define OSSL_FUNC_DIGEST_DIGEST 5
  ------------------
  |  Branch (891:9): [True: 0, False: 236k]
  ------------------
  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|  20.2k|        case OSSL_FUNC_DIGEST_FREECTX:
  ------------------
  |  |  308|  20.2k|#define OSSL_FUNC_DIGEST_FREECTX 6
  ------------------
  |  Branch (896:9): [True: 20.2k, False: 216k]
  ------------------
  897|  20.2k|            if (md->freectx == NULL) {
  ------------------
  |  Branch (897:17): [True: 20.2k, False: 0]
  ------------------
  898|  20.2k|                md->freectx = OSSL_FUNC_digest_freectx(fns);
  899|  20.2k|                fncnt++;
  900|  20.2k|            }
  901|  20.2k|            break;
  902|  20.2k|        case OSSL_FUNC_DIGEST_DUPCTX:
  ------------------
  |  |  309|  20.2k|#define OSSL_FUNC_DIGEST_DUPCTX 7
  ------------------
  |  Branch (902:9): [True: 20.2k, False: 216k]
  ------------------
  903|  20.2k|            if (md->dupctx == NULL)
  ------------------
  |  Branch (903:17): [True: 20.2k, False: 0]
  ------------------
  904|  20.2k|                md->dupctx = OSSL_FUNC_digest_dupctx(fns);
  905|  20.2k|            break;
  906|  20.2k|        case OSSL_FUNC_DIGEST_GET_PARAMS:
  ------------------
  |  |  310|  20.2k|#define OSSL_FUNC_DIGEST_GET_PARAMS 8
  ------------------
  |  Branch (906:9): [True: 20.2k, False: 216k]
  ------------------
  907|  20.2k|            if (md->get_params == NULL)
  ------------------
  |  Branch (907:17): [True: 20.2k, False: 0]
  ------------------
  908|  20.2k|                md->get_params = OSSL_FUNC_digest_get_params(fns);
  909|  20.2k|            break;
  910|  7.41k|        case OSSL_FUNC_DIGEST_SET_CTX_PARAMS:
  ------------------
  |  |  311|  7.41k|#define OSSL_FUNC_DIGEST_SET_CTX_PARAMS 9
  ------------------
  |  Branch (910:9): [True: 7.41k, False: 229k]
  ------------------
  911|  7.41k|            if (md->set_ctx_params == NULL)
  ------------------
  |  Branch (911:17): [True: 7.41k, False: 0]
  ------------------
  912|  7.41k|                md->set_ctx_params = OSSL_FUNC_digest_set_ctx_params(fns);
  913|  7.41k|            break;
  914|  6.06k|        case OSSL_FUNC_DIGEST_GET_CTX_PARAMS:
  ------------------
  |  |  312|  6.06k|#define OSSL_FUNC_DIGEST_GET_CTX_PARAMS 10
  ------------------
  |  Branch (914:9): [True: 6.06k, False: 230k]
  ------------------
  915|  6.06k|            if (md->get_ctx_params == NULL)
  ------------------
  |  Branch (915:17): [True: 6.06k, False: 0]
  ------------------
  916|  6.06k|                md->get_ctx_params = OSSL_FUNC_digest_get_ctx_params(fns);
  917|  6.06k|            break;
  918|  20.2k|        case OSSL_FUNC_DIGEST_GETTABLE_PARAMS:
  ------------------
  |  |  313|  20.2k|#define OSSL_FUNC_DIGEST_GETTABLE_PARAMS 11
  ------------------
  |  Branch (918:9): [True: 20.2k, False: 216k]
  ------------------
  919|  20.2k|            if (md->gettable_params == NULL)
  ------------------
  |  Branch (919:17): [True: 20.2k, False: 0]
  ------------------
  920|  20.2k|                md->gettable_params = OSSL_FUNC_digest_gettable_params(fns);
  921|  20.2k|            break;
  922|  7.41k|        case OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  314|  7.41k|#define OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS 12
  ------------------
  |  Branch (922:9): [True: 7.41k, False: 229k]
  ------------------
  923|  7.41k|            if (md->settable_ctx_params == NULL)
  ------------------
  |  Branch (923:17): [True: 7.41k, False: 0]
  ------------------
  924|  7.41k|                md->settable_ctx_params = OSSL_FUNC_digest_settable_ctx_params(fns);
  925|  7.41k|            break;
  926|  6.06k|        case OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  315|  6.06k|#define OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS 13
  ------------------
  |  Branch (926:9): [True: 6.06k, False: 230k]
  ------------------
  927|  6.06k|            if (md->gettable_ctx_params == NULL)
  ------------------
  |  Branch (927:17): [True: 6.06k, False: 0]
  ------------------
  928|  6.06k|                md->gettable_ctx_params = OSSL_FUNC_digest_gettable_ctx_params(fns);
  929|  6.06k|            break;
  930|  18.1k|        case OSSL_FUNC_DIGEST_COPYCTX:
  ------------------
  |  |  317|  18.1k|#define OSSL_FUNC_DIGEST_COPYCTX 15
  ------------------
  |  Branch (930:9): [True: 18.1k, False: 218k]
  ------------------
  931|  18.1k|            if (md->copyctx == NULL)
  ------------------
  |  Branch (931:17): [True: 18.1k, False: 0]
  ------------------
  932|  18.1k|                md->copyctx = OSSL_FUNC_digest_copyctx(fns);
  933|  18.1k|            break;
  934|  12.8k|        case OSSL_FUNC_DIGEST_SERIALIZE:
  ------------------
  |  |  318|  12.8k|#define OSSL_FUNC_DIGEST_SERIALIZE 16
  ------------------
  |  Branch (934:9): [True: 12.8k, False: 223k]
  ------------------
  935|  12.8k|            if (md->serialize == NULL)
  ------------------
  |  Branch (935:17): [True: 12.8k, False: 0]
  ------------------
  936|  12.8k|                md->serialize = OSSL_FUNC_digest_serialize(fns);
  937|  12.8k|            break;
  938|  12.8k|        case OSSL_FUNC_DIGEST_DESERIALIZE:
  ------------------
  |  |  319|  12.8k|#define OSSL_FUNC_DIGEST_DESERIALIZE 17
  ------------------
  |  Branch (938:9): [True: 12.8k, False: 223k]
  ------------------
  939|  12.8k|            if (md->deserialize == NULL)
  ------------------
  |  Branch (939:17): [True: 12.8k, False: 0]
  ------------------
  940|  12.8k|                md->deserialize = OSSL_FUNC_digest_deserialize(fns);
  941|  12.8k|            break;
  942|   236k|        }
  943|   236k|    }
  944|  20.2k|    if ((fncnt != 0 && fncnt != 5 && fncnt != 6)
  ------------------
  |  Branch (944:10): [True: 20.2k, False: 0]
  |  Branch (944:24): [True: 4.04k, False: 16.1k]
  |  Branch (944:38): [True: 0, False: 4.04k]
  ------------------
  945|  20.2k|        || (fncnt == 0 && md->digest == NULL)) {
  ------------------
  |  Branch (945:13): [True: 0, False: 20.2k]
  |  Branch (945:27): [True: 0, False: 0]
  ------------------
  946|       |        /*
  947|       |         * In order to be a consistent set of functions we either need the
  948|       |         * whole set of init/update/final etc functions or none of them.
  949|       |         * The "digest" function can standalone. We at least need one way to
  950|       |         * generate digests.
  951|       |         */
  952|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  953|      0|        goto err;
  954|      0|    }
  955|  20.2k|    if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (955:9): [True: 20.2k, False: 0]
  |  Branch (955:25): [True: 0, False: 20.2k]
  ------------------
  956|      0|        goto err;
  957|       |
  958|  20.2k|    md->prov = prov;
  959|       |
  960|  20.2k|    if (!evp_md_cache_constants(md)) {
  ------------------
  |  Branch (960:9): [True: 0, False: 20.2k]
  ------------------
  961|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_CACHE_CONSTANTS_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  962|      0|        goto err;
  963|      0|    }
  964|       |
  965|  20.2k|    return md;
  966|       |
  967|      0|err:
  968|      0|    EVP_MD_free(md);
  969|       |    return NULL;
  970|  20.2k|}
digest.c:set_legacy_nid:
  774|  52.5k|{
  775|  52.5k|    int nid;
  776|  52.5k|    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|  52.5k|    const void *legacy_method = OBJ_NAME_get(name, OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   25|  52.5k|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  783|       |
  784|  52.5k|    if (*legacy_nid == -1) /* We found a clash already */
  ------------------
  |  Branch (784:9): [True: 0, False: 52.5k]
  ------------------
  785|      0|        return;
  786|       |
  787|  52.5k|    if (legacy_method == NULL)
  ------------------
  |  Branch (787:9): [True: 37.0k, False: 15.5k]
  ------------------
  788|  37.0k|        return;
  789|  15.5k|    nid = EVP_MD_nid(legacy_method);
  ------------------
  |  |  453|  15.5k|#define EVP_MD_nid EVP_MD_get_type
  ------------------
  790|  15.5k|    if (*legacy_nid != NID_undef && *legacy_nid != nid) {
  ------------------
  |  |   18|  31.0k|#define NID_undef                       0
  ------------------
  |  Branch (790:9): [True: 2.69k, False: 12.8k]
  |  Branch (790:37): [True: 0, False: 2.69k]
  ------------------
  791|      0|        *legacy_nid = -1;
  792|      0|        return;
  793|      0|    }
  794|  15.5k|    *legacy_nid = nid;
  795|  15.5k|}
digest.c:evp_md_cache_constants:
  799|  20.2k|{
  800|  20.2k|    int ok, xof = 0, algid_absent = 0;
  801|  20.2k|    size_t blksz = 0;
  802|  20.2k|    size_t mdsize = 0;
  803|  20.2k|    OSSL_PARAM params[5];
  804|       |
  805|       |    /*
  806|       |     * Note that these parameters are 'constants' that are only set up
  807|       |     * during the EVP_MD_fetch(). For this reason the XOF functions set the
  808|       |     * md_size to 0, since the output size is unknown.
  809|       |     */
  810|  20.2k|    params[0] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_BLOCK_SIZE, &blksz);
  ------------------
  |  |  223|  20.2k|# define OSSL_DIGEST_PARAM_BLOCK_SIZE "blocksize"
  ------------------
  811|  20.2k|    params[1] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_SIZE, &mdsize);
  ------------------
  |  |  233|  20.2k|# define OSSL_DIGEST_PARAM_SIZE "size"
  ------------------
  812|  20.2k|    params[2] = OSSL_PARAM_construct_int(OSSL_DIGEST_PARAM_XOF, &xof);
  ------------------
  |  |  235|  20.2k|# define OSSL_DIGEST_PARAM_XOF "xof"
  ------------------
  813|  20.2k|    params[3] = OSSL_PARAM_construct_int(OSSL_DIGEST_PARAM_ALGID_ABSENT,
  ------------------
  |  |  222|  20.2k|# define OSSL_DIGEST_PARAM_ALGID_ABSENT "algid-absent"
  ------------------
  814|  20.2k|        &algid_absent);
  815|  20.2k|    params[4] = OSSL_PARAM_construct_end();
  816|  20.2k|    ok = evp_do_md_getparams(md, params) > 0;
  817|  20.2k|    if (mdsize > INT_MAX || blksz > INT_MAX)
  ------------------
  |  Branch (817:9): [True: 0, False: 20.2k]
  |  Branch (817:29): [True: 0, False: 20.2k]
  ------------------
  818|      0|        ok = 0;
  819|  20.2k|    if (ok) {
  ------------------
  |  Branch (819:9): [True: 20.2k, False: 0]
  ------------------
  820|  20.2k|        md->block_size = (int)blksz;
  821|  20.2k|        md->md_size = (int)mdsize;
  822|  20.2k|        if (xof)
  ------------------
  |  Branch (822:13): [True: 4.04k, False: 16.1k]
  ------------------
  823|  4.04k|            md->flags |= EVP_MD_FLAG_XOF;
  ------------------
  |  |  135|  4.04k|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
  824|  20.2k|        if (algid_absent)
  ------------------
  |  Branch (824:13): [True: 14.1k, False: 6.06k]
  ------------------
  825|  14.1k|            md->flags |= EVP_MD_FLAG_DIGALGID_ABSENT;
  ------------------
  |  |  147|  14.1k|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  826|  20.2k|    }
  827|  20.2k|    return ok;
  828|  20.2k|}
digest.c:evp_md_up_ref:
  973|   477k|{
  974|   477k|    return EVP_MD_up_ref(md);
  975|   477k|}
digest.c:evp_md_free:
  978|  47.1k|{
  979|  47.1k|    EVP_MD_free(md);
  980|  47.1k|}

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

EVP_ENCODE_CTX_new:
  111|   458k|{
  112|   458k|    return OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));
  ------------------
  |  |  109|   458k|    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|   458k|}
EVP_ENCODE_CTX_free:
  116|   465k|{
  117|   465k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   465k|    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|   465k|}
EVP_DecodeInit:
  259|   458k|{
  260|       |    /* Only ctx->num and ctx->flags are used during decoding. */
  261|   458k|    ctx->num = 0;
  262|   458k|    ctx->line_num = 0;
  263|   458k|    ctx->flags = 0;
  264|   458k|}
EVP_DecodeUpdate:
  288|   458k|{
  289|   458k|    int seof = 0, eof = 0, rv = -1, ret = 0, i, v, tmp, n, decoded_len;
  290|   458k|    unsigned char *d;
  291|   458k|    const unsigned char *table;
  292|       |
  293|   458k|    n = ctx->num;
  294|   458k|    d = ctx->enc_data;
  295|       |
  296|   458k|    if (n > 0 && d[n - 1] == '=') {
  ------------------
  |  Branch (296:9): [True: 0, False: 458k]
  |  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|   458k|    if (inl == 0) {
  ------------------
  |  Branch (303:9): [True: 0, False: 458k]
  ------------------
  304|      0|        rv = 0;
  305|      0|        goto end;
  306|      0|    }
  307|       |
  308|   458k|    if ((ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0)
  ------------------
  |  |  627|   458k|#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
  ------------------
  |  Branch (308:9): [True: 0, False: 458k]
  ------------------
  309|      0|        table = srpdata_ascii2bin;
  310|   458k|    else
  311|   458k|        table = data_ascii2bin;
  312|       |
  313|   665M|    for (i = 0; i < inl; i++) {
  ------------------
  |  Branch (313:17): [True: 665M, False: 458k]
  ------------------
  314|   665M|        tmp = *(in++);
  315|   665M|        v = conv_ascii2bin(tmp, table);
  316|   665M|        if (v == B64_ERROR) {
  ------------------
  |  |   57|   665M|#define B64_ERROR 0xFF
  ------------------
  |  Branch (316:13): [True: 0, False: 665M]
  ------------------
  317|      0|            rv = -1;
  318|      0|            goto end;
  319|      0|        }
  320|       |
  321|   665M|        if (tmp == '=') {
  ------------------
  |  Branch (321:13): [True: 352k, False: 664M]
  ------------------
  322|   352k|            eof++;
  323|   664M|        } else if (eof > 0 && B64_BASE64(v)) {
  ------------------
  |  |   59|   250k|#define B64_BASE64(a) (!B64_NOT_BASE64(a))
  |  |  ------------------
  |  |  |  |   58|   250k|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  |  |  ------------------
  |  |  |  Branch (59:23): [True: 0, False: 250k]
  |  |  ------------------
  ------------------
  |  Branch (323:20): [True: 250k, False: 664M]
  ------------------
  324|       |            /* More data after padding. */
  325|      0|            rv = -1;
  326|      0|            goto end;
  327|      0|        }
  328|       |
  329|   665M|        if (eof > 2) {
  ------------------
  |  Branch (329:13): [True: 0, False: 665M]
  ------------------
  330|      0|            rv = -1;
  331|      0|            goto end;
  332|      0|        }
  333|       |
  334|   665M|        if (v == B64_EOF) {
  ------------------
  |  |   55|   665M|#define B64_EOF 0xF2
  ------------------
  |  Branch (334:13): [True: 0, False: 665M]
  ------------------
  335|      0|            seof = 1;
  336|      0|            goto tail;
  337|      0|        }
  338|       |
  339|       |        /* Only save valid base64 characters. */
  340|   665M|        if (B64_BASE64(v)) {
  ------------------
  |  |   59|   665M|#define B64_BASE64(a) (!B64_NOT_BASE64(a))
  |  |  ------------------
  |  |  |  |   58|   665M|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  |  |  ------------------
  |  |  |  Branch (59:23): [True: 654M, False: 10.4M]
  |  |  ------------------
  ------------------
  341|   654M|            if (n >= 64) {
  ------------------
  |  Branch (341:17): [True: 0, False: 654M]
  ------------------
  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|   654M|            OPENSSL_assert(n < (int)sizeof(ctx->enc_data));
  ------------------
  |  |  477|   654M|    (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: 654M, False: 0]
  |  |  ------------------
  ------------------
  351|   654M|            d[n++] = tmp;
  352|   654M|        }
  353|       |
  354|   665M|        if (n == 64) {
  ------------------
  |  Branch (354:13): [True: 10.0M, False: 655M]
  ------------------
  355|  10.0M|            decoded_len = evp_decodeblock_int(ctx, out, d, n, eof);
  356|  10.0M|            n = 0;
  357|  10.0M|            if (decoded_len < 0 || (decoded_len == 0 && eof > 0)) {
  ------------------
  |  Branch (357:17): [True: 0, False: 10.0M]
  |  Branch (357:37): [True: 0, False: 10.0M]
  |  Branch (357:57): [True: 0, False: 0]
  ------------------
  358|      0|                rv = -1;
  359|      0|                goto end;
  360|      0|            }
  361|  10.0M|            ret += decoded_len;
  362|  10.0M|            out += decoded_len;
  363|  10.0M|        }
  364|   665M|    }
  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|   458k|tail:
  372|   458k|    if (n > 0) {
  ------------------
  |  Branch (372:9): [True: 428k, False: 30.3k]
  ------------------
  373|   428k|        if ((n & 3) == 0) {
  ------------------
  |  Branch (373:13): [True: 428k, False: 0]
  ------------------
  374|   428k|            decoded_len = evp_decodeblock_int(ctx, out, d, n, eof);
  375|   428k|            n = 0;
  376|   428k|            if (decoded_len < 0 || (decoded_len == 0 && eof > 0)) {
  ------------------
  |  Branch (376:17): [True: 0, False: 428k]
  |  Branch (376:37): [True: 0, False: 428k]
  |  Branch (376:57): [True: 0, False: 0]
  ------------------
  377|      0|                rv = -1;
  378|      0|                goto end;
  379|      0|            }
  380|   428k|            ret += decoded_len;
  381|   428k|        } 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|   428k|    }
  387|       |
  388|   458k|    rv = seof || (n == 0 && eof) ? 0 : 1;
  ------------------
  |  Branch (388:10): [True: 0, False: 458k]
  |  Branch (388:19): [True: 458k, False: 0]
  |  Branch (388:29): [True: 250k, False: 208k]
  ------------------
  389|   458k|end:
  390|       |    /* Legacy behaviour. This should probably rather be zeroed on error. */
  391|   458k|    *outl = ret;
  392|   458k|    ctx->num = n;
  393|   458k|    return rv;
  394|   458k|}
EVP_DecodeFinal:
  482|   458k|{
  483|   458k|    int i;
  484|       |
  485|   458k|    *outl = 0;
  486|   458k|    if (ctx->num != 0) {
  ------------------
  |  Branch (486:9): [True: 0, False: 458k]
  ------------------
  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|   458k|        return 1;
  495|   458k|}
encode.c:conv_ascii2bin:
   95|  1.34G|{
   96|  1.34G|    if (a & 0x80)
  ------------------
  |  Branch (96:9): [True: 0, False: 1.34G]
  ------------------
   97|      0|        return B64_ERROR;
  ------------------
  |  |   57|      0|#define B64_ERROR 0xFF
  ------------------
   98|  1.34G|    return table[a];
   99|  1.34G|}
encode.c:evp_decodeblock_int:
  399|  10.4M|{
  400|  10.4M|    int i, ret = 0, a, b, c, d;
  401|  10.4M|    unsigned long l;
  402|  10.4M|    const unsigned char *table;
  403|       |
  404|  10.4M|    if (eof < -1 || eof > 2)
  ------------------
  |  Branch (404:9): [True: 0, False: 10.4M]
  |  Branch (404:21): [True: 0, False: 10.4M]
  ------------------
  405|      0|        return -1;
  406|       |
  407|  10.4M|    if (ctx != NULL && (ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0)
  ------------------
  |  |  627|  10.4M|#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
  ------------------
  |  Branch (407:9): [True: 10.4M, False: 0]
  |  Branch (407:24): [True: 0, False: 10.4M]
  ------------------
  408|      0|        table = srpdata_ascii2bin;
  409|  10.4M|    else
  410|  10.4M|        table = data_ascii2bin;
  411|       |
  412|       |    /* trim whitespace from the start of the line. */
  413|  10.4M|    while ((n > 0) && (conv_ascii2bin(*f, table) == B64_WS)) {
  ------------------
  |  |   56|  10.4M|#define B64_WS 0xE0
  ------------------
  |  Branch (413:12): [True: 10.4M, False: 0]
  |  Branch (413:23): [True: 0, False: 10.4M]
  ------------------
  414|      0|        f++;
  415|      0|        n--;
  416|      0|    }
  417|       |
  418|       |    /*
  419|       |     * strip off stuff at the end of the line ascii2bin values B64_WS,
  420|       |     * B64_EOLN, B64_EOLN and B64_EOF
  421|       |     */
  422|  10.4M|    while ((n > 3) && (B64_NOT_BASE64(conv_ascii2bin(f[n - 1], table))))
  ------------------
  |  |   58|  10.4M|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  ------------------
  |  Branch (422:12): [True: 10.4M, False: 0]
  |  Branch (422:23): [True: 0, False: 10.4M]
  ------------------
  423|      0|        n--;
  424|       |
  425|  10.4M|    if (n % 4 != 0)
  ------------------
  |  Branch (425:9): [True: 0, False: 10.4M]
  ------------------
  426|      0|        return -1;
  427|  10.4M|    if (n == 0)
  ------------------
  |  Branch (427:9): [True: 0, False: 10.4M]
  ------------------
  428|      0|        return 0;
  429|       |
  430|       |    /* all 4-byte blocks except the last one do not have padding. */
  431|   163M|    for (i = 0; i < n - 4; i += 4) {
  ------------------
  |  Branch (431:17): [True: 153M, False: 10.4M]
  ------------------
  432|   153M|        a = conv_ascii2bin(*(f++), table);
  433|   153M|        b = conv_ascii2bin(*(f++), table);
  434|   153M|        c = conv_ascii2bin(*(f++), table);
  435|   153M|        d = conv_ascii2bin(*(f++), table);
  436|   153M|        if ((a | b | c | d) & 0x80)
  ------------------
  |  Branch (436:13): [True: 0, False: 153M]
  ------------------
  437|      0|            return -1;
  438|   153M|        l = ((((unsigned long)a) << 18L) | (((unsigned long)b) << 12L) | (((unsigned long)c) << 6L) | (((unsigned long)d)));
  439|   153M|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  440|   153M|        *(t++) = (unsigned char)(l >> 8L) & 0xff;
  441|   153M|        *(t++) = (unsigned char)(l) & 0xff;
  442|   153M|        ret += 3;
  443|   153M|    }
  444|       |
  445|       |    /* process the last block that may have padding. */
  446|  10.4M|    a = conv_ascii2bin(*(f++), table);
  447|  10.4M|    b = conv_ascii2bin(*(f++), table);
  448|  10.4M|    c = conv_ascii2bin(*(f++), table);
  449|  10.4M|    d = conv_ascii2bin(*(f++), table);
  450|  10.4M|    if ((a | b | c | d) & 0x80)
  ------------------
  |  Branch (450:9): [True: 0, False: 10.4M]
  ------------------
  451|      0|        return -1;
  452|  10.4M|    l = ((((unsigned long)a) << 18L) | (((unsigned long)b) << 12L) | (((unsigned long)c) << 6L) | (((unsigned long)d)));
  453|       |
  454|  10.4M|    if (eof == -1)
  ------------------
  |  Branch (454:9): [True: 0, False: 10.4M]
  ------------------
  455|      0|        eof = (c == '=') + (d == '=');
  456|       |
  457|  10.4M|    switch (eof) {
  ------------------
  |  Branch (457:13): [True: 10.4M, False: 0]
  ------------------
  458|   102k|    case 2:
  ------------------
  |  Branch (458:5): [True: 102k, False: 10.3M]
  ------------------
  459|   102k|        *t = (unsigned char)(l >> 16L) & 0xff;
  460|   102k|        break;
  461|   147k|    case 1:
  ------------------
  |  Branch (461:5): [True: 147k, False: 10.2M]
  ------------------
  462|   147k|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  463|   147k|        *t = (unsigned char)(l >> 8L) & 0xff;
  464|   147k|        break;
  465|  10.1M|    case 0:
  ------------------
  |  Branch (465:5): [True: 10.1M, False: 250k]
  ------------------
  466|  10.1M|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  467|  10.1M|        *(t++) = (unsigned char)(l >> 8L) & 0xff;
  468|  10.1M|        *t = (unsigned char)(l) & 0xff;
  469|  10.1M|        break;
  470|  10.4M|    }
  471|  10.4M|    ret += 3 - eof;
  472|       |
  473|  10.4M|    return ret;
  474|  10.4M|}

EVP_CIPHER_CTX_reset:
   29|  5.20k|{
   30|  5.20k|    if (ctx == NULL)
  ------------------
  |  Branch (30:9): [True: 0, False: 5.20k]
  ------------------
   31|      0|        return 1;
   32|       |
   33|  5.20k|    if (ctx->cipher == NULL || ctx->cipher->prov == NULL)
  ------------------
  |  Branch (33:9): [True: 0, False: 5.20k]
  |  Branch (33:32): [True: 0, False: 5.20k]
  ------------------
   34|      0|        return 1;
   35|       |
   36|  5.20k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (36:9): [True: 5.20k, False: 0]
  ------------------
   37|  5.20k|        if (ctx->cipher->freectx != NULL)
  ------------------
  |  Branch (37:13): [True: 5.20k, False: 0]
  ------------------
   38|  5.20k|            ctx->cipher->freectx(ctx->algctx);
   39|  5.20k|        ctx->algctx = NULL;
   40|  5.20k|    }
   41|  5.20k|    if (ctx->fetched_cipher != NULL)
  ------------------
  |  Branch (41:9): [True: 5.20k, False: 0]
  ------------------
   42|  5.20k|        EVP_CIPHER_free(ctx->fetched_cipher);
   43|  5.20k|    memset(ctx, 0, sizeof(*ctx));
   44|  5.20k|    ctx->iv_len = -1;
   45|       |
   46|  5.20k|    return 1;
   47|  5.20k|}
EVP_CIPHER_CTX_new:
   50|  5.21k|{
   51|  5.21k|    EVP_CIPHER_CTX *ctx;
   52|       |
   53|  5.21k|    ctx = OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));
  ------------------
  |  |  109|  5.21k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   54|  5.21k|    if (ctx == NULL)
  ------------------
  |  Branch (54:9): [True: 0, False: 5.21k]
  ------------------
   55|      0|        return NULL;
   56|       |
   57|  5.21k|    ctx->iv_len = -1;
   58|  5.21k|    return ctx;
   59|  5.21k|}
EVP_CIPHER_CTX_free:
   62|  19.1k|{
   63|  19.1k|    if (ctx == NULL)
  ------------------
  |  Branch (63:9): [True: 13.9k, False: 5.20k]
  ------------------
   64|  13.9k|        return;
   65|  5.20k|    EVP_CIPHER_CTX_reset(ctx);
   66|  5.20k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  5.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__
  |  |  ------------------
  ------------------
   67|  5.20k|}
EVP_CipherInit_ex:
  411|   110k|{
  412|   110k|    if (!ossl_assert(impl == NULL))
  ------------------
  |  |   52|   110k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   110k|    __FILE__, __LINE__)
  ------------------
  |  Branch (412:9): [True: 0, False: 110k]
  ------------------
  413|      0|        return 0;
  414|   110k|    return evp_cipher_init_internal(ctx, cipher, key, iv, enc, 0, NULL);
  415|   110k|}
EVP_CipherUpdate:
  479|   103k|{
  480|   103k|    if (ctx->encrypt)
  ------------------
  |  Branch (480:9): [True: 103k, False: 0]
  ------------------
  481|   103k|        return EVP_EncryptUpdate(ctx, out, outl, in, inl);
  482|      0|    else
  483|      0|        return EVP_DecryptUpdate(ctx, out, outl, in, inl);
  484|   103k|}
EVP_EncryptUpdate:
  652|   103k|{
  653|   103k|    int ret;
  654|   103k|    size_t soutl, inl_ = (size_t)inl;
  655|   103k|    int blocksize;
  656|       |
  657|   103k|    if (inl < 0) {
  ------------------
  |  Branch (657:9): [True: 0, False: 103k]
  ------------------
  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|   103k|    if (ossl_likely(outl != NULL)) {
  ------------------
  |  |   22|   103k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 103k, False: 0]
  |  |  ------------------
  ------------------
  663|   103k|        *outl = 0;
  664|   103k|    } 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|   103k|    if (ossl_unlikely(!ctx->encrypt)) {
  ------------------
  |  |   23|   103k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 103k]
  |  |  ------------------
  ------------------
  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|   103k|    if (ossl_unlikely(ctx->cipher == NULL)) {
  ------------------
  |  |   23|   103k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 103k]
  |  |  ------------------
  ------------------
  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|   103k|    if (ossl_unlikely(ctx->cipher->prov == NULL))
  ------------------
  |  |   23|   103k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 103k]
  |  |  ------------------
  ------------------
  681|      0|        return 0;
  682|       |
  683|   103k|    blocksize = ctx->cipher->block_size;
  684|       |
  685|   103k|    if (ossl_unlikely(ctx->cipher->cupdate == NULL || blocksize < 1)) {
  ------------------
  |  |   23|   206k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 103k]
  |  |  |  Branch (23:46): [True: 0, False: 103k]
  |  |  |  Branch (23:46): [True: 0, False: 103k]
  |  |  ------------------
  ------------------
  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|   103k|    ret = ctx->cipher->cupdate(ctx->algctx, out, &soutl,
  691|   103k|        inl_ + (size_t)(blocksize == 1 ? 0 : blocksize),
  ------------------
  |  Branch (691:25): [True: 29.3k, False: 73.9k]
  ------------------
  692|   103k|        in, inl_);
  693|       |
  694|   103k|    if (ossl_likely(ret)) {
  ------------------
  |  |   22|   103k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 103k, False: 0]
  |  |  ------------------
  ------------------
  695|   103k|        if (ossl_unlikely(soutl > INT_MAX)) {
  ------------------
  |  |   23|   103k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 103k]
  |  |  ------------------
  ------------------
  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|   103k|        *outl = (int)soutl;
  700|   103k|    }
  701|       |
  702|   103k|    return ret;
  703|   103k|}
EVP_CIPHER_get_params:
 1130|  48.5k|{
 1131|  48.5k|    if (cipher != NULL && cipher->get_params != NULL)
  ------------------
  |  Branch (1131:9): [True: 48.5k, False: 0]
  |  Branch (1131:27): [True: 48.5k, False: 0]
  ------------------
 1132|  48.5k|        return cipher->get_params(params);
 1133|      0|    return 0;
 1134|  48.5k|}
EVP_CIPHER_gettable_ctx_params:
 1188|  87.6k|{
 1189|  87.6k|    void *provctx;
 1190|       |
 1191|  87.6k|    if (cipher != NULL && cipher->gettable_ctx_params != NULL) {
  ------------------
  |  Branch (1191:9): [True: 87.6k, False: 0]
  |  Branch (1191:27): [True: 87.6k, False: 0]
  ------------------
 1192|  87.6k|        provctx = ossl_provider_ctx(EVP_CIPHER_get0_provider(cipher));
 1193|  87.6k|        return cipher->gettable_ctx_params(NULL, provctx);
 1194|  87.6k|    }
 1195|      0|    return NULL;
 1196|  87.6k|}
evp_cipher_new:
 1302|  87.6k|{
 1303|  87.6k|    EVP_CIPHER *cipher = OPENSSL_zalloc(sizeof(EVP_CIPHER));
  ------------------
  |  |  109|  87.6k|    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|  87.6k|    if (cipher != NULL && !CRYPTO_NEW_REF(&cipher->refcnt, 1)) {
  ------------------
  |  Branch (1305:9): [True: 87.6k, False: 0]
  |  Branch (1305:27): [True: 0, False: 87.6k]
  ------------------
 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|  87.6k|    return cipher;
 1310|  87.6k|}
EVP_CIPHER_fetch:
 1530|  78.2k|{
 1531|  78.2k|    EVP_CIPHER *cipher = evp_generic_fetch(ctx, OSSL_OP_CIPHER, algorithm, properties,
  ------------------
  |  |  284|  78.2k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
 1532|  78.2k|        evp_cipher_from_algorithm, evp_cipher_up_ref,
 1533|  78.2k|        evp_cipher_free);
 1534|       |
 1535|  78.2k|    return cipher;
 1536|  78.2k|}
evp_cipher_fetch_from_prov:
 1541|  3.47k|{
 1542|  3.47k|    return evp_generic_fetch_from_prov(prov, OSSL_OP_CIPHER,
  ------------------
  |  |  284|  3.47k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
 1543|  3.47k|        algorithm, properties,
 1544|  3.47k|        evp_cipher_from_algorithm,
 1545|  3.47k|        evp_cipher_up_ref,
 1546|  3.47k|        evp_cipher_free);
 1547|  3.47k|}
EVP_CIPHER_up_ref:
 1559|   154k|{
 1560|   154k|    int ref = 0;
 1561|       |
 1562|   154k|    if (cipher->origin == EVP_ORIG_DYNAMIC)
  ------------------
  |  |  186|   154k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (1562:9): [True: 154k, False: 0]
  ------------------
 1563|   154k|        CRYPTO_UP_REF(&cipher->refcnt, &ref);
 1564|   154k|    return 1;
 1565|   154k|}
evp_cipher_free_int:
 1568|  87.4k|{
 1569|  87.4k|    OPENSSL_free(cipher->type_name);
  ------------------
  |  |  132|  87.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__
  |  |  ------------------
  ------------------
 1570|  87.4k|    ossl_provider_free(cipher->prov);
 1571|  87.4k|    CRYPTO_FREE_REF(&cipher->refcnt);
 1572|  87.4k|    OPENSSL_free(cipher);
  ------------------
  |  |  132|  87.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__
  |  |  ------------------
  ------------------
 1573|  87.4k|}
EVP_CIPHER_free:
 1576|   250k|{
 1577|   250k|    int i;
 1578|       |
 1579|   250k|    if (cipher == NULL || cipher->origin != EVP_ORIG_DYNAMIC)
  ------------------
  |  |  186|   241k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (1579:9): [True: 8.68k, False: 241k]
  |  Branch (1579:27): [True: 0, False: 241k]
  ------------------
 1580|  8.68k|        return;
 1581|       |
 1582|   241k|    CRYPTO_DOWN_REF(&cipher->refcnt, &i);
 1583|   241k|    if (i > 0)
  ------------------
  |  Branch (1583:9): [True: 154k, False: 87.4k]
  ------------------
 1584|   154k|        return;
 1585|  87.4k|    evp_cipher_free_int(cipher);
 1586|  87.4k|}
evp_enc.c:evp_cipher_init_internal:
   75|   110k|{
   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|   110k|    if (enc == -1) {
  ------------------
  |  Branch (81:9): [True: 105k, False: 5.21k]
  ------------------
   82|   105k|        enc = ctx->encrypt;
   83|   105k|    } else {
   84|  5.21k|        if (enc)
  ------------------
  |  Branch (84:13): [True: 5.21k, False: 0]
  ------------------
   85|  5.21k|            enc = 1;
   86|  5.21k|        ctx->encrypt = enc;
   87|  5.21k|    }
   88|       |
   89|   110k|    if (cipher == NULL && ctx->cipher == NULL) {
  ------------------
  |  Branch (89:9): [True: 105k, False: 5.21k]
  |  Branch (89:27): [True: 0, False: 105k]
  ------------------
   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|   110k|    if (cipher != NULL && ctx->cipher != NULL) {
  ------------------
  |  Branch (95:9): [True: 5.21k, False: 105k]
  |  Branch (95:27): [True: 0, False: 5.21k]
  ------------------
   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|   110k|    if (cipher == NULL)
  ------------------
  |  Branch (104:9): [True: 105k, False: 5.21k]
  ------------------
  105|   105k|        cipher = ctx->cipher;
  106|       |
  107|   110k|    if (cipher->prov == NULL) {
  ------------------
  |  Branch (107:9): [True: 0, False: 110k]
  ------------------
  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|   110k|    if (!ossl_assert(cipher->prov != NULL)) {
  ------------------
  |  |   52|   110k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   110k|    __FILE__, __LINE__)
  ------------------
  |  Branch (126:9): [True: 0, False: 110k]
  ------------------
  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|   110k|    if (cipher != ctx->fetched_cipher) {
  ------------------
  |  Branch (131:9): [True: 5.21k, False: 105k]
  ------------------
  132|  5.21k|        if (!EVP_CIPHER_up_ref((EVP_CIPHER *)cipher)) {
  ------------------
  |  Branch (132:13): [True: 0, False: 5.21k]
  ------------------
  133|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  134|      0|            return 0;
  135|      0|        }
  136|  5.21k|        EVP_CIPHER_free(ctx->fetched_cipher);
  137|       |        /* Coverity false positive, the reference counting is confusing it */
  138|       |        /* coverity[use_after_free] */
  139|  5.21k|        ctx->fetched_cipher = (EVP_CIPHER *)cipher;
  140|  5.21k|    }
  141|   110k|    ctx->cipher = cipher;
  142|       |
  143|   110k|    if (is_pipeline && !EVP_CIPHER_can_pipeline(cipher, enc)) {
  ------------------
  |  Branch (143:9): [True: 0, False: 110k]
  |  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|   110k|    if (ctx->algctx == NULL) {
  ------------------
  |  Branch (148:9): [True: 5.21k, False: 105k]
  ------------------
  149|  5.21k|        ctx->algctx = ctx->cipher->newctx(ossl_provider_ctx(cipher->prov));
  150|  5.21k|        if (ctx->algctx == NULL) {
  ------------------
  |  Branch (150:13): [True: 0, False: 5.21k]
  ------------------
  151|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  152|      0|            return 0;
  153|      0|        }
  154|  5.21k|    }
  155|       |
  156|   110k|    if ((ctx->flags & EVP_CIPH_NO_PADDING) != 0) {
  ------------------
  |  |  234|   110k|#define EVP_CIPH_NO_PADDING 0x100
  ------------------
  |  Branch (156:9): [True: 0, False: 110k]
  ------------------
  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|   110k|#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|   110k|    if (params != NULL) {
  ------------------
  |  Branch (174:9): [True: 0, False: 110k]
  ------------------
  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|   110k|#endif
  200|       |
  201|   110k|    if (is_pipeline)
  ------------------
  |  Branch (201:9): [True: 0, False: 110k]
  ------------------
  202|      0|        return 1;
  203|       |
  204|   110k|    if (enc) {
  ------------------
  |  Branch (204:9): [True: 110k, False: 0]
  ------------------
  205|   110k|        if (ctx->cipher->einit == NULL) {
  ------------------
  |  Branch (205:13): [True: 0, False: 110k]
  ------------------
  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|   110k|        return ctx->cipher->einit(ctx->algctx,
  222|   110k|            key,
  223|   110k|            key == NULL ? 0
  ------------------
  |  Branch (223:13): [True: 32.8k, False: 77.7k]
  ------------------
  224|   110k|                        : EVP_CIPHER_CTX_get_key_length(ctx),
  225|   110k|            iv,
  226|   110k|            iv == NULL ? 0
  ------------------
  |  Branch (226:13): [True: 81.2k, False: 29.3k]
  ------------------
  227|   110k|                       : EVP_CIPHER_CTX_get_iv_length(ctx),
  228|   110k|            params);
  229|   110k|    }
  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|  87.6k|{
 1347|  87.6k|    const OSSL_DISPATCH *fns = algodef->implementation;
 1348|  87.6k|    EVP_CIPHER *cipher = NULL;
 1349|  87.6k|    int fnciphcnt = 0, encinit = 0, decinit = 0, fnpipecnt = 0, fnctxcnt = 0;
 1350|       |
 1351|  87.6k|    if ((cipher = evp_cipher_new()) == NULL) {
  ------------------
  |  Branch (1351:9): [True: 0, False: 87.6k]
  ------------------
 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|  87.6k|#ifndef FIPS_MODULE
 1357|  87.6k|    cipher->nid = NID_undef;
  ------------------
  |  |   18|  87.6k|#define NID_undef                       0
  ------------------
 1358|  87.6k|    if (!evp_names_do_all(prov, name_id, set_legacy_nid, &cipher->nid)
  ------------------
  |  Branch (1358:9): [True: 0, False: 87.6k]
  ------------------
 1359|  87.6k|        || cipher->nid == -1) {
  ------------------
  |  Branch (1359:12): [True: 0, False: 87.6k]
  ------------------
 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|  87.6k|#endif
 1364|       |
 1365|  87.6k|    cipher->name_id = name_id;
 1366|  87.6k|    if ((cipher->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (1366:9): [True: 0, False: 87.6k]
  ------------------
 1367|      0|        goto err;
 1368|       |
 1369|  87.6k|    cipher->description = algodef->algorithm_description;
 1370|       |
 1371|  1.39M|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (1371:12): [True: 1.30M, False: 87.6k]
  ------------------
 1372|  1.30M|        switch (fns->function_id) {
  ------------------
  |  Branch (1372:17): [True: 1.30M, False: 0]
  ------------------
 1373|  87.6k|        case OSSL_FUNC_CIPHER_NEWCTX:
  ------------------
  |  |  357|  87.6k|#define OSSL_FUNC_CIPHER_NEWCTX 1
  ------------------
  |  Branch (1373:9): [True: 87.6k, False: 1.22M]
  ------------------
 1374|  87.6k|            if (cipher->newctx != NULL)
  ------------------
  |  Branch (1374:17): [True: 0, False: 87.6k]
  ------------------
 1375|      0|                break;
 1376|  87.6k|            cipher->newctx = OSSL_FUNC_cipher_newctx(fns);
 1377|  87.6k|            fnctxcnt++;
 1378|  87.6k|            break;
 1379|  87.6k|        case OSSL_FUNC_CIPHER_ENCRYPT_INIT:
  ------------------
  |  |  358|  87.6k|#define OSSL_FUNC_CIPHER_ENCRYPT_INIT 2
  ------------------
  |  Branch (1379:9): [True: 87.6k, False: 1.22M]
  ------------------
 1380|  87.6k|            if (cipher->einit != NULL)
  ------------------
  |  Branch (1380:17): [True: 0, False: 87.6k]
  ------------------
 1381|      0|                break;
 1382|  87.6k|            cipher->einit = OSSL_FUNC_cipher_encrypt_init(fns);
 1383|  87.6k|            encinit = 1;
 1384|  87.6k|            break;
 1385|  87.6k|        case OSSL_FUNC_CIPHER_DECRYPT_INIT:
  ------------------
  |  |  359|  87.6k|#define OSSL_FUNC_CIPHER_DECRYPT_INIT 3
  ------------------
  |  Branch (1385:9): [True: 87.6k, False: 1.22M]
  ------------------
 1386|  87.6k|            if (cipher->dinit != NULL)
  ------------------
  |  Branch (1386:17): [True: 0, False: 87.6k]
  ------------------
 1387|      0|                break;
 1388|  87.6k|            cipher->dinit = OSSL_FUNC_cipher_decrypt_init(fns);
 1389|  87.6k|            decinit = 1;
 1390|  87.6k|            break;
 1391|  45.8k|        case OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT:
  ------------------
  |  |  375|  45.8k|#define OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT 19
  ------------------
  |  Branch (1391:9): [True: 45.8k, False: 1.26M]
  ------------------
 1392|  45.8k|            if (cipher->einit_skey != NULL)
  ------------------
  |  Branch (1392:17): [True: 0, False: 45.8k]
  ------------------
 1393|      0|                break;
 1394|  45.8k|            cipher->einit_skey = OSSL_FUNC_cipher_encrypt_skey_init(fns);
 1395|  45.8k|            encinit = 1;
 1396|  45.8k|            break;
 1397|  45.8k|        case OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT:
  ------------------
  |  |  376|  45.8k|#define OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT 20
  ------------------
  |  Branch (1397:9): [True: 45.8k, False: 1.26M]
  ------------------
 1398|  45.8k|            if (cipher->dinit_skey != NULL)
  ------------------
  |  Branch (1398:17): [True: 0, False: 45.8k]
  ------------------
 1399|      0|                break;
 1400|  45.8k|            cipher->dinit_skey = OSSL_FUNC_cipher_decrypt_skey_init(fns);
 1401|  45.8k|            decinit = 1;
 1402|  45.8k|            break;
 1403|  87.6k|        case OSSL_FUNC_CIPHER_UPDATE:
  ------------------
  |  |  360|  87.6k|#define OSSL_FUNC_CIPHER_UPDATE 4
  ------------------
  |  Branch (1403:9): [True: 87.6k, False: 1.22M]
  ------------------
 1404|  87.6k|            if (cipher->cupdate != NULL)
  ------------------
  |  Branch (1404:17): [True: 0, False: 87.6k]
  ------------------
 1405|      0|                break;
 1406|  87.6k|            cipher->cupdate = OSSL_FUNC_cipher_update(fns);
 1407|  87.6k|            fnciphcnt++;
 1408|  87.6k|            break;
 1409|  87.6k|        case OSSL_FUNC_CIPHER_FINAL:
  ------------------
  |  |  361|  87.6k|#define OSSL_FUNC_CIPHER_FINAL 5
  ------------------
  |  Branch (1409:9): [True: 87.6k, False: 1.22M]
  ------------------
 1410|  87.6k|            if (cipher->cfinal != NULL)
  ------------------
  |  Branch (1410:17): [True: 0, False: 87.6k]
  ------------------
 1411|      0|                break;
 1412|  87.6k|            cipher->cfinal = OSSL_FUNC_cipher_final(fns);
 1413|  87.6k|            fnciphcnt++;
 1414|  87.6k|            break;
 1415|  79.5k|        case OSSL_FUNC_CIPHER_CIPHER:
  ------------------
  |  |  362|  79.5k|#define OSSL_FUNC_CIPHER_CIPHER 6
  ------------------
  |  Branch (1415:9): [True: 79.5k, False: 1.23M]
  ------------------
 1416|  79.5k|            if (cipher->ccipher != NULL)
  ------------------
  |  Branch (1416:17): [True: 0, False: 79.5k]
  ------------------
 1417|      0|                break;
 1418|  79.5k|            cipher->ccipher = OSSL_FUNC_cipher_cipher(fns);
 1419|  79.5k|            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.30M]
  ------------------
 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.30M]
  ------------------
 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.30M]
  ------------------
 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.30M]
  ------------------
 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|  87.6k|        case OSSL_FUNC_CIPHER_FREECTX:
  ------------------
  |  |  363|  87.6k|#define OSSL_FUNC_CIPHER_FREECTX 7
  ------------------
  |  Branch (1444:9): [True: 87.6k, False: 1.22M]
  ------------------
 1445|  87.6k|            if (cipher->freectx != NULL)
  ------------------
  |  Branch (1445:17): [True: 0, False: 87.6k]
  ------------------
 1446|      0|                break;
 1447|  87.6k|            cipher->freectx = OSSL_FUNC_cipher_freectx(fns);
 1448|  87.6k|            fnctxcnt++;
 1449|  87.6k|            break;
 1450|  86.9k|        case OSSL_FUNC_CIPHER_DUPCTX:
  ------------------
  |  |  364|  86.9k|#define OSSL_FUNC_CIPHER_DUPCTX 8
  ------------------
  |  Branch (1450:9): [True: 86.9k, False: 1.22M]
  ------------------
 1451|  86.9k|            if (cipher->dupctx != NULL)
  ------------------
  |  Branch (1451:17): [True: 0, False: 86.9k]
  ------------------
 1452|      0|                break;
 1453|  86.9k|            cipher->dupctx = OSSL_FUNC_cipher_dupctx(fns);
 1454|  86.9k|            break;
 1455|  87.6k|        case OSSL_FUNC_CIPHER_GET_PARAMS:
  ------------------
  |  |  365|  87.6k|#define OSSL_FUNC_CIPHER_GET_PARAMS 9
  ------------------
  |  Branch (1455:9): [True: 87.6k, False: 1.22M]
  ------------------
 1456|  87.6k|            if (cipher->get_params != NULL)
  ------------------
  |  Branch (1456:17): [True: 0, False: 87.6k]
  ------------------
 1457|      0|                break;
 1458|  87.6k|            cipher->get_params = OSSL_FUNC_cipher_get_params(fns);
 1459|  87.6k|            break;
 1460|  87.6k|        case OSSL_FUNC_CIPHER_GET_CTX_PARAMS:
  ------------------
  |  |  366|  87.6k|#define OSSL_FUNC_CIPHER_GET_CTX_PARAMS 10
  ------------------
  |  Branch (1460:9): [True: 87.6k, False: 1.22M]
  ------------------
 1461|  87.6k|            if (cipher->get_ctx_params != NULL)
  ------------------
  |  Branch (1461:17): [True: 0, False: 87.6k]
  ------------------
 1462|      0|                break;
 1463|  87.6k|            cipher->get_ctx_params = OSSL_FUNC_cipher_get_ctx_params(fns);
 1464|  87.6k|            break;
 1465|  87.6k|        case OSSL_FUNC_CIPHER_SET_CTX_PARAMS:
  ------------------
  |  |  367|  87.6k|#define OSSL_FUNC_CIPHER_SET_CTX_PARAMS 11
  ------------------
  |  Branch (1465:9): [True: 87.6k, False: 1.22M]
  ------------------
 1466|  87.6k|            if (cipher->set_ctx_params != NULL)
  ------------------
  |  Branch (1466:17): [True: 0, False: 87.6k]
  ------------------
 1467|      0|                break;
 1468|  87.6k|            cipher->set_ctx_params = OSSL_FUNC_cipher_set_ctx_params(fns);
 1469|  87.6k|            break;
 1470|  87.6k|        case OSSL_FUNC_CIPHER_GETTABLE_PARAMS:
  ------------------
  |  |  368|  87.6k|#define OSSL_FUNC_CIPHER_GETTABLE_PARAMS 12
  ------------------
  |  Branch (1470:9): [True: 87.6k, False: 1.22M]
  ------------------
 1471|  87.6k|            if (cipher->gettable_params != NULL)
  ------------------
  |  Branch (1471:17): [True: 0, False: 87.6k]
  ------------------
 1472|      0|                break;
 1473|  87.6k|            cipher->gettable_params = OSSL_FUNC_cipher_gettable_params(fns);
 1474|  87.6k|            break;
 1475|  87.6k|        case OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  369|  87.6k|#define OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS 13
  ------------------
  |  Branch (1475:9): [True: 87.6k, False: 1.22M]
  ------------------
 1476|  87.6k|            if (cipher->gettable_ctx_params != NULL)
  ------------------
  |  Branch (1476:17): [True: 0, False: 87.6k]
  ------------------
 1477|      0|                break;
 1478|  87.6k|            cipher->gettable_ctx_params = OSSL_FUNC_cipher_gettable_ctx_params(fns);
 1479|  87.6k|            break;
 1480|  87.6k|        case OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  370|  87.6k|#define OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS 14
  ------------------
  |  Branch (1480:9): [True: 87.6k, False: 1.22M]
  ------------------
 1481|  87.6k|            if (cipher->settable_ctx_params != NULL)
  ------------------
  |  Branch (1481:17): [True: 0, False: 87.6k]
  ------------------
 1482|      0|                break;
 1483|  87.6k|            cipher->settable_ctx_params = OSSL_FUNC_cipher_settable_ctx_params(fns);
 1484|  87.6k|            break;
 1485|  1.30M|        }
 1486|  1.30M|    }
 1487|  87.6k|    fnciphcnt += encinit + decinit;
 1488|  87.6k|    if ((fnciphcnt != 0 && fnciphcnt != 3 && fnciphcnt != 4)
  ------------------
  |  Branch (1488:10): [True: 87.6k, False: 0]
  |  Branch (1488:28): [True: 87.6k, False: 0]
  |  Branch (1488:46): [True: 0, False: 87.6k]
  ------------------
 1489|  87.6k|        || (fnciphcnt == 0 && cipher->ccipher == NULL && fnpipecnt == 0)
  ------------------
  |  Branch (1489:13): [True: 0, False: 87.6k]
  |  Branch (1489:31): [True: 0, False: 0]
  |  Branch (1489:58): [True: 0, False: 0]
  ------------------
 1490|  87.6k|        || (fnpipecnt != 0 && (fnpipecnt < 3 || cipher->p_cupdate == NULL || cipher->p_cfinal == NULL))
  ------------------
  |  Branch (1490:13): [True: 0, False: 87.6k]
  |  Branch (1490:32): [True: 0, False: 0]
  |  Branch (1490:49): [True: 0, False: 0]
  |  Branch (1490:78): [True: 0, False: 0]
  ------------------
 1491|  87.6k|        || fnctxcnt != 2) {
  ------------------
  |  Branch (1491:12): [True: 0, False: 87.6k]
  ------------------
 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|  87.6k|    if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (1501:9): [True: 87.6k, False: 0]
  |  Branch (1501:25): [True: 0, False: 87.6k]
  ------------------
 1502|      0|        goto err;
 1503|       |
 1504|  87.6k|    cipher->prov = prov;
 1505|       |
 1506|  87.6k|    if (!evp_cipher_cache_constants(cipher)) {
  ------------------
  |  Branch (1506:9): [True: 0, False: 87.6k]
  ------------------
 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|  87.6k|    return cipher;
 1512|       |
 1513|      0|err:
 1514|      0|    EVP_CIPHER_free(cipher);
 1515|       |    return NULL;
 1516|  87.6k|}
evp_enc.c:set_legacy_nid:
 1320|   163k|{
 1321|   163k|    int nid;
 1322|   163k|    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|   163k|    const void *legacy_method = OBJ_NAME_get(name, OBJ_NAME_TYPE_CIPHER_METH);
  ------------------
  |  |   26|   163k|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
 1329|       |
 1330|   163k|    if (*legacy_nid == -1) /* We found a clash already */
  ------------------
  |  Branch (1330:9): [True: 0, False: 163k]
  ------------------
 1331|      0|        return;
 1332|   163k|    if (legacy_method == NULL)
  ------------------
  |  Branch (1332:9): [True: 73.4k, False: 90.3k]
  ------------------
 1333|  73.4k|        return;
 1334|  90.3k|    nid = EVP_CIPHER_get_nid(legacy_method);
 1335|  90.3k|    if (*legacy_nid != NID_undef && *legacy_nid != nid) {
  ------------------
  |  |   18|   180k|#define NID_undef                       0
  ------------------
  |  Branch (1335:9): [True: 17.5k, False: 72.7k]
  |  Branch (1335:37): [True: 0, False: 17.5k]
  ------------------
 1336|      0|        *legacy_nid = -1;
 1337|      0|        return;
 1338|      0|    }
 1339|  90.3k|    *legacy_nid = nid;
 1340|  90.3k|}
evp_enc.c:evp_cipher_up_ref:
 1519|   148k|{
 1520|   148k|    return EVP_CIPHER_up_ref(cipher);
 1521|   148k|}
evp_enc.c:evp_cipher_free:
 1524|   184k|{
 1525|   184k|    EVP_CIPHER_free(cipher);
 1526|   184k|}

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|   749k|{
  399|   749k|    struct evp_method_data_st methdata;
  400|   749k|    void *method;
  401|       |
  402|   749k|    methdata.libctx = libctx;
  403|   749k|    methdata.tmp_store = NULL;
  404|       |    method = inner_evp_generic_fetch(&methdata, NULL, operation_id,
  405|   749k|        name, properties,
  406|   749k|        new_method, up_ref_method, free_method);
  407|   749k|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  408|   749k|    return method;
  409|   749k|}
evp_generic_fetch_from_prov:
  424|  3.47k|{
  425|  3.47k|    struct evp_method_data_st methdata;
  426|  3.47k|    void *method;
  427|       |
  428|  3.47k|    methdata.libctx = ossl_provider_libctx(prov);
  429|       |    methdata.tmp_store = NULL;
  430|  3.47k|    method = inner_evp_generic_fetch(&methdata, prov, operation_id,
  431|  3.47k|        name, properties,
  432|  3.47k|        new_method, up_ref_method, free_method);
  433|  3.47k|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  434|  3.47k|    return method;
  435|  3.47k|}
evp_method_store_cache_flush:
  438|    843|{
  439|    843|    OSSL_METHOD_STORE *store = get_evp_method_store(libctx);
  440|       |
  441|    843|    if (store != NULL)
  ------------------
  |  Branch (441:9): [True: 843, False: 0]
  ------------------
  442|    843|        return ossl_method_store_cache_flush_all(store);
  443|      0|    return 1;
  444|    843|}
evp_method_store_remove_all_provided:
  447|    843|{
  448|    843|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  449|    843|    OSSL_METHOD_STORE *store = get_evp_method_store(libctx);
  450|       |
  451|    843|    if (store != NULL)
  ------------------
  |  Branch (451:9): [True: 843, False: 0]
  ------------------
  452|    843|        return ossl_method_store_remove_all_provided(store, prov);
  453|      0|    return 1;
  454|    843|}
evp_generic_do_all:
  638|      2|{
  639|      2|    struct evp_method_data_st methdata;
  640|      2|    struct filter_data_st data;
  641|       |
  642|      2|    methdata.libctx = libctx;
  643|      2|    methdata.tmp_store = NULL;
  644|      2|    (void)inner_evp_generic_fetch(&methdata, NULL, operation_id, NULL, NULL,
  645|      2|        new_method, up_ref_method, free_method);
  646|       |
  647|      2|    data.operation_id = operation_id;
  648|      2|    data.user_fn = user_fn;
  649|      2|    data.user_arg = user_arg;
  650|      2|    if (methdata.tmp_store != NULL)
  ------------------
  |  Branch (650:9): [True: 0, False: 2]
  ------------------
  651|      0|        ossl_method_store_do_all(methdata.tmp_store, &filter_on_operation_id,
  652|      0|            &data);
  653|      2|    ossl_method_store_do_all(get_evp_method_store(libctx),
  654|      2|        &filter_on_operation_id, &data);
  655|      2|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  656|      2|}
evp_is_a:
  660|  1.25M|{
  661|       |    /*
  662|       |     * For a |prov| that is NULL, the library context will be NULL
  663|       |     */
  664|  1.25M|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  665|  1.25M|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  666|       |
  667|  1.25M|    if (prov == NULL)
  ------------------
  |  Branch (667:9): [True: 399k, False: 858k]
  ------------------
  668|   399k|        number = ossl_namemap_name2num(namemap, legacy_name);
  669|  1.25M|    return ossl_namemap_name2num(namemap, name) == number;
  670|  1.25M|}
evp_names_do_all:
  675|   602k|{
  676|   602k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  677|   602k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  678|       |
  679|   602k|    return ossl_namemap_doall_names(namemap, number, fn, data);
  680|   602k|}
evp_fetch.c:inner_evp_generic_fetch:
  259|   753k|{
  260|   753k|    OSSL_METHOD_STORE *store = get_evp_method_store(methdata->libctx);
  261|   753k|    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|   753k|    const char *const propq = properties != NULL ? properties : "";
  ------------------
  |  Branch (271:31): [True: 75.0k, False: 678k]
  ------------------
  272|   753k|#endif /* FIPS_MODULE */
  273|   753k|    uint32_t meth_id = 0;
  274|   753k|    void *method = NULL;
  275|   753k|    int unsupported, name_id;
  276|       |
  277|   753k|    if (store == NULL || namemap == NULL) {
  ------------------
  |  Branch (277:9): [True: 0, False: 753k]
  |  Branch (277:26): [True: 0, False: 753k]
  ------------------
  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|   753k|    if (!ossl_assert(operation_id > 0)) {
  ------------------
  |  |   52|   753k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   753k|    __FILE__, __LINE__)
  ------------------
  |  Branch (286:9): [True: 0, False: 753k]
  ------------------
  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|   753k|    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|   753k|    if (name_id != 0 && (meth_id = evp_method_id(name_id, operation_id)) == 0) {
  ------------------
  |  Branch (302:9): [True: 717k, False: 35.6k]
  |  Branch (302:25): [True: 0, False: 717k]
  ------------------
  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|   753k|    unsupported = name_id == 0;
  312|       |
  313|   753k|    if (meth_id == 0
  ------------------
  |  Branch (313:9): [True: 35.6k, False: 717k]
  ------------------
  314|   717k|        || !ossl_method_store_cache_get(store, prov, meth_id, propq, &method)) {
  ------------------
  |  Branch (314:12): [True: 52.8k, False: 664k]
  ------------------
  315|  88.5k|        OSSL_METHOD_CONSTRUCT_METHOD mcm = {
  316|  88.5k|            get_tmp_evp_method_store,
  317|  88.5k|            reserve_evp_method_store,
  318|  88.5k|            unreserve_evp_method_store,
  319|  88.5k|            get_evp_method_from_store,
  320|  88.5k|            put_evp_method_in_store,
  321|  88.5k|            construct_evp_method,
  322|  88.5k|            destruct_evp_method
  323|  88.5k|        };
  324|       |
  325|  88.5k|        methdata->operation_id = operation_id;
  326|  88.5k|        methdata->name_id = name_id;
  327|  88.5k|        methdata->names = name;
  328|  88.5k|        methdata->propquery = propq;
  329|  88.5k|        methdata->method_from_algorithm = new_method;
  330|  88.5k|        methdata->refcnt_up_method = up_ref_method;
  331|  88.5k|        methdata->destruct_method = free_method;
  332|  88.5k|        methdata->flag_construct_error_occurred = 0;
  333|  88.5k|        if ((method = ossl_method_construct(methdata->libctx, operation_id,
  ------------------
  |  Branch (333:13): [True: 32.6k, False: 55.8k]
  ------------------
  334|  88.5k|                 &prov, 0 /* !force_cache */,
  335|  88.5k|                 &mcm, methdata))
  336|  88.5k|            != 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|  32.6k|            if (name_id == 0)
  ------------------
  |  Branch (349:17): [True: 1.15k, False: 31.4k]
  ------------------
  350|  1.15k|                name_id = ossl_namemap_name2num(namemap, name);
  351|  32.6k|            if (name_id == 0) {
  ------------------
  |  Branch (351:17): [True: 0, False: 32.6k]
  ------------------
  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|  32.6k|            } else {
  357|  32.6k|                meth_id = evp_method_id(name_id, operation_id);
  358|  32.6k|                if (meth_id != 0)
  ------------------
  |  Branch (358:21): [True: 32.6k, False: 0]
  ------------------
  359|  32.6k|                    ossl_method_store_cache_set(store, prov, meth_id, propq,
  360|  32.6k|                        method, up_ref_method, free_method);
  361|  32.6k|            }
  362|  32.6k|        }
  363|       |
  364|       |        /*
  365|       |         * If we never were in the constructor, the algorithm to be fetched
  366|       |         * is unsupported.
  367|       |         */
  368|  88.5k|        unsupported = !methdata->flag_construct_error_occurred;
  369|  88.5k|    }
  370|       |
  371|   753k|    if ((name_id != 0 || name != NULL) && method == NULL) {
  ------------------
  |  Branch (371:10): [True: 718k, False: 34.5k]
  |  Branch (371:26): [True: 34.5k, False: 2]
  |  Branch (371:43): [True: 55.8k, False: 697k]
  ------------------
  372|  55.8k|        int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  317|  55.8k|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|  55.8k|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|  55.8k|#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: 55.8k, False: 0]
  ------------------
  373|       |
  374|  55.8k|        if (name == NULL)
  ------------------
  |  Branch (374:13): [True: 0, False: 55.8k]
  ------------------
  375|      0|            name = ossl_namemap_num2name(namemap, name_id, 0);
  376|  55.8k|        ERR_raise_data(ERR_LIB_EVP, code,
  ------------------
  |  |  359|  55.8k|    (ERR_new(),                                                  \
  |  |  360|  55.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|  55.8k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  55.8k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, code,
  ------------------
  |  |   59|  55.8k|#define ERR_LIB_EVP 6
  ------------------
  377|  55.8k|            "%s, Algorithm (%s : %d), Properties (%s)",
  378|  55.8k|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  379|  55.8k|            name == NULL ? "<null>" : name, name_id,
  ------------------
  |  Branch (379:13): [True: 0, False: 55.8k]
  ------------------
  380|  55.8k|            properties == NULL ? "<null>" : properties);
  ------------------
  |  Branch (380:13): [True: 40.1k, False: 15.7k]
  ------------------
  381|   697k|    } else {
  382|   697k|        OSSL_TRACE4(QUERY, "%s, Algorithm (%s : %d), Properties (%s)\n",
  ------------------
  |  |  297|   697k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  283|   697k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  383|   697k|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  384|   697k|            name == NULL ? "<null>" : name, name_id,
  385|   697k|            properties == NULL ? "<null>" : properties);
  386|   697k|    }
  387|       |
  388|   753k|    return method;
  389|   753k|}
evp_fetch.c:evp_method_id:
  117|   988k|{
  118|   988k|    if (!ossl_assert(name_id > 0 && name_id <= METHOD_ID_NAME_MAX)
  ------------------
  |  |   52|  1.97M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 988k, False: 0]
  |  |  |  Branch (52:41): [True: 988k, False: 0]
  |  |  ------------------
  |  |   53|  1.97M|    __FILE__, __LINE__)
  ------------------
  |  Branch (118:9): [True: 0, False: 988k]
  ------------------
  119|   988k|        || !ossl_assert(operation_id > 0
  ------------------
  |  |   52|  1.97M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 988k, False: 0]
  |  |  |  Branch (52:41): [True: 988k, False: 0]
  |  |  ------------------
  |  |   53|   988k|    __FILE__, __LINE__)
  ------------------
  |  Branch (119:12): [True: 0, False: 988k]
  ------------------
  120|   988k|            && operation_id <= METHOD_ID_OPERATION_MAX))
  121|      0|        return 0;
  122|   988k|    return (((name_id << METHOD_ID_NAME_OFFSET) & METHOD_ID_NAME_MASK)
  ------------------
  |  |  114|   988k|#define METHOD_ID_NAME_OFFSET 8
  ------------------
                  return (((name_id << METHOD_ID_NAME_OFFSET) & METHOD_ID_NAME_MASK)
  ------------------
  |  |  113|   988k|#define METHOD_ID_NAME_MASK 0x7FFFFF00
  ------------------
  123|   988k|        | (operation_id & METHOD_ID_OPERATION_MASK));
  ------------------
  |  |  111|   988k|#define METHOD_ID_OPERATION_MASK 0x000000FF
  ------------------
  124|   988k|}
evp_fetch.c:reserve_evp_method_store:
   73|   147k|{
   74|   147k|    struct evp_method_data_st *methdata = data;
   75|       |
   76|   147k|    if (store == NULL
  ------------------
  |  Branch (76:9): [True: 147k, False: 0]
  ------------------
   77|   147k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (77:12): [True: 0, False: 147k]
  ------------------
   78|      0|        return 0;
   79|       |
   80|   147k|    return ossl_method_lock_store(store);
   81|   147k|}
evp_fetch.c:unreserve_evp_method_store:
   84|   147k|{
   85|   147k|    struct evp_method_data_st *methdata = data;
   86|       |
   87|   147k|    if (store == NULL
  ------------------
  |  Branch (87:9): [True: 147k, False: 0]
  ------------------
   88|   147k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (88:12): [True: 0, False: 147k]
  ------------------
   89|      0|        return 0;
   90|       |
   91|   147k|    return ossl_method_unlock_store(store);
   92|   147k|}
evp_fetch.c:get_evp_method_from_store:
  128|  88.5k|{
  129|  88.5k|    struct evp_method_data_st *methdata = data;
  130|  88.5k|    void *method = NULL;
  131|  88.5k|    int name_id;
  132|  88.5k|    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|  88.5k|    if ((name_id = methdata->name_id) == 0 && methdata->names != NULL) {
  ------------------
  |  Branch (139:9): [True: 35.6k, False: 52.8k]
  |  Branch (139:47): [True: 35.6k, False: 2]
  ------------------
  140|  35.6k|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx);
  141|  35.6k|        const char *names = methdata->names;
  142|  35.6k|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   24|  35.6k|#define NAME_SEPARATOR ':'
  ------------------
  143|  35.6k|        size_t l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (143:21): [True: 35.6k, False: 0]
  ------------------
  144|       |
  145|  35.6k|        if (namemap == 0)
  ------------------
  |  Branch (145:13): [True: 0, False: 35.6k]
  ------------------
  146|      0|            return NULL;
  147|  35.6k|        name_id = ossl_namemap_name2num_n(namemap, names, l);
  148|  35.6k|    }
  149|       |
  150|  88.5k|    if (name_id == 0
  ------------------
  |  Branch (150:9): [True: 34.4k, False: 54.0k]
  ------------------
  151|  54.0k|        || (meth_id = evp_method_id(name_id, methdata->operation_id)) == 0)
  ------------------
  |  Branch (151:12): [True: 0, False: 54.0k]
  ------------------
  152|  34.4k|        return NULL;
  153|       |
  154|  54.0k|    if (store == NULL
  ------------------
  |  Branch (154:9): [True: 54.0k, False: 0]
  ------------------
  155|  54.0k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (155:12): [True: 0, False: 54.0k]
  ------------------
  156|      0|        return NULL;
  157|       |
  158|  54.0k|    if (!ossl_method_store_fetch(store, meth_id, methdata->propquery, prov,
  ------------------
  |  Branch (158:9): [True: 21.4k, False: 32.6k]
  ------------------
  159|  54.0k|            &method))
  160|  21.4k|        return NULL;
  161|  32.6k|    return method;
  162|  54.0k|}
evp_fetch.c:put_evp_method_in_store:
  168|   184k|{
  169|   184k|    struct evp_method_data_st *methdata = data;
  170|   184k|    OSSL_NAMEMAP *namemap;
  171|   184k|    int name_id;
  172|   184k|    uint32_t meth_id;
  173|   184k|    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|   184k|    if (names != NULL) {
  ------------------
  |  Branch (181:9): [True: 184k, False: 0]
  ------------------
  182|   184k|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   24|   184k|#define NAME_SEPARATOR ':'
  ------------------
  183|       |
  184|   184k|        l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (184:14): [True: 57.3k, False: 126k]
  ------------------
  185|   184k|    }
  186|       |
  187|   184k|    if ((namemap = ossl_namemap_stored(methdata->libctx)) == NULL
  ------------------
  |  Branch (187:9): [True: 0, False: 184k]
  ------------------
  188|   184k|        || (name_id = ossl_namemap_name2num_n(namemap, names, l)) == 0
  ------------------
  |  Branch (188:12): [True: 0, False: 184k]
  ------------------
  189|   184k|        || (meth_id = evp_method_id(name_id, methdata->operation_id)) == 0)
  ------------------
  |  Branch (189:12): [True: 0, False: 184k]
  ------------------
  190|      0|        return 0;
  191|       |
  192|   184k|    OSSL_TRACE1(QUERY, "put_evp_method_in_store: original store: %p\n", store);
  ------------------
  |  |  291|   184k|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|   184k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  193|   184k|    if (store == NULL
  ------------------
  |  Branch (193:9): [True: 184k, False: 0]
  ------------------
  194|   184k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (194:12): [True: 0, False: 184k]
  ------------------
  195|      0|        return 0;
  196|       |
  197|   184k|    OSSL_TRACE5(QUERY,
  ------------------
  |  |  299|   184k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5))
  |  |  ------------------
  |  |  |  |  283|   184k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  198|   184k|        "put_evp_method_in_store: "
  199|   184k|        "store: %p, names: %s, operation_id %d, method_id: %d, properties: %s\n",
  200|   184k|        store, names, methdata->operation_id, meth_id, propdef ? propdef : "<null>");
  201|   184k|    return ossl_method_store_add(store, prov, meth_id, propdef, method,
  202|   184k|        methdata->refcnt_up_method,
  203|   184k|        methdata->destruct_method);
  204|   184k|}
evp_fetch.c:construct_evp_method:
  212|   184k|{
  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|   184k|    struct evp_method_data_st *methdata = data;
  221|   184k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  222|   184k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  223|   184k|    const char *names = algodef->algorithm_names;
  224|   184k|    int name_id = ossl_namemap_add_names(namemap, 0, names, NAME_SEPARATOR);
  ------------------
  |  |   24|   184k|#define NAME_SEPARATOR ':'
  ------------------
  225|   184k|    void *method;
  226|       |
  227|   184k|    if (name_id == 0)
  ------------------
  |  Branch (227:9): [True: 0, False: 184k]
  ------------------
  228|      0|        return NULL;
  229|       |
  230|   184k|    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|   184k|    if (method == NULL)
  ------------------
  |  Branch (237:9): [True: 0, False: 184k]
  ------------------
  238|      0|        methdata->flag_construct_error_occurred = 1;
  239|       |
  240|   184k|    return method;
  241|   184k|}
evp_fetch.c:destruct_evp_method:
  244|   184k|{
  245|   184k|    struct evp_method_data_st *methdata = data;
  246|       |
  247|   184k|    methdata->destruct_method(method);
  248|   184k|}
evp_fetch.c:dealloc_tmp_evp_method_store:
   61|   753k|{
   62|   753k|    OSSL_TRACE1(QUERY, "Deallocating the tmp_store %p\n", store);
  ------------------
  |  |  291|   753k|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|   753k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   63|   753k|    if (store != NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 753k]
  ------------------
   64|      0|        ossl_method_store_free(store);
   65|   753k|}
evp_fetch.c:get_evp_method_store:
   68|  1.28M|{
   69|  1.28M|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX);
  ------------------
  |  |   95|  1.28M|#define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX 0
  ------------------
   70|  1.28M|}
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|   123k|{
  242|   123k|    int nid;
  243|   123k|    nid = EVP_CIPHER_get_nid(cipher);
  244|       |
  245|   123k|    switch (nid) {
  246|       |
  247|  2.02k|    case NID_rc2_cbc:
  ------------------
  |  | 1307|  2.02k|#define NID_rc2_cbc             37
  ------------------
  |  Branch (247:5): [True: 2.02k, False: 121k]
  ------------------
  248|  3.37k|    case NID_rc2_64_cbc:
  ------------------
  |  | 1328|  3.37k|#define NID_rc2_64_cbc          166
  ------------------
  |  Branch (248:5): [True: 1.34k, False: 121k]
  ------------------
  249|  4.71k|    case NID_rc2_40_cbc:
  ------------------
  |  | 1324|  4.71k|#define NID_rc2_40_cbc          98
  ------------------
  |  Branch (249:5): [True: 1.34k, False: 121k]
  ------------------
  250|       |
  251|  4.71k|        return NID_rc2_cbc;
  ------------------
  |  | 1307|  4.71k|#define NID_rc2_cbc             37
  ------------------
  252|       |
  253|    674|    case NID_rc4:
  ------------------
  |  | 1332|    674|#define NID_rc4         5
  ------------------
  |  Branch (253:5): [True: 674, False: 122k]
  ------------------
  254|  1.34k|    case NID_rc4_40:
  ------------------
  |  | 1337|  1.34k|#define NID_rc4_40              97
  ------------------
  |  Branch (254:5): [True: 674, False: 122k]
  ------------------
  255|       |
  256|  1.34k|        return NID_rc4;
  ------------------
  |  | 1332|  1.34k|#define NID_rc4         5
  ------------------
  257|       |
  258|    674|    case NID_aes_128_cfb128:
  ------------------
  |  | 3116|    674|#define NID_aes_128_cfb128              421
  ------------------
  |  Branch (258:5): [True: 674, False: 122k]
  ------------------
  259|  1.34k|    case NID_aes_128_cfb8:
  ------------------
  |  | 3237|  1.34k|#define NID_aes_128_cfb8                653
  ------------------
  |  Branch (259:5): [True: 674, False: 122k]
  ------------------
  260|  2.02k|    case NID_aes_128_cfb1:
  ------------------
  |  | 3225|  2.02k|#define NID_aes_128_cfb1                650
  ------------------
  |  Branch (260:5): [True: 674, False: 122k]
  ------------------
  261|       |
  262|  2.02k|        return NID_aes_128_cfb128;
  ------------------
  |  | 3116|  2.02k|#define NID_aes_128_cfb128              421
  ------------------
  263|       |
  264|    674|    case NID_aes_192_cfb128:
  ------------------
  |  | 3154|    674|#define NID_aes_192_cfb128              425
  ------------------
  |  Branch (264:5): [True: 674, False: 122k]
  ------------------
  265|  1.34k|    case NID_aes_192_cfb8:
  ------------------
  |  | 3241|  1.34k|#define NID_aes_192_cfb8                654
  ------------------
  |  Branch (265:5): [True: 674, False: 122k]
  ------------------
  266|  2.02k|    case NID_aes_192_cfb1:
  ------------------
  |  | 3229|  2.02k|#define NID_aes_192_cfb1                651
  ------------------
  |  Branch (266:5): [True: 674, False: 122k]
  ------------------
  267|       |
  268|  2.02k|        return NID_aes_192_cfb128;
  ------------------
  |  | 3154|  2.02k|#define NID_aes_192_cfb128              425
  ------------------
  269|       |
  270|    674|    case NID_aes_256_cfb128:
  ------------------
  |  | 3192|    674|#define NID_aes_256_cfb128              429
  ------------------
  |  Branch (270:5): [True: 674, False: 122k]
  ------------------
  271|  1.34k|    case NID_aes_256_cfb8:
  ------------------
  |  | 3245|  1.34k|#define NID_aes_256_cfb8                655
  ------------------
  |  Branch (271:5): [True: 674, False: 122k]
  ------------------
  272|  2.02k|    case NID_aes_256_cfb1:
  ------------------
  |  | 3233|  2.02k|#define NID_aes_256_cfb1                652
  ------------------
  |  Branch (272:5): [True: 674, False: 122k]
  ------------------
  273|       |
  274|  2.02k|        return NID_aes_256_cfb128;
  ------------------
  |  | 3192|  2.02k|#define NID_aes_256_cfb128              429
  ------------------
  275|       |
  276|    674|    case NID_des_cfb64:
  ------------------
  |  | 2286|    674|#define NID_des_cfb64           30
  ------------------
  |  Branch (276:5): [True: 674, False: 122k]
  ------------------
  277|  1.34k|    case NID_des_cfb8:
  ------------------
  |  | 3277|  1.34k|#define NID_des_cfb8            657
  ------------------
  |  Branch (277:5): [True: 674, False: 122k]
  ------------------
  278|  2.02k|    case NID_des_cfb1:
  ------------------
  |  | 3273|  2.02k|#define NID_des_cfb1            656
  ------------------
  |  Branch (278:5): [True: 674, False: 122k]
  ------------------
  279|       |
  280|  2.02k|        return NID_des_cfb64;
  ------------------
  |  | 2286|  2.02k|#define NID_des_cfb64           30
  ------------------
  281|       |
  282|    674|    case NID_des_ede3_cfb64:
  ------------------
  |  | 2327|    674|#define NID_des_ede3_cfb64              61
  ------------------
  |  Branch (282:5): [True: 674, False: 122k]
  ------------------
  283|  1.34k|    case NID_des_ede3_cfb8:
  ------------------
  |  | 3285|  1.34k|#define NID_des_ede3_cfb8               659
  ------------------
  |  Branch (283:5): [True: 674, False: 122k]
  ------------------
  284|  2.02k|    case NID_des_ede3_cfb1:
  ------------------
  |  | 3281|  2.02k|#define NID_des_ede3_cfb1               658
  ------------------
  |  Branch (284:5): [True: 674, False: 122k]
  ------------------
  285|       |
  286|  2.02k|        return NID_des_ede3_cfb64;
  ------------------
  |  | 2327|  2.02k|#define NID_des_ede3_cfb64              61
  ------------------
  287|       |
  288|   107k|    default:
  ------------------
  |  Branch (288:5): [True: 107k, False: 16.1k]
  ------------------
  289|       |#ifdef FIPS_MODULE
  290|       |        return NID_undef;
  291|       |#else
  292|   107k|    {
  293|       |        /* Check it has an OID and it is valid */
  294|   107k|        ASN1_OBJECT *otmp = OBJ_nid2obj(nid);
  295|       |
  296|   107k|        if (OBJ_get0_data(otmp) == NULL)
  ------------------
  |  Branch (296:13): [True: 32.3k, False: 74.8k]
  ------------------
  297|  32.3k|            nid = NID_undef;
  ------------------
  |  |   18|  32.3k|#define NID_undef                       0
  ------------------
  298|   107k|        ASN1_OBJECT_free(otmp);
  299|   107k|        return nid;
  300|  1.34k|    }
  301|   123k|#endif
  302|   123k|    }
  303|   123k|}
evp_cipher_cache_constants:
  306|  87.6k|{
  307|  87.6k|    int ok, aead = 0, custom_iv = 0, cts = 0, multiblock = 0, randkey = 0;
  308|  87.6k|    int encrypt_then_mac = 0;
  309|  87.6k|    size_t ivlen = 0;
  310|  87.6k|    size_t blksz = 0;
  311|  87.6k|    size_t keylen = 0;
  312|  87.6k|    unsigned int mode = 0;
  313|  87.6k|    OSSL_PARAM params[11];
  314|       |
  315|  87.6k|    params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_BLOCK_SIZE, &blksz);
  ------------------
  |  |  186|  87.6k|# define OSSL_CIPHER_PARAM_BLOCK_SIZE "blocksize"
  ------------------
  316|  87.6k|    params[1] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN, &ivlen);
  ------------------
  |  |  196|  87.6k|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  317|  87.6k|    params[2] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_KEYLEN, &keylen);
  ------------------
  |  |  197|  87.6k|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  318|  87.6k|    params[3] = OSSL_PARAM_construct_uint(OSSL_CIPHER_PARAM_MODE, &mode);
  ------------------
  |  |  198|  87.6k|# define OSSL_CIPHER_PARAM_MODE "mode"
  ------------------
  319|  87.6k|    params[4] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_AEAD, &aead);
  ------------------
  |  |  172|  87.6k|# define OSSL_CIPHER_PARAM_AEAD "aead"
  ------------------
  320|  87.6k|    params[5] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_CUSTOM_IV,
  ------------------
  |  |  189|  87.6k|# define OSSL_CIPHER_PARAM_CUSTOM_IV "custom-iv"
  ------------------
  321|  87.6k|        &custom_iv);
  322|  87.6k|    params[6] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_CTS, &cts);
  ------------------
  |  |  187|  87.6k|# define OSSL_CIPHER_PARAM_CTS "cts"
  ------------------
  323|  87.6k|    params[7] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK,
  ------------------
  |  |  206|  87.6k|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK "tls-multi"
  ------------------
  324|  87.6k|        &multiblock);
  325|  87.6k|    params[8] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_HAS_RAND_KEY,
  ------------------
  |  |  194|  87.6k|# define OSSL_CIPHER_PARAM_HAS_RAND_KEY "has-randkey"
  ------------------
  326|  87.6k|        &randkey);
  327|  87.6k|    params[9] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC,
  ------------------
  |  |  191|  87.6k|# define OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC "encrypt-then-mac"
  ------------------
  328|  87.6k|        &encrypt_then_mac);
  329|  87.6k|    params[10] = OSSL_PARAM_construct_end();
  330|  87.6k|    ok = evp_do_ciph_getparams(cipher, params) > 0;
  331|  87.6k|    if (ok) {
  ------------------
  |  Branch (331:9): [True: 87.6k, False: 0]
  ------------------
  332|  87.6k|        cipher->block_size = (int)blksz;
  333|  87.6k|        cipher->iv_len = (int)ivlen;
  334|  87.6k|        cipher->key_len = (int)keylen;
  335|  87.6k|        cipher->flags = mode;
  336|  87.6k|        if (aead)
  ------------------
  |  Branch (336:13): [True: 18.8k, False: 68.7k]
  ------------------
  337|  18.8k|            cipher->flags |= EVP_CIPH_FLAG_AEAD_CIPHER;
  ------------------
  |  |  256|  18.8k|#define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000
  ------------------
  338|  87.6k|        if (custom_iv)
  ------------------
  |  Branch (338:13): [True: 27.6k, False: 59.9k]
  ------------------
  339|  27.6k|            cipher->flags |= EVP_CIPH_CUSTOM_IV;
  ------------------
  |  |  226|  27.6k|#define EVP_CIPH_CUSTOM_IV 0x10
  ------------------
  340|  87.6k|        if (cts)
  ------------------
  |  Branch (340:13): [True: 4.04k, False: 83.5k]
  ------------------
  341|  4.04k|            cipher->flags |= EVP_CIPH_FLAG_CTS;
  ------------------
  |  |  254|  4.04k|#define EVP_CIPH_FLAG_CTS 0x4000
  ------------------
  342|  87.6k|        if (multiblock)
  ------------------
  |  Branch (342:13): [True: 2.69k, False: 84.9k]
  ------------------
  343|  2.69k|            cipher->flags |= EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK;
  ------------------
  |  |  257|  2.69k|#define EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK 0x400000
  ------------------
  344|  87.6k|        if (cipher->ccipher != NULL)
  ------------------
  |  Branch (344:13): [True: 79.5k, False: 8.08k]
  ------------------
  345|  79.5k|            cipher->flags |= EVP_CIPH_FLAG_CUSTOM_CIPHER;
  ------------------
  |  |  255|  79.5k|#define EVP_CIPH_FLAG_CUSTOM_CIPHER 0x100000
  ------------------
  346|  87.6k|        if (randkey)
  ------------------
  |  Branch (346:13): [True: 7.41k, False: 80.2k]
  ------------------
  347|  7.41k|            cipher->flags |= EVP_CIPH_RAND_KEY;
  ------------------
  |  |  236|  7.41k|#define EVP_CIPH_RAND_KEY 0x200
  ------------------
  348|  87.6k|        if (encrypt_then_mac)
  ------------------
  |  Branch (348:13): [True: 0, False: 87.6k]
  ------------------
  349|      0|            cipher->flags |= EVP_CIPH_FLAG_ENC_THEN_MAC;
  ------------------
  |  |  267|      0|#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000
  ------------------
  350|  87.6k|        if (OSSL_PARAM_locate_const(EVP_CIPHER_gettable_ctx_params(cipher),
  ------------------
  |  Branch (350:13): [True: 0, False: 87.6k]
  ------------------
  351|  87.6k|                OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS))
  ------------------
  |  |  184|  87.6k|# define OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS
  |  |  ------------------
  |  |  |  |  125|  87.6k|# 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|  87.6k|    }
  354|  87.6k|    return ok;
  355|  87.6k|}
EVP_CIPHER_get_iv_length:
  473|  1.73k|{
  474|  1.73k|    return (cipher == NULL) ? 0 : cipher->iv_len;
  ------------------
  |  Branch (474:12): [True: 0, False: 1.73k]
  ------------------
  475|  1.73k|}
EVP_CIPHER_CTX_get_iv_length:
  478|  29.3k|{
  479|  29.3k|    if (ctx->cipher == NULL)
  ------------------
  |  Branch (479:9): [True: 0, False: 29.3k]
  ------------------
  480|      0|        return 0;
  481|       |
  482|  29.3k|    if (ctx->iv_len < 0) {
  ------------------
  |  Branch (482:9): [True: 1.73k, False: 27.5k]
  ------------------
  483|  1.73k|        int rv, len = EVP_CIPHER_get_iv_length(ctx->cipher);
  484|  1.73k|        size_t v = len;
  485|  1.73k|        OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  1.73k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  1.73k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  486|       |
  487|  1.73k|        if (ctx->cipher->get_ctx_params != NULL) {
  ------------------
  |  Branch (487:13): [True: 1.73k, False: 0]
  ------------------
  488|  1.73k|            params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN,
  ------------------
  |  |  196|  1.73k|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  489|  1.73k|                &v);
  490|  1.73k|            rv = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
  491|  1.73k|            if (rv > 0) {
  ------------------
  |  Branch (491:17): [True: 1.73k, False: 0]
  ------------------
  492|  1.73k|                if (OSSL_PARAM_modified(params)
  ------------------
  |  Branch (492:21): [True: 1.73k, False: 0]
  ------------------
  493|  1.73k|                    && !OSSL_PARAM_get_int(params, &len))
  ------------------
  |  Branch (493:24): [True: 0, False: 1.73k]
  ------------------
  494|      0|                    return -1;
  495|  1.73k|            } 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.73k|        }
  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.73k|        ((EVP_CIPHER_CTX *)ctx)->iv_len = len;
  513|  1.73k|    }
  514|  29.3k|    return ctx->iv_len;
  515|  29.3k|}
EVP_CIPHER_get_key_length:
  620|  1.73k|{
  621|  1.73k|    return cipher->key_len;
  622|  1.73k|}
EVP_CIPHER_CTX_get_key_length:
  625|  77.7k|{
  626|  77.7k|    if (ctx->cipher == NULL)
  ------------------
  |  Branch (626:9): [True: 0, False: 77.7k]
  ------------------
  627|      0|        return 0;
  628|       |
  629|  77.7k|    if (ctx->key_len <= 0 && ctx->cipher->prov != NULL) {
  ------------------
  |  Branch (629:9): [True: 5.21k, False: 72.5k]
  |  Branch (629:30): [True: 5.21k, False: 0]
  ------------------
  630|  5.21k|        int ok;
  631|  5.21k|        OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  5.21k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  5.21k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  632|  5.21k|        size_t len;
  633|       |
  634|  5.21k|        params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_KEYLEN, &len);
  ------------------
  |  |  197|  5.21k|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  635|  5.21k|        ok = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
  636|  5.21k|        if (ok <= 0)
  ------------------
  |  Branch (636:13): [True: 0, False: 5.21k]
  ------------------
  637|      0|            return EVP_CTRL_RET_UNSUPPORTED;
  ------------------
  |  |   13|      0|#define EVP_CTRL_RET_UNSUPPORTED -1
  ------------------
  638|       |
  639|       |        /*-
  640|       |         * The if branch should never be taken since EVP_MAX_KEY_LENGTH is
  641|       |         * less than INT_MAX but best to be safe.
  642|       |         *
  643|       |         * Casting away the const is annoying but required here.  We need to
  644|       |         * cache the result for performance reasons.
  645|       |         */
  646|  5.21k|        if (!OSSL_PARAM_get_int(params, &((EVP_CIPHER_CTX *)ctx)->key_len))
  ------------------
  |  Branch (646:13): [True: 0, False: 5.21k]
  ------------------
  647|      0|            return -1;
  648|  5.21k|        ((EVP_CIPHER_CTX *)ctx)->key_len = (int)len;
  649|  5.21k|    }
  650|  77.7k|    return ctx->key_len;
  651|  77.7k|}
EVP_CIPHER_get_nid:
  654|   213k|{
  655|   213k|    return (cipher == NULL) ? NID_undef : cipher->nid;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (655:12): [True: 0, False: 213k]
  ------------------
  656|   213k|}
EVP_CIPHER_get0_provider:
  710|   136k|{
  711|   136k|    return cipher->prov;
  712|   136k|}
EVP_MD_is_a:
  720|   399k|{
  721|   399k|    if (md == NULL)
  ------------------
  |  Branch (721:9): [True: 0, False: 399k]
  ------------------
  722|      0|        return 0;
  723|   399k|    if (md->prov != NULL)
  ------------------
  |  Branch (723:9): [True: 0, False: 399k]
  ------------------
  724|      0|        return evp_is_a(md->prov, md->name_id, NULL, name);
  725|   399k|    return evp_is_a(NULL, 0, EVP_MD_get0_name(md), name);
  726|   399k|}
EVP_MD_get0_name:
  745|   799k|{
  746|   799k|    if (md == NULL)
  ------------------
  |  Branch (746:9): [True: 0, False: 799k]
  ------------------
  747|      0|        return NULL;
  748|   799k|    if (md->type_name != NULL)
  ------------------
  |  Branch (748:9): [True: 0, False: 799k]
  ------------------
  749|      0|        return md->type_name;
  750|   799k|#ifndef FIPS_MODULE
  751|   799k|    return OBJ_nid2sn(EVP_MD_nid(md));
  ------------------
  |  |  453|   799k|#define EVP_MD_nid EVP_MD_get_type
  ------------------
  752|       |#else
  753|       |    return NULL;
  754|       |#endif
  755|   799k|}
EVP_MD_get0_provider:
  768|   430k|{
  769|   430k|    return md->prov;
  770|   430k|}
EVP_MD_get_type:
  773|   935k|{
  774|   935k|    return md->type;
  775|   935k|}
EVP_MD_get_size:
  792|   904k|{
  793|   904k|    if (md == NULL) {
  ------------------
  |  Branch (793:9): [True: 0, False: 904k]
  ------------------
  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|   904k|    return md->md_size;
  798|   904k|}
EVP_MD_xof:
  801|  13.1k|{
  802|  13.1k|    return md != NULL && ((EVP_MD_get_flags(md) & EVP_MD_FLAG_XOF) != 0);
  ------------------
  |  |  135|  13.1k|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
  |  Branch (802:12): [True: 13.1k, False: 0]
  |  Branch (802:26): [True: 11.2k, False: 1.88k]
  ------------------
  803|  13.1k|}
EVP_MD_get_flags:
  806|  13.1k|{
  807|  13.1k|    return md->flags;
  808|  13.1k|}
EVP_MD_CTX_get0_md:
  820|   429k|{
  821|   429k|    if (ctx == NULL)
  ------------------
  |  Branch (821:9): [True: 0, False: 429k]
  ------------------
  822|      0|        return NULL;
  823|   429k|    return ctx->reqdigest;
  824|   429k|}
EVP_MD_CTX_get_size_ex:
  839|   415k|{
  840|   415k|    EVP_MD_CTX *c = (EVP_MD_CTX *)ctx;
  841|   415k|    const OSSL_PARAM *gettables;
  842|       |
  843|   415k|    gettables = EVP_MD_CTX_gettable_params(c);
  844|   415k|    if (gettables != NULL
  ------------------
  |  Branch (844:9): [True: 0, False: 415k]
  ------------------
  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|   415k|    return EVP_MD_get_size(EVP_MD_CTX_get0_md(ctx));
  865|   415k|}
EVP_MD_CTX_set_flags:
  901|   813k|{
  902|   813k|    ctx->flags |= flags;
  903|   813k|}
EVP_MD_CTX_clear_flags:
  906|   444k|{
  907|   444k|    ctx->flags &= ~flags;
  908|   444k|}
EVP_MD_CTX_test_flags:
  911|   414k|{
  912|   414k|    return (ctx->flags & flags);
  913|   414k|}
EVP_PKEY_CTX_set_group_name:
  950|  4.16k|{
  951|  4.16k|    OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.16k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.16k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  952|       |
  953|  4.16k|    if (ctx == NULL || !EVP_PKEY_CTX_IS_GEN_OP(ctx)) {
  ------------------
  |  |  482|  4.16k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1565|  4.16k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1528|  4.16k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1529|  4.16k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (953:9): [True: 0, False: 4.16k]
  |  Branch (953:24): [True: 0, False: 4.16k]
  ------------------
  954|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_COMMAND_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  955|       |        /* Uses the same return values as EVP_PKEY_CTX_ctrl */
  956|      0|        return -2;
  957|      0|    }
  958|       |
  959|  4.16k|    if (name == NULL)
  ------------------
  |  Branch (959:9): [True: 0, False: 4.16k]
  ------------------
  960|      0|        return -1;
  961|       |
  962|  4.16k|    params[0] = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  428|  4.16k|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
  963|  4.16k|        (char *)name, 0);
  964|  4.16k|    return EVP_PKEY_CTX_set_params(ctx, params);
  965|  4.16k|}
EVP_PKEY_Q_keygen:
 1016|  3.76k|{
 1017|  3.76k|    va_list args;
 1018|  3.76k|    size_t bits;
 1019|  3.76k|    char *name;
 1020|  3.76k|    OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  3.76k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  3.76k|    { NULL, 0, NULL, 0, 0 }
  ------------------
 1021|  3.76k|    EVP_PKEY *ret = NULL;
 1022|       |
 1023|  3.76k|    va_start(args, type);
 1024|       |
 1025|  3.76k|    if (OPENSSL_strcasecmp(type, "RSA") == 0) {
  ------------------
  |  Branch (1025:9): [True: 0, False: 3.76k]
  ------------------
 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|  3.76k|    } else if (OPENSSL_strcasecmp(type, "EC") == 0) {
  ------------------
  |  Branch (1028:16): [True: 0, False: 3.76k]
  ------------------
 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|  3.76k|    ret = evp_pkey_keygen(libctx, type, propq, params);
 1035|       |
 1036|       |    va_end(args);
 1037|  3.76k|    return ret;
 1038|  3.76k|}
evp_lib.c:evp_pkey_keygen:
 1001|  3.76k|{
 1002|  3.76k|    EVP_PKEY *pkey = NULL;
 1003|  3.76k|    EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new_from_name(libctx, name, propq);
 1004|       |
 1005|  3.76k|    if (ctx != NULL
  ------------------
  |  Branch (1005:9): [True: 3.76k, False: 0]
  ------------------
 1006|  3.76k|        && EVP_PKEY_keygen_init(ctx) > 0
  ------------------
  |  Branch (1006:12): [True: 3.76k, False: 0]
  ------------------
 1007|  3.76k|        && EVP_PKEY_CTX_set_params(ctx, params))
  ------------------
  |  Branch (1007:12): [True: 3.76k, False: 0]
  ------------------
 1008|  3.76k|        (void)EVP_PKEY_generate(ctx, &pkey);
 1009|       |
 1010|  3.76k|    EVP_PKEY_CTX_free(ctx);
 1011|  3.76k|    return pkey;
 1012|  3.76k|}

EVP_PKEY_type:
   63|   717k|{
   64|   717k|#ifndef OPENSSL_NO_DEPRECATED_3_6
   65|   717k|    int ret;
   66|   717k|    const EVP_PKEY_ASN1_METHOD *ameth;
   67|       |
   68|   717k|    ameth = evp_pkey_asn1_find(type);
   69|   717k|    if (ameth)
  ------------------
  |  Branch (69:9): [True: 608k, False: 108k]
  ------------------
   70|   608k|        ret = ameth->pkey_id;
   71|   108k|    else
   72|   108k|        ret = NID_undef;
  ------------------
  |  |   18|   108k|#define NID_undef                       0
  ------------------
   73|   717k|    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|   717k|}

EVP_RAND_enable_locking:
   95|    579|{
   96|    579|    if (rand->meth->enable_locking != NULL)
  ------------------
  |  Branch (96:9): [True: 579, False: 0]
  ------------------
   97|    579|        return rand->meth->enable_locking(rand->algctx);
   98|    579|    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|    579|}
EVP_RAND_fetch:
  284|  2.31k|{
  285|  2.31k|    return evp_generic_fetch(libctx, OSSL_OP_RAND, algorithm, properties,
  ------------------
  |  |  287|  2.31k|#define OSSL_OP_RAND 5
  ------------------
  286|  2.31k|        evp_rand_from_algorithm, evp_rand_up_ref,
  287|  2.31k|        evp_rand_free);
  288|  2.31k|}
EVP_RAND_up_ref:
  291|  2.31k|{
  292|  2.31k|    return evp_rand_up_ref(rand);
  293|  2.31k|}
EVP_RAND_free:
  296|  4.62k|{
  297|  4.62k|    evp_rand_free(rand);
  298|  4.62k|}
EVP_RAND_get0_provider:
  321|  3.47k|{
  322|  3.47k|    return rand->prov;
  323|  3.47k|}
EVP_RAND_CTX_up_ref:
  333|  1.73k|{
  334|  1.73k|    int ref = 0;
  335|       |
  336|  1.73k|    return CRYPTO_UP_REF(&ctx->refcnt, &ref);
  337|  1.73k|}
EVP_RAND_CTX_new:
  340|  2.31k|{
  341|  2.31k|    EVP_RAND_CTX *ctx;
  342|  2.31k|    void *parent_ctx = NULL;
  343|  2.31k|    const OSSL_DISPATCH *parent_dispatch = NULL;
  344|       |
  345|  2.31k|    if (rand == NULL) {
  ------------------
  |  Branch (345:9): [True: 0, False: 2.31k]
  ------------------
  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.31k|    ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|  2.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__
  |  |  ------------------
  ------------------
  351|  2.31k|    if (ctx == NULL)
  ------------------
  |  Branch (351:9): [True: 0, False: 2.31k]
  ------------------
  352|      0|        return NULL;
  353|  2.31k|    if (!CRYPTO_NEW_REF(&ctx->refcnt, 1)) {
  ------------------
  |  Branch (353:9): [True: 0, False: 2.31k]
  ------------------
  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.31k|    if (parent != NULL) {
  ------------------
  |  Branch (357:9): [True: 1.73k, False: 579]
  ------------------
  358|  1.73k|        if (!EVP_RAND_CTX_up_ref(parent)) {
  ------------------
  |  Branch (358:13): [True: 0, False: 1.73k]
  ------------------
  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.73k|        parent_ctx = parent->algctx;
  365|  1.73k|        parent_dispatch = parent->meth->dispatch;
  366|  1.73k|    }
  367|  2.31k|    if ((ctx->algctx = rand->newctx(ossl_provider_ctx(rand->prov), parent_ctx,
  ------------------
  |  Branch (367:9): [True: 0, False: 2.31k]
  ------------------
  368|  2.31k|             parent_dispatch))
  369|  2.31k|            == NULL
  370|  2.31k|        || !EVP_RAND_up_ref(rand)) {
  ------------------
  |  Branch (370:12): [True: 0, False: 2.31k]
  ------------------
  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.31k|    ctx->meth = rand;
  379|  2.31k|    ctx->parent = parent;
  380|  2.31k|    return ctx;
  381|  2.31k|}
EVP_RAND_CTX_free:
  384|  5.00k|{
  385|  5.00k|    int ref = 0;
  386|  5.00k|    EVP_RAND_CTX *parent;
  387|       |
  388|  5.00k|    if (ctx == NULL)
  ------------------
  |  Branch (388:9): [True: 958, False: 4.04k]
  ------------------
  389|    958|        return;
  390|       |
  391|  4.04k|    CRYPTO_DOWN_REF(&ctx->refcnt, &ref);
  392|  4.04k|    if (ref > 0)
  ------------------
  |  Branch (392:9): [True: 1.73k, False: 2.31k]
  ------------------
  393|  1.73k|        return;
  394|  2.31k|    parent = ctx->parent;
  395|  2.31k|    ctx->meth->freectx(ctx->algctx);
  396|  2.31k|    ctx->algctx = NULL;
  397|  2.31k|    EVP_RAND_free(ctx->meth);
  398|  2.31k|    CRYPTO_FREE_REF(&ctx->refcnt);
  399|  2.31k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  2.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__
  |  |  ------------------
  ------------------
  400|  2.31k|    EVP_RAND_CTX_free(parent);
  401|  2.31k|}
EVP_RAND_CTX_get_params:
  415|  7.01k|{
  416|  7.01k|    int res;
  417|       |
  418|  7.01k|    if (!evp_rand_lock(ctx))
  ------------------
  |  Branch (418:9): [True: 0, False: 7.01k]
  ------------------
  419|      0|        return 0;
  420|  7.01k|    res = evp_rand_get_ctx_params_locked(ctx, params);
  421|  7.01k|    evp_rand_unlock(ctx);
  422|  7.01k|    return res;
  423|  7.01k|}
EVP_RAND_CTX_settable_params:
  482|  1.73k|{
  483|  1.73k|    void *provctx;
  484|       |
  485|  1.73k|    if (ctx->meth->settable_ctx_params == NULL)
  ------------------
  |  Branch (485:9): [True: 0, False: 1.73k]
  ------------------
  486|      0|        return NULL;
  487|  1.73k|    provctx = ossl_provider_ctx(EVP_RAND_get0_provider(ctx->meth));
  488|  1.73k|    return ctx->meth->settable_ctx_params(ctx->algctx, provctx);
  489|  1.73k|}
EVP_RAND_instantiate:
  522|  2.31k|{
  523|  2.31k|    int res;
  524|       |
  525|  2.31k|    if (!evp_rand_lock(ctx))
  ------------------
  |  Branch (525:9): [True: 0, False: 2.31k]
  ------------------
  526|      0|        return 0;
  527|  2.31k|    res = evp_rand_instantiate_locked(ctx, strength, prediction_resistance,
  528|  2.31k|        pstr, pstr_len, params);
  529|  2.31k|    evp_rand_unlock(ctx);
  530|  2.31k|    return res;
  531|  2.31k|}
EVP_RAND_generate:
  584|  27.0k|{
  585|  27.0k|    int res;
  586|       |
  587|  27.0k|    if (!evp_rand_lock(ctx))
  ------------------
  |  Branch (587:9): [True: 0, False: 27.0k]
  ------------------
  588|      0|        return 0;
  589|  27.0k|    res = evp_rand_generate_locked(ctx, out, outlen, strength,
  590|  27.0k|        prediction_resistance, addin, addin_len);
  591|  27.0k|    evp_rand_unlock(ctx);
  592|  27.0k|    return res;
  593|  27.0k|}
EVP_RAND_get_state:
  668|  7.01k|{
  669|  7.01k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  7.01k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  7.01k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  670|  7.01k|    int state;
  671|       |
  672|  7.01k|    params[0] = OSSL_PARAM_construct_int(OSSL_RAND_PARAM_STATE, &state);
  ------------------
  |  |  552|  7.01k|# define OSSL_RAND_PARAM_STATE "state"
  ------------------
  673|  7.01k|    if (!EVP_RAND_CTX_get_params(ctx, params))
  ------------------
  |  Branch (673:9): [True: 0, False: 7.01k]
  ------------------
  674|      0|        state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  675|  7.01k|    return state;
  676|  7.01k|}
evp_rand.c:evp_rand_from_algorithm:
  120|  3.44k|{
  121|  3.44k|    const OSSL_DISPATCH *fns = algodef->implementation;
  122|  3.44k|    EVP_RAND *rand = NULL;
  123|  3.44k|    int fnrandcnt = 0, fnctxcnt = 0, fnlockcnt = 0, fnenablelockcnt = 0;
  124|       |#ifdef FIPS_MODULE
  125|       |    int fnzeroizecnt = 0;
  126|       |#endif
  127|       |
  128|  3.44k|    if ((rand = evp_rand_new()) == NULL) {
  ------------------
  |  Branch (128:9): [True: 0, False: 3.44k]
  ------------------
  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.44k|    rand->name_id = name_id;
  133|  3.44k|    if ((rand->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL) {
  ------------------
  |  Branch (133:9): [True: 0, False: 3.44k]
  ------------------
  134|      0|        evp_rand_free(rand);
  135|      0|        return NULL;
  136|      0|    }
  137|  3.44k|    rand->description = algodef->algorithm_description;
  138|  3.44k|    rand->dispatch = fns;
  139|  56.2k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (139:12): [True: 52.8k, False: 3.44k]
  ------------------
  140|  52.8k|        switch (fns->function_id) {
  ------------------
  |  Branch (140:17): [True: 52.8k, False: 0]
  ------------------
  141|  3.44k|        case OSSL_FUNC_RAND_NEWCTX:
  ------------------
  |  |  541|  3.44k|#define OSSL_FUNC_RAND_NEWCTX 1
  ------------------
  |  Branch (141:9): [True: 3.44k, False: 49.3k]
  ------------------
  142|  3.44k|            if (rand->newctx != NULL)
  ------------------
  |  Branch (142:17): [True: 0, False: 3.44k]
  ------------------
  143|      0|                break;
  144|  3.44k|            rand->newctx = OSSL_FUNC_rand_newctx(fns);
  145|  3.44k|            fnctxcnt++;
  146|  3.44k|            break;
  147|  3.44k|        case OSSL_FUNC_RAND_FREECTX:
  ------------------
  |  |  542|  3.44k|#define OSSL_FUNC_RAND_FREECTX 2
  ------------------
  |  Branch (147:9): [True: 3.44k, False: 49.3k]
  ------------------
  148|  3.44k|            if (rand->freectx != NULL)
  ------------------
  |  Branch (148:17): [True: 0, False: 3.44k]
  ------------------
  149|      0|                break;
  150|  3.44k|            rand->freectx = OSSL_FUNC_rand_freectx(fns);
  151|  3.44k|            fnctxcnt++;
  152|  3.44k|            break;
  153|  3.44k|        case OSSL_FUNC_RAND_INSTANTIATE:
  ------------------
  |  |  543|  3.44k|#define OSSL_FUNC_RAND_INSTANTIATE 3
  ------------------
  |  Branch (153:9): [True: 3.44k, False: 49.3k]
  ------------------
  154|  3.44k|            if (rand->instantiate != NULL)
  ------------------
  |  Branch (154:17): [True: 0, False: 3.44k]
  ------------------
  155|      0|                break;
  156|  3.44k|            rand->instantiate = OSSL_FUNC_rand_instantiate(fns);
  157|  3.44k|            fnrandcnt++;
  158|  3.44k|            break;
  159|  3.44k|        case OSSL_FUNC_RAND_UNINSTANTIATE:
  ------------------
  |  |  544|  3.44k|#define OSSL_FUNC_RAND_UNINSTANTIATE 4
  ------------------
  |  Branch (159:9): [True: 3.44k, False: 49.3k]
  ------------------
  160|  3.44k|            if (rand->uninstantiate != NULL)
  ------------------
  |  Branch (160:17): [True: 0, False: 3.44k]
  ------------------
  161|      0|                break;
  162|  3.44k|            rand->uninstantiate = OSSL_FUNC_rand_uninstantiate(fns);
  163|  3.44k|            fnrandcnt++;
  164|  3.44k|            break;
  165|  3.44k|        case OSSL_FUNC_RAND_GENERATE:
  ------------------
  |  |  545|  3.44k|#define OSSL_FUNC_RAND_GENERATE 5
  ------------------
  |  Branch (165:9): [True: 3.44k, False: 49.3k]
  ------------------
  166|  3.44k|            if (rand->generate != NULL)
  ------------------
  |  Branch (166:17): [True: 0, False: 3.44k]
  ------------------
  167|      0|                break;
  168|  3.44k|            rand->generate = OSSL_FUNC_rand_generate(fns);
  169|  3.44k|            fnrandcnt++;
  170|  3.44k|            break;
  171|  3.44k|        case OSSL_FUNC_RAND_RESEED:
  ------------------
  |  |  546|  3.44k|#define OSSL_FUNC_RAND_RESEED 6
  ------------------
  |  Branch (171:9): [True: 3.44k, False: 49.3k]
  ------------------
  172|  3.44k|            if (rand->reseed != NULL)
  ------------------
  |  Branch (172:17): [True: 0, False: 3.44k]
  ------------------
  173|      0|                break;
  174|  3.44k|            rand->reseed = OSSL_FUNC_rand_reseed(fns);
  175|  3.44k|            break;
  176|    579|        case OSSL_FUNC_RAND_NONCE:
  ------------------
  |  |  547|    579|#define OSSL_FUNC_RAND_NONCE 7
  ------------------
  |  Branch (176:9): [True: 579, False: 52.2k]
  ------------------
  177|    579|            if (rand->nonce != NULL)
  ------------------
  |  Branch (177:17): [True: 0, False: 579]
  ------------------
  178|      0|                break;
  179|    579|            rand->nonce = OSSL_FUNC_rand_nonce(fns);
  180|    579|            break;
  181|  3.44k|        case OSSL_FUNC_RAND_ENABLE_LOCKING:
  ------------------
  |  |  548|  3.44k|#define OSSL_FUNC_RAND_ENABLE_LOCKING 8
  ------------------
  |  Branch (181:9): [True: 3.44k, False: 49.3k]
  ------------------
  182|  3.44k|            if (rand->enable_locking != NULL)
  ------------------
  |  Branch (182:17): [True: 0, False: 3.44k]
  ------------------
  183|      0|                break;
  184|  3.44k|            rand->enable_locking = OSSL_FUNC_rand_enable_locking(fns);
  185|  3.44k|            fnenablelockcnt++;
  186|  3.44k|            break;
  187|  3.44k|        case OSSL_FUNC_RAND_LOCK:
  ------------------
  |  |  549|  3.44k|#define OSSL_FUNC_RAND_LOCK 9
  ------------------
  |  Branch (187:9): [True: 3.44k, False: 49.3k]
  ------------------
  188|  3.44k|            if (rand->lock != NULL)
  ------------------
  |  Branch (188:17): [True: 0, False: 3.44k]
  ------------------
  189|      0|                break;
  190|  3.44k|            rand->lock = OSSL_FUNC_rand_lock(fns);
  191|  3.44k|            fnlockcnt++;
  192|  3.44k|            break;
  193|  3.44k|        case OSSL_FUNC_RAND_UNLOCK:
  ------------------
  |  |  550|  3.44k|#define OSSL_FUNC_RAND_UNLOCK 10
  ------------------
  |  Branch (193:9): [True: 3.44k, False: 49.3k]
  ------------------
  194|  3.44k|            if (rand->unlock != NULL)
  ------------------
  |  Branch (194:17): [True: 0, False: 3.44k]
  ------------------
  195|      0|                break;
  196|  3.44k|            rand->unlock = OSSL_FUNC_rand_unlock(fns);
  197|  3.44k|            fnlockcnt++;
  198|  3.44k|            break;
  199|      0|        case OSSL_FUNC_RAND_GETTABLE_PARAMS:
  ------------------
  |  |  551|      0|#define OSSL_FUNC_RAND_GETTABLE_PARAMS 11
  ------------------
  |  Branch (199:9): [True: 0, False: 52.8k]
  ------------------
  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.44k|        case OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  552|  3.44k|#define OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS 12
  ------------------
  |  Branch (204:9): [True: 3.44k, False: 49.3k]
  ------------------
  205|  3.44k|            if (rand->gettable_ctx_params != NULL)
  ------------------
  |  Branch (205:17): [True: 0, False: 3.44k]
  ------------------
  206|      0|                break;
  207|  3.44k|            rand->gettable_ctx_params = OSSL_FUNC_rand_gettable_ctx_params(fns);
  208|  3.44k|            break;
  209|  2.31k|        case OSSL_FUNC_RAND_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  553|  2.31k|#define OSSL_FUNC_RAND_SETTABLE_CTX_PARAMS 13
  ------------------
  |  Branch (209:9): [True: 2.31k, False: 50.4k]
  ------------------
  210|  2.31k|            if (rand->settable_ctx_params != NULL)
  ------------------
  |  Branch (210:17): [True: 0, False: 2.31k]
  ------------------
  211|      0|                break;
  212|  2.31k|            rand->settable_ctx_params = OSSL_FUNC_rand_settable_ctx_params(fns);
  213|  2.31k|            break;
  214|      0|        case OSSL_FUNC_RAND_GET_PARAMS:
  ------------------
  |  |  554|      0|#define OSSL_FUNC_RAND_GET_PARAMS 14
  ------------------
  |  Branch (214:9): [True: 0, False: 52.8k]
  ------------------
  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.44k|        case OSSL_FUNC_RAND_GET_CTX_PARAMS:
  ------------------
  |  |  555|  3.44k|#define OSSL_FUNC_RAND_GET_CTX_PARAMS 15
  ------------------
  |  Branch (219:9): [True: 3.44k, False: 49.3k]
  ------------------
  220|  3.44k|            if (rand->get_ctx_params != NULL)
  ------------------
  |  Branch (220:17): [True: 0, False: 3.44k]
  ------------------
  221|      0|                break;
  222|  3.44k|            rand->get_ctx_params = OSSL_FUNC_rand_get_ctx_params(fns);
  223|  3.44k|            fnctxcnt++;
  224|  3.44k|            break;
  225|  2.31k|        case OSSL_FUNC_RAND_SET_CTX_PARAMS:
  ------------------
  |  |  556|  2.31k|#define OSSL_FUNC_RAND_SET_CTX_PARAMS 16
  ------------------
  |  Branch (225:9): [True: 2.31k, False: 50.4k]
  ------------------
  226|  2.31k|            if (rand->set_ctx_params != NULL)
  ------------------
  |  Branch (226:17): [True: 0, False: 2.31k]
  ------------------
  227|      0|                break;
  228|  2.31k|            rand->set_ctx_params = OSSL_FUNC_rand_set_ctx_params(fns);
  229|  2.31k|            break;
  230|  3.44k|        case OSSL_FUNC_RAND_VERIFY_ZEROIZATION:
  ------------------
  |  |  557|  3.44k|#define OSSL_FUNC_RAND_VERIFY_ZEROIZATION 17
  ------------------
  |  Branch (230:9): [True: 3.44k, False: 49.3k]
  ------------------
  231|  3.44k|            if (rand->verify_zeroization != NULL)
  ------------------
  |  Branch (231:17): [True: 0, False: 3.44k]
  ------------------
  232|      0|                break;
  233|  3.44k|            rand->verify_zeroization = OSSL_FUNC_rand_verify_zeroization(fns);
  234|       |#ifdef FIPS_MODULE
  235|       |            fnzeroizecnt++;
  236|       |#endif
  237|  3.44k|            break;
  238|  3.44k|        case OSSL_FUNC_RAND_GET_SEED:
  ------------------
  |  |  558|  3.44k|#define OSSL_FUNC_RAND_GET_SEED 18
  ------------------
  |  Branch (238:9): [True: 3.44k, False: 49.3k]
  ------------------
  239|  3.44k|            if (rand->get_seed != NULL)
  ------------------
  |  Branch (239:17): [True: 0, False: 3.44k]
  ------------------
  240|      0|                break;
  241|  3.44k|            rand->get_seed = OSSL_FUNC_rand_get_seed(fns);
  242|  3.44k|            break;
  243|  2.86k|        case OSSL_FUNC_RAND_CLEAR_SEED:
  ------------------
  |  |  559|  2.86k|#define OSSL_FUNC_RAND_CLEAR_SEED 19
  ------------------
  |  Branch (243:9): [True: 2.86k, False: 49.9k]
  ------------------
  244|  2.86k|            if (rand->clear_seed != NULL)
  ------------------
  |  Branch (244:17): [True: 0, False: 2.86k]
  ------------------
  245|      0|                break;
  246|  2.86k|            rand->clear_seed = OSSL_FUNC_rand_clear_seed(fns);
  247|  2.86k|            break;
  248|  52.8k|        }
  249|  52.8k|    }
  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.44k|    if (fnrandcnt != 3
  ------------------
  |  Branch (259:9): [True: 0, False: 3.44k]
  ------------------
  260|  3.44k|        || fnctxcnt != 3
  ------------------
  |  Branch (260:12): [True: 0, False: 3.44k]
  ------------------
  261|  3.44k|        || (fnenablelockcnt != 0 && fnenablelockcnt != 1)
  ------------------
  |  Branch (261:13): [True: 3.44k, False: 0]
  |  Branch (261:37): [True: 0, False: 3.44k]
  ------------------
  262|  3.44k|        || (fnlockcnt != 0 && fnlockcnt != 2)
  ------------------
  |  Branch (262:13): [True: 3.44k, False: 0]
  |  Branch (262:31): [True: 0, False: 3.44k]
  ------------------
  263|       |#ifdef FIPS_MODULE
  264|       |        || fnzeroizecnt != 1
  265|       |#endif
  266|  3.44k|    ) {
  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.44k|    if (prov != NULL && !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (272:9): [True: 3.44k, False: 0]
  |  Branch (272:25): [True: 0, False: 3.44k]
  ------------------
  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.44k|    rand->prov = prov;
  278|       |
  279|  3.44k|    return rand;
  280|  3.44k|}
evp_rand.c:evp_rand_new:
   80|  3.44k|{
   81|  3.44k|    EVP_RAND *rand = OPENSSL_zalloc(sizeof(*rand));
  ------------------
  |  |  109|  3.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__
  |  |  ------------------
  ------------------
   82|       |
   83|  3.44k|    if (rand == NULL)
  ------------------
  |  Branch (83:9): [True: 0, False: 3.44k]
  ------------------
   84|      0|        return NULL;
   85|       |
   86|  3.44k|    if (!CRYPTO_NEW_REF(&rand->refcnt, 1)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 3.44k]
  ------------------
   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.44k|    return rand;
   91|  3.44k|}
evp_rand.c:evp_rand_up_ref:
   54|  9.23k|{
   55|  9.23k|    EVP_RAND *rand = (EVP_RAND *)vrand;
   56|  9.23k|    int ref = 0;
   57|       |
   58|  9.23k|    if (rand != NULL)
  ------------------
  |  Branch (58:9): [True: 9.23k, False: 0]
  ------------------
   59|  9.23k|        return CRYPTO_UP_REF(&rand->refcnt, &ref);
   60|      0|    return 1;
   61|  9.23k|}
evp_rand.c:evp_rand_free:
   64|  12.6k|{
   65|  12.6k|    EVP_RAND *rand = (EVP_RAND *)vrand;
   66|  12.6k|    int ref = 0;
   67|       |
   68|  12.6k|    if (rand == NULL)
  ------------------
  |  Branch (68:9): [True: 0, False: 12.6k]
  ------------------
   69|      0|        return;
   70|  12.6k|    CRYPTO_DOWN_REF(&rand->refcnt, &ref);
   71|  12.6k|    if (ref > 0)
  ------------------
  |  Branch (71:9): [True: 9.22k, False: 3.43k]
  ------------------
   72|  9.22k|        return;
   73|  3.43k|    OPENSSL_free(rand->type_name);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
   74|  3.43k|    ossl_provider_free(rand->prov);
   75|  3.43k|    CRYPTO_FREE_REF(&rand->refcnt);
   76|  3.43k|    OPENSSL_free(rand);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
   77|  3.43k|}
evp_rand.c:evp_rand_lock:
  104|  36.3k|{
  105|  36.3k|    if (rand->meth->lock != NULL)
  ------------------
  |  Branch (105:9): [True: 36.3k, False: 0]
  ------------------
  106|  36.3k|        return rand->meth->lock(rand->algctx);
  107|      0|    return 1;
  108|  36.3k|}
evp_rand.c:evp_rand_get_ctx_params_locked:
  410|  34.0k|{
  411|  34.0k|    return ctx->meth->get_ctx_params(ctx->algctx, params);
  412|  34.0k|}
evp_rand.c:evp_rand_unlock:
  112|  36.3k|{
  113|  36.3k|    if (rand->meth->unlock != NULL)
  ------------------
  |  Branch (113:9): [True: 36.3k, False: 0]
  ------------------
  114|  36.3k|        rand->meth->unlock(rand->algctx);
  115|  36.3k|}
evp_rand.c:evp_rand_instantiate_locked:
  513|  2.31k|{
  514|  2.31k|    return ctx->meth->instantiate(ctx->algctx, strength, prediction_resistance,
  515|  2.31k|        pstr, pstr_len, params);
  516|  2.31k|}
evp_rand.c:evp_rand_generate_locked:
  554|  27.0k|{
  555|  27.0k|    size_t chunk, max_request = 0;
  556|  27.0k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  27.0k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  27.0k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  557|       |
  558|  27.0k|    params[0] = OSSL_PARAM_construct_size_t(OSSL_RAND_PARAM_MAX_REQUEST,
  ------------------
  |  |  551|  27.0k|# define OSSL_RAND_PARAM_MAX_REQUEST "max_request"
  ------------------
  559|  27.0k|        &max_request);
  560|  27.0k|    if (!evp_rand_get_ctx_params_locked(ctx, params)
  ------------------
  |  Branch (560:9): [True: 0, False: 27.0k]
  ------------------
  561|  27.0k|        || max_request == 0) {
  ------------------
  |  Branch (561:12): [True: 0, False: 27.0k]
  ------------------
  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|  54.0k|    for (; outlen > 0; outlen -= chunk, out += chunk) {
  ------------------
  |  Branch (565:12): [True: 27.0k, False: 27.0k]
  ------------------
  566|  27.0k|        chunk = outlen > max_request ? max_request : outlen;
  ------------------
  |  Branch (566:17): [True: 0, False: 27.0k]
  ------------------
  567|  27.0k|        if (!ctx->meth->generate(ctx->algctx, out, chunk, strength,
  ------------------
  |  Branch (567:13): [True: 0, False: 27.0k]
  ------------------
  568|  27.0k|                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|  27.0k|        prediction_resistance = 0;
  577|  27.0k|    }
  578|  27.0k|    return 1;
  579|  27.0k|}

EVP_KEYEXCH_free:
  162|  16.6k|{
  163|  16.6k|    int i;
  164|       |
  165|  16.6k|    if (exchange == NULL)
  ------------------
  |  Branch (165:9): [True: 0, False: 16.6k]
  ------------------
  166|      0|        return;
  167|  16.6k|    CRYPTO_DOWN_REF(&exchange->refcnt, &i);
  168|  16.6k|    if (i > 0)
  ------------------
  |  Branch (168:9): [True: 11.9k, False: 4.71k]
  ------------------
  169|  11.9k|        return;
  170|  4.71k|    OPENSSL_free(exchange->type_name);
  ------------------
  |  |  132|  4.71k|    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.71k|    ossl_provider_free(exchange->prov);
  172|  4.71k|    CRYPTO_FREE_REF(&exchange->refcnt);
  173|  4.71k|    OPENSSL_free(exchange);
  ------------------
  |  |  132|  4.71k|    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.71k|}
EVP_KEYEXCH_up_ref:
  177|  11.9k|{
  178|  11.9k|    int ref = 0;
  179|       |
  180|  11.9k|    CRYPTO_UP_REF(&exchange->refcnt, &ref);
  181|  11.9k|    return 1;
  182|  11.9k|}
EVP_KEYEXCH_fetch:
  191|  6.26k|{
  192|  6.26k|    return evp_generic_fetch(ctx, OSSL_OP_KEYEXCH, algorithm, properties,
  ------------------
  |  |  289|  6.26k|#define OSSL_OP_KEYEXCH 11
  ------------------
  193|  6.26k|        evp_keyexch_from_algorithm,
  194|  6.26k|        evp_keyexch_up_ref,
  195|  6.26k|        evp_keyexch_free);
  196|  6.26k|}
exchange.c:evp_keyexch_from_algorithm:
   53|  4.71k|{
   54|  4.71k|    const OSSL_DISPATCH *fns = algodef->implementation;
   55|  4.71k|    EVP_KEYEXCH *exchange = NULL;
   56|  4.71k|    int fncnt = 0, sparamfncnt = 0, gparamfncnt = 0, derive_found = 0;
   57|       |
   58|  4.71k|    if ((exchange = evp_keyexch_new(prov)) == NULL) {
  ------------------
  |  Branch (58:9): [True: 0, False: 4.71k]
  ------------------
   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.71k|    exchange->name_id = name_id;
   64|  4.71k|    if ((exchange->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 4.71k]
  ------------------
   65|      0|        goto err;
   66|  4.71k|    exchange->description = algodef->algorithm_description;
   67|       |
   68|  47.8k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (68:12): [True: 43.1k, False: 4.71k]
  ------------------
   69|  43.1k|        switch (fns->function_id) {
  ------------------
  |  Branch (69:17): [True: 43.1k, False: 0]
  ------------------
   70|  4.71k|        case OSSL_FUNC_KEYEXCH_NEWCTX:
  ------------------
  |  |  769|  4.71k|#define OSSL_FUNC_KEYEXCH_NEWCTX 1
  ------------------
  |  Branch (70:9): [True: 4.71k, False: 38.4k]
  ------------------
   71|  4.71k|            if (exchange->newctx != NULL)
  ------------------
  |  Branch (71:17): [True: 0, False: 4.71k]
  ------------------
   72|      0|                break;
   73|  4.71k|            exchange->newctx = OSSL_FUNC_keyexch_newctx(fns);
   74|  4.71k|            fncnt++;
   75|  4.71k|            break;
   76|  4.71k|        case OSSL_FUNC_KEYEXCH_INIT:
  ------------------
  |  |  770|  4.71k|#define OSSL_FUNC_KEYEXCH_INIT 2
  ------------------
  |  Branch (76:9): [True: 4.71k, False: 38.4k]
  ------------------
   77|  4.71k|            if (exchange->init != NULL)
  ------------------
  |  Branch (77:17): [True: 0, False: 4.71k]
  ------------------
   78|      0|                break;
   79|  4.71k|            exchange->init = OSSL_FUNC_keyexch_init(fns);
   80|  4.71k|            fncnt++;
   81|  4.71k|            break;
   82|  2.69k|        case OSSL_FUNC_KEYEXCH_SET_PEER:
  ------------------
  |  |  772|  2.69k|#define OSSL_FUNC_KEYEXCH_SET_PEER 4
  ------------------
  |  Branch (82:9): [True: 2.69k, False: 40.4k]
  ------------------
   83|  2.69k|            if (exchange->set_peer != NULL)
  ------------------
  |  Branch (83:17): [True: 0, False: 2.69k]
  ------------------
   84|      0|                break;
   85|  2.69k|            exchange->set_peer = OSSL_FUNC_keyexch_set_peer(fns);
   86|  2.69k|            break;
   87|  4.71k|        case OSSL_FUNC_KEYEXCH_DERIVE:
  ------------------
  |  |  771|  4.71k|#define OSSL_FUNC_KEYEXCH_DERIVE 3
  ------------------
  |  Branch (87:9): [True: 4.71k, False: 38.4k]
  ------------------
   88|  4.71k|            if (exchange->derive != NULL)
  ------------------
  |  Branch (88:17): [True: 0, False: 4.71k]
  ------------------
   89|      0|                break;
   90|  4.71k|            exchange->derive = OSSL_FUNC_keyexch_derive(fns);
   91|  4.71k|            derive_found = 1;
   92|  4.71k|            break;
   93|  4.71k|        case OSSL_FUNC_KEYEXCH_FREECTX:
  ------------------
  |  |  773|  4.71k|#define OSSL_FUNC_KEYEXCH_FREECTX 5
  ------------------
  |  Branch (93:9): [True: 4.71k, False: 38.4k]
  ------------------
   94|  4.71k|            if (exchange->freectx != NULL)
  ------------------
  |  Branch (94:17): [True: 0, False: 4.71k]
  ------------------
   95|      0|                break;
   96|  4.71k|            exchange->freectx = OSSL_FUNC_keyexch_freectx(fns);
   97|  4.71k|            fncnt++;
   98|  4.71k|            break;
   99|  4.71k|        case OSSL_FUNC_KEYEXCH_DUPCTX:
  ------------------
  |  |  774|  4.71k|#define OSSL_FUNC_KEYEXCH_DUPCTX 6
  ------------------
  |  Branch (99:9): [True: 4.71k, False: 38.4k]
  ------------------
  100|  4.71k|            if (exchange->dupctx != NULL)
  ------------------
  |  Branch (100:17): [True: 0, False: 4.71k]
  ------------------
  101|      0|                break;
  102|  4.71k|            exchange->dupctx = OSSL_FUNC_keyexch_dupctx(fns);
  103|  4.71k|            break;
  104|  4.71k|        case OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS:
  ------------------
  |  |  777|  4.71k|#define OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS 9
  ------------------
  |  Branch (104:9): [True: 4.71k, False: 38.4k]
  ------------------
  105|  4.71k|            if (exchange->get_ctx_params != NULL)
  ------------------
  |  Branch (105:17): [True: 0, False: 4.71k]
  ------------------
  106|      0|                break;
  107|  4.71k|            exchange->get_ctx_params = OSSL_FUNC_keyexch_get_ctx_params(fns);
  108|  4.71k|            gparamfncnt++;
  109|  4.71k|            break;
  110|  4.71k|        case OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  778|  4.71k|#define OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS 10
  ------------------
  |  Branch (110:9): [True: 4.71k, False: 38.4k]
  ------------------
  111|  4.71k|            if (exchange->gettable_ctx_params != NULL)
  ------------------
  |  Branch (111:17): [True: 0, False: 4.71k]
  ------------------
  112|      0|                break;
  113|  4.71k|            exchange->gettable_ctx_params
  114|  4.71k|                = OSSL_FUNC_keyexch_gettable_ctx_params(fns);
  115|  4.71k|            gparamfncnt++;
  116|  4.71k|            break;
  117|  3.37k|        case OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS:
  ------------------
  |  |  775|  3.37k|#define OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS 7
  ------------------
  |  Branch (117:9): [True: 3.37k, False: 39.7k]
  ------------------
  118|  3.37k|            if (exchange->set_ctx_params != NULL)
  ------------------
  |  Branch (118:17): [True: 0, False: 3.37k]
  ------------------
  119|      0|                break;
  120|  3.37k|            exchange->set_ctx_params = OSSL_FUNC_keyexch_set_ctx_params(fns);
  121|  3.37k|            sparamfncnt++;
  122|  3.37k|            break;
  123|  3.37k|        case OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  776|  3.37k|#define OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS 8
  ------------------
  |  Branch (123:9): [True: 3.37k, False: 39.7k]
  ------------------
  124|  3.37k|            if (exchange->settable_ctx_params != NULL)
  ------------------
  |  Branch (124:17): [True: 0, False: 3.37k]
  ------------------
  125|      0|                break;
  126|  3.37k|            exchange->settable_ctx_params
  127|  3.37k|                = OSSL_FUNC_keyexch_settable_ctx_params(fns);
  128|  3.37k|            sparamfncnt++;
  129|  3.37k|            break;
  130|    674|        case OSSL_FUNC_KEYEXCH_DERIVE_SKEY:
  ------------------
  |  |  779|    674|#define OSSL_FUNC_KEYEXCH_DERIVE_SKEY 11
  ------------------
  |  Branch (130:9): [True: 674, False: 42.4k]
  ------------------
  131|    674|            if (exchange->derive_skey != NULL)
  ------------------
  |  Branch (131:17): [True: 0, False: 674]
  ------------------
  132|      0|                break;
  133|    674|            exchange->derive_skey = OSSL_FUNC_keyexch_derive_skey(fns);
  134|    674|            derive_found = 1;
  135|    674|            break;
  136|  43.1k|        }
  137|  43.1k|    }
  138|  4.71k|    fncnt += derive_found;
  139|  4.71k|    if (fncnt != 4
  ------------------
  |  Branch (139:9): [True: 0, False: 4.71k]
  ------------------
  140|  4.71k|        || (gparamfncnt != 0 && gparamfncnt != 2)
  ------------------
  |  Branch (140:13): [True: 4.71k, False: 0]
  |  Branch (140:33): [True: 0, False: 4.71k]
  ------------------
  141|  4.71k|        || (sparamfncnt != 0 && sparamfncnt != 2)) {
  ------------------
  |  Branch (141:13): [True: 3.37k, False: 1.34k]
  |  Branch (141:33): [True: 0, False: 3.37k]
  ------------------
  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.71k|    return exchange;
  155|       |
  156|      0|err:
  157|      0|    EVP_KEYEXCH_free(exchange);
  158|       |    return NULL;
  159|  4.71k|}
exchange.c:evp_keyexch_new:
   33|  4.71k|{
   34|  4.71k|    EVP_KEYEXCH *exchange = OPENSSL_zalloc(sizeof(EVP_KEYEXCH));
  ------------------
  |  |  109|  4.71k|    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.71k|    if (exchange == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 4.71k]
  ------------------
   37|      0|        return NULL;
   38|       |
   39|  4.71k|    if (!CRYPTO_NEW_REF(&exchange->refcnt, 1)
  ------------------
  |  Branch (39:9): [True: 0, False: 4.71k]
  ------------------
   40|  4.71k|        || !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (40:12): [True: 0, False: 4.71k]
  ------------------
   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.71k|    exchange->prov = prov;
   46|       |
   47|  4.71k|    return exchange;
   48|  4.71k|}
exchange.c:evp_keyexch_up_ref:
   28|  11.9k|{
   29|  11.9k|    return EVP_KEYEXCH_up_ref(data);
   30|  11.9k|}
exchange.c:evp_keyexch_free:
   23|  10.5k|{
   24|  10.5k|    EVP_KEYEXCH_free(data);
   25|  10.5k|}

evp_keymgmt_util_assign_pkey:
   62|   466k|{
   63|   466k|    if (pkey == NULL || keymgmt == NULL || keydata == NULL
  ------------------
  |  Branch (63:9): [True: 0, False: 466k]
  |  Branch (63:25): [True: 0, False: 466k]
  |  Branch (63:44): [True: 0, False: 466k]
  ------------------
   64|   466k|        || !EVP_PKEY_set_type_by_keymgmt(pkey, keymgmt)) {
  ------------------
  |  Branch (64:12): [True: 0, False: 466k]
  ------------------
   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|   466k|    pkey->keydata = keydata;
   69|   466k|    evp_keymgmt_util_cache_keyinfo(pkey);
   70|   466k|    return 1;
   71|   466k|}
evp_keymgmt_util_make_pkey:
   74|   458k|{
   75|   458k|    EVP_PKEY *pkey = NULL;
   76|       |
   77|   458k|    if (keymgmt == NULL
  ------------------
  |  Branch (77:9): [True: 0, False: 458k]
  ------------------
   78|   458k|        || keydata == NULL
  ------------------
  |  Branch (78:12): [True: 0, False: 458k]
  ------------------
   79|   458k|        || (pkey = EVP_PKEY_new()) == NULL
  ------------------
  |  Branch (79:12): [True: 0, False: 458k]
  ------------------
   80|   458k|        || !evp_keymgmt_util_assign_pkey(pkey, keymgmt, keydata)) {
  ------------------
  |  Branch (80:12): [True: 0, False: 458k]
  ------------------
   81|      0|        EVP_PKEY_free(pkey);
   82|      0|        return NULL;
   83|      0|    }
   84|   458k|    return pkey;
   85|   458k|}
evp_keymgmt_util_export:
   89|  3.76k|{
   90|  3.76k|    if (pk == NULL || export_cb == NULL)
  ------------------
  |  Branch (90:9): [True: 0, False: 3.76k]
  |  Branch (90:23): [True: 0, False: 3.76k]
  ------------------
   91|      0|        return 0;
   92|  3.76k|    return evp_keymgmt_export(pk->keymgmt, pk->keydata, selection,
   93|  3.76k|        export_cb, export_cbarg);
   94|  3.76k|}
evp_keymgmt_util_clear_operation_cache:
  223|   927k|{
  224|   927k|    if (pk == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 927k]
  ------------------
  225|      0|        return;
  226|       |
  227|   927k|    sk_OP_CACHE_ELEM_pop_free(pk->operation_cache, op_cache_free);
  228|       |    pk->operation_cache = NULL;
  229|   927k|}
evp_keymgmt_util_cache_keyinfo:
  289|   466k|{
  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|   466k|    if (pk->keydata != NULL) {
  ------------------
  |  Branch (295:9): [True: 466k, False: 0]
  ------------------
  296|   466k|        int bits = 0;
  297|   466k|        int security_bits = 0;
  298|   466k|        int security_category = -1;
  299|   466k|        int size = 0;
  300|   466k|        OSSL_PARAM params[5];
  301|       |
  302|   466k|        params[0] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_BITS, &bits);
  ------------------
  |  |  374|   466k|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  303|   466k|        params[1] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_SECURITY_BITS,
  ------------------
  |  |  506|   466k|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  304|   466k|            &security_bits);
  305|   466k|        params[2] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_SECURITY_CATEGORY,
  ------------------
  |  |  507|   466k|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  131|   466k|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  306|   466k|            &security_category);
  307|   466k|        params[3] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_MAX_SIZE, &size);
  ------------------
  |  |  432|   466k|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  308|   466k|        params[4] = OSSL_PARAM_construct_end();
  309|   466k|        if (evp_keymgmt_get_params(pk->keymgmt, pk->keydata, params)) {
  ------------------
  |  Branch (309:13): [True: 466k, False: 0]
  ------------------
  310|   466k|            pk->cache.size = size;
  311|   466k|            pk->cache.bits = bits;
  312|   466k|            pk->cache.security_bits = security_bits;
  313|   466k|            pk->cache.security_category = security_category;
  314|   466k|        }
  315|   466k|    }
  316|   466k|}
evp_keymgmt_util_gen:
  516|  7.92k|{
  517|  7.92k|    void *keydata = NULL;
  518|       |
  519|  7.92k|    if ((keydata = evp_keymgmt_gen(keymgmt, genctx, cb, cbarg)) == NULL
  ------------------
  |  Branch (519:9): [True: 0, False: 7.92k]
  ------------------
  520|  7.92k|        || !evp_keymgmt_util_assign_pkey(target, keymgmt, keydata)) {
  ------------------
  |  Branch (520:12): [True: 0, False: 7.92k]
  ------------------
  521|      0|        evp_keymgmt_freedata(keymgmt, keydata);
  522|      0|        keydata = NULL;
  523|      0|    }
  524|       |
  525|  7.92k|    return keydata;
  526|  7.92k|}

EVP_KEYMGMT_fetch:
  287|   184k|{
  288|   184k|    return evp_generic_fetch(ctx, OSSL_OP_KEYMGMT, algorithm, properties,
  ------------------
  |  |  288|   184k|#define OSSL_OP_KEYMGMT 10
  ------------------
  289|   184k|        keymgmt_from_algorithm,
  290|   184k|        evp_keymgmt_up_ref,
  291|   184k|        evp_keymgmt_free);
  292|   184k|}
EVP_KEYMGMT_up_ref:
  295|  1.75M|{
  296|  1.75M|    int ref = 0;
  297|       |
  298|  1.75M|    CRYPTO_UP_REF(&keymgmt->refcnt, &ref);
  299|  1.75M|    return 1;
  300|  1.75M|}
EVP_KEYMGMT_free:
  303|  1.78M|{
  304|  1.78M|    int ref = 0;
  305|       |
  306|  1.78M|    if (keymgmt == NULL)
  ------------------
  |  Branch (306:9): [True: 0, False: 1.78M]
  ------------------
  307|      0|        return;
  308|       |
  309|  1.78M|    CRYPTO_DOWN_REF(&keymgmt->refcnt, &ref);
  310|  1.78M|    if (ref > 0)
  ------------------
  |  Branch (310:9): [True: 1.75M, False: 28.2k]
  ------------------
  311|  1.75M|        return;
  312|  28.2k|    OPENSSL_free(keymgmt->type_name);
  ------------------
  |  |  132|  28.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__
  |  |  ------------------
  ------------------
  313|  28.2k|    ossl_provider_free(keymgmt->prov);
  314|  28.2k|    CRYPTO_FREE_REF(&keymgmt->refcnt);
  315|  28.2k|    OPENSSL_free(keymgmt);
  ------------------
  |  |  132|  28.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__
  |  |  ------------------
  ------------------
  316|  28.2k|}
EVP_KEYMGMT_get0_provider:
  319|   478k|{
  320|   478k|    return keymgmt->prov;
  321|   478k|}
evp_keymgmt_get_legacy_alg:
  329|  86.8k|{
  330|  86.8k|    return keymgmt->legacy_alg;
  331|  86.8k|}
EVP_KEYMGMT_is_a:
  344|   858k|{
  345|   858k|    return keymgmt != NULL
  ------------------
  |  Branch (345:12): [True: 858k, False: 0]
  ------------------
  346|   858k|        && evp_is_a(keymgmt->prov, keymgmt->name_id, NULL, name);
  ------------------
  |  Branch (346:12): [True: 858k, False: 0]
  ------------------
  347|   858k|}
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|   494k|{
  364|   494k|    if (keymgmt->prov != NULL)
  ------------------
  |  Branch (364:9): [True: 494k, False: 0]
  ------------------
  365|   494k|        return evp_names_do_all(keymgmt->prov, keymgmt->name_id, fn, data);
  366|       |
  367|      0|    return 1;
  368|   494k|}
evp_keymgmt_freedata:
  390|   466k|{
  391|       |    /* This is mandatory, no need to check for its presence */
  392|   466k|    keymgmt->free(keydata);
  393|   466k|}
evp_keymgmt_gen_init:
  397|  7.92k|{
  398|  7.92k|    void *provctx = ossl_provider_ctx(EVP_KEYMGMT_get0_provider(keymgmt));
  399|       |
  400|  7.92k|    if (keymgmt->gen_init == NULL)
  ------------------
  |  Branch (400:9): [True: 0, False: 7.92k]
  ------------------
  401|      0|        return NULL;
  402|  7.92k|    return keymgmt->gen_init(provctx, selection, params);
  403|  7.92k|}
evp_keymgmt_gen_set_params:
  421|  7.92k|{
  422|  7.92k|    if (keymgmt->gen_set_params == NULL)
  ------------------
  |  Branch (422:9): [True: 0, False: 7.92k]
  ------------------
  423|      0|        return 0;
  424|  7.92k|    return keymgmt->gen_set_params(genctx, params);
  425|  7.92k|}
evp_keymgmt_gen:
  455|  7.92k|{
  456|  7.92k|    void *ret;
  457|  7.92k|    const char *desc = keymgmt->description != NULL ? keymgmt->description : "";
  ------------------
  |  Branch (457:24): [True: 7.92k, False: 0]
  ------------------
  458|       |
  459|  7.92k|    if (keymgmt->gen == NULL) {
  ------------------
  |  Branch (459:9): [True: 0, False: 7.92k]
  ------------------
  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|  7.92k|    ERR_set_mark();
  466|  7.92k|    ret = keymgmt->gen(genctx, cb, cbarg);
  467|  7.92k|    if (ret == NULL && ERR_count_to_mark() == 0)
  ------------------
  |  Branch (467:9): [True: 0, False: 7.92k]
  |  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|  7.92k|    ERR_clear_last_mark();
  471|  7.92k|    return ret;
  472|  7.92k|}
evp_keymgmt_gen_cleanup:
  475|  7.92k|{
  476|  7.92k|    if (keymgmt->gen_cleanup != NULL)
  ------------------
  |  Branch (476:9): [True: 7.92k, False: 0]
  ------------------
  477|  7.92k|        keymgmt->gen_cleanup(genctx);
  478|  7.92k|}
evp_keymgmt_has_load:
  481|   916k|{
  482|   916k|    return keymgmt != NULL && keymgmt->load != NULL;
  ------------------
  |  Branch (482:12): [True: 916k, False: 0]
  |  Branch (482:31): [True: 916k, False: 0]
  ------------------
  483|   916k|}
evp_keymgmt_load:
  487|   458k|{
  488|   458k|    if (evp_keymgmt_has_load(keymgmt))
  ------------------
  |  Branch (488:9): [True: 458k, False: 0]
  ------------------
  489|   458k|        return keymgmt->load(objref, objref_sz);
  490|      0|    return NULL;
  491|   458k|}
evp_keymgmt_get_params:
  495|   474k|{
  496|   474k|    if (keymgmt->get_params == NULL)
  ------------------
  |  Branch (496:9): [True: 0, False: 474k]
  ------------------
  497|      0|        return 1;
  498|   474k|    return keymgmt->get_params(keydata, params);
  499|   474k|}
evp_keymgmt_export:
  574|  3.76k|{
  575|  3.76k|    if (keymgmt->export == NULL)
  ------------------
  |  Branch (575:9): [True: 0, False: 3.76k]
  ------------------
  576|      0|        return 0;
  577|  3.76k|    return keymgmt->export(keydata, selection, param_cb, cbarg);
  578|  3.76k|}
keymgmt_meth.c:keymgmt_from_algorithm:
   66|  28.3k|{
   67|  28.3k|    const OSSL_DISPATCH *fns = algodef->implementation;
   68|  28.3k|    EVP_KEYMGMT *keymgmt = NULL;
   69|  28.3k|    int setparamfncnt = 0, getparamfncnt = 0;
   70|  28.3k|    int setgenparamfncnt = 0;
   71|  28.3k|    int importfncnt = 0, exportfncnt = 0;
   72|  28.3k|    int importtypesfncnt = 0, exporttypesfncnt = 0;
   73|  28.3k|    int getgenparamfncnt = 0;
   74|       |
   75|  28.3k|    if ((keymgmt = keymgmt_new()) == NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 28.3k]
  ------------------
   76|      0|        return NULL;
   77|       |
   78|  28.3k|    keymgmt->name_id = name_id;
   79|  28.3k|    if ((keymgmt->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL) {
  ------------------
  |  Branch (79:9): [True: 0, False: 28.3k]
  ------------------
   80|      0|        EVP_KEYMGMT_free(keymgmt);
   81|      0|        return NULL;
   82|      0|    }
   83|  28.3k|    keymgmt->description = algodef->algorithm_description;
   84|       |
   85|   535k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (85:12): [True: 506k, False: 28.3k]
  ------------------
   86|   506k|        switch (fns->function_id) {
  ------------------
  |  Branch (86:17): [True: 506k, False: 0]
  ------------------
   87|  28.3k|        case OSSL_FUNC_KEYMGMT_NEW:
  ------------------
  |  |  664|  28.3k|#define OSSL_FUNC_KEYMGMT_NEW 1
  ------------------
  |  Branch (87:9): [True: 28.3k, False: 478k]
  ------------------
   88|  28.3k|            if (keymgmt->new == NULL)
  ------------------
  |  Branch (88:17): [True: 28.3k, False: 0]
  ------------------
   89|  28.3k|                keymgmt->new = OSSL_FUNC_keymgmt_new(fns);
   90|  28.3k|            break;
   91|  4.04k|        case OSSL_FUNC_KEYMGMT_NEW_EX:
  ------------------
  |  |  666|  4.04k|#define OSSL_FUNC_KEYMGMT_NEW_EX 17
  ------------------
  |  Branch (91:9): [True: 4.04k, False: 502k]
  ------------------
   92|  4.04k|            if (keymgmt->new_ex == NULL)
  ------------------
  |  Branch (92:17): [True: 4.04k, False: 0]
  ------------------
   93|  4.04k|                keymgmt->new_ex = OSSL_FUNC_keymgmt_new_ex(fns);
   94|  4.04k|            break;
   95|  26.2k|        case OSSL_FUNC_KEYMGMT_GEN_INIT:
  ------------------
  |  |  670|  26.2k|#define OSSL_FUNC_KEYMGMT_GEN_INIT 2
  ------------------
  |  Branch (95:9): [True: 26.2k, False: 480k]
  ------------------
   96|  26.2k|            if (keymgmt->gen_init == NULL)
  ------------------
  |  Branch (96:17): [True: 26.2k, False: 0]
  ------------------
   97|  26.2k|                keymgmt->gen_init = OSSL_FUNC_keymgmt_gen_init(fns);
   98|  26.2k|            break;
   99|  4.04k|        case OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE:
  ------------------
  |  |  671|  4.04k|#define OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE 3
  ------------------
  |  Branch (99:9): [True: 4.04k, False: 502k]
  ------------------
  100|  4.04k|            if (keymgmt->gen_set_template == NULL)
  ------------------
  |  Branch (100:17): [True: 4.04k, False: 0]
  ------------------
  101|  4.04k|                keymgmt->gen_set_template = OSSL_FUNC_keymgmt_gen_set_template(fns);
  102|  4.04k|            break;
  103|  26.2k|        case OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS:
  ------------------
  |  |  672|  26.2k|#define OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS 4
  ------------------
  |  Branch (103:9): [True: 26.2k, False: 480k]
  ------------------
  104|  26.2k|            if (keymgmt->gen_set_params == NULL) {
  ------------------
  |  Branch (104:17): [True: 26.2k, False: 0]
  ------------------
  105|  26.2k|                setgenparamfncnt++;
  106|  26.2k|                keymgmt->gen_set_params = OSSL_FUNC_keymgmt_gen_set_params(fns);
  107|  26.2k|            }
  108|  26.2k|            break;
  109|  26.2k|        case OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS:
  ------------------
  |  |  673|  26.2k|#define OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS 5
  ------------------
  |  Branch (109:9): [True: 26.2k, False: 480k]
  ------------------
  110|  26.2k|            if (keymgmt->gen_settable_params == NULL) {
  ------------------
  |  Branch (110:17): [True: 26.2k, False: 0]
  ------------------
  111|  26.2k|                setgenparamfncnt++;
  112|  26.2k|                keymgmt->gen_settable_params = OSSL_FUNC_keymgmt_gen_settable_params(fns);
  113|  26.2k|            }
  114|  26.2k|            break;
  115|  1.34k|        case OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS:
  ------------------
  |  |  676|  1.34k|#define OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS 15
  ------------------
  |  Branch (115:9): [True: 1.34k, False: 505k]
  ------------------
  116|  1.34k|            if (keymgmt->gen_get_params == NULL) {
  ------------------
  |  Branch (116:17): [True: 1.34k, False: 0]
  ------------------
  117|  1.34k|                getgenparamfncnt++;
  118|  1.34k|                keymgmt->gen_get_params = OSSL_FUNC_keymgmt_gen_get_params(fns);
  119|  1.34k|            }
  120|  1.34k|            break;
  121|  1.34k|        case OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS:
  ------------------
  |  |  677|  1.34k|#define OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS 16
  ------------------
  |  Branch (121:9): [True: 1.34k, False: 505k]
  ------------------
  122|  1.34k|            if (keymgmt->gen_gettable_params == NULL) {
  ------------------
  |  Branch (122:17): [True: 1.34k, False: 0]
  ------------------
  123|  1.34k|                getgenparamfncnt++;
  124|  1.34k|                keymgmt->gen_gettable_params = OSSL_FUNC_keymgmt_gen_gettable_params(fns);
  125|  1.34k|            }
  126|  1.34k|            break;
  127|  26.2k|        case OSSL_FUNC_KEYMGMT_GEN:
  ------------------
  |  |  674|  26.2k|#define OSSL_FUNC_KEYMGMT_GEN 6
  ------------------
  |  Branch (127:9): [True: 26.2k, False: 480k]
  ------------------
  128|  26.2k|            if (keymgmt->gen == NULL)
  ------------------
  |  Branch (128:17): [True: 26.2k, False: 0]
  ------------------
  129|  26.2k|                keymgmt->gen = OSSL_FUNC_keymgmt_gen(fns);
  130|  26.2k|            break;
  131|  26.2k|        case OSSL_FUNC_KEYMGMT_GEN_CLEANUP:
  ------------------
  |  |  675|  26.2k|#define OSSL_FUNC_KEYMGMT_GEN_CLEANUP 7
  ------------------
  |  Branch (131:9): [True: 26.2k, False: 480k]
  ------------------
  132|  26.2k|            if (keymgmt->gen_cleanup == NULL)
  ------------------
  |  Branch (132:17): [True: 26.2k, False: 0]
  ------------------
  133|  26.2k|                keymgmt->gen_cleanup = OSSL_FUNC_keymgmt_gen_cleanup(fns);
  134|  26.2k|            break;
  135|  28.3k|        case OSSL_FUNC_KEYMGMT_FREE:
  ------------------
  |  |  702|  28.3k|#define OSSL_FUNC_KEYMGMT_FREE 10
  ------------------
  |  Branch (135:9): [True: 28.3k, False: 478k]
  ------------------
  136|  28.3k|            if (keymgmt->free == NULL)
  ------------------
  |  Branch (136:17): [True: 28.3k, False: 0]
  ------------------
  137|  28.3k|                keymgmt->free = OSSL_FUNC_keymgmt_free(fns);
  138|  28.3k|            break;
  139|  20.2k|        case OSSL_FUNC_KEYMGMT_LOAD:
  ------------------
  |  |  697|  20.2k|#define OSSL_FUNC_KEYMGMT_LOAD 8
  ------------------
  |  Branch (139:9): [True: 20.2k, False: 486k]
  ------------------
  140|  20.2k|            if (keymgmt->load == NULL)
  ------------------
  |  Branch (140:17): [True: 20.2k, False: 0]
  ------------------
  141|  20.2k|                keymgmt->load = OSSL_FUNC_keymgmt_load(fns);
  142|  20.2k|            break;
  143|  26.2k|        case OSSL_FUNC_KEYMGMT_GET_PARAMS:
  ------------------
  |  |  706|  26.2k|#define OSSL_FUNC_KEYMGMT_GET_PARAMS 11
  ------------------
  |  Branch (143:9): [True: 26.2k, False: 480k]
  ------------------
  144|  26.2k|            if (keymgmt->get_params == NULL) {
  ------------------
  |  Branch (144:17): [True: 26.2k, False: 0]
  ------------------
  145|  26.2k|                getparamfncnt++;
  146|  26.2k|                keymgmt->get_params = OSSL_FUNC_keymgmt_get_params(fns);
  147|  26.2k|            }
  148|  26.2k|            break;
  149|  26.2k|        case OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS:
  ------------------
  |  |  707|  26.2k|#define OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS 12
  ------------------
  |  Branch (149:9): [True: 26.2k, False: 480k]
  ------------------
  150|  26.2k|            if (keymgmt->gettable_params == NULL) {
  ------------------
  |  Branch (150:17): [True: 26.2k, False: 0]
  ------------------
  151|  26.2k|                getparamfncnt++;
  152|  26.2k|                keymgmt->gettable_params = OSSL_FUNC_keymgmt_gettable_params(fns);
  153|  26.2k|            }
  154|  26.2k|            break;
  155|  14.1k|        case OSSL_FUNC_KEYMGMT_SET_PARAMS:
  ------------------
  |  |  713|  14.1k|#define OSSL_FUNC_KEYMGMT_SET_PARAMS 13
  ------------------
  |  Branch (155:9): [True: 14.1k, False: 492k]
  ------------------
  156|  14.1k|            if (keymgmt->set_params == NULL) {
  ------------------
  |  Branch (156:17): [True: 14.1k, False: 0]
  ------------------
  157|  14.1k|                setparamfncnt++;
  158|  14.1k|                keymgmt->set_params = OSSL_FUNC_keymgmt_set_params(fns);
  159|  14.1k|            }
  160|  14.1k|            break;
  161|  14.1k|        case OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS:
  ------------------
  |  |  714|  14.1k|#define OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS 14
  ------------------
  |  Branch (161:9): [True: 14.1k, False: 492k]
  ------------------
  162|  14.1k|            if (keymgmt->settable_params == NULL) {
  ------------------
  |  Branch (162:17): [True: 14.1k, False: 0]
  ------------------
  163|  14.1k|                setparamfncnt++;
  164|  14.1k|                keymgmt->settable_params = OSSL_FUNC_keymgmt_settable_params(fns);
  165|  14.1k|            }
  166|  14.1k|            break;
  167|  3.37k|        case OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME:
  ------------------
  |  |  721|  3.37k|#define OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME 20
  ------------------
  |  Branch (167:9): [True: 3.37k, False: 503k]
  ------------------
  168|  3.37k|            if (keymgmt->query_operation_name == NULL)
  ------------------
  |  Branch (168:17): [True: 3.37k, False: 0]
  ------------------
  169|  3.37k|                keymgmt->query_operation_name = OSSL_FUNC_keymgmt_query_operation_name(fns);
  170|  3.37k|            break;
  171|  28.3k|        case OSSL_FUNC_KEYMGMT_HAS:
  ------------------
  |  |  726|  28.3k|#define OSSL_FUNC_KEYMGMT_HAS 21
  ------------------
  |  Branch (171:9): [True: 28.3k, False: 478k]
  ------------------
  172|  28.3k|            if (keymgmt->has == NULL)
  ------------------
  |  Branch (172:17): [True: 28.3k, False: 0]
  ------------------
  173|  28.3k|                keymgmt->has = OSSL_FUNC_keymgmt_has(fns);
  174|  28.3k|            break;
  175|  23.5k|        case OSSL_FUNC_KEYMGMT_DUP:
  ------------------
  |  |  755|  23.5k|#define OSSL_FUNC_KEYMGMT_DUP 44
  ------------------
  |  Branch (175:9): [True: 23.5k, False: 483k]
  ------------------
  176|  23.5k|            if (keymgmt->dup == NULL)
  ------------------
  |  Branch (176:17): [True: 23.5k, False: 0]
  ------------------
  177|  23.5k|                keymgmt->dup = OSSL_FUNC_keymgmt_dup(fns);
  178|  23.5k|            break;
  179|  20.2k|        case OSSL_FUNC_KEYMGMT_VALIDATE:
  ------------------
  |  |  730|  20.2k|#define OSSL_FUNC_KEYMGMT_VALIDATE 22
  ------------------
  |  Branch (179:9): [True: 20.2k, False: 486k]
  ------------------
  180|  20.2k|            if (keymgmt->validate == NULL)
  ------------------
  |  Branch (180:17): [True: 20.2k, False: 0]
  ------------------
  181|  20.2k|                keymgmt->validate = OSSL_FUNC_keymgmt_validate(fns);
  182|  20.2k|            break;
  183|  26.2k|        case OSSL_FUNC_KEYMGMT_MATCH:
  ------------------
  |  |  734|  26.2k|#define OSSL_FUNC_KEYMGMT_MATCH 23
  ------------------
  |  Branch (183:9): [True: 26.2k, False: 480k]
  ------------------
  184|  26.2k|            if (keymgmt->match == NULL)
  ------------------
  |  Branch (184:17): [True: 26.2k, False: 0]
  ------------------
  185|  26.2k|                keymgmt->match = OSSL_FUNC_keymgmt_match(fns);
  186|  26.2k|            break;
  187|  26.2k|        case OSSL_FUNC_KEYMGMT_IMPORT:
  ------------------
  |  |  740|  26.2k|#define OSSL_FUNC_KEYMGMT_IMPORT 40
  ------------------
  |  Branch (187:9): [True: 26.2k, False: 480k]
  ------------------
  188|  26.2k|            if (keymgmt->import == NULL) {
  ------------------
  |  Branch (188:17): [True: 26.2k, False: 0]
  ------------------
  189|  26.2k|                importfncnt++;
  190|  26.2k|                keymgmt->import = OSSL_FUNC_keymgmt_import(fns);
  191|  26.2k|            }
  192|  26.2k|            break;
  193|  26.2k|        case OSSL_FUNC_KEYMGMT_IMPORT_TYPES:
  ------------------
  |  |  741|  26.2k|#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES 41
  ------------------
  |  Branch (193:9): [True: 26.2k, False: 480k]
  ------------------
  194|  26.2k|            if (keymgmt->import_types == NULL) {
  ------------------
  |  Branch (194:17): [True: 26.2k, False: 0]
  ------------------
  195|  26.2k|                if (importtypesfncnt == 0)
  ------------------
  |  Branch (195:21): [True: 26.2k, False: 0]
  ------------------
  196|  26.2k|                    importfncnt++;
  197|  26.2k|                importtypesfncnt++;
  198|  26.2k|                keymgmt->import_types = OSSL_FUNC_keymgmt_import_types(fns);
  199|  26.2k|            }
  200|  26.2k|            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: 506k]
  ------------------
  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|  26.2k|        case OSSL_FUNC_KEYMGMT_EXPORT:
  ------------------
  |  |  742|  26.2k|#define OSSL_FUNC_KEYMGMT_EXPORT 42
  ------------------
  |  Branch (209:9): [True: 26.2k, False: 480k]
  ------------------
  210|  26.2k|            if (keymgmt->export == NULL) {
  ------------------
  |  Branch (210:17): [True: 26.2k, False: 0]
  ------------------
  211|  26.2k|                exportfncnt++;
  212|  26.2k|                keymgmt->export = OSSL_FUNC_keymgmt_export(fns);
  213|  26.2k|            }
  214|  26.2k|            break;
  215|  26.2k|        case OSSL_FUNC_KEYMGMT_EXPORT_TYPES:
  ------------------
  |  |  743|  26.2k|#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES 43
  ------------------
  |  Branch (215:9): [True: 26.2k, False: 480k]
  ------------------
  216|  26.2k|            if (keymgmt->export_types == NULL) {
  ------------------
  |  Branch (216:17): [True: 26.2k, False: 0]
  ------------------
  217|  26.2k|                if (exporttypesfncnt == 0)
  ------------------
  |  Branch (217:21): [True: 26.2k, False: 0]
  ------------------
  218|  26.2k|                    exportfncnt++;
  219|  26.2k|                exporttypesfncnt++;
  220|  26.2k|                keymgmt->export_types = OSSL_FUNC_keymgmt_export_types(fns);
  221|  26.2k|            }
  222|  26.2k|            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: 506k]
  ------------------
  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|   506k|        }
  232|   506k|    }
  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|  28.3k|    if (keymgmt->free == NULL
  ------------------
  |  Branch (241:9): [True: 0, False: 28.3k]
  ------------------
  242|  28.3k|        || (keymgmt->new == NULL
  ------------------
  |  Branch (242:13): [True: 0, False: 28.3k]
  ------------------
  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|  28.3k|        || keymgmt->has == NULL
  ------------------
  |  Branch (246:12): [True: 0, False: 28.3k]
  ------------------
  247|  28.3k|        || (getparamfncnt != 0 && getparamfncnt != 2)
  ------------------
  |  Branch (247:13): [True: 26.2k, False: 2.02k]
  |  Branch (247:35): [True: 0, False: 26.2k]
  ------------------
  248|  28.3k|        || (setparamfncnt != 0 && setparamfncnt != 2)
  ------------------
  |  Branch (248:13): [True: 14.1k, False: 14.1k]
  |  Branch (248:35): [True: 0, False: 14.1k]
  ------------------
  249|  28.3k|        || (setgenparamfncnt != 0 && setgenparamfncnt != 2)
  ------------------
  |  Branch (249:13): [True: 26.2k, False: 2.02k]
  |  Branch (249:38): [True: 0, False: 26.2k]
  ------------------
  250|  28.3k|        || (getgenparamfncnt != 0 && getgenparamfncnt != 2)
  ------------------
  |  Branch (250:13): [True: 1.34k, False: 26.9k]
  |  Branch (250:38): [True: 0, False: 1.34k]
  ------------------
  251|  28.3k|        || (importfncnt != 0 && importfncnt != 2)
  ------------------
  |  Branch (251:13): [True: 26.2k, False: 2.02k]
  |  Branch (251:33): [True: 0, False: 26.2k]
  ------------------
  252|  28.3k|        || (exportfncnt != 0 && exportfncnt != 2)
  ------------------
  |  Branch (252:13): [True: 26.2k, False: 2.02k]
  |  Branch (252:33): [True: 0, False: 26.2k]
  ------------------
  253|  28.3k|        || (keymgmt->gen != NULL
  ------------------
  |  Branch (253:13): [True: 26.2k, False: 2.02k]
  ------------------
  254|  26.2k|            && (keymgmt->gen_init == NULL
  ------------------
  |  Branch (254:17): [True: 0, False: 26.2k]
  ------------------
  255|  26.2k|                || keymgmt->gen_cleanup == NULL))) {
  ------------------
  |  Branch (255:20): [True: 0, False: 26.2k]
  ------------------
  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|  28.3k|    keymgmt->prov = prov;
  261|  28.3k|    if (prov != NULL && !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (261:9): [True: 28.3k, False: 0]
  |  Branch (261:25): [True: 0, False: 28.3k]
  ------------------
  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|  28.3k|#ifndef FIPS_MODULE
  268|  28.3k|    keymgmt->legacy_alg = get_legacy_alg_type_from_keymgmt(keymgmt);
  269|  28.3k|#endif
  270|       |
  271|  28.3k|    return keymgmt;
  272|  28.3k|}
keymgmt_meth.c:keymgmt_new:
   31|  28.3k|{
   32|  28.3k|    EVP_KEYMGMT *keymgmt = NULL;
   33|       |
   34|  28.3k|    if ((keymgmt = OPENSSL_zalloc(sizeof(*keymgmt))) == NULL)
  ------------------
  |  |  109|  28.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__
  |  |  ------------------
  ------------------
  |  Branch (34:9): [True: 0, False: 28.3k]
  ------------------
   35|      0|        return NULL;
   36|  28.3k|    if (!CRYPTO_NEW_REF(&keymgmt->refcnt, 1)) {
  ------------------
  |  Branch (36:9): [True: 0, False: 28.3k]
  ------------------
   37|      0|        EVP_KEYMGMT_free(keymgmt);
   38|      0|        return NULL;
   39|      0|    }
   40|  28.3k|    return keymgmt;
   41|  28.3k|}
keymgmt_meth.c:get_legacy_alg_type_from_keymgmt:
   54|  28.3k|{
   55|  28.3k|    int type = NID_undef;
  ------------------
  |  |   18|  28.3k|#define NID_undef                       0
  ------------------
   56|       |
   57|  28.3k|    EVP_KEYMGMT_names_do_all(keymgmt, help_get_legacy_alg_type_from_keymgmt,
   58|  28.3k|        &type);
   59|  28.3k|    return type;
   60|  28.3k|}
keymgmt_meth.c:help_get_legacy_alg_type_from_keymgmt:
   46|  73.4k|{
   47|  73.4k|    int *type = arg;
   48|       |
   49|  73.4k|    if (*type == NID_undef)
  ------------------
  |  |   18|  73.4k|#define NID_undef                       0
  ------------------
  |  Branch (49:9): [True: 57.9k, False: 15.5k]
  ------------------
   50|  57.9k|        *type = evp_pkey_name2type(keytype);
   51|  73.4k|}
keymgmt_meth.c:evp_keymgmt_up_ref:
   26|   222k|{
   27|   222k|    return EVP_KEYMGMT_up_ref(data);
   28|   222k|}
keymgmt_meth.c:evp_keymgmt_free:
   21|  69.7k|{
   22|  69.7k|    EVP_KEYMGMT_free(data);
   23|  69.7k|}

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|   399k|{
   31|   399k|    return &sha1_md;
   32|   399k|}
EVP_sha224:
   44|      1|{
   45|      1|    return &sha224_md;
   46|      1|}
EVP_sha256:
   58|  12.4k|{
   59|  12.4k|    return &sha256_md;
   60|  12.4k|}
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|  13.9k|{
   41|  13.9k|    if (ctx == NULL)
  ------------------
  |  Branch (41:9): [True: 13.9k, False: 0]
  ------------------
   42|  13.9k|        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|   383k|{
  132|       |    return evp_get_digestbyname_ex(NULL, name);
  133|   383k|}
evp_get_digestbyname_ex:
  136|   383k|{
  137|   383k|    const EVP_MD *dp;
  138|   383k|    OSSL_NAMEMAP *namemap;
  139|   383k|    int id;
  140|   383k|    int do_retry = 1;
  141|       |
  142|   383k|    if (!OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_DIGESTS, NULL))
  ------------------
  |  |  508|   383k|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
  |  Branch (142:9): [True: 0, False: 383k]
  ------------------
  143|      0|        return NULL;
  144|       |
  145|   383k|    dp = (const EVP_MD *)OBJ_NAME_get(name, OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   25|   383k|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  146|       |
  147|   383k|    if (dp != NULL)
  ------------------
  |  Branch (147:9): [True: 383k, False: 0]
  ------------------
  148|   383k|        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|   310k|{
   42|   310k|    if (pkey->type != EVP_PKEY_RSA && pkey->type != EVP_PKEY_RSA_PSS) {
  ------------------
  |  |   63|   310k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   621k|#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: 310k]
  |  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|   310k|    return evp_pkey_get_legacy((EVP_PKEY *)pkey);
   47|   310k|}
EVP_PKEY_get1_RSA:
   55|   310k|{
   56|   310k|    RSA *ret = evp_pkey_get0_RSA_int(pkey);
   57|       |
   58|   310k|    if (ret != NULL && !RSA_up_ref(ret))
  ------------------
  |  Branch (58:9): [True: 310k, False: 0]
  |  Branch (58:24): [True: 0, False: 310k]
  ------------------
   59|      0|        ret = NULL;
   60|       |
   61|   310k|    return ret;
   62|   310k|}
evp_pkey_get0_EC_KEY_int:
   77|   147k|{
   78|   147k|    if (EVP_PKEY_get_base_id(pkey) != EVP_PKEY_EC) {
  ------------------
  |  |   73|   147k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|   147k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (78:9): [True: 0, False: 147k]
  ------------------
   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|   147k|    return evp_pkey_get_legacy((EVP_PKEY *)pkey);
   83|   147k|}
EVP_PKEY_get1_EC_KEY:
   91|   147k|{
   92|   147k|    EC_KEY *ret = evp_pkey_get0_EC_KEY_int(pkey);
   93|       |
   94|   147k|    if (ret != NULL && !EC_KEY_up_ref(ret))
  ------------------
  |  Branch (94:9): [True: 147k, False: 0]
  |  Branch (94:24): [True: 0, False: 147k]
  ------------------
   95|      0|        ret = NULL;
   96|   147k|    return ret;
   97|   147k|}

EVP_PKEY_set_type:
  693|   995k|{
  694|   995k|    return pkey_set_type(pkey, type, NULL, -1, NULL);
  695|   995k|}
EVP_PKEY_assign:
  738|   458k|{
  739|   458k|#ifndef OPENSSL_NO_EC
  740|   458k|    int pktype;
  741|       |
  742|   458k|    pktype = EVP_PKEY_type(type);
  743|   458k|    if ((key != NULL) && (pktype == EVP_PKEY_EC || pktype == EVP_PKEY_SM2)) {
  ------------------
  |  |   73|   458k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|   916k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
                  if ((key != NULL) && (pktype == EVP_PKEY_EC || pktype == EVP_PKEY_SM2)) {
  ------------------
  |  |   74|   310k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|   310k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (743:9): [True: 458k, False: 0]
  |  Branch (743:27): [True: 147k, False: 310k]
  |  Branch (743:52): [True: 0, False: 310k]
  ------------------
  744|   147k|        const EC_GROUP *group = EC_KEY_get0_group(key);
  745|       |
  746|   147k|        if (group != NULL) {
  ------------------
  |  Branch (746:13): [True: 147k, False: 0]
  ------------------
  747|   147k|            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|   147k|            if (curve == NID_sm2 && pktype == EVP_PKEY_EC)
  ------------------
  |  | 1259|   295k|#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: 147k]
  |  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|   147k|            else if (curve != NID_sm2 && pktype == EVP_PKEY_SM2)
  ------------------
  |  | 1259|   295k|#define NID_sm2         1172
  ------------------
                          else if (curve != NID_sm2 && pktype == EVP_PKEY_SM2)
  ------------------
  |  |   74|   147k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|   147k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (755:22): [True: 147k, False: 0]
  |  Branch (755:42): [True: 0, False: 147k]
  ------------------
  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|   147k|        }
  758|   147k|    }
  759|   458k|#endif
  760|       |
  761|   458k|    if (pkey == NULL || !EVP_PKEY_set_type(pkey, type))
  ------------------
  |  Branch (761:9): [True: 0, False: 458k]
  |  Branch (761:25): [True: 0, False: 458k]
  ------------------
  762|      0|        return 0;
  763|       |
  764|   458k|    pkey->pkey.ptr = key;
  765|   458k|    detect_foreign_key(pkey);
  766|       |
  767|       |    return (key != NULL);
  768|   458k|}
EVP_PKEY_get_id:
  970|   147k|{
  971|   147k|    return pkey->type;
  972|   147k|}
EVP_PKEY_get_base_id:
  975|   147k|{
  976|   147k|    return EVP_PKEY_type(pkey->type);
  977|   147k|}
evp_pkey_name2type:
 1007|  65.8k|{
 1008|  65.8k|    int type;
 1009|  65.8k|    size_t i;
 1010|       |
 1011|   797k|    for (i = 0; i < OSSL_NELEM(standard_name2type); i++) {
  ------------------
  |  |   14|   797k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1011:17): [True: 739k, False: 57.1k]
  ------------------
 1012|   739k|        if (OPENSSL_strcasecmp(name, standard_name2type[i].ptr) == 0)
  ------------------
  |  Branch (1012:13): [True: 8.72k, False: 731k]
  ------------------
 1013|  8.72k|            return (int)standard_name2type[i].id;
 1014|   739k|    }
 1015|       |
 1016|  57.1k|    if ((type = EVP_PKEY_type(OBJ_sn2nid(name))) != NID_undef)
  ------------------
  |  |   18|  57.1k|#define NID_undef                       0
  ------------------
  |  Branch (1016:9): [True: 2.69k, False: 54.4k]
  ------------------
 1017|  2.69k|        return type;
 1018|  54.4k|    return EVP_PKEY_type(OBJ_ln2nid(name));
 1019|  57.1k|}
EVP_PKEY_is_a:
 1034|   399k|{
 1035|   399k|    if (pkey == NULL)
  ------------------
  |  Branch (1035:9): [True: 0, False: 399k]
  ------------------
 1036|      0|        return 0;
 1037|   399k|    if (pkey->keymgmt == NULL)
  ------------------
  |  Branch (1037:9): [True: 0, False: 399k]
  ------------------
 1038|      0|        return pkey->type == evp_pkey_name2type(name);
 1039|   399k|    return EVP_KEYMGMT_is_a(pkey->keymgmt, name);
 1040|   399k|}
EVP_PKEY_get1_encoded_public_key:
 1388|  4.16k|{
 1389|  4.16k|    if (pkey == NULL)
  ------------------
  |  Branch (1389:9): [True: 0, False: 4.16k]
  ------------------
 1390|      0|        return 0;
 1391|  4.16k|#ifndef FIPS_MODULE
 1392|  4.16k|    if (evp_pkey_is_provided(pkey))
  ------------------
  |  |  383|  4.16k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (383:5): [True: 4.16k, False: 0]
  |  |  ------------------
  ------------------
 1393|  4.16k|#endif
 1394|  4.16k|    {
 1395|  4.16k|        size_t return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  4.16k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
 1396|  4.16k|        unsigned char *buf;
 1397|       |
 1398|       |        /*
 1399|       |         * We know that this is going to fail, but it will give us a size
 1400|       |         * to allocate.
 1401|       |         */
 1402|  4.16k|        EVP_PKEY_get_octet_string_param(pkey,
 1403|  4.16k|            OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY,
  ------------------
  |  |  407|  4.16k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
 1404|  4.16k|            NULL, 0, &return_size);
 1405|  4.16k|        if (return_size == OSSL_PARAM_UNMODIFIED)
  ------------------
  |  |   22|  4.16k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  |  Branch (1405:13): [True: 0, False: 4.16k]
  ------------------
 1406|      0|            return 0;
 1407|       |
 1408|  4.16k|        *ppub = NULL;
 1409|  4.16k|        buf = OPENSSL_malloc(return_size);
  ------------------
  |  |  107|  4.16k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1410|  4.16k|        if (buf == NULL)
  ------------------
  |  Branch (1410:13): [True: 0, False: 4.16k]
  ------------------
 1411|      0|            return 0;
 1412|       |
 1413|  4.16k|        if (!EVP_PKEY_get_octet_string_param(pkey,
  ------------------
  |  Branch (1413:13): [True: 0, False: 4.16k]
  ------------------
 1414|  4.16k|                OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY,
  ------------------
  |  |  407|  4.16k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
 1415|  4.16k|                buf, return_size, NULL)) {
 1416|      0|            OPENSSL_free(buf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1417|      0|            return 0;
 1418|      0|        }
 1419|  4.16k|        *ppub = buf;
 1420|  4.16k|        return return_size;
 1421|  4.16k|    }
 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|   927k|{
 1437|   927k|    EVP_PKEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   927k|    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|   927k|    if (ret == NULL)
  ------------------
  |  Branch (1439:9): [True: 0, False: 927k]
  ------------------
 1440|      0|        return NULL;
 1441|       |
 1442|   927k|    ret->type = EVP_PKEY_NONE;
  ------------------
  |  |   62|   927k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   927k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1443|   927k|    ret->save_type = EVP_PKEY_NONE;
  ------------------
  |  |   62|   927k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   927k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1444|       |
 1445|   927k|    if (!CRYPTO_NEW_REF(&ret->references, 1))
  ------------------
  |  Branch (1445:9): [True: 0, False: 927k]
  ------------------
 1446|      0|        goto err;
 1447|       |
 1448|   927k|    ret->lock = CRYPTO_THREAD_lock_new();
 1449|   927k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (1449:9): [True: 0, False: 927k]
  ------------------
 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|   927k|#ifndef FIPS_MODULE
 1455|   927k|    ret->save_parameters = 1;
 1456|   927k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_EVP_PKEY, ret, &ret->ex_data)) {
  ------------------
  |  |  269|   927k|#define CRYPTO_EX_INDEX_EVP_PKEY 17
  ------------------
  |  Branch (1456:9): [True: 0, False: 927k]
  ------------------
 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|   927k|#endif
 1461|   927k|    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|   927k|}
EVP_PKEY_set_type_by_keymgmt:
 1601|   466k|{
 1602|   466k|#ifndef FIPS_MODULE
 1603|   466k|#define EVP_PKEY_TYPE_STR str[0]
 1604|   466k|#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|   466k|    const char *str[2] = { NULL, NULL };
 1611|       |
 1612|   466k|    if (!EVP_KEYMGMT_names_do_all(keymgmt, find_ameth, &str)
  ------------------
  |  Branch (1612:9): [True: 0, False: 466k]
  ------------------
 1613|   466k|        || str[1] != NULL) {
  ------------------
  |  Branch (1613:12): [True: 0, False: 466k]
  ------------------
 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|   466k|    return pkey_set_type(pkey, EVP_PKEY_NONE,
  ------------------
  |  |   62|   466k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   466k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1622|   466k|        EVP_PKEY_TYPE_STR, EVP_PKEY_TYPE_STRLEN,
  ------------------
  |  | 1603|   466k|#define EVP_PKEY_TYPE_STR str[0]
  ------------------
                      EVP_PKEY_TYPE_STR, EVP_PKEY_TYPE_STRLEN,
  ------------------
  |  | 1604|   466k|#define EVP_PKEY_TYPE_STRLEN (str[0] == NULL ? -1 : (int)strlen(str[0]))
  |  |  ------------------
  |  |  |  Branch (1604:31): [True: 3.92k, False: 462k]
  |  |  ------------------
  ------------------
 1623|   466k|        keymgmt);
 1624|       |
 1625|   466k|#undef EVP_PKEY_TYPE_STR
 1626|   466k|#undef EVP_PKEY_TYPE_STRLEN
 1627|   466k|}
EVP_PKEY_up_ref:
 1630|   537k|{
 1631|   537k|    int i;
 1632|       |
 1633|   537k|    if (CRYPTO_UP_REF(&pkey->references, &i) <= 0)
  ------------------
  |  Branch (1633:9): [True: 0, False: 537k]
  ------------------
 1634|      0|        return 0;
 1635|       |
 1636|   537k|    REF_PRINT_COUNT("EVP_PKEY", i, pkey);
  ------------------
  |  |  301|   537k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   537k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   537k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   537k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1637|   537k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   537k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 537k]
  |  |  ------------------
  ------------------
 1638|   537k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (1638:13): [True: 537k, False: 0]
  ------------------
 1639|   537k|}
evp_pkey_free_legacy:
 1704|   935k|{
 1705|   935k|    const EVP_PKEY_ASN1_METHOD *ameth = x->ameth;
 1706|       |
 1707|   935k|    if (ameth == NULL && x->legacy_cache_pkey.ptr != NULL)
  ------------------
  |  Branch (1707:9): [True: 474k, False: 461k]
  |  Branch (1707:26): [True: 0, False: 474k]
  ------------------
 1708|      0|        ameth = evp_pkey_asn1_find(x->type);
 1709|       |
 1710|   935k|    if (ameth != NULL) {
  ------------------
  |  Branch (1710:9): [True: 461k, False: 474k]
  ------------------
 1711|   461k|        if (x->legacy_cache_pkey.ptr != NULL) {
  ------------------
  |  Branch (1711:13): [True: 0, False: 461k]
  ------------------
 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|   461k|        if (ameth->pkey_free != NULL)
  ------------------
  |  Branch (1724:13): [True: 461k, False: 0]
  ------------------
 1725|   461k|            ameth->pkey_free(x);
 1726|       |        x->pkey.ptr = NULL;
 1727|   461k|    }
 1728|   935k|}
EVP_PKEY_free:
 1749|  2.56M|{
 1750|  2.56M|    int i;
 1751|       |
 1752|  2.56M|    if (x == NULL)
  ------------------
  |  Branch (1752:9): [True: 1.10M, False: 1.46M]
  ------------------
 1753|  1.10M|        return;
 1754|       |
 1755|  1.46M|    CRYPTO_DOWN_REF(&x->references, &i);
 1756|  1.46M|    REF_PRINT_COUNT("EVP_PKEY", i, x);
  ------------------
  |  |  301|  1.46M|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  1.46M|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  1.46M|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  1.46M|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1757|  1.46M|    if (i > 0)
  ------------------
  |  Branch (1757:9): [True: 537k, False: 927k]
  ------------------
 1758|   537k|        return;
 1759|   927k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|   927k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 927k]
  |  |  ------------------
  ------------------
 1760|   927k|    evp_pkey_free_it(x);
 1761|   927k|#ifndef FIPS_MODULE
 1762|   927k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_EVP_PKEY, x, &x->ex_data);
  ------------------
  |  |  269|   927k|#define CRYPTO_EX_INDEX_EVP_PKEY 17
  ------------------
 1763|   927k|#endif
 1764|   927k|    CRYPTO_THREAD_lock_free(x->lock);
 1765|   927k|    CRYPTO_FREE_REF(&x->references);
 1766|   927k|#ifndef FIPS_MODULE
 1767|   927k|    sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free);
  ------------------
  |  |  287|   927k|#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|   927k|#endif
 1769|   927k|    OPENSSL_free(x);
  ------------------
  |  |  132|   927k|    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|   927k|}
evp_pkey_get_legacy:
 2089|   458k|{
 2090|   458k|    EVP_PKEY *tmp_copy = NULL;
 2091|   458k|    void *ret = NULL;
 2092|       |
 2093|   458k|    if (!ossl_assert(pk != NULL))
  ------------------
  |  |   52|   458k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   458k|    __FILE__, __LINE__)
  ------------------
  |  Branch (2093:9): [True: 0, False: 458k]
  ------------------
 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|   458k|    if (!evp_pkey_is_assigned(pk))
  ------------------
  |  |  375|   458k|    ((pk)->pkey.ptr != NULL || (pk)->keydata != NULL)
  |  |  ------------------
  |  |  |  Branch (375:6): [True: 458k, False: 0]
  |  |  |  Branch (375:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2101|      0|        return NULL;
 2102|   458k|    if (!evp_pkey_is_provided(pk))
  ------------------
  |  |  383|   458k|    ((pk)->keymgmt != NULL)
  ------------------
  |  Branch (2102:9): [True: 458k, False: 0]
  ------------------
 2103|   458k|        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|  8.32k|{
 2195|  8.32k|    OSSL_PARAM params[2];
 2196|  8.32k|    int ret1 = 0, ret2 = 0;
 2197|       |
 2198|  8.32k|    if (key_name == NULL)
  ------------------
  |  Branch (2198:9): [True: 0, False: 8.32k]
  ------------------
 2199|      0|        return 0;
 2200|       |
 2201|  8.32k|    params[0] = OSSL_PARAM_construct_octet_string(key_name, buf, max_buf_sz);
 2202|  8.32k|    params[1] = OSSL_PARAM_construct_end();
 2203|  8.32k|    if ((ret1 = EVP_PKEY_get_params(pkey, params)))
  ------------------
  |  Branch (2203:9): [True: 8.32k, False: 0]
  ------------------
 2204|  8.32k|        ret2 = OSSL_PARAM_modified(params);
 2205|  8.32k|    if (ret2 && out_len != NULL)
  ------------------
  |  Branch (2205:9): [True: 8.32k, False: 0]
  |  Branch (2205:17): [True: 4.16k, False: 4.16k]
  ------------------
 2206|  4.16k|        *out_len = params[0].return_size;
 2207|  8.32k|    return ret1 && ret2;
  ------------------
  |  Branch (2207:12): [True: 8.32k, False: 0]
  |  Branch (2207:20): [True: 8.32k, False: 0]
  ------------------
 2208|  8.32k|}
EVP_PKEY_get_params:
 2380|  8.32k|{
 2381|  8.32k|    if (pkey != NULL) {
  ------------------
  |  Branch (2381:9): [True: 8.32k, False: 0]
  ------------------
 2382|  8.32k|        if (evp_pkey_is_provided(pkey))
  ------------------
  |  |  383|  8.32k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (383:5): [True: 8.32k, False: 0]
  |  |  ------------------
  ------------------
 2383|  8.32k|            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|  8.32k|#endif
 2388|  8.32k|    }
 2389|  8.32k|    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|  8.32k|}
p_lib.c:detect_foreign_key:
  704|   458k|{
  705|   458k|    switch (pkey->type) {
  706|   310k|    case EVP_PKEY_RSA:
  ------------------
  |  |   63|   310k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   310k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  |  Branch (706:5): [True: 310k, False: 147k]
  ------------------
  707|   310k|    case EVP_PKEY_RSA_PSS:
  ------------------
  |  |   65|   310k|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|   310k|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (707:5): [True: 0, False: 458k]
  ------------------
  708|   310k|        pkey->foreign = pkey->pkey.rsa != NULL
  ------------------
  |  Branch (708:25): [True: 310k, False: 0]
  ------------------
  709|   310k|            && ossl_rsa_is_foreign(pkey->pkey.rsa);
  ------------------
  |  Branch (709:16): [True: 0, False: 310k]
  ------------------
  710|   310k|        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: 458k]
  ------------------
  713|      0|        break;
  714|   147k|    case EVP_PKEY_EC:
  ------------------
  |  |   73|   147k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|   147k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (714:5): [True: 147k, False: 310k]
  ------------------
  715|   147k|        pkey->foreign = pkey->pkey.ec != NULL
  ------------------
  |  Branch (715:25): [True: 147k, False: 0]
  ------------------
  716|   147k|            && ossl_ec_key_is_foreign(pkey->pkey.ec);
  ------------------
  |  Branch (716:16): [True: 0, False: 147k]
  ------------------
  717|   147k|        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: 458k]
  ------------------
  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: 458k]
  ------------------
  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: 458k]
  ------------------
  732|      0|        pkey->foreign = 0;
  733|      0|        break;
  734|   458k|    }
  735|   458k|}
p_lib.c:pkey_set_type:
 1485|  3.16M|{
 1486|  3.16M|#ifndef FIPS_MODULE
 1487|  3.16M|    const EVP_PKEY_ASN1_METHOD *ameth = NULL;
 1488|  3.16M|#endif
 1489|       |
 1490|       |    /*
 1491|       |     * The setups can't set both legacy and provider side methods.
 1492|       |     * It is forbidden
 1493|       |     */
 1494|  3.16M|    if (!ossl_assert(type == EVP_PKEY_NONE || keymgmt == NULL)) {
  ------------------
  |  |   52|  4.16M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 2.16M, False: 995k]
  |  |  |  Branch (52:41): [True: 995k, False: 0]
  |  |  ------------------
  |  |   53|  3.16M|    __FILE__, __LINE__)
  ------------------
  |  Branch (1494:9): [True: 0, False: 3.16M]
  ------------------
 1495|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1496|      0|        return 0;
 1497|      0|    }
 1498|       |
 1499|  3.16M|    if (pkey != NULL) {
  ------------------
  |  Branch (1499:9): [True: 1.46M, False: 1.70M]
  ------------------
 1500|  1.46M|        int free_it = 0;
 1501|       |
 1502|  1.46M|#ifndef FIPS_MODULE
 1503|  1.46M|        free_it = free_it || pkey->pkey.ptr != NULL;
  ------------------
  |  Branch (1503:19): [True: 0, False: 1.46M]
  |  Branch (1503:30): [True: 0, False: 1.46M]
  ------------------
 1504|  1.46M|#endif
 1505|  1.46M|        free_it = free_it || pkey->keydata != NULL;
  ------------------
  |  Branch (1505:19): [True: 0, False: 1.46M]
  |  Branch (1505:30): [True: 0, False: 1.46M]
  ------------------
 1506|  1.46M|        if (free_it)
  ------------------
  |  Branch (1506:13): [True: 0, False: 1.46M]
  ------------------
 1507|      0|            evp_pkey_free_it(pkey);
 1508|  1.46M|#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.46M|        if (pkey->type != EVP_PKEY_NONE
  ------------------
  |  |   62|  1.46M|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  2.92M|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1513:13): [True: 534k, False: 927k]
  ------------------
 1514|   534k|            && type == pkey->save_type
  ------------------
  |  Branch (1514:16): [True: 516k, False: 18.3k]
  ------------------
 1515|   516k|            && pkey->ameth != NULL)
  ------------------
  |  Branch (1515:16): [True: 516k, False: 0]
  ------------------
 1516|   516k|            return 1;
 1517|  1.46M|#endif
 1518|  1.46M|    }
 1519|  2.64M|#ifndef FIPS_MODULE
 1520|  2.64M|    if (str != NULL)
  ------------------
  |  Branch (1520:9): [True: 2.16M, False: 483k]
  ------------------
 1521|  2.16M|        ameth = evp_pkey_asn1_find_str(str, len);
 1522|   483k|    else if (type != EVP_PKEY_NONE)
  ------------------
  |  |   62|   483k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   483k|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1522:14): [True: 479k, False: 3.92k]
  ------------------
 1523|   479k|        ameth = evp_pkey_asn1_find(type);
 1524|  2.64M|#endif
 1525|       |
 1526|  2.64M|    {
 1527|  2.64M|        int check = 1;
 1528|       |
 1529|  2.64M|#ifndef FIPS_MODULE
 1530|  2.64M|        check = check && ameth == NULL;
  ------------------
  |  Branch (1530:17): [True: 2.64M, False: 0]
  |  Branch (1530:26): [True: 1.24M, False: 1.40M]
  ------------------
 1531|  2.64M|#endif
 1532|  2.64M|        check = check && keymgmt == NULL;
  ------------------
  |  Branch (1532:17): [True: 1.24M, False: 1.40M]
  |  Branch (1532:26): [True: 1.24M, False: 3.92k]
  ------------------
 1533|  2.64M|        if (check) {
  ------------------
  |  Branch (1533:13): [True: 1.24M, False: 1.40M]
  ------------------
 1534|  1.24M|            ERR_raise(ERR_LIB_EVP, EVP_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  357|  1.24M|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  1.24M|    (ERR_new(),                                                  \
  |  |  |  |  360|  1.24M|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       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.24M|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  1.24M|        ERR_set_error)
  |  |  ------------------
  ------------------
 1535|  1.24M|            return 0;
 1536|  1.24M|        }
 1537|  2.64M|    }
 1538|  1.40M|    if (pkey != NULL) {
  ------------------
  |  Branch (1538:9): [True: 946k, False: 462k]
  ------------------
 1539|   946k|        if (keymgmt != NULL && !EVP_KEYMGMT_up_ref(keymgmt)) {
  ------------------
  |  Branch (1539:13): [True: 466k, False: 479k]
  |  Branch (1539:32): [True: 0, False: 466k]
  ------------------
 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|   946k|        pkey->keymgmt = keymgmt;
 1545|       |
 1546|   946k|        pkey->save_type = type;
 1547|   946k|        pkey->type = type;
 1548|       |
 1549|   946k|#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|   946k|        if (keymgmt == NULL)
  ------------------
  |  Branch (1555:13): [True: 479k, False: 466k]
  ------------------
 1556|   479k|            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|   946k|        if (ameth != NULL) {
  ------------------
  |  Branch (1566:13): [True: 942k, False: 3.92k]
  ------------------
 1567|   942k|            if (type == EVP_PKEY_NONE)
  ------------------
  |  |   62|   942k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   942k|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1567:17): [True: 462k, False: 479k]
  ------------------
 1568|   462k|                pkey->type = ameth->pkey_id;
 1569|   942k|        } else {
 1570|  3.92k|            pkey->type = EVP_PKEY_KEYMGMT;
  ------------------
  |  |  104|  3.92k|#define EVP_PKEY_KEYMGMT -1
  ------------------
 1571|  3.92k|        }
 1572|   946k|#endif
 1573|   946k|    }
 1574|  1.40M|    return 1;
 1575|  1.40M|}
p_lib.c:find_ameth:
 1579|  1.70M|{
 1580|  1.70M|    const char **str = data;
 1581|       |
 1582|       |    /*
 1583|       |     * The error messages from pkey_set_type() are uninteresting here,
 1584|       |     * and misleading.
 1585|       |     */
 1586|  1.70M|    ERR_set_mark();
 1587|       |
 1588|  1.70M|    if (pkey_set_type(NULL, EVP_PKEY_NONE, name, (int)strlen(name),
  ------------------
  |  |   62|  1.70M|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  1.70M|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1588:9): [True: 462k, False: 1.24M]
  ------------------
 1589|  1.70M|            NULL)) {
 1590|   462k|        if (str[0] == NULL)
  ------------------
  |  Branch (1590:13): [True: 462k, False: 0]
  ------------------
 1591|   462k|            str[0] = name;
 1592|      0|        else if (str[1] == NULL)
  ------------------
  |  Branch (1592:18): [True: 0, False: 0]
  ------------------
 1593|      0|            str[1] = name;
 1594|   462k|    }
 1595|       |
 1596|  1.70M|    ERR_pop_to_mark();
 1597|  1.70M|}
p_lib.c:evp_pkey_free_it:
 1732|   927k|{
 1733|       |    /* internal function; x is never NULL */
 1734|   927k|    evp_keymgmt_util_clear_operation_cache(x);
 1735|   927k|#ifndef FIPS_MODULE
 1736|   927k|    evp_pkey_free_legacy(x);
 1737|   927k|#endif
 1738|       |
 1739|   927k|    if (x->keymgmt != NULL) {
  ------------------
  |  Branch (1739:9): [True: 466k, False: 461k]
  ------------------
 1740|   466k|        evp_keymgmt_freedata(x->keymgmt, x->keydata);
 1741|   466k|        EVP_KEYMGMT_free(x->keymgmt);
 1742|   466k|        x->keymgmt = NULL;
 1743|   466k|        x->keydata = NULL;
 1744|   466k|    }
 1745|   927k|    x->type = EVP_PKEY_NONE;
  ------------------
  |  |   62|   927k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   927k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1746|   927k|}

EVP_PKEY_keygen_init:
   75|  7.92k|{
   76|  7.92k|    return gen_init(ctx, EVP_PKEY_OP_KEYGEN);
  ------------------
  |  | 1529|  7.92k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
   77|  7.92k|}
EVP_PKEY_generate:
  104|  7.92k|{
  105|  7.92k|    int ret = 0;
  106|  7.92k|    EVP_PKEY *allocated_pkey = NULL;
  107|       |    /* Legacy compatible keygen callback info, only used with provider impls */
  108|  7.92k|    int gentmp[2];
  109|       |
  110|  7.92k|    if (ppkey == NULL)
  ------------------
  |  Branch (110:9): [True: 0, False: 7.92k]
  ------------------
  111|      0|        return -1;
  112|       |
  113|  7.92k|    if (ctx == NULL)
  ------------------
  |  Branch (113:9): [True: 0, False: 7.92k]
  ------------------
  114|      0|        goto not_supported;
  115|       |
  116|  7.92k|    if ((ctx->operation & EVP_PKEY_OP_TYPE_GEN) == 0)
  ------------------
  |  | 1565|  7.92k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  ------------------
  |  |  |  | 1528|  7.92k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  ------------------
  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  ------------------
  |  |  |  | 1529|  7.92k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  ------------------
  ------------------
  |  Branch (116:9): [True: 0, False: 7.92k]
  ------------------
  117|      0|        goto not_initialized;
  118|       |
  119|  7.92k|    if (*ppkey == NULL)
  ------------------
  |  Branch (119:9): [True: 7.92k, False: 0]
  ------------------
  120|  7.92k|        *ppkey = allocated_pkey = EVP_PKEY_new();
  121|       |
  122|  7.92k|    if (*ppkey == NULL) {
  ------------------
  |  Branch (122:9): [True: 0, False: 7.92k]
  ------------------
  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|  7.92k|    if (ctx->op.keymgmt.genctx == NULL)
  ------------------
  |  Branch (127:9): [True: 0, False: 7.92k]
  ------------------
  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|  7.92k|    ctx->keygen_info = gentmp;
  140|  7.92k|    ctx->keygen_info_count = 2;
  141|       |
  142|  7.92k|    ret = 1;
  143|  7.92k|    if (ctx->pkey != NULL) {
  ------------------
  |  Branch (143:9): [True: 0, False: 7.92k]
  ------------------
  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|  7.92k|    ret = ret
  ------------------
  |  Branch (162:11): [True: 7.92k, False: 0]
  ------------------
  163|  7.92k|        && (evp_keymgmt_util_gen(*ppkey, ctx->keymgmt, ctx->op.keymgmt.genctx,
  ------------------
  |  Branch (163:12): [True: 7.92k, False: 0]
  ------------------
  164|  7.92k|                ossl_callback_to_pkey_gencb, ctx)
  165|  7.92k|            != NULL);
  166|       |
  167|  7.92k|    ctx->keygen_info = NULL;
  168|       |
  169|  7.92k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_DEPRECATED_3_6)
  170|       |    /* In case |*ppkey| was originally a legacy key */
  171|  7.92k|    if (ret)
  ------------------
  |  Branch (171:9): [True: 7.92k, False: 0]
  ------------------
  172|  7.92k|        evp_pkey_free_legacy(*ppkey);
  173|  7.92k|#endif
  174|       |
  175|       |    /*
  176|       |     * Because we still have legacy keys
  177|       |     */
  178|  7.92k|    (*ppkey)->type = ctx->legacy_keytype;
  179|       |
  180|  7.92k|    goto end;
  181|       |
  182|  7.92k|end:
  183|  7.92k|    if (ret <= 0) {
  ------------------
  |  Branch (183:9): [True: 0, False: 7.92k]
  ------------------
  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|  7.92k|    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|  7.92k|}
EVP_PKEY_keygen:
  210|  4.16k|{
  211|  4.16k|    if (ctx->operation != EVP_PKEY_OP_KEYGEN) {
  ------------------
  |  | 1529|  4.16k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (211:9): [True: 0, False: 4.16k]
  ------------------
  212|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|        return -1;
  214|      0|    }
  215|  4.16k|    return EVP_PKEY_generate(ctx, ppkey);
  216|  4.16k|}
EVP_PKEY_export:
  384|  3.76k|{
  385|  3.76k|    if (pkey == NULL) {
  ------------------
  |  Branch (385:9): [True: 0, False: 3.76k]
  ------------------
  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|  3.76k|#ifndef FIPS_MODULE
  390|  3.76k|    if (evp_pkey_is_legacy(pkey)) {
  ------------------
  |  |  381|  3.76k|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|  3.76k|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  7.52k|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (381:6): [True: 3.76k, False: 0]
  |  |  |  Branch (381:37): [True: 0, False: 3.76k]
  |  |  ------------------
  ------------------
  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|  3.76k|#endif
  404|  3.76k|    return evp_keymgmt_util_export(pkey, selection, export_cb, export_cbarg);
  405|  3.76k|}
pmeth_gn.c:gen_init:
   27|  7.92k|{
   28|  7.92k|    int ret = 0;
   29|       |
   30|  7.92k|    if (ctx == NULL)
  ------------------
  |  Branch (30:9): [True: 0, False: 7.92k]
  ------------------
   31|      0|        goto not_supported;
   32|       |
   33|  7.92k|    evp_pkey_ctx_free_old_ops(ctx);
   34|  7.92k|    ctx->operation = operation;
   35|       |
   36|  7.92k|    if (ctx->keymgmt == NULL || ctx->keymgmt->gen_init == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 7.92k]
  |  Branch (36:33): [True: 0, False: 7.92k]
  ------------------
   37|      0|        goto not_supported;
   38|       |
   39|  7.92k|    switch (operation) {
  ------------------
  |  Branch (39:13): [True: 7.92k, False: 0]
  ------------------
   40|      0|    case EVP_PKEY_OP_PARAMGEN:
  ------------------
  |  | 1528|      0|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  ------------------
  |  Branch (40:5): [True: 0, False: 7.92k]
  ------------------
   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|  7.92k|    case EVP_PKEY_OP_KEYGEN:
  ------------------
  |  | 1529|  7.92k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (44:5): [True: 7.92k, False: 0]
  ------------------
   45|  7.92k|        ctx->op.keymgmt.genctx = evp_keymgmt_gen_init(ctx->keymgmt, OSSL_KEYMGMT_SELECT_KEYPAIR,
  ------------------
  |  |  656|  7.92k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  7.92k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  7.92k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
   46|  7.92k|            NULL);
   47|  7.92k|        break;
   48|  7.92k|    }
   49|       |
   50|  7.92k|    if (ctx->op.keymgmt.genctx == NULL)
  ------------------
  |  Branch (50:9): [True: 0, False: 7.92k]
  ------------------
   51|  7.92k|        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|  7.92k|    else
   53|  7.92k|        ret = 1;
   54|  7.92k|    goto end;
   55|       |
   56|  7.92k|end:
   57|  7.92k|    if (ret <= 0 && ctx != NULL) {
  ------------------
  |  Branch (57:9): [True: 0, False: 7.92k]
  |  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|  7.92k|    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|  7.92k|}

evp_pkey_ctx_state:
   49|  7.92k|{
   50|  7.92k|    if (ctx->operation == EVP_PKEY_OP_UNDEFINED)
  ------------------
  |  | 1527|  7.92k|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  |  Branch (50:9): [True: 0, False: 7.92k]
  ------------------
   51|      0|        return EVP_PKEY_STATE_UNKNOWN;
  ------------------
  |  |  678|      0|#define EVP_PKEY_STATE_UNKNOWN 0
  ------------------
   52|       |
   53|  7.92k|    if ((EVP_PKEY_CTX_IS_DERIVE_OP(ctx)
  ------------------
  |  |  476|  15.8k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1556|  7.92k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1538|  7.92k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (476:5): [True: 0, False: 7.92k]
  |  |  ------------------
  ------------------
   54|      0|            && ctx->op.kex.algctx != NULL)
  ------------------
  |  Branch (54:16): [True: 0, False: 0]
  ------------------
   55|  7.92k|        || (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)
  ------------------
  |  |  473|  15.8k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|  7.92k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|  7.92k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|  7.92k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|  7.92k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|  7.92k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|  7.92k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|  7.92k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|  7.92k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|  7.92k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|  7.92k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|  7.92k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 0, False: 7.92k]
  |  |  ------------------
  ------------------
   56|      0|            && ctx->op.sig.algctx != NULL)
  ------------------
  |  Branch (56:16): [True: 0, False: 0]
  ------------------
   57|  7.92k|        || (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)
  ------------------
  |  |  479|  15.8k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1553|  7.92k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1536|  7.92k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1537|  7.92k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (479:5): [True: 0, False: 7.92k]
  |  |  ------------------
  ------------------
   58|      0|            && ctx->op.ciph.algctx != NULL)
  ------------------
  |  Branch (58:16): [True: 0, False: 0]
  ------------------
   59|  7.92k|        || (EVP_PKEY_CTX_IS_GEN_OP(ctx)
  ------------------
  |  |  482|  15.8k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1565|  7.92k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1528|  7.92k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1529|  7.92k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (482:5): [True: 7.92k, False: 0]
  |  |  ------------------
  ------------------
   60|  7.92k|            && ctx->op.keymgmt.genctx != NULL)
  ------------------
  |  Branch (60:16): [True: 7.92k, 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|  7.92k|        return EVP_PKEY_STATE_PROVIDER;
  ------------------
  |  |  680|  7.92k|#define EVP_PKEY_STATE_PROVIDER 2
  ------------------
   64|       |
   65|      0|    return EVP_PKEY_STATE_LEGACY;
  ------------------
  |  |  679|      0|#define EVP_PKEY_STATE_LEGACY 1
  ------------------
   66|  7.92k|}
EVP_PKEY_CTX_new_from_name:
  194|  7.92k|{
  195|       |    return int_ctx_new(libctx, NULL, name, propquery, -1);
  196|  7.92k|}
EVP_PKEY_CTX_new_from_pkey:
  200|  79.1k|{
  201|       |    return int_ctx_new(libctx, pkey, NULL, propquery, -1);
  202|  79.1k|}
evp_pkey_ctx_free_old_ops:
  205|  94.7k|{
  206|  94.7k|    if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)) {
  ------------------
  |  |  473|  94.7k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|  94.7k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|  94.7k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|  94.7k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|  94.7k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|  94.7k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|  94.7k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|  94.7k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|  94.7k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|  94.7k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|  94.7k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|  94.7k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 0, False: 94.7k]
  |  |  ------------------
  ------------------
  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|  94.7k|    } else if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)) {
  ------------------
  |  |  476|  94.7k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1556|  94.7k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1538|  94.7k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (476:5): [True: 0, False: 94.7k]
  |  |  ------------------
  ------------------
  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|  94.7k|    } else if (EVP_PKEY_CTX_IS_KEM_OP(ctx)) {
  ------------------
  |  |  488|  94.7k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1562|  94.7k|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1539|  94.7k|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1540|  94.7k|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (488:5): [True: 0, False: 94.7k]
  |  |  ------------------
  ------------------
  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|  94.7k|    } else if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)) {
  ------------------
  |  |  479|  94.7k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1553|  94.7k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1536|  94.7k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1537|  94.7k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (479:5): [True: 0, False: 94.7k]
  |  |  ------------------
  ------------------
  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|  94.7k|    } else if (EVP_PKEY_CTX_IS_GEN_OP(ctx)) {
  ------------------
  |  |  482|  94.7k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1565|  94.7k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1528|  94.7k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1529|  94.7k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (482:5): [True: 7.92k, False: 86.8k]
  |  |  ------------------
  ------------------
  231|  7.92k|        if (ctx->op.keymgmt.genctx != NULL && ctx->keymgmt != NULL)
  ------------------
  |  Branch (231:13): [True: 7.92k, False: 0]
  |  Branch (231:47): [True: 7.92k, False: 0]
  ------------------
  232|  7.92k|            evp_keymgmt_gen_cleanup(ctx->keymgmt, ctx->op.keymgmt.genctx);
  233|  7.92k|    }
  234|  94.7k|}
EVP_PKEY_CTX_free:
  237|   501k|{
  238|   501k|    if (ctx == NULL)
  ------------------
  |  Branch (238:9): [True: 414k, False: 86.8k]
  ------------------
  239|   414k|        return;
  240|       |
  241|  86.8k|    evp_pkey_ctx_free_old_ops(ctx);
  242|  86.8k|#ifndef FIPS_MODULE
  243|  86.8k|    evp_pkey_ctx_free_all_cached_data(ctx);
  244|  86.8k|#endif
  245|  86.8k|    EVP_KEYMGMT_free(ctx->keymgmt);
  246|       |
  247|  86.8k|    OPENSSL_free(ctx->propquery);
  ------------------
  |  |  132|  86.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__
  |  |  ------------------
  ------------------
  248|  86.8k|    EVP_PKEY_free(ctx->pkey);
  249|  86.8k|    EVP_PKEY_free(ctx->peerkey);
  250|  86.8k|    BN_free(ctx->rsa_pubexp);
  251|  86.8k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  86.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__
  |  |  ------------------
  ------------------
  252|  86.8k|}
EVP_PKEY_CTX_set_params:
  425|  7.92k|{
  426|  7.92k|    switch (evp_pkey_ctx_state(ctx)) {
  ------------------
  |  Branch (426:13): [True: 7.92k, False: 0]
  ------------------
  427|  7.92k|    case EVP_PKEY_STATE_PROVIDER:
  ------------------
  |  |  680|  7.92k|#define EVP_PKEY_STATE_PROVIDER 2
  ------------------
  |  Branch (427:5): [True: 7.92k, False: 0]
  ------------------
  428|  7.92k|        if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)
  ------------------
  |  |  476|  15.8k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1556|  7.92k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1538|  7.92k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (476:5): [True: 0, False: 7.92k]
  |  |  ------------------
  ------------------
  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|  7.92k|        if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)
  ------------------
  |  |  473|  15.8k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|  7.92k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|  7.92k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|  7.92k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|  7.92k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|  7.92k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|  7.92k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|  7.92k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|  7.92k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|  7.92k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|  7.92k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|  7.92k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 0, False: 7.92k]
  |  |  ------------------
  ------------------
  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|  7.92k|        if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)
  ------------------
  |  |  479|  15.8k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1553|  7.92k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1536|  7.92k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1537|  7.92k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (479:5): [True: 0, False: 7.92k]
  |  |  ------------------
  ------------------
  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|  7.92k|        if (EVP_PKEY_CTX_IS_GEN_OP(ctx)
  ------------------
  |  |  482|  15.8k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1565|  7.92k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1528|  7.92k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1529|  7.92k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (482:5): [True: 7.92k, False: 0]
  |  |  ------------------
  ------------------
  444|  7.92k|            && ctx->keymgmt != NULL
  ------------------
  |  Branch (444:16): [True: 7.92k, False: 0]
  ------------------
  445|  7.92k|            && ctx->keymgmt->gen_set_params != NULL)
  ------------------
  |  Branch (445:16): [True: 7.92k, False: 0]
  ------------------
  446|  7.92k|            return evp_keymgmt_gen_set_params(ctx->keymgmt, ctx->op.keymgmt.genctx,
  447|  7.92k|                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: 7.92k]
  ------------------
  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: 7.92k]
  ------------------
  458|      0|        return evp_pkey_ctx_set_params_to_ctrl(ctx, params);
  459|  7.92k|#endif
  460|  7.92k|    }
  461|      0|    return 0;
  462|  7.92k|}
pmeth_lib.c:int_ctx_new:
   71|  87.0k|{
   72|  87.0k|    EVP_PKEY_CTX *ret = NULL;
   73|  87.0k|    EVP_KEYMGMT *keymgmt = NULL;
   74|       |
   75|       |    /* Code below to be removed when legacy support is dropped. */
   76|       |    /* BEGIN legacy */
   77|  87.0k|    if (id == -1) {
  ------------------
  |  Branch (77:9): [True: 87.0k, False: 0]
  ------------------
   78|  87.0k|        if (pkey != NULL && !evp_pkey_is_provided(pkey)) {
  ------------------
  |  |  383|  79.1k|    ((pk)->keymgmt != NULL)
  ------------------
  |  Branch (78:13): [True: 79.1k, False: 7.92k]
  |  Branch (78:29): [True: 79.1k, False: 0]
  ------------------
   79|  79.1k|            id = pkey->type;
   80|  79.1k|        } else {
   81|  7.92k|            if (pkey != NULL) {
  ------------------
  |  Branch (81:17): [True: 0, False: 7.92k]
  ------------------
   82|       |                /* Must be provided if we get here */
   83|      0|                keytype = EVP_KEYMGMT_get0_name(pkey->keymgmt);
   84|      0|            }
   85|  7.92k|#ifndef FIPS_MODULE
   86|  7.92k|            if (keytype != NULL) {
  ------------------
  |  Branch (86:17): [True: 7.92k, False: 0]
  ------------------
   87|  7.92k|                id = evp_pkey_name2type(keytype);
   88|  7.92k|                if (id == NID_undef)
  ------------------
  |  |   18|  7.92k|#define NID_undef                       0
  ------------------
  |  Branch (88:21): [True: 3.92k, False: 4.00k]
  ------------------
   89|  3.92k|                    id = -1;
   90|  7.92k|            }
   91|  7.92k|#endif
   92|  7.92k|        }
   93|  87.0k|    }
   94|       |
   95|  87.0k|#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|  87.0k|    if (id != -1)
  ------------------
  |  Branch (101:9): [True: 83.1k, False: 3.92k]
  ------------------
  102|  83.1k|        keytype = OBJ_nid2sn(id);
  103|       |
  104|       |    /* END legacy */
  105|  87.0k|#endif /* FIPS_MODULE */
  106|       |    /* We try fetching a provider implementation. */
  107|  87.0k|    if (keytype != NULL) {
  ------------------
  |  Branch (107:9): [True: 87.0k, 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|  87.0k|        if (pkey != NULL && pkey->keymgmt != NULL) {
  ------------------
  |  Branch (114:13): [True: 79.1k, False: 7.92k]
  |  Branch (114:29): [True: 0, False: 79.1k]
  ------------------
  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|  87.0k|        } else {
  120|  87.0k|            keymgmt = EVP_KEYMGMT_fetch(libctx, keytype, propquery);
  121|  87.0k|        }
  122|  87.0k|        if (keymgmt == NULL)
  ------------------
  |  Branch (122:13): [True: 190, False: 86.8k]
  ------------------
  123|    190|            return NULL; /* EVP_KEYMGMT_fetch() recorded an error */
  124|       |
  125|  86.8k|#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|  86.8k|        if (keymgmt != NULL) {
  ------------------
  |  Branch (133:13): [True: 86.8k, False: 0]
  ------------------
  134|  86.8k|            int tmp_id = evp_keymgmt_get_legacy_alg(keymgmt);
  135|       |
  136|  86.8k|            if (tmp_id != NID_undef) {
  ------------------
  |  |   18|  86.8k|#define NID_undef                       0
  ------------------
  |  Branch (136:17): [True: 82.9k, False: 3.92k]
  ------------------
  137|  82.9k|                if (id == -1) {
  ------------------
  |  Branch (137:21): [True: 0, False: 82.9k]
  ------------------
  138|      0|                    id = tmp_id;
  139|  82.9k|                } else {
  140|       |                    /*
  141|       |                     * It really really shouldn't differ.  If it still does,
  142|       |                     * something is very wrong.
  143|       |                     */
  144|  82.9k|                    if (!ossl_assert(id == tmp_id)) {
  ------------------
  |  |   52|  82.9k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  82.9k|    __FILE__, __LINE__)
  ------------------
  |  Branch (144:25): [True: 0, False: 82.9k]
  ------------------
  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|  82.9k|                }
  150|  82.9k|            }
  151|  86.8k|        }
  152|  86.8k|#endif
  153|  86.8k|    }
  154|       |
  155|  86.8k|    if (keymgmt == NULL) {
  ------------------
  |  Branch (155:9): [True: 0, False: 86.8k]
  ------------------
  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|  86.8k|    } else {
  158|  86.8k|        ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  86.8k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  159|  86.8k|    }
  160|       |
  161|  86.8k|    if (ret == NULL) {
  ------------------
  |  Branch (161:9): [True: 0, False: 86.8k]
  ------------------
  162|      0|        EVP_KEYMGMT_free(keymgmt);
  163|      0|        return NULL;
  164|      0|    }
  165|  86.8k|    if (propquery != NULL) {
  ------------------
  |  Branch (165:9): [True: 14.7k, False: 72.1k]
  ------------------
  166|  14.7k|        ret->propquery = OPENSSL_strdup(propquery);
  ------------------
  |  |  136|  14.7k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  167|  14.7k|        if (ret->propquery == NULL) {
  ------------------
  |  Branch (167:13): [True: 0, False: 14.7k]
  ------------------
  168|      0|            OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  169|      0|            EVP_KEYMGMT_free(keymgmt);
  170|      0|            return NULL;
  171|      0|        }
  172|  14.7k|    }
  173|  86.8k|    ret->libctx = libctx;
  174|  86.8k|    ret->keytype = keytype;
  175|  86.8k|    ret->keymgmt = keymgmt;
  176|  86.8k|    ret->legacy_keytype = id;
  177|  86.8k|    ret->operation = EVP_PKEY_OP_UNDEFINED;
  ------------------
  |  | 1527|  86.8k|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  178|       |
  179|  86.8k|    if (pkey != NULL && !EVP_PKEY_up_ref(pkey)) {
  ------------------
  |  Branch (179:9): [True: 78.9k, False: 7.92k]
  |  Branch (179:25): [True: 0, False: 78.9k]
  ------------------
  180|      0|        EVP_PKEY_CTX_free(ret);
  181|      0|        return NULL;
  182|      0|    }
  183|       |
  184|  86.8k|    ret->pkey = pkey;
  185|       |
  186|  86.8k|    return ret;
  187|  86.8k|}
pmeth_lib.c:decode_cmd:
 1154|  86.8k|{
 1155|  86.8k|    if (cmd == -1) {
  ------------------
  |  Branch (1155:9): [True: 0, False: 86.8k]
  ------------------
 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|  86.8k|    return cmd;
 1167|  86.8k|}
pmeth_lib.c:evp_pkey_ctx_free_cached_data:
 1233|  86.8k|{
 1234|  86.8k|    cmd = decode_cmd(cmd, name);
 1235|  86.8k|    switch (cmd) {
  ------------------
  |  Branch (1235:13): [True: 86.8k, False: 0]
  ------------------
 1236|  86.8k|    case EVP_PKEY_CTRL_SET1_ID:
  ------------------
  |  | 1590|  86.8k|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
  |  Branch (1236:5): [True: 86.8k, False: 0]
  ------------------
 1237|  86.8k|        OPENSSL_free(ctx->cached_parameters.dist_id);
  ------------------
  |  |  132|  86.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__
  |  |  ------------------
  ------------------
 1238|  86.8k|        OPENSSL_free(ctx->cached_parameters.dist_id_name);
  ------------------
  |  |  132|  86.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__
  |  |  ------------------
  ------------------
 1239|  86.8k|        ctx->cached_parameters.dist_id = NULL;
 1240|       |        ctx->cached_parameters.dist_id_name = NULL;
 1241|  86.8k|        break;
 1242|  86.8k|    }
 1243|  86.8k|}
pmeth_lib.c:evp_pkey_ctx_free_all_cached_data:
 1246|  86.8k|{
 1247|  86.8k|    evp_pkey_ctx_free_cached_data(ctx, EVP_PKEY_CTRL_SET1_ID, NULL);
  ------------------
  |  | 1590|  86.8k|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
 1248|  86.8k|}

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

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

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

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

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

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

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

ossl_ht_new:
  185|  3.90k|{
  186|  3.90k|    HT *new = OPENSSL_zalloc(sizeof(*new));
  ------------------
  |  |  109|  3.90k|    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.90k|    if (new == NULL)
  ------------------
  |  Branch (188:9): [True: 0, False: 3.90k]
  ------------------
  189|      0|        return NULL;
  190|       |
  191|  3.90k|    if (conf->lockless_reads && conf->no_rcu)
  ------------------
  |  Branch (191:9): [True: 769, False: 3.13k]
  |  Branch (191:33): [True: 0, False: 769]
  ------------------
  192|      0|        goto err;
  193|       |
  194|  3.90k|    if (!conf->no_rcu) {
  ------------------
  |  Branch (194:9): [True: 769, False: 3.13k]
  ------------------
  195|    769|        new->atomic_lock = CRYPTO_THREAD_lock_new();
  196|    769|        if (new->atomic_lock == NULL)
  ------------------
  |  Branch (196:13): [True: 0, False: 769]
  ------------------
  197|      0|            goto err;
  198|    769|    }
  199|  3.90k|    memcpy(&new->config, conf, sizeof(*conf));
  200|       |
  201|  3.90k|    if (new->config.init_neighborhoods != 0) {
  ------------------
  |  Branch (201:9): [True: 3.90k, False: 0]
  ------------------
  202|  3.90k|        new->wpd.neighborhood_len = new->config.init_neighborhoods;
  203|       |        /* round up to the next power of 2 */
  204|  3.90k|        new->wpd.neighborhood_len--;
  205|  3.90k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 1;
  206|  3.90k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 2;
  207|  3.90k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 4;
  208|  3.90k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 8;
  209|  3.90k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 16;
  210|  3.90k|        new->wpd.neighborhood_len++;
  211|  3.90k|    } 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.90k|    if (new->config.ht_free_fn == NULL)
  ------------------
  |  Branch (215:9): [True: 769, False: 3.13k]
  ------------------
  216|    769|        new->config.ht_free_fn = internal_free_nop;
  217|       |
  218|  3.90k|    new->md = OPENSSL_zalloc(sizeof(*new->md));
  ------------------
  |  |  109|  3.90k|    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.90k|    if (new->md == NULL)
  ------------------
  |  Branch (219:9): [True: 0, False: 3.90k]
  ------------------
  220|      0|        goto err;
  221|       |
  222|  3.90k|    new->md->neighborhoods = alloc_new_neighborhood_list(new->wpd.neighborhood_len,
  223|  3.90k|        &new->md->neighborhood_ptr_to_free);
  224|  3.90k|    if (new->md->neighborhoods == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 3.90k]
  ------------------
  225|      0|        goto err;
  226|  3.90k|    new->md->neighborhood_mask = new->wpd.neighborhood_len - 1;
  227|       |
  228|  3.90k|    if (!conf->no_rcu) {
  ------------------
  |  Branch (228:9): [True: 769, False: 3.13k]
  ------------------
  229|    769|        new->lock = ossl_rcu_lock_new(1, conf->ctx);
  230|    769|        if (new->lock == NULL)
  ------------------
  |  Branch (230:13): [True: 0, False: 769]
  ------------------
  231|      0|            goto err;
  232|    769|    }
  233|  3.90k|    if (new->config.ht_hash_fn == NULL)
  ------------------
  |  Branch (233:9): [True: 769, False: 3.13k]
  ------------------
  234|    769|        new->config.ht_hash_fn = internal_ht_hash_fn;
  235|       |
  236|  3.90k|    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.90k|}
ossl_ht_write_lock:
  267|  3.89k|{
  268|  3.89k|    if (htable->config.no_rcu)
  ------------------
  |  Branch (268:9): [True: 3.13k, False: 768]
  ------------------
  269|  3.13k|        return;
  270|       |
  271|    768|    ossl_rcu_write_lock(htable->lock);
  272|    768|    htable->wpd.need_sync = 0;
  273|    768|}
ossl_ht_write_unlock:
  276|  3.89k|{
  277|  3.89k|    int need_sync = htable->wpd.need_sync;
  278|       |
  279|  3.89k|    if (htable->config.no_rcu)
  ------------------
  |  Branch (279:9): [True: 3.13k, False: 768]
  ------------------
  280|  3.13k|        return;
  281|       |
  282|    768|    htable->wpd.need_sync = 0;
  283|    768|    ossl_rcu_write_unlock(htable->lock);
  284|    768|    if (need_sync)
  ------------------
  |  Branch (284:9): [True: 768, False: 0]
  ------------------
  285|    768|        ossl_synchronize_rcu(htable->lock);
  286|    768|}
ossl_ht_free:
  365|  3.89k|{
  366|  3.89k|    int flush_ok;
  367|       |
  368|  3.89k|    if (h == NULL)
  ------------------
  |  Branch (368:9): [True: 0, False: 3.89k]
  ------------------
  369|      0|        return;
  370|       |
  371|  3.89k|    ossl_ht_write_lock(h);
  372|  3.89k|    flush_ok = ossl_ht_flush_internal(h);
  373|  3.89k|    ossl_ht_write_unlock(h);
  374|       |    /* Freeing the lock does a final sync for us */
  375|  3.89k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (375:9): [True: 768, False: 3.13k]
  ------------------
  376|    768|        CRYPTO_THREAD_lock_free(h->atomic_lock);
  377|    768|        ossl_rcu_lock_free(h->lock);
  378|    768|    }
  379|  3.89k|    if (flush_ok) {
  ------------------
  |  Branch (379:9): [True: 3.89k, False: 0]
  ------------------
  380|  3.89k|        OPENSSL_free(h->md->neighborhood_ptr_to_free);
  ------------------
  |  |  132|  3.89k|    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.89k|        OPENSSL_free(h->md);
  ------------------
  |  |  132|  3.89k|    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.89k|    } else {
  383|      0|        free_oldmd(h->md);
  384|      0|    }
  385|  3.89k|    OPENSSL_free(h);
  ------------------
  |  |  132|  3.89k|    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.89k|    return;
  387|  3.89k|}
ossl_ht_insert:
  719|   661k|{
  720|   661k|    struct ht_internal_value_st *newval = NULL;
  721|   661k|    uint64_t hash;
  722|   661k|    int rc = 0;
  723|   661k|    int i;
  724|       |
  725|   661k|    if (data->value == NULL)
  ------------------
  |  Branch (725:9): [True: 0, False: 661k]
  ------------------
  726|      0|        goto out;
  727|       |
  728|   661k|    rc = -1;
  729|   661k|    newval = alloc_new_value(h, key, data->value, data->type_id);
  730|   661k|    if (newval == NULL)
  ------------------
  |  Branch (730:9): [True: 0, False: 661k]
  ------------------
  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|   661k|    hash = h->config.ht_hash_fn(key);
  738|       |
  739|   661k|    for (i = 0;
  740|   673k|        (rc = ossl_ht_insert_locked(h, hash, newval, olddata)) == -1
  ------------------
  |  Branch (740:9): [True: 12.8k, False: 661k]
  ------------------
  741|  12.8k|        && i <= (int)NEIGHBORHOOD_LEN;
  ------------------
  |  |  104|  12.8k|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|  12.8k|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (741:12): [True: 12.8k, False: 0]
  ------------------
  742|   661k|        ++i)
  743|  12.8k|        if (!grow_hashtable(h, h->wpd.neighborhood_len)) {
  ------------------
  |  Branch (743:13): [True: 0, False: 12.8k]
  ------------------
  744|      0|            rc = -1;
  745|      0|            break;
  746|      0|        }
  747|       |
  748|   661k|    if (rc <= 0)
  ------------------
  |  Branch (748:9): [True: 0, False: 661k]
  ------------------
  749|      0|        free_value(newval);
  750|       |
  751|   661k|out:
  752|   661k|    return rc;
  753|   661k|}
ossl_ht_get:
  756|  6.83M|{
  757|  6.83M|    struct ht_mutable_data_st *md;
  758|  6.83M|    uint64_t hash;
  759|  6.83M|    uint64_t neigh_idx_start;
  760|  6.83M|    uint64_t neigh_idx;
  761|  6.83M|    struct ht_internal_value_st *ival = NULL;
  762|  6.83M|    size_t j;
  763|  6.83M|    uint64_t ehash;
  764|  6.83M|    int lockless_reads = h->config.lockless_reads;
  765|       |
  766|  6.83M|    hash = h->config.ht_hash_fn(key);
  767|       |
  768|  6.83M|    if (!h->config.no_rcu)
  ------------------
  |  Branch (768:9): [True: 6.37M, False: 458k]
  ------------------
  769|  6.37M|        md = ossl_rcu_deref(&h->md);
  ------------------
  |  |   35|  6.37M|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  770|   458k|    else
  771|   458k|        md = h->md;
  772|  6.83M|    neigh_idx = neigh_idx_start = hash & md->neighborhood_mask;
  773|  6.84M|    do {
  774|  6.84M|        PREFETCH_NEIGHBORHOOD(md->neighborhoods[neigh_idx]);
  ------------------
  |  |   82|  6.84M|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  775|  11.4M|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  104|  11.4M|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|  11.4M|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (775:21): [True: 11.2M, False: 263k]
  ------------------
  776|  11.2M|            if (!h->config.no_rcu)
  ------------------
  |  Branch (776:17): [True: 9.78M, False: 1.45M]
  ------------------
  777|  9.78M|                ival = ossl_rcu_deref(&md->neighborhoods[neigh_idx].entries[j].value);
  ------------------
  |  |   35|  9.78M|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  778|  1.45M|            else
  779|  1.45M|                ival = md->neighborhoods[neigh_idx].entries[j].value;
  780|  11.2M|            if (ival == NULL) {
  ------------------
  |  Branch (780:17): [True: 1.71M, False: 9.51M]
  ------------------
  781|  1.71M|                if (lockless_reads)
  ------------------
  |  Branch (781:21): [True: 700k, False: 1.01M]
  ------------------
  782|       |                    /* lockless_reads implies no deletion, we can break out */
  783|   700k|                    return NULL;
  784|  1.01M|                continue;
  785|  1.71M|            }
  786|  9.51M|            if (!h->config.no_rcu) {
  ------------------
  |  Branch (786:17): [True: 9.08M, False: 434k]
  ------------------
  787|  9.08M|                if (!CRYPTO_atomic_load(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (787:21): [True: 0, False: 9.08M]
  ------------------
  788|  9.08M|                        &ehash, h->atomic_lock))
  789|      0|                    return NULL;
  790|  9.08M|            } else {
  791|   434k|                ehash = md->neighborhoods[neigh_idx].entries[j].hash;
  792|   434k|            }
  793|  9.51M|            if (compare_hash(hash, ehash) && match_key(&ival->value.key, key))
  ------------------
  |  Branch (793:17): [True: 5.87M, False: 3.64M]
  |  Branch (793:46): [True: 5.87M, False: 0]
  ------------------
  794|  5.87M|                return (HT_VALUE *)ival;
  795|  9.51M|        }
  796|   263k|        if (!lockless_reads)
  ------------------
  |  Branch (796:13): [True: 258k, False: 5.39k]
  ------------------
  797|   258k|            break;
  798|       |        /* Continue search in subsequent neighborhoods */
  799|  5.39k|        neigh_idx = (neigh_idx + 1) & md->neighborhood_mask;
  800|  5.39k|    } while (neigh_idx != neigh_idx_start);
  ------------------
  |  Branch (800:14): [True: 5.39k, False: 0]
  ------------------
  801|       |
  802|   258k|    return NULL;
  803|  6.83M|}
hashtable.c:internal_free_nop:
  175|   401k|{
  176|   401k|    return;
  177|   401k|}
hashtable.c:alloc_new_neighborhood_list:
  155|  20.6k|{
  156|  20.6k|    struct ht_neighborhood_st *ret;
  157|       |
  158|  20.6k|#if !defined(OPENSSL_SMALL_FOOTPRINT)
  159|  20.6k|    ret = OPENSSL_aligned_alloc_array(len, sizeof(struct ht_neighborhood_st),
  ------------------
  |  |  118|  20.6k|    CRYPTO_aligned_alloc_array(num, size, alignment, freeptr,      \
  |  |  119|  20.6k|        OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  160|  20.6k|        CACHE_LINE_BYTES, freeptr);
  161|       |
  162|       |    /* fall back to regular malloc */
  163|  20.6k|    if (ret == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 20.6k]
  ------------------
  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|  20.6k|    memset(ret, 0, sizeof(struct ht_neighborhood_st) * len);
  171|  20.6k|    return ret;
  172|  20.6k|}
hashtable.c:internal_ht_hash_fn:
  180|  6.77M|{
  181|  6.77M|    return ossl_fnv1a_hash(key->keybuf, key->keysize);
  182|  6.77M|}
hashtable.c:ossl_ht_flush_internal:
  311|  3.89k|{
  312|  3.89k|    struct ht_mutable_data_st *newmd = NULL;
  313|  3.89k|    struct ht_mutable_data_st *oldmd = NULL;
  314|  3.89k|    CRYPTO_RCU_CB_ITEM *cbi = NULL;
  315|       |
  316|  3.89k|    newmd = OPENSSL_zalloc(sizeof(*newmd));
  ------------------
  |  |  109|  3.89k|    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.89k|    if (newmd == NULL)
  ------------------
  |  Branch (317:9): [True: 0, False: 3.89k]
  ------------------
  318|      0|        return 0;
  319|       |
  320|  3.89k|    newmd->neighborhoods = alloc_new_neighborhood_list(DEFAULT_NEIGH_LEN,
  ------------------
  |  |   96|  3.89k|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   95|  3.89k|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  321|  3.89k|        &newmd->neighborhood_ptr_to_free);
  322|  3.89k|    if (newmd->neighborhoods == NULL) {
  ------------------
  |  Branch (322:9): [True: 0, False: 3.89k]
  ------------------
  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.89k|    newmd->neighborhood_mask = DEFAULT_NEIGH_LEN - 1;
  ------------------
  |  |   96|  3.89k|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   95|  3.89k|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  328|       |
  329|  3.89k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (329:9): [True: 768, False: 3.13k]
  ------------------
  330|    768|        cbi = ossl_rcu_cb_item_new();
  331|    768|        if (cbi == NULL) {
  ------------------
  |  Branch (331:13): [True: 0, False: 768]
  ------------------
  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|    768|        oldmd = ossl_rcu_deref(&h->md);
  ------------------
  |  |   35|    768|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  339|    768|        ossl_rcu_assign_ptr(&h->md, &newmd);
  ------------------
  |  |   36|    768|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  340|  3.13k|    } else {
  341|  3.13k|        oldmd = h->md;
  342|  3.13k|        h->md = newmd;
  343|  3.13k|    }
  344|       |
  345|       |    /* Set the number of entries to 0 */
  346|  3.89k|    h->wpd.value_count = 0;
  347|  3.89k|    h->wpd.neighborhood_len = DEFAULT_NEIGH_LEN;
  ------------------
  |  |   96|  3.89k|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   95|  3.89k|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  348|       |
  349|  3.89k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (349:9): [True: 768, False: 3.13k]
  ------------------
  350|    768|        ossl_rcu_call(h->lock, cbi, free_oldmd, oldmd);
  351|    768|        h->wpd.need_sync = 1;
  352|  3.13k|    } else {
  353|  3.13k|        free_oldmd(oldmd);
  354|  3.13k|    }
  355|       |
  356|  3.89k|    return 1;
  357|  3.89k|}
hashtable.c:free_oldmd:
  289|  3.89k|{
  290|  3.89k|    struct ht_mutable_data_st *oldmd = arg;
  291|  3.89k|    size_t i, j;
  292|  3.89k|    size_t neighborhood_len = (size_t)oldmd->neighborhood_mask + 1;
  293|  3.89k|    struct ht_internal_value_st *v;
  294|       |
  295|  1.49M|    for (i = 0; i < neighborhood_len; i++) {
  ------------------
  |  Branch (295:17): [True: 1.49M, False: 3.89k]
  ------------------
  296|  1.49M|        PREFETCH_NEIGHBORHOOD(oldmd->neighborhoods[i + 1]);
  ------------------
  |  |   82|  1.49M|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  297|  7.47M|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  104|  7.47M|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|  7.47M|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (297:21): [True: 5.97M, False: 1.49M]
  ------------------
  298|  5.97M|            if (oldmd->neighborhoods[i].entries[j].value != NULL) {
  ------------------
  |  Branch (298:17): [True: 660k, False: 5.31M]
  ------------------
  299|   660k|                v = oldmd->neighborhoods[i].entries[j].value;
  300|   660k|                v->ht->config.ht_free_fn((HT_VALUE *)v);
  301|   660k|                free_value(v);
  302|   660k|            }
  303|  5.97M|        }
  304|  1.49M|    }
  305|       |
  306|  3.89k|    OPENSSL_free(oldmd->neighborhood_ptr_to_free);
  ------------------
  |  |  132|  3.89k|    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.89k|    OPENSSL_free(oldmd);
  ------------------
  |  |  132|  3.89k|    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.89k|}
hashtable.c:alloc_new_value:
  688|   661k|{
  689|   661k|    struct ht_internal_value_st *tmp;
  690|   661k|    size_t nvsize = sizeof(*tmp);
  691|       |
  692|   661k|    if (h->config.collision_check == 1)
  ------------------
  |  Branch (692:9): [True: 402k, False: 258k]
  ------------------
  693|   402k|        nvsize += key->keysize;
  694|       |
  695|   661k|    tmp = OPENSSL_malloc(nvsize);
  ------------------
  |  |  107|   661k|    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|   661k|    if (tmp == NULL)
  ------------------
  |  Branch (697:9): [True: 0, False: 661k]
  ------------------
  698|      0|        return NULL;
  699|       |
  700|   661k|    tmp->ht = h;
  701|   661k|    tmp->value.value = data;
  702|   661k|    tmp->value.type_id = type;
  703|   661k|    tmp->value.key.keybuf = NULL;
  704|   661k|    if (h->config.collision_check) {
  ------------------
  |  Branch (704:9): [True: 402k, False: 258k]
  ------------------
  705|   402k|        tmp->value.key.keybuf = (uint8_t *)(tmp + 1);
  706|   402k|        tmp->value.key.keysize = key->keysize;
  707|   402k|        memcpy(tmp->value.key.keybuf, key->keybuf, key->keysize);
  708|   402k|    }
  709|       |
  710|   661k|    return tmp;
  711|   661k|}
hashtable.c:ossl_ht_insert_locked:
  601|   673k|{
  602|   673k|    struct ht_mutable_data_st *md = h->md;
  603|   673k|    uint64_t neigh_idx_start = hash & md->neighborhood_mask;
  604|   673k|    uint64_t neigh_idx = neigh_idx_start;
  605|   673k|    size_t j;
  606|   673k|    uint64_t ihash;
  607|   673k|    HT_VALUE *ival;
  608|   673k|    size_t empty_idx = SIZE_MAX;
  609|   673k|    int lockless_reads = h->config.lockless_reads;
  610|       |
  611|   675k|    do {
  612|   675k|        PREFETCH_NEIGHBORHOOD(md->neighborhoods[neigh_idx]);
  ------------------
  |  |   82|   675k|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  613|       |
  614|  1.98M|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  104|  1.98M|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|  1.98M|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (614:21): [True: 1.71M, False: 273k]
  ------------------
  615|  1.71M|            if (!h->config.no_rcu)
  ------------------
  |  Branch (615:17): [True: 627k, False: 1.08M]
  ------------------
  616|   627k|                ival = ossl_rcu_deref(&md->neighborhoods[neigh_idx].entries[j].value);
  ------------------
  |  |   35|   627k|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  617|  1.08M|            else
  618|  1.08M|                ival = (HT_VALUE *)md->neighborhoods[neigh_idx].entries[j].value;
  619|  1.71M|            if (ival == NULL) {
  ------------------
  |  Branch (619:17): [True: 1.24M, False: 468k]
  ------------------
  620|  1.24M|                empty_idx = j;
  621|       |                /* lockless_reads implies no deletion, we can break out */
  622|  1.24M|                if (lockless_reads)
  ------------------
  |  Branch (622:21): [True: 402k, False: 841k]
  ------------------
  623|   402k|                    goto not_found;
  624|   841k|                continue;
  625|  1.24M|            }
  626|   468k|            if (!h->config.no_rcu) {
  ------------------
  |  Branch (626:17): [True: 224k, False: 243k]
  ------------------
  627|   224k|                if (!CRYPTO_atomic_load(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (627:21): [True: 0, False: 224k]
  ------------------
  628|   224k|                        &ihash, h->atomic_lock))
  629|      0|                    return 0;
  630|   243k|            } else {
  631|   243k|                ihash = md->neighborhoods[neigh_idx].entries[j].hash;
  632|   243k|            }
  633|   468k|            if (compare_hash(hash, ihash) && match_key(&newval->value.key, &ival->key)) {
  ------------------
  |  Branch (633:17): [True: 0, False: 468k]
  |  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|   468k|        }
  661|   273k|        if (!lockless_reads)
  ------------------
  |  Branch (661:13): [True: 271k, False: 2.02k]
  ------------------
  662|   271k|            break;
  663|       |        /* Continue search in subsequent neighborhoods */
  664|  2.02k|        neigh_idx = (neigh_idx + 1) & md->neighborhood_mask;
  665|  2.02k|    } while (neigh_idx != neigh_idx_start);
  ------------------
  |  Branch (665:14): [True: 2.02k, False: 0]
  ------------------
  666|       |
  667|   673k|not_found:
  668|       |    /* If we get to here, its just an insert */
  669|   673k|    if (empty_idx == SIZE_MAX)
  ------------------
  |  Branch (669:9): [True: 12.8k, False: 661k]
  ------------------
  670|  12.8k|        return -1; /* out of space */
  671|   661k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (671:9): [True: 402k, False: 258k]
  ------------------
  672|   402k|        if (!CRYPTO_atomic_store(&md->neighborhoods[neigh_idx].entries[empty_idx].hash,
  ------------------
  |  Branch (672:13): [True: 0, False: 402k]
  ------------------
  673|   402k|                hash, h->atomic_lock))
  674|      0|            return 0;
  675|   402k|        ossl_rcu_assign_ptr(&md->neighborhoods[neigh_idx].entries[empty_idx].value,
  ------------------
  |  |   36|   402k|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  676|   402k|            &newval);
  677|   402k|    } else {
  678|   258k|        md->neighborhoods[neigh_idx].entries[empty_idx].hash = hash;
  679|   258k|        md->neighborhoods[neigh_idx].entries[empty_idx].value = newval;
  680|   258k|    }
  681|   661k|    h->wpd.value_count++;
  682|   661k|    return 1;
  683|   661k|}
hashtable.c:grow_hashtable:
  475|  12.8k|{
  476|  12.8k|    struct ht_mutable_data_st *newmd;
  477|  12.8k|    struct ht_mutable_data_st *oldmd = ossl_rcu_deref(&h->md);
  ------------------
  |  |   35|  12.8k|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  478|  12.8k|    CRYPTO_RCU_CB_ITEM *cbi = NULL;
  479|  12.8k|    int rc = 0;
  480|  12.8k|    uint64_t oldi, oldj, newi, newj;
  481|  12.8k|    uint64_t oldhash;
  482|  12.8k|    struct ht_internal_value_st *oldv;
  483|  12.8k|    int rehashed;
  484|  12.8k|    size_t newsize = oldsize * 2;
  485|       |
  486|  12.8k|    if (h->config.lockless_reads)
  ------------------
  |  Branch (486:9): [True: 0, False: 12.8k]
  ------------------
  487|      0|        goto out;
  488|       |
  489|  12.8k|    if ((newmd = OPENSSL_zalloc(sizeof(*newmd))) == NULL)
  ------------------
  |  |  109|  12.8k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (489:9): [True: 0, False: 12.8k]
  ------------------
  490|      0|        goto out;
  491|       |
  492|       |    /* bucket list is always a power of 2 */
  493|  12.8k|    newmd->neighborhoods = alloc_new_neighborhood_list(oldsize * 2,
  494|  12.8k|        &newmd->neighborhood_ptr_to_free);
  495|  12.8k|    if (newmd->neighborhoods == NULL)
  ------------------
  |  Branch (495:9): [True: 0, False: 12.8k]
  ------------------
  496|      0|        goto out_free;
  497|       |
  498|       |    /* being a power of 2 makes for easy mask computation */
  499|  12.8k|    newmd->neighborhood_mask = (newsize - 1);
  500|       |
  501|       |    /*
  502|       |     * Now we need to start rehashing entries
  503|       |     * Note we don't need to use atomics here as the new
  504|       |     * mutable data hasn't been published
  505|       |     */
  506|  1.08M|    for (oldi = 0; oldi < h->wpd.neighborhood_len; oldi++) {
  ------------------
  |  Branch (506:20): [True: 1.07M, False: 12.8k]
  ------------------
  507|  1.07M|        PREFETCH_NEIGHBORHOOD(oldmd->neighborhoods[oldi + 1]);
  ------------------
  |  |   82|  1.07M|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  508|  5.38M|        for (oldj = 0; oldj < NEIGHBORHOOD_LEN; oldj++) {
  ------------------
  |  |  104|  5.38M|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|  5.38M|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (508:24): [True: 4.30M, False: 1.07M]
  ------------------
  509|  4.30M|            oldv = oldmd->neighborhoods[oldi].entries[oldj].value;
  510|  4.30M|            if (oldv == NULL)
  ------------------
  |  Branch (510:17): [True: 3.58M, False: 719k]
  ------------------
  511|  3.58M|                continue;
  512|   719k|            oldhash = oldmd->neighborhoods[oldi].entries[oldj].hash;
  513|   719k|            newi = oldhash & newmd->neighborhood_mask;
  514|   719k|            rehashed = 0;
  515|   894k|            for (newj = 0; newj < NEIGHBORHOOD_LEN; newj++) {
  ------------------
  |  |  104|   894k|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|   894k|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (515:28): [True: 894k, False: 0]
  ------------------
  516|   894k|                if (newmd->neighborhoods[newi].entries[newj].value == NULL) {
  ------------------
  |  Branch (516:21): [True: 719k, False: 175k]
  ------------------
  517|   719k|                    newmd->neighborhoods[newi].entries[newj].value = oldv;
  518|   719k|                    newmd->neighborhoods[newi].entries[newj].hash = oldhash;
  519|   719k|                    rehashed = 1;
  520|   719k|                    break;
  521|   719k|                }
  522|   894k|            }
  523|   719k|            if (rehashed == 0) {
  ------------------
  |  Branch (523:17): [True: 0, False: 719k]
  ------------------
  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|   719k|        }
  530|  1.07M|    }
  531|       |
  532|       |    /*
  533|       |     * Pre allocate the rcu callback item before assigning the newmd.
  534|       |     */
  535|  12.8k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (535:9): [True: 0, False: 12.8k]
  ------------------
  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|  12.8k|    h->wpd.neighborhood_len = newsize;
  546|       |
  547|       |    /*
  548|       |     * Now we replace the old mutable data with the new
  549|       |     */
  550|  12.8k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (550:9): [True: 0, False: 12.8k]
  ------------------
  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|  12.8k|    } else {
  555|  12.8k|        h->md = newmd;
  556|  12.8k|        free_old_neigh_table(oldmd);
  557|  12.8k|    }
  558|       |    /*
  559|       |     * And we're done
  560|       |     */
  561|  12.8k|    rc = 1;
  562|       |
  563|  12.8k|out:
  564|  12.8k|    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|  12.8k|}
hashtable.c:free_old_neigh_table:
  463|  12.8k|{
  464|  12.8k|    struct ht_mutable_data_st *oldmd = arg;
  465|       |
  466|  12.8k|    OPENSSL_free(oldmd->neighborhood_ptr_to_free);
  ------------------
  |  |  132|  12.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__
  |  |  ------------------
  ------------------
  467|  12.8k|    OPENSSL_free(oldmd);
  ------------------
  |  |  132|  12.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__
  |  |  ------------------
  ------------------
  468|  12.8k|}
hashtable.c:free_value:
  714|   660k|{
  715|   660k|    OPENSSL_free(v);
  ------------------
  |  |  132|   660k|    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|   660k|}
hashtable.c:compare_hash:
  458|  9.98M|{
  459|  9.98M|    return (hash1 == hash2);
  460|  9.98M|}
hashtable.c:match_key:
  585|  5.87M|{
  586|       |    /*
  587|       |     * keys match if they are both present, the same size
  588|       |     * and compare equal in memory
  589|       |     */
  590|  5.87M|    PREFETCH(a->keybuf);
  ------------------
  |  |   83|  5.87M|#define PREFETCH(x) __builtin_prefetch(x)
  ------------------
  591|  5.87M|    PREFETCH(b->keybuf);
  ------------------
  |  |   83|  5.87M|#define PREFETCH(x) __builtin_prefetch(x)
  ------------------
  592|  5.87M|    if (a->keybuf != NULL && b->keybuf != NULL && a->keysize == b->keysize)
  ------------------
  |  Branch (592:9): [True: 5.67M, False: 199k]
  |  Branch (592:30): [True: 5.67M, False: 0]
  |  Branch (592:51): [True: 5.67M, False: 0]
  ------------------
  593|  5.67M|        return !memcmp(a->keybuf, b->keybuf, a->keysize);
  594|       |
  595|   199k|    return 1;
  596|  5.87M|}

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

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|    769|{
   22|    769|    INDICATOR_CB *cb;
   23|       |
   24|    769|    cb = OPENSSL_zalloc(sizeof(*cb));
  ------------------
  |  |  109|    769|    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|    769|    return cb;
   26|    769|}
ossl_indicator_set_callback_free:
   29|    768|{
   30|    768|    OPENSSL_free(cb);
  ------------------
  |  |  132|    768|    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|    768|}

OPENSSL_init_crypto:
  349|  22.9M|{
  350|  22.9M|    uint64_t tmp;
  351|  22.9M|    int aloaddone = 0;
  352|       |
  353|       |    /* Applications depend on 0 being returned when cleanup was already done */
  354|  22.9M|    if (ossl_unlikely(stopped)) {
  ------------------
  |  |   23|  22.9M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 22.9M]
  |  |  ------------------
  ------------------
  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|  22.9M|    if (ossl_likely(CRYPTO_atomic_load(&optsdone, &tmp, NULL))) {
  ------------------
  |  |   22|  22.9M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 22.9M, False: 0]
  |  |  ------------------
  ------------------
  374|  22.9M|        if ((tmp & opts) == opts)
  ------------------
  |  Branch (374:13): [True: 832k, False: 22.1M]
  ------------------
  375|   832k|            return 1;
  376|  22.1M|        aloaddone = 1;
  377|  22.1M|    }
  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|  22.1M|    if (ossl_unlikely(!RUN_ONCE(&base, ossl_init_base)))
  ------------------
  |  |   23|  44.2M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 22.1M]
  |  |  |  Branch (23:46): [True: 22.1M, False: 0]
  |  |  ------------------
  ------------------
  391|      0|        return 0;
  392|       |
  393|  22.1M|    if (opts & OPENSSL_INIT_BASE_ONLY)
  ------------------
  |  |   31|  22.1M|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (393:9): [True: 22.1M, False: 3]
  ------------------
  394|  22.1M|        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|    768|{
  282|    768|    if (destructor_key.sane != -1) {
  ------------------
  |  Branch (282:9): [True: 768, False: 0]
  ------------------
  283|    768|        THREAD_EVENT_HANDLER **hands = fetch_thread_local(ctx);
  284|       |
  285|    768|        init_thread_stop(ctx, hands);
  286|    768|    }
  287|    768|}
ossl_init_thread_start:
  392|    580|{
  393|    580|    THREAD_EVENT_HANDLER **hands;
  394|    580|    THREAD_EVENT_HANDLER *hand;
  395|    580|    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|    580|    hands = alloc_thread_local(ctx);
  407|       |
  408|    580|    if (hands == NULL)
  ------------------
  |  Branch (408:9): [True: 0, False: 580]
  ------------------
  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|    580|    hand = OPENSSL_malloc(sizeof(*hand));
  ------------------
  |  |  107|    580|    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|    580|    if (hand == NULL)
  ------------------
  |  Branch (424:9): [True: 0, False: 580]
  ------------------
  425|      0|        return 0;
  426|       |
  427|    580|    hand->handfn = handfn;
  428|    580|    hand->arg = arg;
  429|    580|#ifndef FIPS_MODULE
  430|    580|    hand->index = index;
  431|    580|#endif
  432|    580|    hand->next = *hands;
  433|    580|    *hands = hand;
  434|       |
  435|    580|    return 1;
  436|    580|}
ossl_init_thread_deregister:
  492|  1.69k|{
  493|  1.69k|    return init_thread_deregister(index, 0);
  494|  1.69k|}
initthread.c:manage_thread_local:
  137|  1.34k|{
  138|  1.34k|    THREAD_EVENT_HANDLER **hands = get_thread_event_handler(ctx);
  139|       |
  140|  1.34k|    if (alloc) {
  ------------------
  |  Branch (140:9): [True: 580, False: 768]
  ------------------
  141|    580|        if (hands == NULL) {
  ------------------
  |  Branch (141:13): [True: 1, False: 579]
  ------------------
  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|    768|    } else if (!keep) {
  ------------------
  |  Branch (158:16): [True: 0, False: 768]
  ------------------
  159|      0|        set_thread_event_handler(ctx, NULL);
  160|      0|    }
  161|       |
  162|  1.34k|    return hands;
  163|  1.34k|}
initthread.c:get_thread_event_handler:
  114|  1.34k|{
  115|       |#ifdef FIPS_MODULE
  116|       |    return CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_TEVENT_KEY, ctx);
  117|       |#else
  118|  1.34k|    if (destructor_key.sane != -1)
  ------------------
  |  Branch (118:9): [True: 1.34k, False: 0]
  ------------------
  119|  1.34k|        return CRYPTO_THREAD_get_local(&destructor_key.value);
  120|      0|    return NULL;
  121|  1.34k|#endif
  122|  1.34k|}
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.46k|{
   80|  2.46k|    if (!RUN_ONCE(&tevent_register_runonce, create_global_tevent_register))
  ------------------
  |  |  130|  2.46k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2.46k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (80:9): [True: 0, False: 2.46k]
  ------------------
   81|      0|        return NULL;
   82|  2.46k|    return glob_tevent_reg;
   83|  2.46k|}
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|    768|{
  172|    768|    return manage_thread_local(ctx, 0, 1);
  173|    768|}
initthread.c:init_thread_stop:
  348|    768|{
  349|    768|    THREAD_EVENT_HANDLER *curr, *prev = NULL, *tmp;
  350|    768|#ifndef FIPS_MODULE
  351|    768|    GLOBAL_TEVENT_REGISTER *gtr;
  352|    768|#endif
  353|       |
  354|       |    /* Can't do much about this */
  355|    768|    if (hands == NULL)
  ------------------
  |  Branch (355:9): [True: 0, False: 768]
  ------------------
  356|      0|        return;
  357|       |
  358|    768|#ifndef FIPS_MODULE
  359|    768|    gtr = get_global_tevent_register();
  360|    768|    if (gtr == NULL)
  ------------------
  |  Branch (360:9): [True: 0, False: 768]
  ------------------
  361|      0|        return;
  362|       |
  363|    768|    if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (363:9): [True: 0, False: 768]
  ------------------
  364|      0|        return;
  365|    768|#endif
  366|       |
  367|    768|    curr = *hands;
  368|  2.88k|    while (curr != NULL) {
  ------------------
  |  Branch (368:12): [True: 2.11k, False: 768]
  ------------------
  369|  2.11k|        if (arg != NULL && curr->arg != arg) {
  ------------------
  |  Branch (369:13): [True: 2.11k, False: 0]
  |  Branch (369:28): [True: 1.53k, False: 578]
  ------------------
  370|  1.53k|            prev = curr;
  371|  1.53k|            curr = curr->next;
  372|  1.53k|            continue;
  373|  1.53k|        }
  374|    578|        curr->handfn(curr->arg);
  375|    578|        if (prev == NULL)
  ------------------
  |  Branch (375:13): [True: 578, False: 0]
  ------------------
  376|    578|            *hands = curr->next;
  377|      0|        else
  378|      0|            prev->next = curr->next;
  379|       |
  380|    578|        tmp = curr;
  381|    578|        curr = curr->next;
  382|       |
  383|    578|        OPENSSL_free(tmp);
  ------------------
  |  |  132|    578|    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|    578|    }
  385|    768|#ifndef FIPS_MODULE
  386|    768|    CRYPTO_THREAD_unlock(gtr->lock);
  387|    768|#endif
  388|    768|}
initthread.c:alloc_thread_local:
  176|    580|{
  177|    580|    return manage_thread_local(ctx, 1, 0);
  178|    580|}
initthread.c:init_thread_deregister:
  440|  1.69k|{
  441|  1.69k|    GLOBAL_TEVENT_REGISTER *gtr;
  442|  1.69k|    int i;
  443|       |
  444|  1.69k|    gtr = get_global_tevent_register();
  445|  1.69k|    if (gtr == NULL)
  ------------------
  |  Branch (445:9): [True: 0, False: 1.69k]
  ------------------
  446|      0|        return 0;
  447|  1.69k|    if (!all) {
  ------------------
  |  Branch (447:9): [True: 1.69k, False: 0]
  ------------------
  448|  1.69k|        if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (448:13): [True: 0, False: 1.69k]
  ------------------
  449|      0|            return 0;
  450|  1.69k|    } else {
  451|      0|        glob_tevent_reg = NULL;
  452|      0|    }
  453|  3.39k|    for (i = 0; i < sk_THREAD_EVENT_HANDLER_PTR_num(gtr->skhands); i++) {
  ------------------
  |  Branch (453:17): [True: 1.69k, False: 1.69k]
  ------------------
  454|  1.69k|        THREAD_EVENT_HANDLER **hands
  455|  1.69k|            = sk_THREAD_EVENT_HANDLER_PTR_value(gtr->skhands, i);
  456|  1.69k|        THREAD_EVENT_HANDLER *curr = NULL, *prev = NULL, *tmp;
  457|       |
  458|  1.69k|        if (hands == NULL) {
  ------------------
  |  Branch (458:13): [True: 0, False: 1.69k]
  ------------------
  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.69k|        curr = *hands;
  464|  5.09k|        while (curr != NULL) {
  ------------------
  |  Branch (464:16): [True: 3.39k, False: 1.69k]
  ------------------
  465|  3.39k|            if (all || curr->index == index) {
  ------------------
  |  Branch (465:17): [True: 0, False: 3.39k]
  |  Branch (465:24): [True: 0, False: 3.39k]
  ------------------
  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.39k|            prev = curr;
  476|  3.39k|            curr = curr->next;
  477|  3.39k|        }
  478|  1.69k|        if (all)
  ------------------
  |  Branch (478:13): [True: 0, False: 1.69k]
  ------------------
  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.69k|    }
  481|  1.69k|    if (all) {
  ------------------
  |  Branch (481:9): [True: 0, False: 1.69k]
  ------------------
  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.69k|    } else {
  486|  1.69k|        CRYPTO_THREAD_unlock(gtr->lock);
  487|  1.69k|    }
  488|  1.69k|    return 1;
  489|  1.69k|}

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

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

CRYPTO_secure_malloc:
  154|  4.19k|{
  155|  4.19k|#ifndef OPENSSL_NO_SECURE_MEMORY
  156|  4.19k|    void *ret = NULL;
  157|  4.19k|    size_t actual_size;
  158|  4.19k|    int reason = CRYPTO_R_SECURE_MALLOC_FAILURE;
  ------------------
  |  |   45|  4.19k|#define CRYPTO_R_SECURE_MALLOC_FAILURE 111
  ------------------
  159|       |
  160|  4.19k|    if (!secure_mem_initialized) {
  ------------------
  |  Branch (160:9): [True: 4.19k, False: 0]
  ------------------
  161|  4.19k|        return CRYPTO_malloc(num, file, line);
  162|  4.19k|    }
  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|  15.5k|{
  185|  15.5k|#ifndef OPENSSL_NO_SECURE_MEMORY
  186|  15.5k|    if (secure_mem_initialized)
  ------------------
  |  Branch (186:9): [True: 0, False: 15.5k]
  ------------------
  187|       |        /* CRYPTO_secure_malloc() zeroes allocations when it is implemented */
  188|      0|        return CRYPTO_secure_malloc(num, file, line);
  189|  15.5k|#endif
  190|  15.5k|    return CRYPTO_zalloc(num, file, line);
  191|  15.5k|}
CRYPTO_secure_clear_free:
  218|  28.1k|{
  219|  28.1k|#ifndef OPENSSL_NO_SECURE_MEMORY
  220|  28.1k|    size_t actual_size;
  221|       |
  222|  28.1k|    if (ptr == NULL)
  ------------------
  |  Branch (222:9): [True: 8.43k, False: 19.7k]
  ------------------
  223|  8.43k|        return;
  224|  19.7k|    if (!CRYPTO_secure_allocated(ptr)) {
  ------------------
  |  Branch (224:9): [True: 19.7k, False: 0]
  ------------------
  225|  19.7k|        OPENSSL_cleanse(ptr, num);
  226|  19.7k|        CRYPTO_free(ptr, file, line);
  227|  19.7k|        return;
  228|  19.7k|    }
  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|  23.7k|{
  246|  23.7k|#ifndef OPENSSL_NO_SECURE_MEMORY
  247|  23.7k|    if (!secure_mem_initialized)
  ------------------
  |  Branch (247:9): [True: 23.7k, False: 0]
  ------------------
  248|  23.7k|        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|  23.7k|}

ossl_ml_kem_key_reset:
 1584|  1.88k|{
 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.88k|    if (key->seedbuf != NULL)
  ------------------
  |  Branch (1591:9): [True: 0, False: 1.88k]
  ------------------
 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.88k|    if (ossl_ml_kem_have_dkenc(key))
  ------------------
  |  |  210|  1.88k|#define ossl_ml_kem_have_dkenc(key) ((key)->encoded_dk != NULL)
  |  |  ------------------
  |  |  |  Branch (210:37): [True: 0, False: 1.88k]
  |  |  ------------------
  ------------------
 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.88k|    if (key->t != NULL) {
  ------------------
  |  Branch (1601:9): [True: 1.88k, False: 0]
  ------------------
 1602|  1.88k|        if (ossl_ml_kem_have_prvkey(key))
  ------------------
  |  |  208|  1.88k|#define ossl_ml_kem_have_prvkey(key) ((key)->s != NULL)
  |  |  ------------------
  |  |  |  Branch (208:38): [True: 1.88k, False: 0]
  |  |  ------------------
  ------------------
 1603|  1.88k|            OPENSSL_secure_clear_free(key->s, key->vinfo->prvalloc);
  ------------------
  |  |  150|  1.88k|    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.88k|        OPENSSL_free(key->t);
  ------------------
  |  |  132|  1.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__
  |  |  ------------------
  ------------------
 1605|  1.88k|    }
 1606|       |    key->d = key->z = key->seedbuf = key->encoded_dk = (uint8_t *)(key->s = key->m = key->t = NULL);
 1607|  1.88k|}
ossl_ml_kem_get_vinfo:
 1618|  3.76k|{
 1619|  3.76k|    switch (evp_type) {
  ------------------
  |  Branch (1619:13): [True: 3.76k, 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: 3.76k]
  ------------------
 1621|      0|        return &vinfo_map[ML_KEM_512_VINFO];
  ------------------
  |  |  177|      0|#define ML_KEM_512_VINFO 0
  ------------------
 1622|  3.76k|    case EVP_PKEY_ML_KEM_768:
  ------------------
  |  |  103|  3.76k|#define EVP_PKEY_ML_KEM_768 NID_ML_KEM_768
  |  |  ------------------
  |  |  |  | 6645|  3.76k|#define NID_ML_KEM_768          1455
  |  |  ------------------
  ------------------
  |  Branch (1622:5): [True: 3.76k, False: 0]
  ------------------
 1623|  3.76k|        return &vinfo_map[ML_KEM_768_VINFO];
  ------------------
  |  |  178|  3.76k|#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: 3.76k]
  ------------------
 1625|      0|        return &vinfo_map[ML_KEM_1024_VINFO];
  ------------------
  |  |  179|      0|#define ML_KEM_1024_VINFO 2
  ------------------
 1626|  3.76k|    }
 1627|      0|    return NULL;
 1628|  3.76k|}
ossl_ml_kem_key_new:
 1632|  1.88k|{
 1633|  1.88k|    const ML_KEM_VINFO *vinfo = ossl_ml_kem_get_vinfo(evp_type);
 1634|  1.88k|    ML_KEM_KEY *key;
 1635|       |
 1636|  1.88k|    if (vinfo == NULL) {
  ------------------
  |  Branch (1636:9): [True: 0, False: 1.88k]
  ------------------
 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.88k|    if ((key = OPENSSL_malloc(sizeof(*key))) == NULL)
  ------------------
  |  |  107|  1.88k|    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.88k]
  ------------------
 1643|      0|        return NULL;
 1644|       |
 1645|  1.88k|    key->vinfo = vinfo;
 1646|  1.88k|    key->libctx = libctx;
 1647|  1.88k|    key->prov_flags = ML_KEM_KEY_PROV_FLAGS_DEFAULT;
  ------------------
  |  |  132|  1.88k|    (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_PREFER_SEED | ML_KEM_KEY_RETAIN_SEED)
  |  |  ------------------
  |  |  |  |  123|  1.88k|#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.88k|#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.88k|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  |  |  ------------------
  ------------------
 1648|  1.88k|    key->shake128_md = EVP_MD_fetch(libctx, "SHAKE128", properties);
 1649|  1.88k|    key->shake256_md = EVP_MD_fetch(libctx, "SHAKE256", properties);
 1650|  1.88k|    key->sha3_256_md = EVP_MD_fetch(libctx, "SHA3-256", properties);
 1651|  1.88k|    key->sha3_512_md = EVP_MD_fetch(libctx, "SHA3-512", properties);
 1652|  1.88k|    key->d = key->z = key->rho = key->pkhash = key->encoded_dk = key->seedbuf = NULL;
 1653|  1.88k|    key->s = key->m = key->t = NULL;
 1654|       |
 1655|  1.88k|    if (key->shake128_md != NULL
  ------------------
  |  Branch (1655:9): [True: 1.88k, False: 0]
  ------------------
 1656|  1.88k|        && key->shake256_md != NULL
  ------------------
  |  Branch (1656:12): [True: 1.88k, False: 0]
  ------------------
 1657|  1.88k|        && key->sha3_256_md != NULL
  ------------------
  |  Branch (1657:12): [True: 1.88k, False: 0]
  ------------------
 1658|  1.88k|        && key->sha3_512_md != NULL)
  ------------------
  |  Branch (1658:12): [True: 1.88k, False: 0]
  ------------------
 1659|  1.88k|        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.88k|}
ossl_ml_kem_key_free:
 1734|  1.88k|{
 1735|  1.88k|    if (key == NULL)
  ------------------
  |  Branch (1735:9): [True: 0, False: 1.88k]
  ------------------
 1736|      0|        return;
 1737|       |
 1738|  1.88k|    EVP_MD_free(key->shake128_md);
 1739|  1.88k|    EVP_MD_free(key->shake256_md);
 1740|  1.88k|    EVP_MD_free(key->sha3_256_md);
 1741|  1.88k|    EVP_MD_free(key->sha3_512_md);
 1742|       |
 1743|  1.88k|    ossl_ml_kem_key_reset(key);
 1744|  1.88k|    OPENSSL_free(key);
  ------------------
  |  |  132|  1.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__
  |  |  ------------------
  ------------------
 1745|  1.88k|}
ossl_ml_kem_encode_public_key:
 1750|  1.88k|{
 1751|  1.88k|    if (!ossl_ml_kem_have_pubkey(key)
  ------------------
  |  |  207|  3.76k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (1751:9): [True: 0, False: 1.88k]
  ------------------
 1752|  1.88k|        || len != key->vinfo->pubkey_bytes)
  ------------------
  |  Branch (1752:12): [True: 0, False: 1.88k]
  ------------------
 1753|      0|        return 0;
 1754|  1.88k|    encode_pubkey(out, key);
 1755|  1.88k|    return 1;
 1756|  1.88k|}
ossl_ml_kem_genkey:
 1872|  1.88k|{
 1873|  1.88k|    uint8_t seed[ML_KEM_SEED_BYTES];
 1874|  1.88k|    EVP_MD_CTX *mdctx = NULL;
 1875|  1.88k|    const ML_KEM_VINFO *vinfo;
 1876|  1.88k|    int ret = 0;
 1877|       |
 1878|  1.88k|    if (key == NULL
  ------------------
  |  Branch (1878:9): [True: 0, False: 1.88k]
  ------------------
 1879|  1.88k|        || ossl_ml_kem_have_pubkey(key)
  ------------------
  |  |  207|  3.76k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  |  |  ------------------
  |  |  |  Branch (207:38): [True: 0, False: 1.88k]
  |  |  ------------------
  ------------------
 1880|  1.88k|        || ossl_ml_kem_have_dkenc(key))
  ------------------
  |  |  210|  1.88k|#define ossl_ml_kem_have_dkenc(key) ((key)->encoded_dk != NULL)
  |  |  ------------------
  |  |  |  Branch (210:37): [True: 0, False: 1.88k]
  |  |  ------------------
  ------------------
 1881|      0|        return 0;
 1882|  1.88k|    vinfo = key->vinfo;
 1883|       |
 1884|  1.88k|    if (pubenc != NULL && publen != vinfo->pubkey_bytes)
  ------------------
  |  Branch (1884:9): [True: 0, False: 1.88k]
  |  Branch (1884:27): [True: 0, False: 0]
  ------------------
 1885|      0|        return 0;
 1886|       |
 1887|  1.88k|    if (key->seedbuf != NULL) {
  ------------------
  |  Branch (1887:9): [True: 0, False: 1.88k]
  ------------------
 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.88k|    } else if (RAND_priv_bytes_ex(key->libctx, seed, sizeof(seed),
  ------------------
  |  Branch (1891:16): [True: 0, False: 1.88k]
  ------------------
 1892|  1.88k|                   key->vinfo->secbits)
 1893|  1.88k|        <= 0) {
 1894|      0|        return 0;
 1895|      0|    }
 1896|       |
 1897|  1.88k|    if ((mdctx = EVP_MD_CTX_new()) == NULL)
  ------------------
  |  Branch (1897:9): [True: 0, False: 1.88k]
  ------------------
 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.88k|    CONSTTIME_SECRET(seed, ML_KEM_SEED_BYTES);
 1905|       |
 1906|  1.88k|    if (add_storage(OPENSSL_malloc(vinfo->puballoc),
  ------------------
  |  |  107|  1.88k|    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.88k, False: 0]
  ------------------
 1907|  1.88k|            OPENSSL_secure_malloc(vinfo->prvalloc), 1, key))
  ------------------
  |  |  140|  1.88k|    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.88k|        ret = genkey(seed, mdctx, pubenc, key);
 1909|  1.88k|    OPENSSL_cleanse(seed, sizeof(seed));
 1910|       |
 1911|       |    /* Declassify secret inputs and derived outputs before returning control */
 1912|  1.88k|    CONSTTIME_DECLASSIFY(seed, ML_KEM_SEED_BYTES);
 1913|       |
 1914|  1.88k|    EVP_MD_CTX_free(mdctx);
 1915|  1.88k|    if (!ret) {
  ------------------
  |  Branch (1915:9): [True: 0, False: 1.88k]
  ------------------
 1916|      0|        ossl_ml_kem_key_reset(key);
 1917|      0|        return 0;
 1918|      0|    }
 1919|       |
 1920|       |    /* The public components are already declassified */
 1921|  1.88k|    CONSTTIME_DECLASSIFY(key->s, vinfo->rank * sizeof(scalar));
 1922|  1.88k|    CONSTTIME_DECLASSIFY(key->z, 2 * ML_KEM_RANDOM_BYTES);
 1923|  1.88k|    return 1;
 1924|  1.88k|}
ml_kem.c:add_storage:
 1543|  1.88k|{
 1544|  1.88k|    int rank = key->vinfo->rank;
 1545|       |
 1546|  1.88k|    if (pub == NULL || (private && priv == NULL)) {
  ------------------
  |  Branch (1546:9): [True: 0, False: 1.88k]
  |  Branch (1546:25): [True: 1.88k, False: 0]
  |  Branch (1546:36): [True: 0, False: 1.88k]
  ------------------
 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.88k|    memset(key->rho_pkhash, 0, sizeof(key->rho_pkhash));
 1560|  1.88k|    key->rho = key->rho_pkhash;
 1561|  1.88k|    key->pkhash = key->rho_pkhash + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1562|  1.88k|    key->d = key->z = NULL;
 1563|       |
 1564|       |    /* A public key needs space for |t| and |m| */
 1565|  1.88k|    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.88k|    if (private)
  ------------------
  |  Branch (1574:9): [True: 1.88k, False: 0]
  ------------------
 1575|  1.88k|        key->z = (uint8_t *)(rank + (key->s = priv));
 1576|  1.88k|    return 1;
 1577|  1.88k|}
ml_kem.c:encode_pubkey:
 1232|  1.88k|{
 1233|  1.88k|    const uint8_t *rho = key->rho;
 1234|  1.88k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1235|       |
 1236|  1.88k|    vector_encode(out, key->t, 12, vinfo->rank);
 1237|  1.88k|    memcpy(out + vinfo->vector_bytes, rho, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1238|  1.88k|}
ml_kem.c:vector_encode:
  885|  1.88k|{
  886|  1.88k|    int stride = bits * DEGREE / 8;
  ------------------
  |  |   41|  1.88k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  1.88k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  887|       |
  888|  7.52k|    for (; rank-- > 0; out += stride)
  ------------------
  |  Branch (888:12): [True: 5.64k, False: 1.88k]
  ------------------
  889|  5.64k|        scalar_encode(out, a++, bits);
  890|  1.88k|}
ml_kem.c:scalar_encode:
  637|  11.2k|{
  638|  11.2k|    const uint16_t *curr = s->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  11.2k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  11.2k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  639|  11.2k|    uint64_t accum = 0, element;
  640|  11.2k|    int used = 0;
  641|       |
  642|  2.88M|    do {
  643|  2.88M|        element = *curr++;
  644|  2.88M|        if (used + bits < 64) {
  ------------------
  |  Branch (644:13): [True: 2.34M, False: 541k]
  ------------------
  645|  2.34M|            accum |= element << used;
  646|  2.34M|            used += bits;
  647|  2.34M|        } else if (used + bits > 64) {
  ------------------
  |  Branch (647:20): [True: 360k, False: 180k]
  ------------------
  648|   360k|            out = OPENSSL_store_u64_le(out, accum | (element << used));
  649|   360k|            accum = element >> (64 - used);
  650|   360k|            used = (used + bits) - 64;
  651|   360k|        } else {
  652|   180k|            out = OPENSSL_store_u64_le(out, accum | (element << used));
  653|   180k|            accum = 0;
  654|   180k|            used = 0;
  655|   180k|        }
  656|  2.88M|    } while (curr < end);
  ------------------
  |  Branch (656:14): [True: 2.87M, False: 11.2k]
  ------------------
  657|  11.2k|}
ml_kem.c:single_keccak:
  336|  13.1k|{
  337|  13.1k|    unsigned int sz = (unsigned int)outlen;
  338|       |
  339|  13.1k|    if (!EVP_DigestUpdate(mdctx, in, inlen))
  ------------------
  |  Branch (339:9): [True: 0, False: 13.1k]
  ------------------
  340|      0|        return 0;
  341|  13.1k|    if (EVP_MD_xof(EVP_MD_CTX_get0_md(mdctx)))
  ------------------
  |  Branch (341:9): [True: 11.2k, False: 1.88k]
  ------------------
  342|  11.2k|        return EVP_DigestFinalXOF(mdctx, out, outlen);
  343|  1.88k|    return EVP_DigestFinal_ex(mdctx, out, &sz)
  ------------------
  |  Branch (343:12): [True: 1.88k, False: 0]
  ------------------
  344|  1.88k|        && ossl_assert((size_t)sz == outlen);
  ------------------
  |  |   52|  1.88k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 1.88k, False: 0]
  |  |  ------------------
  |  |   53|  1.88k|    __FILE__, __LINE__)
  ------------------
  345|  13.1k|}
ml_kem.c:matrix_expand:
  981|  1.88k|{
  982|  1.88k|    scalar *out = key->m;
  983|  1.88k|    uint8_t input[ML_KEM_RANDOM_BYTES + 2];
  984|  1.88k|    int rank = key->vinfo->rank;
  985|  1.88k|    int i, j;
  986|       |
  987|  1.88k|    memcpy(input, key->rho, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  988|  7.52k|    for (i = 0; i < rank; i++) {
  ------------------
  |  Branch (988:17): [True: 5.64k, False: 1.88k]
  ------------------
  989|  22.5k|        for (j = 0; j < rank; j++) {
  ------------------
  |  Branch (989:21): [True: 16.9k, False: 5.64k]
  ------------------
  990|  16.9k|            input[ML_KEM_RANDOM_BYTES] = i;
  ------------------
  |  |   47|  16.9k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  991|  16.9k|            input[ML_KEM_RANDOM_BYTES + 1] = j;
  ------------------
  |  |   47|  16.9k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  992|  16.9k|            if (!EVP_DigestInit_ex(mdctx, key->shake128_md, NULL)
  ------------------
  |  Branch (992:17): [True: 0, False: 16.9k]
  ------------------
  993|  16.9k|                || !EVP_DigestUpdate(mdctx, input, sizeof(input))
  ------------------
  |  Branch (993:20): [True: 0, False: 16.9k]
  ------------------
  994|  16.9k|                || !sample_scalar(out++, mdctx))
  ------------------
  |  Branch (994:20): [True: 0, False: 16.9k]
  ------------------
  995|      0|                return 0;
  996|  16.9k|        }
  997|  5.64k|    }
  998|  1.88k|    return 1;
  999|  1.88k|}
ml_kem.c:sample_scalar:
  431|  16.9k|{
  432|  16.9k|    uint16_t *curr = out->c, *endout = curr + DEGREE;
  ------------------
  |  |   41|  16.9k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  16.9k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  433|  16.9k|    uint8_t buf[SCALAR_SAMPLING_BUFSIZE], *in;
  434|  16.9k|    uint8_t *endin = buf + sizeof(buf);
  435|  16.9k|    uint16_t d;
  436|  16.9k|    uint8_t b1, b2, b3;
  437|       |
  438|  50.8k|    do {
  439|  50.8k|        if (!EVP_DigestSqueeze(mdctx, in = buf, sizeof(buf)))
  ------------------
  |  Branch (439:13): [True: 0, False: 50.8k]
  ------------------
  440|      0|            return 0;
  441|  2.67M|        do {
  442|  2.67M|            b1 = *in++;
  443|  2.67M|            b2 = *in++;
  444|  2.67M|            b3 = *in++;
  445|       |
  446|  2.67M|            if (curr >= endout)
  ------------------
  |  Branch (446:17): [True: 8.43k, False: 2.66M]
  ------------------
  447|  8.43k|                break;
  448|  2.66M|            if ((d = ((b2 & 0x0f) << 8) + b1) < kPrime)
  ------------------
  |  Branch (448:17): [True: 2.16M, False: 500k]
  ------------------
  449|  2.16M|                *curr++ = d;
  450|  2.66M|            if (curr >= endout)
  ------------------
  |  Branch (450:17): [True: 8.43k, False: 2.66M]
  ------------------
  451|  8.43k|                break;
  452|  2.66M|            if ((d = (b3 << 4) + (b2 >> 4)) < kPrime)
  ------------------
  |  Branch (452:17): [True: 2.16M, False: 499k]
  ------------------
  453|  2.16M|                *curr++ = d;
  454|  2.66M|        } while (in < endin);
  ------------------
  |  Branch (454:18): [True: 2.62M, False: 34.0k]
  ------------------
  455|  50.8k|    } while (curr < endout);
  ------------------
  |  Branch (455:14): [True: 33.9k, False: 16.9k]
  ------------------
  456|  16.9k|    return 1;
  457|  16.9k|}
ml_kem.c:genkey:
 1357|  1.88k|{
 1358|  1.88k|    uint8_t hashed[2 * ML_KEM_RANDOM_BYTES];
 1359|  1.88k|    const uint8_t *const sigma = hashed + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1360|  1.88k|    uint8_t augmented_seed[ML_KEM_RANDOM_BYTES + 1];
 1361|  1.88k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1362|  1.88k|    CBD_FUNC cbd_1 = CBD1(vinfo->evp_type);
  ------------------
  |  | 1134|  1.88k|#define CBD1(evp_type) ((evp_type) == EVP_PKEY_ML_KEM_512 ? cbd_3 : cbd_2)
  |  |  ------------------
  |  |  |  |   93|  1.88k|#define EVP_PKEY_ML_KEM_512 NID_ML_KEM_512
  |  |  |  |  ------------------
  |  |  |  |  |  | 6640|  1.88k|#define NID_ML_KEM_512          1454
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (1134:25): [True: 0, False: 1.88k]
  |  |  ------------------
  ------------------
 1363|  1.88k|    int rank = vinfo->rank;
 1364|  1.88k|    uint8_t counter = 0;
 1365|  1.88k|    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.88k|    memcpy(augmented_seed, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1372|  1.88k|    augmented_seed[ML_KEM_RANDOM_BYTES] = (uint8_t)rank;
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1373|  1.88k|    if (!hash_g(hashed, augmented_seed, sizeof(augmented_seed), mdctx, key))
  ------------------
  |  Branch (1373:9): [True: 0, False: 1.88k]
  ------------------
 1374|      0|        goto end;
 1375|  1.88k|    memcpy(key->rho, hashed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1376|       |    /* The |rho| matrix seed is public */
 1377|  1.88k|    CONSTTIME_DECLASSIFY(key->rho, ML_KEM_RANDOM_BYTES);
 1378|       |
 1379|       |    /* FIPS 203 |e| vector is initial value of key->t */
 1380|  1.88k|    if (!matrix_expand(mdctx, key)
  ------------------
  |  Branch (1380:9): [True: 0, False: 1.88k]
  ------------------
 1381|  1.88k|        || !gencbd_vector_ntt(key->s, cbd_1, &counter, sigma, rank, mdctx, key)
  ------------------
  |  Branch (1381:12): [True: 0, False: 1.88k]
  ------------------
 1382|  1.88k|        || !gencbd_vector_ntt(key->t, cbd_1, &counter, sigma, rank, mdctx, key))
  ------------------
  |  Branch (1382:12): [True: 0, False: 1.88k]
  ------------------
 1383|      0|        goto end;
 1384|       |
 1385|       |    /* To |e| we now add the product of transpose |m| and |s|, giving |t|. */
 1386|  1.88k|    matrix_mult_transpose_add(key->t, key->m, key->s, rank);
 1387|       |    /* The |t| vector is public */
 1388|  1.88k|    CONSTTIME_DECLASSIFY(key->t, vinfo->rank * sizeof(scalar));
 1389|       |
 1390|  1.88k|    if (pubenc == NULL) {
  ------------------
  |  Branch (1390:9): [True: 1.88k, False: 0]
  ------------------
 1391|       |        /* Incremental digest of public key without in-full serialisation. */
 1392|  1.88k|        if (!hash_h_pubkey(key->pkhash, mdctx, key))
  ------------------
  |  Branch (1392:13): [True: 0, False: 1.88k]
  ------------------
 1393|      0|            goto end;
 1394|  1.88k|    } 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.88k|    memcpy(key->z, seed + ML_KEM_RANDOM_BYTES, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
                  memcpy(key->z, seed + ML_KEM_RANDOM_BYTES, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1402|       |
 1403|       |    /* Save the |d| portion of the seed */
 1404|  1.88k|    key->d = key->z + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1405|  1.88k|    memcpy(key->d, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1406|       |
 1407|  1.88k|    ret = 1;
 1408|  1.88k|end:
 1409|  1.88k|    OPENSSL_cleanse((void *)augmented_seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1410|  1.88k|    OPENSSL_cleanse((void *)sigma, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1411|  1.88k|    if (ret == 0) {
  ------------------
  |  Branch (1411:9): [True: 0, False: 1.88k]
  ------------------
 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.88k|    return ret;
 1417|  1.88k|}
ml_kem.c:prf:
  353|  11.2k|{
  354|  11.2k|    return EVP_DigestInit_ex(mdctx, key->shake256_md, NULL)
  ------------------
  |  Branch (354:12): [True: 11.2k, False: 0]
  ------------------
  355|  11.2k|        && single_keccak(out, len, in, ML_KEM_RANDOM_BYTES + 1, mdctx);
  ------------------
  |  |   47|  11.2k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (355:12): [True: 11.2k, False: 0]
  ------------------
  356|  11.2k|}
ml_kem.c:cbd_2:
 1011|  11.2k|{
 1012|  11.2k|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  11.2k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  11.2k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
 1013|  11.2k|    uint8_t randbuf[4 * DEGREE / 8], *r = randbuf; /* 64 * eta slots */
 1014|  11.2k|    uint16_t value, mask;
 1015|  11.2k|    uint8_t b;
 1016|       |
 1017|  11.2k|    if (!prf(randbuf, sizeof(randbuf), in, mdctx, key))
  ------------------
  |  Branch (1017:9): [True: 0, False: 11.2k]
  ------------------
 1018|      0|        return 0;
 1019|       |
 1020|  1.44M|    do {
 1021|  1.44M|        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.44M|        value = bit0(b) + bitn(1, b);
  ------------------
  |  |   34|  1.44M|#define bit0(b) ((b) & 1)
  ------------------
                      value = bit0(b) + bitn(1, b);
  ------------------
  |  |   35|  1.44M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1031|  1.44M|        value -= bitn(2, b) + bitn(3, b);
  ------------------
  |  |   35|  1.44M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(2, b) + bitn(3, b);
  ------------------
  |  |   35|  1.44M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1032|  1.44M|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|  1.44M|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1033|  1.44M|        *curr++ = value + (kPrime & mask);
 1034|       |
 1035|  1.44M|        value = bitn(4, b) + bitn(5, b);
  ------------------
  |  |   35|  1.44M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value = bitn(4, b) + bitn(5, b);
  ------------------
  |  |   35|  1.44M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1036|  1.44M|        value -= bitn(6, b) + bitn(7, b);
  ------------------
  |  |   35|  1.44M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(6, b) + bitn(7, b);
  ------------------
  |  |   35|  1.44M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1037|  1.44M|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|  1.44M|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1038|  1.44M|        *curr++ = value + (kPrime & mask);
 1039|  1.44M|    } while (curr < end);
  ------------------
  |  Branch (1039:14): [True: 1.43M, False: 11.2k]
  ------------------
 1040|  11.2k|    return 1;
 1041|  11.2k|}
ml_kem.c:hash_g:
  402|  1.88k|{
  403|  1.88k|    return EVP_DigestInit_ex(mdctx, key->sha3_512_md, NULL)
  ------------------
  |  Branch (403:12): [True: 1.88k, False: 0]
  ------------------
  404|  1.88k|        && single_keccak(out, ML_KEM_SEED_BYTES, in, len, mdctx);
  ------------------
  |  |   48|  1.88k|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  |  Branch (404:12): [True: 1.88k, False: 0]
  ------------------
  405|  1.88k|}
ml_kem.c:gencbd_vector_ntt:
 1120|  3.76k|{
 1121|  3.76k|    uint8_t input[ML_KEM_RANDOM_BYTES + 1];
 1122|       |
 1123|  3.76k|    memcpy(input, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  3.76k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1124|  11.2k|    do {
 1125|  11.2k|        input[ML_KEM_RANDOM_BYTES] = (*counter)++;
  ------------------
  |  |   47|  11.2k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1126|  11.2k|        if (!cbd(out, input, mdctx, key))
  ------------------
  |  Branch (1126:13): [True: 0, False: 11.2k]
  ------------------
 1127|      0|            return 0;
 1128|  11.2k|        scalar_ntt(out++);
 1129|  11.2k|    } while (--rank > 0);
  ------------------
  |  Branch (1129:14): [True: 7.52k, False: 3.76k]
  ------------------
 1130|  3.76k|    return 1;
 1131|  3.76k|}
ml_kem.c:scalar_ntt:
  510|  11.2k|{
  511|  11.2k|    const uint16_t *roots = kNTTRoots;
  512|  11.2k|    uint16_t *end = s->c + DEGREE;
  ------------------
  |  |   41|  11.2k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  11.2k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  513|  11.2k|    int offset = DEGREE / 2;
  ------------------
  |  |   41|  11.2k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  11.2k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  514|       |
  515|  78.9k|    do {
  516|  78.9k|        uint16_t *curr = s->c, *peer;
  517|       |
  518|  1.43M|        do {
  519|  1.43M|            uint16_t *pause = curr + offset, even, odd;
  520|  1.43M|            uint32_t zeta = *++roots;
  521|       |
  522|  1.43M|            peer = pause;
  523|  10.1M|            do {
  524|  10.1M|                even = *curr;
  525|  10.1M|                odd = reduce(*peer * zeta);
  526|  10.1M|                *peer++ = reduce_once(even - odd + kPrime);
  527|  10.1M|                *curr++ = reduce_once(odd + even);
  528|  10.1M|            } while (curr < pause);
  ------------------
  |  Branch (528:22): [True: 8.67M, False: 1.43M]
  ------------------
  529|  1.43M|        } while ((curr = peer) < end);
  ------------------
  |  Branch (529:18): [True: 1.35M, False: 78.9k]
  ------------------
  530|  78.9k|    } while ((offset >>= 1) >= 2);
  ------------------
  |  Branch (530:14): [True: 67.6k, False: 11.2k]
  ------------------
  531|  11.2k|}
ml_kem.c:reduce:
  481|  16.6M|{
  482|  16.6M|    uint64_t product = (uint64_t)x * kBarrettMultiplier;
  483|  16.6M|    uint32_t quotient = (uint32_t)(product >> kBarrettShift);
  484|  16.6M|    uint32_t remainder = x - quotient * kPrime;
  485|       |
  486|  16.6M|    return reduce_once(remainder);
  487|  16.6M|}
ml_kem.c:reduce_once:
  467|  36.8M|{
  468|  36.8M|    const uint16_t subtracted = x - kPrime;
  469|  36.8M|    uint16_t mask = constish_time_non_zero(subtracted >> 15);
  ------------------
  |  |   70|  36.8M|#define constish_time_non_zero(b) (0u - (b))
  ------------------
  470|       |
  471|  36.8M|    return (mask & x) | (~mask & subtracted);
  472|  36.8M|}
ml_kem.c:matrix_mult_transpose_add:
  962|  1.88k|{
  963|  1.88k|    const scalar *mc = m, *mr, *ar;
  964|  1.88k|    int i, j;
  965|       |
  966|  7.52k|    for (i = rank; i-- > 0; ++out) {
  ------------------
  |  Branch (966:20): [True: 5.64k, False: 1.88k]
  ------------------
  967|  5.64k|        scalar_mult_add(out, mr = mc++, ar = a);
  968|  16.9k|        for (j = rank; --j > 0;)
  ------------------
  |  Branch (968:24): [True: 11.2k, False: 5.64k]
  ------------------
  969|  11.2k|            scalar_mult_add(out, (mr += rank), ++ar);
  970|  5.64k|    }
  971|  1.88k|}
ml_kem.c:scalar_mult_add:
  615|  16.9k|{
  616|  16.9k|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  16.9k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  16.9k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  617|  16.9k|    const uint16_t *lc = lhs->c, *rc = rhs->c;
  618|  16.9k|    const uint16_t *roots = kModRoots;
  619|       |
  620|  2.16M|    do {
  621|  2.16M|        uint32_t l0 = *lc++, r0 = *rc++;
  622|  2.16M|        uint32_t l1 = *lc++, r1 = *rc++;
  623|  2.16M|        uint16_t *c0 = curr++;
  624|  2.16M|        uint16_t *c1 = curr++;
  625|  2.16M|        uint32_t zetapow = *roots++;
  626|       |
  627|  2.16M|        *c0 = reduce(*c0 + l0 * r0 + reduce(l1 * r1) * zetapow);
  628|  2.16M|        *c1 = reduce(*c1 + l0 * r1 + l1 * r0);
  629|  2.16M|    } while (curr < end);
  ------------------
  |  Branch (629:14): [True: 2.14M, False: 16.9k]
  ------------------
  630|  16.9k|}
ml_kem.c:hash_h_pubkey:
  373|  1.88k|{
  374|  1.88k|    const ML_KEM_VINFO *vinfo = key->vinfo;
  375|  1.88k|    const scalar *t = key->t, *end = t + vinfo->rank;
  376|  1.88k|    unsigned int sz;
  377|       |
  378|  1.88k|    if (!EVP_DigestInit_ex(mdctx, key->sha3_256_md, NULL))
  ------------------
  |  Branch (378:9): [True: 0, False: 1.88k]
  ------------------
  379|      0|        return 0;
  380|       |
  381|  5.64k|    do {
  382|  5.64k|        uint8_t buf[3 * DEGREE / 2];
  383|       |
  384|  5.64k|        scalar_encode(buf, t++, 12);
  385|  5.64k|        if (!EVP_DigestUpdate(mdctx, buf, sizeof(buf)))
  ------------------
  |  Branch (385:13): [True: 0, False: 5.64k]
  ------------------
  386|      0|            return 0;
  387|  5.64k|    } while (t < end);
  ------------------
  |  Branch (387:14): [True: 3.76k, False: 1.88k]
  ------------------
  388|       |
  389|  1.88k|    if (!EVP_DigestUpdate(mdctx, key->rho, ML_KEM_RANDOM_BYTES))
  ------------------
  |  |   47|  1.88k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (389:9): [True: 0, False: 1.88k]
  ------------------
  390|      0|        return 0;
  391|  1.88k|    return EVP_DigestFinal_ex(mdctx, pkhash, &sz)
  ------------------
  |  Branch (391:12): [True: 1.88k, False: 0]
  ------------------
  392|  1.88k|        && ossl_assert(sz == ML_KEM_PKHASH_BYTES);
  ------------------
  |  |   52|  1.88k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 1.88k, False: 0]
  |  |  ------------------
  |  |   53|  1.88k|    __FILE__, __LINE__)
  ------------------
  393|  1.88k|}

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

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

CRYPTO_strdup:
   23|   901k|{
   24|   901k|    char *ret;
   25|   901k|    size_t len;
   26|       |
   27|   901k|    if (str == NULL)
  ------------------
  |  Branch (27:9): [True: 0, False: 901k]
  ------------------
   28|      0|        return NULL;
   29|       |
   30|   901k|    len = strlen(str) + 1;
   31|   901k|    ret = CRYPTO_malloc(len, file, line);
   32|   901k|    if (ret != NULL)
  ------------------
  |  Branch (32:9): [True: 901k, False: 0]
  ------------------
   33|   901k|        memcpy(ret, str, len);
   34|   901k|    return ret;
   35|   901k|}
CRYPTO_strndup:
   38|   191k|{
   39|   191k|    size_t maxlen;
   40|   191k|    char *ret;
   41|       |
   42|   191k|    if (str == NULL)
  ------------------
  |  Branch (42:9): [True: 0, False: 191k]
  ------------------
   43|      0|        return NULL;
   44|       |
   45|   191k|    maxlen = OPENSSL_strnlen(str, s);
   46|       |
   47|   191k|    ret = CRYPTO_malloc(maxlen + 1, file, line);
   48|   191k|    if (ret) {
  ------------------
  |  Branch (48:9): [True: 191k, False: 0]
  ------------------
   49|   191k|        memcpy(ret, str, maxlen);
   50|   191k|        ret[maxlen] = CH_ZERO;
  ------------------
  |  |   20|   191k|#define CH_ZERO '\0'
  ------------------
   51|   191k|    }
   52|   191k|    return ret;
   53|   191k|}
CRYPTO_memdup:
   56|  9.94k|{
   57|  9.94k|    void *ret;
   58|       |
   59|  9.94k|    if (data == NULL || siz >= INT_MAX)
  ------------------
  |  Branch (59:9): [True: 0, False: 9.94k]
  |  Branch (59:25): [True: 0, False: 9.94k]
  ------------------
   60|      0|        return NULL;
   61|       |
   62|  9.94k|    ret = CRYPTO_malloc(siz, file, line);
   63|  9.94k|    if (ret == NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 9.94k]
  ------------------
   64|      0|        return NULL;
   65|  9.94k|    return memcpy(ret, data, siz);
   66|  9.94k|}
OPENSSL_strnlen:
   69|   191k|{
   70|   191k|    const char *p;
   71|       |
   72|  2.43M|    for (p = str; maxlen-- != 0 && *p != CH_ZERO; ++p)
  ------------------
  |  |   20|  2.24M|#define CH_ZERO '\0'
  ------------------
  |  Branch (72:19): [True: 2.24M, False: 191k]
  |  Branch (72:36): [True: 2.24M, False: 0]
  ------------------
   73|  2.24M|        ;
   74|       |
   75|   191k|    return p - str;
   76|   191k|}
OPENSSL_strlcpy:
   79|  1.84M|{
   80|  1.84M|    size_t l = 0;
   81|  16.6M|    for (; size > 1 && *src; size--) {
  ------------------
  |  Branch (81:12): [True: 16.6M, False: 0]
  |  Branch (81:24): [True: 14.8M, False: 1.84M]
  ------------------
   82|  14.8M|        *dst++ = *src++;
   83|  14.8M|        l++;
   84|  14.8M|    }
   85|  1.84M|    if (size)
  ------------------
  |  Branch (85:9): [True: 1.84M, False: 0]
  ------------------
   86|  1.84M|        *dst = CH_ZERO;
  ------------------
  |  |   20|  1.84M|#define CH_ZERO '\0'
  ------------------
   87|  1.84M|    return l + strlen(src);
   88|  1.84M|}
OPENSSL_strlcat:
   91|  3.33k|{
   92|  3.33k|    size_t l = 0;
   93|  21.6k|    for (; size > 0 && *dst; size--, dst++)
  ------------------
  |  Branch (93:12): [True: 21.6k, False: 0]
  |  Branch (93:24): [True: 18.3k, False: 3.33k]
  ------------------
   94|  18.3k|        l++;
   95|  3.33k|    return l + OPENSSL_strlcpy(dst, src, size);
   96|  3.33k|}
openssl_strerror_r:
  379|     24|{
  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|     24|    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|     24|}
OPENSSL_strcasecmp:
  426|  7.58M|{
  427|  7.58M|    int t;
  428|       |
  429|  52.5M|    while ((t = ossl_tolower(*s1) - ossl_tolower(*s2++)) == 0)
  ------------------
  |  Branch (429:12): [True: 48.9M, False: 3.58M]
  ------------------
  430|  48.9M|        if (*s1++ == '\0')
  ------------------
  |  Branch (430:13): [True: 3.99M, False: 44.9M]
  ------------------
  431|  3.99M|            return 0;
  432|  3.58M|    return t;
  433|  7.58M|}
OPENSSL_strncasecmp:
  436|  20.6M|{
  437|  20.6M|    int t;
  438|  20.6M|    size_t i;
  439|       |
  440|  25.2M|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (440:17): [True: 23.8M, False: 1.40M]
  ------------------
  441|  23.8M|        if ((t = ossl_tolower(*s1) - ossl_tolower(*s2++)) != 0)
  ------------------
  |  Branch (441:13): [True: 19.2M, False: 4.51M]
  ------------------
  442|  19.2M|            return t;
  443|  4.51M|        else if (*s1++ == '\0')
  ------------------
  |  Branch (443:18): [True: 0, False: 4.51M]
  ------------------
  444|      0|            return 0;
  445|  1.40M|    return 0;
  446|  20.6M|}

OBJ_NAME_init:
   64|   763k|{
   65|   763k|    return RUN_ONCE(&init, o_names_init);
  ------------------
  |  |  130|   763k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 763k, False: 0]
  |  |  ------------------
  ------------------
   66|   763k|}
OBJ_NAME_get:
  153|   762k|{
  154|   762k|    OBJ_NAME on, *ret;
  155|   762k|    int num = 0, alias;
  156|   762k|    const char *value = NULL;
  157|       |
  158|   762k|    if (name == NULL)
  ------------------
  |  Branch (158:9): [True: 0, False: 762k]
  ------------------
  159|      0|        return NULL;
  160|   762k|    if (!OBJ_NAME_init())
  ------------------
  |  Branch (160:9): [True: 0, False: 762k]
  ------------------
  161|      0|        return NULL;
  162|   762k|    if (!CRYPTO_THREAD_read_lock(obj_lock))
  ------------------
  |  Branch (162:9): [True: 0, False: 762k]
  ------------------
  163|      0|        return NULL;
  164|       |
  165|   762k|    alias = type & OBJ_NAME_ALIAS;
  ------------------
  |  |   33|   762k|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  166|   762k|    type &= ~OBJ_NAME_ALIAS;
  ------------------
  |  |   33|   762k|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  167|       |
  168|   762k|    on.name = name;
  169|   762k|    on.type = type;
  170|       |
  171|   826k|    for (;;) {
  172|   826k|        ret = lh_OBJ_NAME_retrieve(names_lh, &on);
  173|   826k|        if (ret == NULL)
  ------------------
  |  Branch (173:13): [True: 110k, False: 716k]
  ------------------
  174|   110k|            break;
  175|   716k|        if ((ret->alias) && !alias) {
  ------------------
  |  Branch (175:13): [True: 64.0k, False: 652k]
  |  Branch (175:29): [True: 64.0k, False: 0]
  ------------------
  176|  64.0k|            if (++num > 10)
  ------------------
  |  Branch (176:17): [True: 0, False: 64.0k]
  ------------------
  177|      0|                break;
  178|  64.0k|            on.name = ret->data;
  179|   652k|        } else {
  180|   652k|            value = ret->data;
  181|   652k|            break;
  182|   652k|        }
  183|   716k|    }
  184|       |
  185|   762k|    CRYPTO_THREAD_unlock(obj_lock);
  186|   762k|    return value;
  187|   762k|}
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.34k|{
  297|  1.34k|    OBJ_DOALL d;
  298|       |
  299|  1.34k|    d.type = type;
  300|  1.34k|    d.fn = fn;
  301|  1.34k|    d.arg = arg;
  302|       |
  303|  1.34k|    lh_OBJ_NAME_doall_OBJ_DOALL(names_lh, do_all_fn, &d);
  304|  1.34k|}
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|   827k|{
  138|   827k|    unsigned long ret;
  139|       |
  140|   827k|    if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 827k]
  ------------------
  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|   827k|    } else {
  146|   827k|        ret = ossl_lh_strcasehash(a->name);
  147|   827k|    }
  148|   827k|    ret ^= a->type;
  149|   827k|    return ret;
  150|   827k|}
o_names.c:obj_name_cmp:
  120|   716k|{
  121|   716k|    int ret;
  122|       |
  123|   716k|    ret = a->type - b->type;
  124|   716k|    if (ret == 0) {
  ------------------
  |  Branch (124:9): [True: 716k, False: 0]
  ------------------
  125|   716k|        if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (125:13): [True: 0, False: 716k]
  ------------------
  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|   716k|            ret = OPENSSL_strcasecmp(a->name, b->name);
  132|   716k|    }
  133|   716k|    return ret;
  134|   716k|}
o_names.c:do_all_fn:
  287|   326k|{
  288|   326k|    if (name->type == d->type)
  ------------------
  |  Branch (288:9): [True: 163k, False: 163k]
  ------------------
  289|   163k|        d->fn(name, d->arg);
  290|   326k|}

OBJ_nid2obj:
  259|  21.3M|{
  260|  21.3M|    ADDED_OBJ ad, *adp = NULL;
  261|  21.3M|    ASN1_OBJECT ob;
  262|       |
  263|  21.3M|    if (n == NID_undef
  ------------------
  |  |   18|  42.7M|#define NID_undef                       0
  ------------------
  |  Branch (263:9): [True: 10.3M, False: 11.0M]
  ------------------
  264|  11.0M|        || (n > 0 && n < NUM_NID && nid_objs[n].nid != NID_undef))
  ------------------
  |  | 1359|  22.0M|#define NUM_NID 1502
  ------------------
                      || (n > 0 && n < NUM_NID && nid_objs[n].nid != NID_undef))
  ------------------
  |  |   18|  11.0M|#define NID_undef                       0
  ------------------
  |  Branch (264:13): [True: 11.0M, False: 0]
  |  Branch (264:22): [True: 11.0M, False: 0]
  |  Branch (264:37): [True: 11.0M, False: 0]
  ------------------
  265|  21.3M|        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.94M|{
  285|  1.94M|    ASN1_OBJECT *ob = OBJ_nid2obj(n);
  286|       |
  287|  1.94M|    return ob == NULL ? NULL : ob->sn;
  ------------------
  |  Branch (287:12): [True: 0, False: 1.94M]
  ------------------
  288|  1.94M|}
OBJ_nid2ln:
  291|  1.06M|{
  292|  1.06M|    ASN1_OBJECT *ob = OBJ_nid2obj(n);
  293|       |
  294|  1.06M|    return ob == NULL ? NULL : ob->ln;
  ------------------
  |  Branch (294:12): [True: 0, False: 1.06M]
  ------------------
  295|  1.06M|}
OBJ_txt2obj:
  349|  94.1k|{
  350|  94.1k|    int nid = NID_undef;
  ------------------
  |  |   18|  94.1k|#define NID_undef                       0
  ------------------
  351|  94.1k|    ASN1_OBJECT *op = NULL;
  352|  94.1k|    unsigned char *buf;
  353|  94.1k|    unsigned char *p;
  354|  94.1k|    const unsigned char *cp;
  355|  94.1k|    int i, j;
  356|       |
  357|  94.1k|    if (!no_name) {
  ------------------
  |  Branch (357:9): [True: 85.0k, False: 9.10k]
  ------------------
  358|  85.0k|        if ((nid = OBJ_sn2nid(s)) != NID_undef
  ------------------
  |  |   18|   170k|#define NID_undef                       0
  ------------------
  |  Branch (358:13): [True: 21.2k, False: 63.7k]
  ------------------
  359|  85.0k|            || (nid = OBJ_ln2nid(s)) != NID_undef) {
  ------------------
  |  |   18|  63.7k|#define NID_undef                       0
  ------------------
  |  Branch (359:16): [True: 63.7k, False: 0]
  ------------------
  360|  85.0k|            return OBJ_nid2obj(nid);
  361|  85.0k|        }
  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|  9.10k|    i = a2d_ASN1_OBJECT(NULL, 0, s, -1);
  370|  9.10k|    if (i <= 0)
  ------------------
  |  Branch (370:9): [True: 0, False: 9.10k]
  ------------------
  371|      0|        return NULL;
  372|       |
  373|       |    /* Work out total size */
  374|  9.10k|    j = ASN1_object_size(0, i, V_ASN1_OBJECT);
  ------------------
  |  |   70|  9.10k|#define V_ASN1_OBJECT 6
  ------------------
  375|  9.10k|    if (j < 0)
  ------------------
  |  Branch (375:9): [True: 0, False: 9.10k]
  ------------------
  376|      0|        return NULL;
  377|       |
  378|  9.10k|    if ((buf = OPENSSL_malloc(j)) == NULL)
  ------------------
  |  |  107|  9.10k|    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: 9.10k]
  ------------------
  379|      0|        return NULL;
  380|       |
  381|  9.10k|    p = buf;
  382|       |    /* Write out tag+length */
  383|  9.10k|    ASN1_put_object(&p, 0, i, V_ASN1_OBJECT, V_ASN1_UNIVERSAL);
  ------------------
  |  |   70|  9.10k|#define V_ASN1_OBJECT 6
  ------------------
                  ASN1_put_object(&p, 0, i, V_ASN1_OBJECT, V_ASN1_UNIVERSAL);
  ------------------
  |  |   49|  9.10k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  384|       |    /* Write out contents */
  385|  9.10k|    a2d_ASN1_OBJECT(p, i, s, -1);
  386|       |
  387|  9.10k|    cp = buf;
  388|  9.10k|    op = d2i_ASN1_OBJECT(NULL, &cp, j);
  389|  9.10k|    OPENSSL_free(buf);
  ------------------
  |  |  132|  9.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__
  |  |  ------------------
  ------------------
  390|  9.10k|    return op;
  391|  9.10k|}
OBJ_obj2txt:
  394|  1.05M|{
  395|  1.05M|    int i, n = 0, len, nid, first, use_bn;
  396|  1.05M|    BIGNUM *bl;
  397|  1.05M|    unsigned long l;
  398|  1.05M|    const unsigned char *p;
  399|  1.05M|    char tbuf[DECIMAL_SIZE(i) + DECIMAL_SIZE(l) + 2];
  400|  1.05M|    const char *s;
  401|       |
  402|       |    /* Ensure that, at every state, |buf| is NUL-terminated. */
  403|  1.05M|    if (buf != NULL && buf_len > 0)
  ------------------
  |  Branch (403:9): [True: 1.05M, False: 0]
  |  Branch (403:24): [True: 1.05M, False: 0]
  ------------------
  404|  1.05M|        buf[0] = '\0';
  405|       |
  406|  1.05M|    if (a == NULL || a->data == NULL)
  ------------------
  |  Branch (406:9): [True: 0, False: 1.05M]
  |  Branch (406:22): [True: 2.69k, False: 1.05M]
  ------------------
  407|  2.69k|        return 0;
  408|       |
  409|  1.05M|    if (!no_name && (nid = OBJ_obj2nid(a)) != NID_undef) {
  ------------------
  |  |   18|   916k|#define NID_undef                       0
  ------------------
  |  Branch (409:9): [True: 916k, False: 138k]
  |  Branch (409:21): [True: 916k, False: 0]
  ------------------
  410|   916k|        s = OBJ_nid2ln(nid);
  411|   916k|        if (s == NULL)
  ------------------
  |  Branch (411:13): [True: 0, False: 916k]
  ------------------
  412|      0|            s = OBJ_nid2sn(nid);
  413|   916k|        if (s != NULL) {
  ------------------
  |  Branch (413:13): [True: 916k, False: 0]
  ------------------
  414|   916k|            if (buf != NULL)
  ------------------
  |  Branch (414:17): [True: 916k, False: 0]
  ------------------
  415|   916k|                OPENSSL_strlcpy(buf, s, buf_len);
  416|   916k|            return (int)strlen(s);
  417|   916k|        }
  418|   916k|    }
  419|       |
  420|   138k|    len = a->length;
  421|   138k|    p = a->data;
  422|       |
  423|   138k|    first = 1;
  424|   138k|    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|   138k|    if (len > 586)
  ------------------
  |  Branch (442:9): [True: 0, False: 138k]
  ------------------
  443|      0|        goto err;
  444|       |
  445|  1.05M|    while (len > 0) {
  ------------------
  |  Branch (445:12): [True: 920k, False: 138k]
  ------------------
  446|   920k|        l = 0;
  447|   920k|        use_bn = 0;
  448|  1.13M|        for (;;) {
  449|  1.13M|            unsigned char c = *p++;
  450|       |
  451|  1.13M|            len--;
  452|  1.13M|            if (len == 0 && (c & 0x80) != 0)
  ------------------
  |  Branch (452:17): [True: 138k, False: 998k]
  |  Branch (452:29): [True: 0, False: 138k]
  ------------------
  453|      0|                goto err;
  454|  1.13M|            if (use_bn) {
  ------------------
  |  Branch (454:17): [True: 0, False: 1.13M]
  ------------------
  455|      0|                if (!BN_add_word(bl, c & 0x7f))
  ------------------
  |  Branch (455:21): [True: 0, False: 0]
  ------------------
  456|      0|                    goto err;
  457|  1.13M|            } else {
  458|  1.13M|                l |= c & 0x7f;
  459|  1.13M|            }
  460|  1.13M|            if ((c & 0x80) == 0)
  ------------------
  |  Branch (460:17): [True: 920k, False: 217k]
  ------------------
  461|   920k|                break;
  462|   217k|            if (!use_bn && l > (ULONG_MAX >> 7L)) {
  ------------------
  |  Branch (462:17): [True: 217k, False: 0]
  |  Branch (462:28): [True: 0, False: 217k]
  ------------------
  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|   217k|            if (use_bn) {
  ------------------
  |  Branch (469:17): [True: 0, False: 217k]
  ------------------
  470|      0|                if (!BN_lshift(bl, bl, 7))
  ------------------
  |  Branch (470:21): [True: 0, False: 0]
  ------------------
  471|      0|                    goto err;
  472|   217k|            } else {
  473|   217k|                l <<= 7L;
  474|   217k|            }
  475|   217k|        }
  476|       |
  477|   920k|        if (first) {
  ------------------
  |  Branch (477:13): [True: 138k, False: 781k]
  ------------------
  478|   138k|            first = 0;
  479|   138k|            if (l >= 80) {
  ------------------
  |  Branch (479:17): [True: 54.5k, False: 84.2k]
  ------------------
  480|  54.5k|                i = 2;
  481|  54.5k|                if (use_bn) {
  ------------------
  |  Branch (481:21): [True: 0, False: 54.5k]
  ------------------
  482|      0|                    if (!BN_sub_word(bl, 80))
  ------------------
  |  Branch (482:25): [True: 0, False: 0]
  ------------------
  483|      0|                        goto err;
  484|  54.5k|                } else {
  485|  54.5k|                    l -= 80;
  486|  54.5k|                }
  487|  84.2k|            } else {
  488|  84.2k|                i = (int)(l / 40);
  489|  84.2k|                l -= (long)(i * 40);
  490|  84.2k|            }
  491|   138k|            if (buf != NULL && buf_len > 1) {
  ------------------
  |  Branch (491:17): [True: 138k, False: 0]
  |  Branch (491:32): [True: 138k, False: 0]
  ------------------
  492|   138k|                *buf++ = i + '0';
  493|   138k|                *buf = '\0';
  494|   138k|                buf_len--;
  495|   138k|            }
  496|   138k|            n++;
  497|   138k|        }
  498|       |
  499|   920k|        if (use_bn) {
  ------------------
  |  Branch (499:13): [True: 0, False: 920k]
  ------------------
  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|   920k|        } else {
  524|   920k|            BIO_snprintf(tbuf, sizeof(tbuf), ".%lu", l);
  525|   920k|            i = (int)strlen(tbuf);
  526|   920k|            if (buf && buf_len > 0) {
  ------------------
  |  Branch (526:17): [True: 920k, False: 0]
  |  Branch (526:24): [True: 920k, False: 0]
  ------------------
  527|   920k|                OPENSSL_strlcpy(buf, tbuf, buf_len);
  528|   920k|                if (i > buf_len) {
  ------------------
  |  Branch (528:21): [True: 0, False: 920k]
  ------------------
  529|      0|                    buf += buf_len;
  530|      0|                    buf_len = 0;
  531|   920k|                } else {
  532|   920k|                    buf += i;
  533|   920k|                    buf_len -= i;
  534|   920k|                }
  535|   920k|            }
  536|   920k|            n += i;
  537|   920k|            l = 0;
  538|   920k|        }
  539|   920k|    }
  540|       |
  541|   138k|    BN_free(bl);
  542|   138k|    return n;
  543|       |
  544|      0|err:
  545|      0|    BN_free(bl);
  546|      0|    return -1;
  547|   138k|}
OBJ_txt2nid:
  550|  85.0k|{
  551|  85.0k|    ASN1_OBJECT *obj = OBJ_txt2obj(s, 0);
  552|  85.0k|    int nid = NID_undef;
  ------------------
  |  |   18|  85.0k|#define NID_undef                       0
  ------------------
  553|       |
  554|  85.0k|    if (obj != NULL) {
  ------------------
  |  Branch (554:9): [True: 85.0k, False: 0]
  ------------------
  555|  85.0k|        nid = OBJ_obj2nid(obj);
  556|  85.0k|        ASN1_OBJECT_free(obj);
  557|  85.0k|    }
  558|  85.0k|    return nid;
  559|  85.0k|}
OBJ_ln2nid:
  562|   118k|{
  563|   118k|    ASN1_OBJECT o;
  564|   118k|    const ASN1_OBJECT *oo = &o;
  565|   118k|    ADDED_OBJ ad, *adp;
  566|   118k|    const unsigned int *op;
  567|   118k|    int nid = NID_undef;
  ------------------
  |  |   18|   118k|#define NID_undef                       0
  ------------------
  568|       |
  569|   118k|    o.ln = s;
  570|   118k|    op = OBJ_bsearch_ln(&oo, ln_objs, NUM_LN);
  ------------------
  |  | 4362|   118k|#define NUM_LN 1493
  ------------------
  571|   118k|    if (op != NULL)
  ------------------
  |  Branch (571:9): [True: 77.7k, False: 40.4k]
  ------------------
  572|  77.7k|        return nid_objs[*op].nid;
  573|  40.4k|    if (!ossl_obj_read_lock()) {
  ------------------
  |  Branch (573:9): [True: 0, False: 40.4k]
  ------------------
  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|  40.4k|    ad.type = ADDED_LNAME;
  ------------------
  |  |   33|  40.4k|#define ADDED_LNAME 2
  ------------------
  578|  40.4k|    ad.obj = &o;
  579|  40.4k|    adp = lh_ADDED_OBJ_retrieve(added, &ad);
  580|  40.4k|    if (adp != NULL)
  ------------------
  |  Branch (580:9): [True: 0, False: 40.4k]
  ------------------
  581|      0|        nid = adp->obj->nid;
  582|  40.4k|    ossl_obj_unlock();
  583|  40.4k|    return nid;
  584|  40.4k|}
OBJ_sn2nid:
  587|   154k|{
  588|   154k|    ASN1_OBJECT o;
  589|   154k|    const ASN1_OBJECT *oo = &o;
  590|   154k|    ADDED_OBJ ad, *adp;
  591|   154k|    const unsigned int *op;
  592|   154k|    int nid = NID_undef;
  ------------------
  |  |   18|   154k|#define NID_undef                       0
  ------------------
  593|       |
  594|   154k|    o.sn = s;
  595|   154k|    op = OBJ_bsearch_sn(&oo, sn_objs, NUM_SN);
  ------------------
  |  | 2865|   154k|#define NUM_SN 1493
  ------------------
  596|   154k|    if (op != NULL)
  ------------------
  |  Branch (596:9): [True: 42.4k, False: 111k]
  ------------------
  597|  42.4k|        return nid_objs[*op].nid;
  598|   111k|    if (!ossl_obj_read_lock()) {
  ------------------
  |  Branch (598:9): [True: 0, False: 111k]
  ------------------
  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|   111k|    ad.type = ADDED_SNAME;
  ------------------
  |  |   32|   111k|#define ADDED_SNAME 1
  ------------------
  603|   111k|    ad.obj = &o;
  604|   111k|    adp = lh_ADDED_OBJ_retrieve(added, &ad);
  605|   111k|    if (adp != NULL)
  ------------------
  |  Branch (605:9): [True: 0, False: 111k]
  ------------------
  606|      0|        nid = adp->obj->nid;
  607|   111k|    ossl_obj_unlock();
  608|   111k|    return nid;
  609|   111k|}
OBJ_bsearch_:
  613|  12.1M|{
  614|  12.1M|    return OBJ_bsearch_ex_(key, base, num, size, cmp, 0);
  615|  12.1M|}
OBJ_bsearch_ex_:
  621|  12.1M|{
  622|  12.1M|    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|  12.1M|    return p;
  645|  12.1M|}
OBJ_create:
  701|  12.1k|{
  702|  12.1k|    ASN1_OBJECT *tmpoid = NULL;
  703|  12.1k|    int ok = NID_undef;
  ------------------
  |  |   18|  12.1k|#define NID_undef                       0
  ------------------
  704|       |
  705|       |    /* With no arguments at all, nothing can be done */
  706|  12.1k|    if (oid == NULL && sn == NULL && ln == NULL) {
  ------------------
  |  Branch (706:9): [True: 0, False: 12.1k]
  |  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|  12.1k|    if ((sn != NULL && OBJ_sn2nid(sn) != NID_undef)
  ------------------
  |  |   18|  12.1k|#define NID_undef                       0
  ------------------
  |  Branch (712:10): [True: 12.1k, False: 0]
  |  Branch (712:24): [True: 3.03k, False: 9.10k]
  ------------------
  713|  9.10k|        || (ln != NULL && OBJ_ln2nid(ln) != NID_undef)) {
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (713:13): [True: 0, False: 9.10k]
  |  Branch (713:27): [True: 0, False: 0]
  ------------------
  714|  3.03k|        ERR_raise(ERR_LIB_OBJ, OBJ_R_OID_EXISTS);
  ------------------
  |  |  357|  3.03k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  3.03k|    (ERR_new(),                                                  \
  |  |  |  |  360|  3.03k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       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.03k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  3.03k|        ERR_set_error)
  |  |  ------------------
  ------------------
  715|  3.03k|        return NID_undef;
  ------------------
  |  |   18|  3.03k|#define NID_undef                       0
  ------------------
  716|  3.03k|    }
  717|       |
  718|  9.10k|    if (oid != NULL) {
  ------------------
  |  Branch (718:9): [True: 9.10k, False: 0]
  ------------------
  719|       |        /* Convert numerical OID string to an ASN1_OBJECT structure */
  720|  9.10k|        tmpoid = OBJ_txt2obj(oid, 1);
  721|  9.10k|        if (tmpoid == NULL)
  ------------------
  |  Branch (721:13): [True: 0, False: 9.10k]
  ------------------
  722|      0|            return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  723|  9.10k|    } 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|  9.10k|    if (oid != NULL
  ------------------
  |  Branch (733:9): [True: 9.10k, False: 0]
  ------------------
  734|  9.10k|        && ossl_obj_obj2nid(tmpoid) != NID_undef) {
  ------------------
  |  |   18|  9.10k|#define NID_undef                       0
  ------------------
  |  Branch (734:12): [True: 9.10k, False: 0]
  ------------------
  735|  9.10k|        ERR_raise(ERR_LIB_OBJ, OBJ_R_OID_EXISTS);
  ------------------
  |  |  357|  9.10k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  9.10k|    (ERR_new(),                                                  \
  |  |  |  |  360|  9.10k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       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.10k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  9.10k|        ERR_set_error)
  |  |  ------------------
  ------------------
  736|  9.10k|        goto err;
  737|  9.10k|    }
  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|  9.10k|err:
  749|  9.10k|    ASN1_OBJECT_free(tmpoid);
  750|  9.10k|    return ok;
  751|      0|}
OBJ_length:
  754|   136k|{
  755|   136k|    if (obj == NULL)
  ------------------
  |  Branch (755:9): [True: 0, False: 136k]
  ------------------
  756|      0|        return 0;
  757|   136k|    return obj->length;
  758|   136k|}
OBJ_get0_data:
  761|   107k|{
  762|   107k|    if (obj == NULL)
  ------------------
  |  Branch (762:9): [True: 0, False: 107k]
  ------------------
  763|      0|        return NULL;
  764|   107k|    return obj->data;
  765|   107k|}
OBJ_obj2nid:
  869|  31.1M|{
  870|  31.1M|    return ossl_obj_obj2nid(a);
  871|  31.1M|}
obj_dat.c:ossl_obj_read_lock:
  102|   385k|{
  103|   385k|    if (!ossl_init_added_api())
  ------------------
  |  Branch (103:9): [True: 0, False: 385k]
  ------------------
  104|      0|        return 0;
  105|   385k|    return CRYPTO_THREAD_read_lock(ossl_obj_lock);
  106|   385k|}
obj_dat.c:ossl_init_added_api:
   86|   385k|{
   87|   385k|#ifndef OPENSSL_NO_AUTOLOAD_CONFIG
   88|       |    /* Make sure we've loaded config before checking for any "added" objects */
   89|   385k|    OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  ------------------
  |  |  511|   385k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
   90|   385k|#endif
   91|   385k|    return RUN_ONCE(&ossl_obj_api_init, obj_api_initialise);
  ------------------
  |  |  130|   385k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 385k, False: 0]
  |  |  ------------------
  ------------------
   92|   385k|}
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|   385k|{
  129|   385k|    const ASN1_OBJECT *a;
  130|   385k|    int i;
  131|   385k|    unsigned long ret = 0;
  132|   385k|    unsigned char *p;
  133|       |
  134|   385k|    a = ca->obj;
  135|   385k|    switch (ca->type) {
  136|   233k|    case ADDED_DATA:
  ------------------
  |  |   31|   233k|#define ADDED_DATA 0
  ------------------
  |  Branch (136:5): [True: 233k, False: 152k]
  ------------------
  137|   233k|        ret = (unsigned long)a->length << 20UL;
  138|   233k|        p = (unsigned char *)a->data;
  139|  2.33M|        for (i = 0; i < a->length; i++)
  ------------------
  |  Branch (139:21): [True: 2.10M, False: 233k]
  ------------------
  140|  2.10M|            ret ^= p[i] << ((i * 3) % 24);
  141|   233k|        break;
  142|   111k|    case ADDED_SNAME:
  ------------------
  |  |   32|   111k|#define ADDED_SNAME 1
  ------------------
  |  Branch (142:5): [True: 111k, False: 274k]
  ------------------
  143|   111k|        ret = OPENSSL_LH_strhash(a->sn);
  144|   111k|        break;
  145|  40.4k|    case ADDED_LNAME:
  ------------------
  |  |   33|  40.4k|#define ADDED_LNAME 2
  ------------------
  |  Branch (145:5): [True: 40.4k, False: 345k]
  ------------------
  146|  40.4k|        ret = OPENSSL_LH_strhash(a->ln);
  147|  40.4k|        break;
  148|      0|    case ADDED_NID:
  ------------------
  |  |   34|      0|#define ADDED_NID 3
  ------------------
  |  Branch (148:5): [True: 0, False: 385k]
  ------------------
  149|      0|        ret = a->nid;
  150|      0|        break;
  151|      0|    default:
  ------------------
  |  Branch (151:5): [True: 0, False: 385k]
  ------------------
  152|       |        /* abort(); */
  153|      0|        return 0;
  154|   385k|    }
  155|   385k|    ret &= 0x3fffffffL;
  156|   385k|    ret |= ((unsigned long)ca->type) << 30L;
  157|   385k|    return ret;
  158|   385k|}
obj_dat.c:ossl_obj_unlock:
  109|   385k|{
  110|   385k|    CRYPTO_THREAD_unlock(ossl_obj_lock);
  111|   385k|}
obj_dat.c:ln_cmp:
  121|  1.17M|{
  122|  1.17M|    return strcmp((*a)->ln, nid_objs[*b].ln);
  123|  1.17M|}
obj_dat.c:sn_cmp:
  114|  1.61M|{
  115|  1.61M|    return strcmp((*a)->sn, nid_objs[*b].sn);
  116|  1.61M|}
obj_dat.c:ossl_obj_obj2nid:
  314|  31.1M|{
  315|  31.1M|    int nid = NID_undef;
  ------------------
  |  |   18|  31.1M|#define NID_undef                       0
  ------------------
  316|  31.1M|    const unsigned int *op;
  317|  31.1M|    ADDED_OBJ ad, *adp;
  318|       |
  319|  31.1M|    if (a == NULL)
  ------------------
  |  Branch (319:9): [True: 0, False: 31.1M]
  ------------------
  320|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  321|  31.1M|    if (a->nid != NID_undef)
  ------------------
  |  |   18|  31.1M|#define NID_undef                       0
  ------------------
  |  Branch (321:9): [True: 23.3M, False: 7.76M]
  ------------------
  322|  23.3M|        return a->nid;
  323|  7.76M|    if (a->length == 0)
  ------------------
  |  Branch (323:9): [True: 0, False: 7.76M]
  ------------------
  324|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  325|       |
  326|  7.76M|    op = OBJ_bsearch_obj(&a, obj_objs, NUM_OBJ);
  ------------------
  |  | 5859|  7.76M|#define NUM_OBJ 1350
  ------------------
  327|  7.76M|    if (op != NULL)
  ------------------
  |  Branch (327:9): [True: 7.53M, False: 233k]
  ------------------
  328|  7.53M|        return nid_objs[*op].nid;
  329|   233k|    if (!ossl_obj_read_lock()) {
  ------------------
  |  Branch (329:9): [True: 0, False: 233k]
  ------------------
  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|   233k|    ad.type = ADDED_DATA;
  ------------------
  |  |   31|   233k|#define ADDED_DATA 0
  ------------------
  334|   233k|    ad.obj = (ASN1_OBJECT *)a; /* casting away const is harmless here */
  335|   233k|    adp = lh_ADDED_OBJ_retrieve(added, &ad);
  336|   233k|    if (adp != NULL)
  ------------------
  |  Branch (336:9): [True: 0, False: 233k]
  ------------------
  337|      0|        nid = adp->obj->nid;
  338|   233k|    ossl_obj_unlock();
  339|   233k|    return nid;
  340|   233k|}
obj_dat.c:obj_cmp:
  298|  75.3M|{
  299|  75.3M|    int j;
  300|  75.3M|    const ASN1_OBJECT *a = *ap;
  301|  75.3M|    const ASN1_OBJECT *b = &nid_objs[*bp];
  302|       |
  303|  75.3M|    j = (a->length - b->length);
  304|  75.3M|    if (j)
  ------------------
  |  Branch (304:9): [True: 24.1M, False: 51.2M]
  ------------------
  305|  24.1M|        return j;
  306|  51.2M|    if (a->length == 0)
  ------------------
  |  Branch (306:9): [True: 0, False: 51.2M]
  ------------------
  307|      0|        return 0;
  308|  51.2M|    return memcmp(a->data, b->data, a->length);
  309|  51.2M|}

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

OBJ_dup:
   18|  3.24M|{
   19|  3.24M|    ASN1_OBJECT *r;
   20|       |
   21|  3.24M|    if (o == NULL)
  ------------------
  |  Branch (21:9): [True: 0, False: 3.24M]
  ------------------
   22|      0|        return NULL;
   23|       |    /* If object isn't dynamic it's an internal OID which is never freed */
   24|  3.24M|    if (!(o->flags & ASN1_OBJECT_FLAG_DYNAMIC))
  ------------------
  |  |  146|  3.24M|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  |  Branch (24:9): [True: 3.24M, False: 0]
  ------------------
   25|  3.24M|        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|   799k|{
  105|   799k|    return ossl_obj_find_sigid_algs(signid, pdig_nid, ppkey_nid, 1);
  106|   799k|}
OBJ_add_sigid:
  148|  12.1k|{
  149|  12.1k|    nid_triple *ntr;
  150|  12.1k|    int dnid = NID_undef, pnid = NID_undef, ret = 0;
  ------------------
  |  |   18|  12.1k|#define NID_undef                       0
  ------------------
                  int dnid = NID_undef, pnid = NID_undef, ret = 0;
  ------------------
  |  |   18|  12.1k|#define NID_undef                       0
  ------------------
  151|       |
  152|  12.1k|    if (signid == NID_undef || pkey_id == NID_undef)
  ------------------
  |  |   18|  24.2k|#define NID_undef                       0
  ------------------
                  if (signid == NID_undef || pkey_id == NID_undef)
  ------------------
  |  |   18|  12.1k|#define NID_undef                       0
  ------------------
  |  Branch (152:9): [True: 0, False: 12.1k]
  |  Branch (152:32): [True: 0, False: 12.1k]
  ------------------
  153|      0|        return 0;
  154|       |
  155|  12.1k|    if (!obj_sig_init())
  ------------------
  |  Branch (155:9): [True: 0, False: 12.1k]
  ------------------
  156|      0|        return 0;
  157|       |
  158|  12.1k|    if ((ntr = OPENSSL_malloc(sizeof(*ntr))) == NULL)
  ------------------
  |  |  107|  12.1k|    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: 12.1k]
  ------------------
  159|      0|        return 0;
  160|  12.1k|    ntr->sign_id = signid;
  161|  12.1k|    ntr->hash_id = dig_id;
  162|  12.1k|    ntr->pkey_id = pkey_id;
  163|       |
  164|  12.1k|    if (!CRYPTO_THREAD_write_lock(sig_lock)) {
  ------------------
  |  Branch (164:9): [True: 0, False: 12.1k]
  ------------------
  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|  12.1k|    if (ossl_obj_find_sigid_algs(signid, &dnid, &pnid, 0)) {
  ------------------
  |  Branch (171:9): [True: 12.1k, False: 1]
  ------------------
  172|  12.1k|        ret = dnid == dig_id && pnid == pkey_id;
  ------------------
  |  Branch (172:15): [True: 12.1k, False: 0]
  |  Branch (172:33): [True: 12.1k, False: 0]
  ------------------
  173|  12.1k|        goto err;
  174|  12.1k|    }
  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|  12.1k|err:
  204|  12.1k|    OPENSSL_free(ntr);
  ------------------
  |  |  132|  12.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__
  |  |  ------------------
  ------------------
  205|  12.1k|    CRYPTO_THREAD_unlock(sig_lock);
  206|  12.1k|    return ret;
  207|      1|}
obj_xref.c:ossl_obj_find_sigid_algs:
   68|   811k|{
   69|   811k|    nid_triple tmp;
   70|   811k|    const nid_triple *rv;
   71|   811k|    int idx;
   72|       |
   73|   811k|    if (signid == NID_undef)
  ------------------
  |  |   18|   811k|#define NID_undef                       0
  ------------------
  |  Branch (73:9): [True: 0, False: 811k]
  ------------------
   74|      0|        return 0;
   75|       |
   76|   811k|    tmp.sign_id = signid;
   77|   811k|    rv = OBJ_bsearch_sig(&tmp, sigoid_srt, OSSL_NELEM(sigoid_srt));
  ------------------
  |  |   14|   811k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   78|   811k|    if (rv == NULL) {
  ------------------
  |  Branch (78:9): [True: 3.03k, False: 808k]
  ------------------
   79|  3.03k|        if (!obj_sig_init())
  ------------------
  |  Branch (79:13): [True: 0, False: 3.03k]
  ------------------
   80|      0|            return 0;
   81|  3.03k|        if (lock && !CRYPTO_THREAD_read_lock(sig_lock)) {
  ------------------
  |  Branch (81:13): [True: 0, False: 3.03k]
  |  Branch (81:21): [True: 0, False: 0]
  ------------------
   82|      0|            ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   83|      0|            return 0;
   84|      0|        }
   85|  3.03k|        if (sig_app != NULL) {
  ------------------
  |  Branch (85:13): [True: 3.03k, False: 1]
  ------------------
   86|  3.03k|            idx = sk_nid_triple_find(sig_app, &tmp);
   87|  3.03k|            if (idx >= 0)
  ------------------
  |  Branch (87:17): [True: 3.03k, False: 0]
  ------------------
   88|  3.03k|                rv = sk_nid_triple_value(sig_app, idx);
   89|  3.03k|        }
   90|  3.03k|        if (lock)
  ------------------
  |  Branch (90:13): [True: 0, False: 3.03k]
  ------------------
   91|      0|            CRYPTO_THREAD_unlock(sig_lock);
   92|  3.03k|        if (rv == NULL)
  ------------------
  |  Branch (92:13): [True: 1, False: 3.03k]
  ------------------
   93|      1|            return 0;
   94|  3.03k|    }
   95|       |
   96|   811k|    if (pdig_nid != NULL)
  ------------------
  |  Branch (96:9): [True: 411k, False: 399k]
  ------------------
   97|   411k|        *pdig_nid = rv->hash_id;
   98|   811k|    if (ppkey_nid != NULL)
  ------------------
  |  Branch (98:9): [True: 811k, False: 0]
  ------------------
   99|   811k|        *ppkey_nid = rv->pkey_id;
  100|   811k|    return 1;
  101|   811k|}
obj_xref.c:sig_cmp:
   20|  4.06M|{
   21|  4.06M|    return a->sign_id - b->sign_id;
   22|  4.06M|}
obj_xref.c:obj_sig_init:
   62|  15.1k|{
   63|  15.1k|    return RUN_ONCE(&sig_init, o_sig_init);
  ------------------
  |  |  130|  15.1k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 15.1k, False: 0]
  |  |  ------------------
  ------------------
   64|  15.1k|}
obj_xref.c:o_sig_init:
   56|      1|{
   57|      1|    sig_lock = CRYPTO_THREAD_lock_new();
   58|       |    return sig_lock != NULL;
   59|      1|}
obj_xref.c:sig_sk_cmp:
   28|  3.03k|{
   29|  3.03k|    return (*a)->sign_id - (*b)->sign_id;
   30|  3.03k|}

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

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

ossl_param_build_set_int:
   24|   299k|{
   25|   299k|    if (bld != NULL)
  ------------------
  |  Branch (25:9): [True: 0, False: 299k]
  ------------------
   26|      0|        return OSSL_PARAM_BLD_push_int(bld, key, num);
   27|   299k|    p = OSSL_PARAM_locate(p, key);
   28|   299k|    if (p != NULL)
  ------------------
  |  Branch (28:9): [True: 0, False: 299k]
  ------------------
   29|      0|        return OSSL_PARAM_set_int(p, num);
   30|   299k|    return 1;
   31|   299k|}
ossl_param_build_set_utf8_string:
   46|   742k|{
   47|   742k|    if (bld != NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 742k]
  ------------------
   48|      0|        return OSSL_PARAM_BLD_push_utf8_string(bld, key, buf, 0);
   49|   742k|    p = OSSL_PARAM_locate(p, key);
   50|   742k|    if (p != NULL)
  ------------------
  |  Branch (50:9): [True: 0, False: 742k]
  ------------------
   51|      0|        return OSSL_PARAM_set_utf8_string(p, buf);
   52|   742k|    return 1;
   53|   742k|}
ossl_param_build_set_octet_string:
   59|  18.9k|{
   60|  18.9k|    if (bld != NULL)
  ------------------
  |  Branch (60:9): [True: 3.76k, False: 15.2k]
  ------------------
   61|  3.76k|        return OSSL_PARAM_BLD_push_octet_string(bld, key, data, data_len);
   62|       |
   63|  15.2k|    p = OSSL_PARAM_locate(p, key);
   64|  15.2k|    if (p != NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 15.2k]
  ------------------
   65|      0|        return OSSL_PARAM_set_octet_string(p, data, data_len);
   66|  15.2k|    return 1;
   67|  15.2k|}
ossl_param_build_set_bn_pad:
   71|    729|{
   72|    729|    if (bld != NULL)
  ------------------
  |  Branch (72:9): [True: 0, False: 729]
  ------------------
   73|      0|        return OSSL_PARAM_BLD_push_BN_pad(bld, key, bn, sz);
   74|    729|    p = OSSL_PARAM_locate(p, key);
   75|    729|    if (p != NULL) {
  ------------------
  |  Branch (75:9): [True: 0, False: 729]
  ------------------
   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|    729|    return 1;
   89|    729|}
ossl_param_build_set_bn:
   93|   623k|{
   94|   623k|    if (bld != NULL)
  ------------------
  |  Branch (94:9): [True: 0, False: 623k]
  ------------------
   95|      0|        return OSSL_PARAM_BLD_push_BN(bld, key, bn);
   96|       |
   97|   623k|    p = OSSL_PARAM_locate(p, key);
   98|   623k|    if (p != NULL)
  ------------------
  |  Branch (98:9): [True: 0, False: 623k]
  ------------------
   99|      0|        return OSSL_PARAM_set_BN(p, bn) > 0;
  100|   623k|    return 1;
  101|   623k|}

OSSL_PARAM_locate:
   55|  11.3M|{
   56|  11.3M|    if (ossl_likely(p != NULL && key != NULL))
  ------------------
  |  |   22|  22.7M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 11.3M, False: 23.3k]
  |  |  |  Branch (22:44): [True: 11.3M, False: 23.3k]
  |  |  |  Branch (22:44): [True: 11.3M, False: 0]
  |  |  ------------------
  ------------------
   57|  44.8M|        for (; p->key != NULL; p++)
  ------------------
  |  Branch (57:16): [True: 39.5M, False: 5.30M]
  ------------------
   58|  39.5M|            if (strcmp(key, p->key) == 0)
  ------------------
  |  Branch (58:17): [True: 6.05M, False: 33.4M]
  ------------------
   59|  6.05M|                return p;
   60|  5.33M|    return NULL;
   61|  11.3M|}
OSSL_PARAM_locate_const:
   64|  6.03M|{
   65|  6.03M|    return OSSL_PARAM_locate((OSSL_PARAM *)p, key);
   66|  6.03M|}
OSSL_PARAM_modified:
   82|  15.7k|{
   83|  15.7k|    return p != NULL && p->return_size != OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  15.7k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  |  Branch (83:12): [True: 15.7k, False: 0]
  |  Branch (83:25): [True: 10.0k, False: 5.64k]
  ------------------
   84|  15.7k|}
OSSL_PARAM_get_int:
  268|   396k|{
  269|   396k|#ifndef OPENSSL_SMALL_FOOTPRINT
  270|   396k|    switch (sizeof(int)) {
  ------------------
  |  Branch (270:13): [True: 396k, Folded]
  ------------------
  271|   396k|    case sizeof(int32_t):
  ------------------
  |  Branch (271:5): [True: 396k, False: 0]
  ------------------
  272|   396k|        return OSSL_PARAM_get_int32(p, (int32_t *)val);
  273|      0|    case sizeof(int64_t):
  ------------------
  |  Branch (273:5): [True: 0, False: 396k]
  ------------------
  274|      0|        return OSSL_PARAM_get_int64(p, (int64_t *)val);
  275|   396k|    }
  276|      0|#endif
  277|      0|    return general_get_int(p, val, sizeof(*val));
  278|   396k|}
OSSL_PARAM_set_int:
  281|  2.43M|{
  282|  2.43M|#ifndef OPENSSL_SMALL_FOOTPRINT
  283|  2.43M|    switch (sizeof(int)) {
  ------------------
  |  Branch (283:13): [True: 2.43M, Folded]
  ------------------
  284|  2.43M|    case sizeof(int32_t):
  ------------------
  |  Branch (284:5): [True: 2.43M, False: 0]
  ------------------
  285|  2.43M|        return OSSL_PARAM_set_int32(p, (int32_t)val);
  286|      0|    case sizeof(int64_t):
  ------------------
  |  Branch (286:5): [True: 0, False: 2.43M]
  ------------------
  287|      0|        return OSSL_PARAM_set_int64(p, (int64_t)val);
  288|  2.43M|    }
  289|      0|#endif
  290|      0|    return general_set_int(p, &val, sizeof(val));
  291|  2.43M|}
OSSL_PARAM_construct_int:
  294|  3.41M|{
  295|  3.41M|    return ossl_param_construct(key, OSSL_PARAM_INTEGER, buf, sizeof(int));
  ------------------
  |  |  106|  3.41M|#define OSSL_PARAM_INTEGER 1
  ------------------
  296|  3.41M|}
OSSL_PARAM_get_uint:
  299|   280k|{
  300|   280k|#ifndef OPENSSL_SMALL_FOOTPRINT
  301|   280k|    switch (sizeof(unsigned int)) {
  ------------------
  |  Branch (301:13): [True: 280k, Folded]
  ------------------
  302|   280k|    case sizeof(uint32_t):
  ------------------
  |  Branch (302:5): [True: 280k, False: 0]
  ------------------
  303|   280k|        return OSSL_PARAM_get_uint32(p, (uint32_t *)val);
  304|      0|    case sizeof(uint64_t):
  ------------------
  |  Branch (304:5): [True: 0, False: 280k]
  ------------------
  305|      0|        return OSSL_PARAM_get_uint64(p, (uint64_t *)val);
  306|   280k|    }
  307|      0|#endif
  308|      0|    return general_get_uint(p, val, sizeof(*val));
  309|   280k|}
OSSL_PARAM_set_uint:
  312|   116k|{
  313|   116k|#ifndef OPENSSL_SMALL_FOOTPRINT
  314|   116k|    switch (sizeof(unsigned int)) {
  ------------------
  |  Branch (314:13): [True: 116k, Folded]
  ------------------
  315|   116k|    case sizeof(uint32_t):
  ------------------
  |  Branch (315:5): [True: 116k, False: 0]
  ------------------
  316|   116k|        return OSSL_PARAM_set_uint32(p, (uint32_t)val);
  317|      0|    case sizeof(uint64_t):
  ------------------
  |  Branch (317:5): [True: 0, False: 116k]
  ------------------
  318|      0|        return OSSL_PARAM_set_uint64(p, (uint64_t)val);
  319|   116k|    }
  320|      0|#endif
  321|      0|    return general_set_uint(p, &val, sizeof(val));
  322|   116k|}
OSSL_PARAM_construct_uint:
  325|   124k|{
  326|   124k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|   124k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  327|   124k|        sizeof(unsigned int));
  328|   124k|}
OSSL_PARAM_get_int32:
  394|   396k|{
  395|   396k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (395:9): [True: 0, False: 396k]
  |  Branch (395:24): [True: 0, False: 396k]
  ------------------
  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|   396k|    if (p->data == NULL) {
  ------------------
  |  Branch (400:9): [True: 0, False: 396k]
  ------------------
  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|   396k|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|   396k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (405:9): [True: 389k, False: 6.94k]
  ------------------
  406|   389k|#ifndef OPENSSL_SMALL_FOOTPRINT
  407|   389k|        int64_t i64;
  408|       |
  409|   389k|        switch (p->data_size) {
  ------------------
  |  Branch (409:17): [True: 389k, False: 0]
  ------------------
  410|   389k|        case sizeof(int32_t):
  ------------------
  |  Branch (410:9): [True: 389k, False: 0]
  ------------------
  411|   389k|            *val = *(const int32_t *)p->data;
  412|   389k|            return 1;
  413|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (413:9): [True: 0, False: 389k]
  ------------------
  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|   389k|        }
  422|      0|#endif
  423|      0|        return general_get_int(p, val, sizeof(*val));
  424|       |
  425|   389k|    } else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|  6.94k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (425:16): [True: 6.94k, False: 0]
  ------------------
  426|  6.94k|#ifndef OPENSSL_SMALL_FOOTPRINT
  427|  6.94k|        uint32_t u32;
  428|  6.94k|        uint64_t u64;
  429|       |
  430|  6.94k|        switch (p->data_size) {
  ------------------
  |  Branch (430:17): [True: 6.94k, False: 0]
  ------------------
  431|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (431:9): [True: 0, False: 6.94k]
  ------------------
  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.94k|        case sizeof(uint64_t):
  ------------------
  |  Branch (439:9): [True: 6.94k, False: 0]
  ------------------
  440|  6.94k|            u64 = *(const uint64_t *)p->data;
  441|  6.94k|            if (u64 <= INT32_MAX) {
  ------------------
  |  Branch (441:17): [True: 6.94k, False: 0]
  ------------------
  442|  6.94k|                *val = (int32_t)u64;
  443|  6.94k|                return 1;
  444|  6.94k|            }
  445|      0|            err_out_of_range;
  ------------------
  |  |   26|  6.94k|    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.94k|        }
  448|      0|#endif
  449|      0|        return general_get_int(p, val, sizeof(*val));
  450|       |
  451|  6.94k|    } 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|   396k|    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|   396k|}
OSSL_PARAM_set_int32:
  474|  2.43M|{
  475|  2.43M|    if (p == NULL) {
  ------------------
  |  Branch (475:9): [True: 0, False: 2.43M]
  ------------------
  476|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|      0|        return 0;
  478|      0|    }
  479|  2.43M|    p->return_size = 0;
  480|  2.43M|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  2.43M|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (480:9): [True: 2.43M, False: 3.47k]
  ------------------
  481|  2.43M|#ifndef OPENSSL_SMALL_FOOTPRINT
  482|  2.43M|        p->return_size = sizeof(int32_t); /* Minimum expected size */
  483|  2.43M|        if (p->data == NULL)
  ------------------
  |  Branch (483:13): [True: 0, False: 2.43M]
  ------------------
  484|      0|            return 1;
  485|  2.43M|        switch (p->data_size) {
  ------------------
  |  Branch (485:17): [True: 2.43M, False: 0]
  ------------------
  486|  2.43M|        case sizeof(int32_t):
  ------------------
  |  Branch (486:9): [True: 2.43M, False: 0]
  ------------------
  487|  2.43M|            *(int32_t *)p->data = val;
  488|  2.43M|            return 1;
  489|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (489:9): [True: 0, False: 2.43M]
  ------------------
  490|      0|            p->return_size = sizeof(int64_t);
  491|      0|            *(int64_t *)p->data = (int64_t)val;
  492|      0|            return 1;
  493|  2.43M|        }
  494|      0|#endif
  495|      0|        return general_set_int(p, &val, sizeof(val));
  496|  2.43M|    } else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER && val >= 0) {
  ------------------
  |  |  107|  6.94k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (496:16): [True: 3.47k, False: 0]
  |  Branch (496:63): [True: 3.47k, False: 0]
  ------------------
  497|  3.47k|#ifndef OPENSSL_SMALL_FOOTPRINT
  498|  3.47k|        p->return_size = sizeof(uint32_t); /* Minimum expected size */
  499|  3.47k|        if (p->data == NULL)
  ------------------
  |  Branch (499:13): [True: 0, False: 3.47k]
  ------------------
  500|      0|            return 1;
  501|  3.47k|        switch (p->data_size) {
  ------------------
  |  Branch (501:17): [True: 3.47k, False: 0]
  ------------------
  502|  3.47k|        case sizeof(uint32_t):
  ------------------
  |  Branch (502:9): [True: 3.47k, False: 0]
  ------------------
  503|  3.47k|            *(uint32_t *)p->data = (uint32_t)val;
  504|  3.47k|            return 1;
  505|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (505:9): [True: 0, False: 3.47k]
  ------------------
  506|      0|            p->return_size = sizeof(uint64_t);
  507|      0|            *(uint64_t *)p->data = (uint64_t)val;
  508|      0|            return 1;
  509|  3.47k|        }
  510|      0|#endif
  511|      0|        return general_set_int(p, &val, sizeof(val));
  512|  3.47k|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (512:16): [True: 0, False: 0]
  ------------------
  513|      0|#ifndef OPENSSL_SYS_UEFI
  514|      0|        uint32_t u32;
  515|      0|        unsigned int shift;
  516|       |
  517|      0|        p->return_size = sizeof(double);
  518|      0|        if (p->data == NULL)
  ------------------
  |  Branch (518:13): [True: 0, False: 0]
  ------------------
  519|      0|            return 1;
  520|      0|        switch (p->data_size) {
  ------------------
  |  Branch (520:17): [True: 0, False: 0]
  ------------------
  521|      0|        case sizeof(double):
  ------------------
  |  Branch (521:9): [True: 0, False: 0]
  ------------------
  522|      0|            shift = real_shift();
  523|      0|            if (shift < 8 * sizeof(val) - 1) {
  ------------------
  |  Branch (523:17): [True: 0, False: 0]
  ------------------
  524|      0|                u32 = val < 0 ? -val : val;
  ------------------
  |  Branch (524:23): [True: 0, False: 0]
  ------------------
  525|      0|                if ((u32 >> shift) != 0) {
  ------------------
  |  Branch (525:21): [True: 0, False: 0]
  ------------------
  526|      0|                    err_inexact;
  ------------------
  |  |   29|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY)
  ------------------
  527|      0|                    return 0;
  528|      0|                }
  529|      0|            }
  530|      0|            *(double *)p->data = (double)val;
  531|      0|            return 1;
  532|      0|        }
  533|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  534|      0|        return 0;
  535|      0|#endif
  536|      0|    }
  537|      0|    err_bad_type;
  ------------------
  |  |   36|  2.43M|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  538|      0|    return 0;
  539|  2.43M|}
OSSL_PARAM_get_uint32:
  548|   294k|{
  549|   294k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (549:9): [True: 0, False: 294k]
  |  Branch (549:24): [True: 0, False: 294k]
  ------------------
  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|   294k|    if (p->data == NULL) {
  ------------------
  |  Branch (554:9): [True: 0, False: 294k]
  ------------------
  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|   294k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   294k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (559:9): [True: 209k, False: 84.5k]
  ------------------
  560|   209k|#ifndef OPENSSL_SMALL_FOOTPRINT
  561|   209k|        uint64_t u64;
  562|       |
  563|   209k|        switch (p->data_size) {
  ------------------
  |  Branch (563:17): [True: 209k, False: 0]
  ------------------
  564|   209k|        case sizeof(uint32_t):
  ------------------
  |  Branch (564:9): [True: 209k, False: 0]
  ------------------
  565|   209k|            *val = *(const uint32_t *)p->data;
  566|   209k|            return 1;
  567|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (567:9): [True: 0, False: 209k]
  ------------------
  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|   209k|        }
  576|      0|#endif
  577|      0|        return general_get_uint(p, val, sizeof(*val));
  578|   209k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  84.5k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (578:16): [True: 84.5k, False: 0]
  ------------------
  579|  84.5k|#ifndef OPENSSL_SMALL_FOOTPRINT
  580|  84.5k|        int32_t i32;
  581|  84.5k|        int64_t i64;
  582|       |
  583|  84.5k|        switch (p->data_size) {
  ------------------
  |  Branch (583:17): [True: 84.5k, False: 0]
  ------------------
  584|  84.5k|        case sizeof(int32_t):
  ------------------
  |  Branch (584:9): [True: 84.5k, False: 0]
  ------------------
  585|  84.5k|            i32 = *(const int32_t *)p->data;
  586|  84.5k|            if (i32 >= 0) {
  ------------------
  |  Branch (586:17): [True: 84.5k, False: 0]
  ------------------
  587|  84.5k|                *val = i32;
  588|  84.5k|                return 1;
  589|  84.5k|            }
  590|      0|            err_unsigned_negative;
  ------------------
  |  |   23|  84.5k|    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: 84.5k]
  ------------------
  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|  84.5k|        }
  604|      0|#endif
  605|      0|        return general_get_uint(p, val, sizeof(*val));
  606|  84.5k|    } 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|   294k|    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|   294k|}
OSSL_PARAM_set_uint32:
  629|   116k|{
  630|   116k|    if (p == NULL) {
  ------------------
  |  Branch (630:9): [True: 0, False: 116k]
  ------------------
  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|   116k|    p->return_size = 0;
  635|       |
  636|   116k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   116k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (636:9): [True: 116k, False: 0]
  ------------------
  637|   116k|#ifndef OPENSSL_SMALL_FOOTPRINT
  638|   116k|        p->return_size = sizeof(uint32_t); /* Minimum expected size */
  639|   116k|        if (p->data == NULL)
  ------------------
  |  Branch (639:13): [True: 0, False: 116k]
  ------------------
  640|      0|            return 1;
  641|   116k|        switch (p->data_size) {
  ------------------
  |  Branch (641:17): [True: 116k, False: 0]
  ------------------
  642|   116k|        case sizeof(uint32_t):
  ------------------
  |  Branch (642:9): [True: 116k, False: 0]
  ------------------
  643|   116k|            *(uint32_t *)p->data = val;
  644|   116k|            return 1;
  645|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (645:9): [True: 0, False: 116k]
  ------------------
  646|      0|            p->return_size = sizeof(uint64_t);
  647|      0|            *(uint64_t *)p->data = val;
  648|      0|            return 1;
  649|   116k|        }
  650|      0|#endif
  651|      0|        return general_set_uint(p, &val, sizeof(val));
  652|   116k|    } 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|   116k|    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|   116k|}
OSSL_PARAM_construct_uint32:
  700|  13.9k|{
  701|  13.9k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|  13.9k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  702|  13.9k|        sizeof(uint32_t));
  703|  13.9k|}
OSSL_PARAM_get_int64:
  706|  1.73k|{
  707|  1.73k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (707:9): [True: 0, False: 1.73k]
  |  Branch (707:24): [True: 0, False: 1.73k]
  ------------------
  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.73k|    if (p->data == NULL) {
  ------------------
  |  Branch (712:9): [True: 0, False: 1.73k]
  ------------------
  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.73k|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  1.73k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (717:9): [True: 1.73k, False: 0]
  ------------------
  718|  1.73k|#ifndef OPENSSL_SMALL_FOOTPRINT
  719|  1.73k|        switch (p->data_size) {
  ------------------
  |  Branch (719:17): [True: 1.73k, False: 0]
  ------------------
  720|      0|        case sizeof(int32_t):
  ------------------
  |  Branch (720:9): [True: 0, False: 1.73k]
  ------------------
  721|      0|            *val = *(const int32_t *)p->data;
  722|      0|            return 1;
  723|  1.73k|        case sizeof(int64_t):
  ------------------
  |  Branch (723:9): [True: 1.73k, False: 0]
  ------------------
  724|  1.73k|            *val = *(const int64_t *)p->data;
  725|  1.73k|            return 1;
  726|  1.73k|        }
  727|      0|#endif
  728|      0|        return general_get_int(p, val, sizeof(*val));
  729|  1.73k|    } 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.73k|    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.73k|}
OSSL_PARAM_get_uint64:
  861|  46.1k|{
  862|  46.1k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (862:9): [True: 0, False: 46.1k]
  |  Branch (862:24): [True: 0, False: 46.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|  46.1k|    if (p->data == NULL) {
  ------------------
  |  Branch (867:9): [True: 0, False: 46.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|  46.1k|    if (ossl_likely(p->data_type == OSSL_PARAM_UNSIGNED_INTEGER)) {
  ------------------
  |  |   22|  46.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 46.1k, False: 0]
  |  |  ------------------
  ------------------
  873|  46.1k|#ifndef OPENSSL_SMALL_FOOTPRINT
  874|  46.1k|        switch (p->data_size) {
  ------------------
  |  Branch (874:17): [True: 46.1k, False: 0]
  ------------------
  875|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (875:9): [True: 0, False: 46.1k]
  ------------------
  876|      0|            *val = *(const uint32_t *)p->data;
  877|      0|            return 1;
  878|  46.1k|        case sizeof(uint64_t):
  ------------------
  |  Branch (878:9): [True: 46.1k, False: 0]
  ------------------
  879|  46.1k|            *val = *(const uint64_t *)p->data;
  880|  46.1k|            return 1;
  881|  46.1k|        }
  882|      0|#endif
  883|      0|        return general_get_uint(p, val, sizeof(*val));
  884|  46.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|  46.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|  46.1k|}
OSSL_PARAM_set_uint64:
  939|   344k|{
  940|   344k|    if (p == NULL) {
  ------------------
  |  Branch (940:9): [True: 0, False: 344k]
  ------------------
  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|   344k|    p->return_size = 0;
  945|       |
  946|   344k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   344k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (946:9): [True: 337k, False: 7.52k]
  ------------------
  947|   337k|#ifndef OPENSSL_SMALL_FOOTPRINT
  948|   337k|        if (p->data == NULL) {
  ------------------
  |  Branch (948:13): [True: 0, False: 337k]
  ------------------
  949|      0|            p->return_size = sizeof(uint64_t); /* Expected size */
  950|      0|            return 1;
  951|      0|        }
  952|   337k|        switch (p->data_size) {
  ------------------
  |  Branch (952:17): [True: 337k, False: 0]
  ------------------
  953|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (953:9): [True: 0, False: 337k]
  ------------------
  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|   337k|        case sizeof(uint64_t):
  ------------------
  |  Branch (961:9): [True: 337k, False: 0]
  ------------------
  962|   337k|            p->return_size = sizeof(uint64_t);
  963|   337k|            *(uint64_t *)p->data = val;
  964|   337k|            return 1;
  965|   337k|        }
  966|      0|#endif
  967|      0|        return general_set_uint(p, &val, sizeof(val));
  968|   337k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  7.52k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (968:16): [True: 7.52k, False: 0]
  ------------------
  969|  7.52k|#ifndef OPENSSL_SMALL_FOOTPRINT
  970|  7.52k|        if (p->data == NULL) {
  ------------------
  |  Branch (970:13): [True: 0, False: 7.52k]
  ------------------
  971|      0|            p->return_size = sizeof(int64_t); /* Expected size */
  972|      0|            return 1;
  973|      0|        }
  974|  7.52k|        switch (p->data_size) {
  ------------------
  |  Branch (974:17): [True: 7.52k, False: 0]
  ------------------
  975|  7.52k|        case sizeof(int32_t):
  ------------------
  |  Branch (975:9): [True: 7.52k, False: 0]
  ------------------
  976|  7.52k|            if (val <= INT32_MAX) {
  ------------------
  |  Branch (976:17): [True: 7.52k, False: 0]
  ------------------
  977|  7.52k|                p->return_size = sizeof(int32_t);
  978|  7.52k|                *(int32_t *)p->data = (int32_t)val;
  979|  7.52k|                return 1;
  980|  7.52k|            }
  981|      0|            err_out_of_range;
  ------------------
  |  |   26|  7.52k|    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: 7.52k]
  ------------------
  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|  7.52k|        }
  992|      0|#endif
  993|      0|        return general_set_uint(p, &val, sizeof(val));
  994|  7.52k|    } 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|   344k|    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|   344k|}
OSSL_PARAM_construct_uint64:
 1015|  13.9k|{
 1016|  13.9k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|  13.9k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
 1017|  13.9k|        sizeof(uint64_t));
 1018|  13.9k|}
OSSL_PARAM_get_size_t:
 1021|  32.1k|{
 1022|  32.1k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1023|  32.1k|    switch (sizeof(size_t)) {
  ------------------
  |  Branch (1023:13): [True: 32.1k, Folded]
  ------------------
 1024|      0|    case sizeof(uint32_t):
  ------------------
  |  Branch (1024:5): [True: 0, False: 32.1k]
  ------------------
 1025|      0|        return OSSL_PARAM_get_uint32(p, (uint32_t *)val);
 1026|  32.1k|    case sizeof(uint64_t):
  ------------------
  |  Branch (1026:5): [True: 32.1k, False: 0]
  ------------------
 1027|  32.1k|        return OSSL_PARAM_get_uint64(p, (uint64_t *)val);
 1028|  32.1k|    }
 1029|      0|#endif
 1030|      0|    return general_get_uint(p, val, sizeof(*val));
 1031|  32.1k|}
OSSL_PARAM_set_size_t:
 1034|   344k|{
 1035|   344k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1036|   344k|    switch (sizeof(size_t)) {
  ------------------
  |  Branch (1036:13): [True: 344k, Folded]
  ------------------
 1037|      0|    case sizeof(uint32_t):
  ------------------
  |  Branch (1037:5): [True: 0, False: 344k]
  ------------------
 1038|      0|        return OSSL_PARAM_set_uint32(p, (uint32_t)val);
 1039|   344k|    case sizeof(uint64_t):
  ------------------
  |  Branch (1039:5): [True: 344k, False: 0]
  ------------------
 1040|   344k|        return OSSL_PARAM_set_uint64(p, (uint64_t)val);
 1041|   344k|    }
 1042|      0|#endif
 1043|      0|    return general_set_uint(p, &val, sizeof(val));
 1044|   344k|}
OSSL_PARAM_construct_size_t:
 1047|   369k|{
 1048|   369k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|   369k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
 1049|   369k|        sizeof(size_t));
 1050|   369k|}
OSSL_PARAM_get_time_t:
 1053|  1.73k|{
 1054|  1.73k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1055|  1.73k|    switch (sizeof(time_t)) {
  ------------------
  |  Branch (1055:13): [True: 1.73k, Folded]
  ------------------
 1056|      0|    case sizeof(int32_t):
  ------------------
  |  Branch (1056:5): [True: 0, False: 1.73k]
  ------------------
 1057|      0|        return OSSL_PARAM_get_int32(p, (int32_t *)val);
 1058|  1.73k|    case sizeof(int64_t):
  ------------------
  |  Branch (1058:5): [True: 1.73k, False: 0]
  ------------------
 1059|  1.73k|        return OSSL_PARAM_get_int64(p, (int64_t *)val);
 1060|  1.73k|    }
 1061|      0|#endif
 1062|      0|    return general_get_int(p, val, sizeof(*val));
 1063|  1.73k|}
OSSL_PARAM_construct_time_t:
 1079|  1.73k|{
 1080|  1.73k|    return ossl_param_construct(key, OSSL_PARAM_INTEGER, buf, sizeof(time_t));
  ------------------
  |  |  106|  1.73k|#define OSSL_PARAM_INTEGER 1
  ------------------
 1081|  1.73k|}
OSSL_PARAM_get_utf8_string:
 1381|   916k|{
 1382|   916k|    int ret = get_string_internal(p, (void **)val, &max_len, NULL,
 1383|   916k|        OSSL_PARAM_UTF8_STRING);
  ------------------
  |  |  117|   916k|#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|   916k|    size_t data_length = p->data_size;
 1397|       |
 1398|   916k|    if (ret == 0)
  ------------------
  |  Branch (1398:9): [True: 0, False: 916k]
  ------------------
 1399|      0|        return 0;
 1400|   916k|    if (data_length >= max_len)
  ------------------
  |  Branch (1400:9): [True: 0, False: 916k]
  ------------------
 1401|      0|        data_length = OPENSSL_strnlen(p->data, data_length);
 1402|   916k|    if (data_length >= max_len) {
  ------------------
  |  Branch (1402:9): [True: 0, False: 916k]
  ------------------
 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|   916k|    (*val)[data_length] = '\0';
 1407|       |
 1408|   916k|    return ret;
 1409|   916k|}
OSSL_PARAM_get_octet_string:
 1413|  3.76k|{
 1414|  3.76k|    return get_string_internal(p, val, &max_len, used_len,
 1415|  3.76k|        OSSL_PARAM_OCTET_STRING);
  ------------------
  |  |  123|  3.76k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1416|  3.76k|}
OSSL_PARAM_set_octet_string:
 1452|  3.81k|{
 1453|  3.81k|    if (p == NULL || val == NULL) {
  ------------------
  |  Branch (1453:9): [True: 0, False: 3.81k]
  |  Branch (1453:22): [True: 0, False: 3.81k]
  ------------------
 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|  3.81k|    p->return_size = 0;
 1458|  3.81k|    return set_string_internal(p, val, len, OSSL_PARAM_OCTET_STRING);
  ------------------
  |  |  123|  3.81k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1459|  3.81k|}
OSSL_PARAM_construct_utf8_string:
 1463|  2.29M|{
 1464|  2.29M|    if (buf != NULL && bsize == 0)
  ------------------
  |  Branch (1464:9): [True: 2.29M, False: 0]
  |  Branch (1464:24): [True: 2.29M, False: 0]
  ------------------
 1465|  2.29M|        bsize = strlen(buf);
 1466|  2.29M|    return ossl_param_construct(key, OSSL_PARAM_UTF8_STRING, buf, bsize);
  ------------------
  |  |  117|  2.29M|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
 1467|  2.29M|}
OSSL_PARAM_construct_octet_string:
 1471|   925k|{
 1472|   925k|    return ossl_param_construct(key, OSSL_PARAM_OCTET_STRING, buf, bsize);
  ------------------
  |  |  123|   925k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1473|   925k|}
OSSL_PARAM_construct_end:
 1665|  1.59M|{
 1666|  1.59M|    OSSL_PARAM end = OSSL_PARAM_END;
  ------------------
  |  |   25|  1.59M|    { NULL, 0, NULL, 0, 0 }
  ------------------
 1667|       |
 1668|  1.59M|    return end;
 1669|  1.59M|}
OSSL_PARAM_get_utf8_string_ptr:
 1694|  1.37M|{
 1695|  1.37M|    return get_string_ptr_internal(p, (const void **)val, NULL,
 1696|  1.37M|        OSSL_PARAM_UTF8_PTR,
  ------------------
  |  |  141|  1.37M|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
 1697|  1.37M|        OSSL_PARAM_UTF8_STRING);
  ------------------
  |  |  117|  1.37M|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
 1698|  1.37M|}
params.c:ossl_param_construct:
   70|  7.16M|{
   71|  7.16M|    OSSL_PARAM res;
   72|       |
   73|  7.16M|    res.key = key;
   74|  7.16M|    res.data_type = data_type;
   75|  7.16M|    res.data = data;
   76|  7.16M|    res.data_size = data_size;
   77|  7.16M|    res.return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  7.16M|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
   78|  7.16M|    return res;
   79|  7.16M|}
params.c:get_string_internal:
 1333|   920k|{
 1334|   920k|    size_t sz, alloc_sz;
 1335|       |
 1336|   920k|    if ((val == NULL && used_len == NULL) || p == NULL) {
  ------------------
  |  Branch (1336:10): [True: 0, False: 920k]
  |  Branch (1336:25): [True: 0, False: 0]
  |  Branch (1336:46): [True: 0, False: 920k]
  ------------------
 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|   920k|    if (p->data_type != type) {
  ------------------
  |  Branch (1340:9): [True: 0, False: 920k]
  ------------------
 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|   920k|    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|   920k|    alloc_sz = sz + (type == OSSL_PARAM_UTF8_STRING || sz == 0);
  ------------------
  |  |  117|  1.84M|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1350:22): [True: 916k, False: 3.76k]
  |  Branch (1350:56): [True: 0, False: 3.76k]
  ------------------
 1351|       |
 1352|   920k|    if (used_len != NULL)
  ------------------
  |  Branch (1352:9): [True: 3.76k, False: 916k]
  ------------------
 1353|  3.76k|        *used_len = sz;
 1354|       |
 1355|   920k|    if (p->data == NULL) {
  ------------------
  |  Branch (1355:9): [True: 0, False: 920k]
  ------------------
 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|   920k|    if (val == NULL)
  ------------------
  |  Branch (1360:9): [True: 0, False: 920k]
  ------------------
 1361|      0|        return 1;
 1362|       |
 1363|   920k|    if (*val == NULL) {
  ------------------
  |  Branch (1363:9): [True: 916k, False: 3.76k]
  ------------------
 1364|   916k|        char *const q = OPENSSL_malloc(alloc_sz);
  ------------------
  |  |  107|   916k|    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|   916k|        if (q == NULL)
  ------------------
  |  Branch (1366:13): [True: 0, False: 916k]
  ------------------
 1367|      0|            return 0;
 1368|   916k|        *val = q;
 1369|   916k|        *max_len = alloc_sz;
 1370|   916k|    }
 1371|       |
 1372|   920k|    if (*max_len < sz) {
  ------------------
  |  Branch (1372:9): [True: 0, False: 920k]
  ------------------
 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|   920k|    memcpy(*val, p->data, sz);
 1377|   920k|    return 1;
 1378|   920k|}
params.c:set_string_internal:
 1420|  3.81k|{
 1421|  3.81k|    if (p->data_type != type) {
  ------------------
  |  Branch (1421:9): [True: 0, False: 3.81k]
  ------------------
 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|  3.81k|    p->return_size = len;
 1426|  3.81k|    if (p->data == NULL)
  ------------------
  |  Branch (1426:9): [True: 1.90k, False: 1.90k]
  ------------------
 1427|  1.90k|        return 1;
 1428|  1.90k|    if (p->data_size < len) {
  ------------------
  |  Branch (1428:9): [True: 0, False: 1.90k]
  ------------------
 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.90k|    memcpy(p->data, val, len);
 1434|       |    /* If possible within the size of p->data, add a NUL terminator byte */
 1435|  1.90k|    if (type == OSSL_PARAM_UTF8_STRING && p->data_size > len)
  ------------------
  |  |  117|  3.81k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1435:9): [True: 0, False: 1.90k]
  |  Branch (1435:43): [True: 0, False: 0]
  ------------------
 1436|      0|        ((char *)p->data)[len] = '\0';
 1437|  1.90k|    return 1;
 1438|  1.90k|}
params.c:get_string_ptr_internal:
 1674|  1.37M|{
 1675|  1.37M|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (1675:9): [True: 0, False: 1.37M]
  |  Branch (1675:24): [True: 0, False: 1.37M]
  ------------------
 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.37M|    if (p->data_type == ref_type)
  ------------------
  |  Branch (1680:9): [True: 0, False: 1.37M]
  ------------------
 1681|      0|        return get_ptr_internal_skip_checks(p, (const void **)val, used_len);
 1682|       |
 1683|  1.37M|    if (p->data_type != type) {
  ------------------
  |  Branch (1683:9): [True: 0, False: 1.37M]
  ------------------
 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.37M|    if (used_len != NULL)
  ------------------
  |  Branch (1687:9): [True: 0, False: 1.37M]
  ------------------
 1688|      0|        *used_len = p->data_size;
 1689|  1.37M|    *val = p->data;
 1690|  1.37M|    return 1;
 1691|  1.37M|}

ossl_param_bytes_to_blocks:
   31|  8.00k|{
   32|  8.00k|    return (bytes + OSSL_PARAM_ALIGN_SIZE - 1) / OSSL_PARAM_ALIGN_SIZE;
  ------------------
  |  |   22|  8.00k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
                  return (bytes + OSSL_PARAM_ALIGN_SIZE - 1) / OSSL_PARAM_ALIGN_SIZE;
  ------------------
  |  |   22|  8.00k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
   33|  8.00k|}
ossl_param_set_secure_block:
   56|  4.00k|{
   57|  4.00k|    last->key = NULL;
   58|  4.00k|    last->data_size = secure_buffer_sz;
   59|  4.00k|    last->data = secure_buffer;
   60|  4.00k|    last->data_type = OSSL_PARAM_ALLOCATED_END;
  ------------------
  |  |   16|  4.00k|#define OSSL_PARAM_ALLOCATED_END 127
  ------------------
   61|  4.00k|}
OSSL_PARAM_free:
  234|    243|{
  235|    243|    if (params != NULL) {
  ------------------
  |  Branch (235:9): [True: 243, False: 0]
  ------------------
  236|    243|        OSSL_PARAM *p;
  237|       |
  238|    486|        for (p = params; p->key != NULL; p++)
  ------------------
  |  Branch (238:26): [True: 243, False: 243]
  ------------------
  239|    243|            ;
  240|    243|        if (p->data_type == OSSL_PARAM_ALLOCATED_END)
  ------------------
  |  |   16|    243|#define OSSL_PARAM_ALLOCATED_END 127
  ------------------
  |  Branch (240:13): [True: 243, False: 0]
  ------------------
  241|    243|            OPENSSL_secure_clear_free(p->data, p->data_size);
  ------------------
  |  |  150|    243|    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|    243|        OPENSSL_free(params);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
  243|    243|    }
  244|    243|}
OSSL_PARAM_clear_free:
  247|  3.76k|{
  248|  3.76k|    if (params != NULL) {
  ------------------
  |  Branch (248:9): [True: 3.76k, False: 0]
  ------------------
  249|  3.76k|        OSSL_PARAM *p;
  250|       |
  251|  7.52k|        for (p = params; p->key != NULL; p++)
  ------------------
  |  Branch (251:26): [True: 3.76k, False: 3.76k]
  ------------------
  252|  3.76k|            ;
  253|  3.76k|        if (p->data_type == OSSL_PARAM_ALLOCATED_END)
  ------------------
  |  |   16|  3.76k|#define OSSL_PARAM_ALLOCATED_END 127
  ------------------
  |  Branch (253:13): [True: 3.76k, False: 0]
  ------------------
  254|  3.76k|            OPENSSL_secure_clear_free(p->data, p->data_size);
  ------------------
  |  |  150|  3.76k|    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|  3.76k|        if (p->return_size > 0 && p->return_size != OSSL_PARAM_UNMODIFIED)
  ------------------
  |  |   22|  3.76k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  |  Branch (255:13): [True: 3.76k, False: 0]
  |  Branch (255:35): [True: 3.76k, False: 0]
  ------------------
  256|  3.76k|            OPENSSL_cleanse(params, p->return_size);
  257|  3.76k|        OPENSSL_free(params);
  ------------------
  |  |  132|  3.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__
  |  |  ------------------
  ------------------
  258|  3.76k|    }
  259|  3.76k|}

ossl_pw_clear_passphrase_data:
   17|   458k|{
   18|   458k|    if (data != NULL) {
  ------------------
  |  Branch (18:9): [True: 458k, False: 0]
  ------------------
   19|   458k|        if (data->type == is_expl_passphrase)
  ------------------
  |  Branch (19:13): [True: 0, False: 458k]
  ------------------
   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|   458k|                data->_.expl_passphrase.passphrase_len);
   22|   458k|        ossl_pw_clear_passphrase_cache(data);
   23|   458k|        memset(data, 0, sizeof(*data));
   24|   458k|    }
   25|   458k|}
ossl_pw_clear_passphrase_cache:
   28|   916k|{
   29|   916k|    OPENSSL_clear_free(data->cached_passphrase, data->cached_passphrase_len);
  ------------------
  |  |  130|   916k|    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|   916k|}
ossl_pw_enable_passphrase_caching:
   94|   458k|{
   95|   458k|    data->flag_cache_passphrase = 1;
   96|   458k|    return 1;
   97|   458k|}

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

PEM_X509_INFO_read_bio_ex:
   56|  3.80k|{
   57|  3.80k|    X509_INFO *xi = NULL;
   58|  3.80k|    char *name = NULL, *header = NULL, *str;
   59|  3.80k|    void *pp;
   60|  3.80k|    unsigned char *data = NULL;
   61|  3.80k|    const unsigned char *p;
   62|  3.80k|    long len, error = 0;
   63|  3.80k|    int ok = 0;
   64|  3.80k|    STACK_OF(X509_INFO) *ret = NULL;
  ------------------
  |  |   33|  3.80k|#define STACK_OF(type) struct stack_st_##type
  ------------------
   65|  3.80k|    unsigned int i, raw, ptype;
   66|  3.80k|    d2i_of_void *d2i = 0;
   67|       |
   68|  3.80k|    if (sk == NULL) {
  ------------------
  |  Branch (68:9): [True: 3.80k, False: 0]
  ------------------
   69|  3.80k|        if ((ret = sk_X509_INFO_new_null()) == NULL) {
  ------------------
  |  |  400|  3.80k|#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: 3.80k]
  ------------------
   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|  3.80k|    } else
   74|      0|        ret = sk;
   75|       |
   76|  3.80k|    if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (76:9): [True: 0, False: 3.80k]
  ------------------
   77|      0|        goto err;
   78|   462k|    for (;;) {
   79|   462k|        raw = 0;
   80|   462k|        ptype = 0;
   81|   462k|        ERR_set_mark();
   82|   462k|        i = PEM_read_bio(bp, &name, &header, &data, &len);
   83|   462k|        if (i == 0) {
  ------------------
  |  Branch (83:13): [True: 3.80k, False: 458k]
  ------------------
   84|  3.80k|            error = ERR_GET_REASON(ERR_peek_last_error());
   85|  3.80k|            if (error == PEM_R_NO_START_LINE) {
  ------------------
  |  |   44|  3.80k|#define PEM_R_NO_START_LINE 108
  ------------------
  |  Branch (85:17): [True: 3.80k, False: 0]
  ------------------
   86|  3.80k|                ERR_pop_to_mark();
   87|  3.80k|                break;
   88|  3.80k|            }
   89|      0|            ERR_clear_last_mark();
   90|      0|            goto err;
   91|  3.80k|        }
   92|   458k|        ERR_clear_last_mark();
   93|   912k|    start:
   94|   912k|        if (strcmp(name, PEM_STRING_X509) == 0
  ------------------
  |  |   36|   912k|#define PEM_STRING_X509 "CERTIFICATE"
  ------------------
  |  Branch (94:13): [True: 912k, 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|   912k|            || strcmp(name, PEM_STRING_X509_TRUSTED) == 0) {
  ------------------
  |  |   37|      0|#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
  ------------------
  |  Branch (96:16): [True: 0, False: 0]
  ------------------
   97|   912k|            if (xi->x509 != NULL) {
  ------------------
  |  Branch (97:17): [True: 454k, False: 458k]
  ------------------
   98|   454k|                if (!sk_X509_INFO_push(ret, xi))
  ------------------
  |  |  407|   454k|#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: 454k]
  ------------------
   99|      0|                    goto err;
  100|   454k|                if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (100:21): [True: 0, False: 454k]
  ------------------
  101|      0|                    goto err;
  102|   454k|                goto start;
  103|   454k|            }
  104|   458k|            if ((strcmp(name, PEM_STRING_X509_TRUSTED) == 0))
  ------------------
  |  |   37|   458k|#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
  ------------------
  |  Branch (104:17): [True: 0, False: 458k]
  ------------------
  105|      0|                d2i = (D2I_OF(void))d2i_X509_AUX;
  106|   458k|            else
  107|   458k|                d2i = (D2I_OF(void))d2i_X509;
  108|   458k|            xi->x509 = X509_new_ex(libctx, propq);
  109|   458k|            if (xi->x509 == NULL)
  ------------------
  |  Branch (109:17): [True: 0, False: 458k]
  ------------------
  110|      0|                goto err;
  111|   458k|            pp = &(xi->x509);
  112|   458k|        } 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|   458k|        if (d2i != NULL) {
  ------------------
  |  Branch (153:13): [True: 458k, False: 0]
  ------------------
  154|   458k|            if (!raw) {
  ------------------
  |  Branch (154:17): [True: 458k, False: 0]
  ------------------
  155|   458k|                EVP_CIPHER_INFO cipher;
  156|       |
  157|   458k|                if (!PEM_get_EVP_CIPHER_INFO(header, &cipher))
  ------------------
  |  Branch (157:21): [True: 0, False: 458k]
  ------------------
  158|      0|                    goto err;
  159|   458k|                if (!PEM_do_header(&cipher, data, &len, cb, u))
  ------------------
  |  Branch (159:21): [True: 0, False: 458k]
  ------------------
  160|      0|                    goto err;
  161|   458k|                p = data;
  162|   458k|                if (ptype) {
  ------------------
  |  Branch (162:21): [True: 0, False: 458k]
  ------------------
  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|   458k|                } else if (d2i(pp, &p, len) == NULL) {
  ------------------
  |  Branch (169:28): [True: 0, False: 458k]
  ------------------
  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|   458k|            } 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|   458k|        }
  181|   458k|        OPENSSL_free(name);
  ------------------
  |  |  132|   458k|    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|   458k|        name = NULL;
  183|   458k|        OPENSSL_free(header);
  ------------------
  |  |  132|   458k|    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|   458k|        header = NULL;
  185|   458k|        OPENSSL_free(data);
  ------------------
  |  |  132|   458k|    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|   458k|        data = NULL;
  187|   458k|    }
  188|       |
  189|       |    /*
  190|       |     * if the last one hasn't been pushed yet and there is anything in it
  191|       |     * then add it to the stack ...
  192|       |     */
  193|  3.80k|    if ((xi->x509 != NULL) || (xi->crl != NULL) || (xi->x_pkey != NULL) || (xi->enc_data != NULL)) {
  ------------------
  |  Branch (193:9): [True: 3.78k, False: 13]
  |  Branch (193:31): [True: 0, False: 13]
  |  Branch (193:52): [True: 0, False: 13]
  |  Branch (193:76): [True: 0, False: 13]
  ------------------
  194|  3.78k|        if (!sk_X509_INFO_push(ret, xi))
  ------------------
  |  |  407|  3.78k|#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: 3.78k]
  ------------------
  195|      0|            goto err;
  196|  3.78k|        xi = NULL;
  197|  3.78k|    }
  198|  3.80k|    ok = 1;
  199|  3.80k|err:
  200|  3.80k|    X509_INFO_free(xi);
  201|  3.80k|    if (!ok) {
  ------------------
  |  Branch (201:9): [True: 0, False: 3.80k]
  ------------------
  202|      0|        for (i = 0; ((int)i) < sk_X509_INFO_num(ret); i++) {
  ------------------
  |  |  397|      0|#define sk_X509_INFO_num(sk) OPENSSL_sk_num(ossl_check_const_X509_INFO_sk_type(sk))
  ------------------
  |  Branch (202:21): [True: 0, False: 0]
  ------------------
  203|      0|            xi = sk_X509_INFO_value(ret, i);
  ------------------
  |  |  398|      0|#define sk_X509_INFO_value(sk, idx) ((X509_INFO *)OPENSSL_sk_value(ossl_check_const_X509_INFO_sk_type(sk), (idx)))
  ------------------
  204|      0|            X509_INFO_free(xi);
  205|      0|        }
  206|      0|        if (ret != sk)
  ------------------
  |  Branch (206:13): [True: 0, False: 0]
  ------------------
  207|      0|            sk_X509_INFO_free(ret);
  ------------------
  |  |  403|      0|#define sk_X509_INFO_free(sk) OPENSSL_sk_free(ossl_check_X509_INFO_sk_type(sk))
  ------------------
  208|      0|        ret = NULL;
  209|      0|    }
  210|       |
  211|  3.80k|    OPENSSL_free(name);
  ------------------
  |  |  132|  3.80k|    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|  3.80k|    OPENSSL_free(header);
  ------------------
  |  |  132|  3.80k|    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|  3.80k|    OPENSSL_free(data);
  ------------------
  |  |  132|  3.80k|    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|  3.80k|    return ret;
  215|  3.80k|}

PEM_bytes_read_bio:
  285|  3.37k|{
  286|  3.37k|    return pem_bytes_read_bio_flags(pdata, plen, pnm, name, bp, cb, u,
  287|  3.37k|        PEM_FLAG_EAY_COMPATIBLE);
  ------------------
  |  |  383|  3.37k|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
  288|  3.37k|}
PEM_do_header:
  443|   458k|{
  444|   458k|    int ok;
  445|   458k|    int keylen;
  446|   458k|    long len = *plen;
  447|   458k|    int ilen = (int)len; /* EVP_DecryptUpdate etc. take int lengths */
  448|   458k|    EVP_CIPHER_CTX *ctx;
  449|   458k|    unsigned char key[EVP_MAX_KEY_LENGTH];
  450|   458k|    char buf[PEM_BUFSIZE];
  451|       |
  452|   458k|#if LONG_MAX > INT_MAX
  453|       |    /* Check that we did not truncate the length */
  454|   458k|    if (len > INT_MAX) {
  ------------------
  |  Branch (454:9): [True: 0, False: 458k]
  ------------------
  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|   458k|#endif
  459|       |
  460|   458k|    if (cipher->cipher == NULL)
  ------------------
  |  Branch (460:9): [True: 458k, False: 0]
  ------------------
  461|   458k|        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|   458k|{
  519|   458k|    const EVP_CIPHER *enc = NULL;
  520|   458k|    int ivlen;
  521|   458k|    char *dekinfostart, c;
  522|       |
  523|   458k|    cipher->cipher = NULL;
  524|   458k|    memset(cipher->iv, 0, sizeof(cipher->iv));
  525|   458k|    if ((header == NULL) || (*header == '\0') || (*header == '\n'))
  ------------------
  |  Branch (525:9): [True: 0, False: 458k]
  |  Branch (525:29): [True: 458k, False: 0]
  |  Branch (525:50): [True: 0, False: 0]
  ------------------
  526|   458k|        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|   465k|{
  943|   465k|    EVP_ENCODE_CTX *ctx = NULL;
  944|   465k|    const BIO_METHOD *bmeth;
  945|   465k|    BIO *headerB = NULL, *dataB = NULL;
  946|   465k|    char *name = NULL;
  947|   465k|    int len, taillen, headerlen, ret = 0;
  948|   465k|    BUF_MEM *buf_mem;
  949|       |
  950|   465k|    *len_out = 0;
  951|   465k|    *name_out = *header = NULL;
  952|   465k|    *data = NULL;
  953|   465k|    if ((flags & PEM_FLAG_EAY_COMPATIBLE) && (flags & PEM_FLAG_ONLY_B64)) {
  ------------------
  |  |  383|   465k|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
                  if ((flags & PEM_FLAG_EAY_COMPATIBLE) && (flags & PEM_FLAG_ONLY_B64)) {
  ------------------
  |  |  384|   465k|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  |  Branch (953:9): [True: 465k, False: 0]
  |  Branch (953:46): [True: 0, False: 465k]
  ------------------
  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|   465k|    bmeth = (flags & PEM_FLAG_SECURE) ? BIO_s_secmem() : BIO_s_mem();
  ------------------
  |  |  382|   465k|#define PEM_FLAG_SECURE 0x1
  ------------------
  |  Branch (958:13): [True: 0, False: 465k]
  ------------------
  959|       |
  960|   465k|    headerB = BIO_new(bmeth);
  961|   465k|    dataB = BIO_new(bmeth);
  962|   465k|    if (headerB == NULL || dataB == NULL) {
  ------------------
  |  Branch (962:9): [True: 0, False: 465k]
  |  Branch (962:28): [True: 0, False: 465k]
  ------------------
  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|   465k|    if (!get_name(bp, &name, flags))
  ------------------
  |  Branch (967:9): [True: 7.17k, False: 458k]
  ------------------
  968|  7.17k|        goto end;
  969|   458k|    if (!get_header_and_data(bp, &headerB, &dataB, name, flags))
  ------------------
  |  Branch (969:9): [True: 0, False: 458k]
  ------------------
  970|      0|        goto end;
  971|       |
  972|   458k|    BIO_get_mem_ptr(dataB, &buf_mem);
  ------------------
  |  |  627|   458k|#define BIO_get_mem_ptr(b, pp) BIO_ctrl(b, BIO_C_GET_BUF_MEM_PTR, 0, \
  |  |  ------------------
  |  |  |  |  458|   458k|#define BIO_C_GET_BUF_MEM_PTR 115
  |  |  ------------------
  |  |  628|   458k|    (char *)(pp))
  ------------------
  973|   458k|    if (buf_mem->length > INT_MAX) {
  ------------------
  |  Branch (973:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    len = (int)buf_mem->length;
  978|       |
  979|       |    /* There was no data in the PEM file */
  980|   458k|    if (len == 0)
  ------------------
  |  Branch (980:9): [True: 0, False: 458k]
  ------------------
  981|      0|        goto end;
  982|       |
  983|   458k|    ctx = EVP_ENCODE_CTX_new();
  984|   458k|    if (ctx == NULL) {
  ------------------
  |  Branch (984:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    EVP_DecodeInit(ctx);
  990|   458k|    if (EVP_DecodeUpdate(ctx, (unsigned char *)buf_mem->data, &len,
  ------------------
  |  Branch (990:9): [True: 0, False: 458k]
  ------------------
  991|   458k|            (unsigned char *)buf_mem->data, len)
  992|   458k|            < 0
  993|   458k|        || EVP_DecodeFinal(ctx, (unsigned char *)&(buf_mem->data[len]),
  ------------------
  |  Branch (993:12): [True: 0, False: 458k]
  ------------------
  994|   458k|               &taillen)
  995|   458k|            < 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|   458k|    len += taillen;
 1000|   458k|    buf_mem->length = len;
 1001|       |
 1002|   458k|    headerlen = BIO_get_mem_data(headerB, NULL);
  ------------------
  |  |  625|   458k|#define BIO_get_mem_data(b, pp) BIO_ctrl(b, BIO_CTRL_INFO, 0, (char *)(pp))
  |  |  ------------------
  |  |  |  |   92|   458k|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  |  |  ------------------
  ------------------
 1003|   458k|    *header = PEM_MALLOC(headerlen + 1, flags);
  ------------------
  |  |  231|   458k|    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|   458k|    *data = PEM_MALLOC(len, flags);
  ------------------
  |  |  231|   458k|    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|   458k|    if (*header == NULL || *data == NULL)
  ------------------
  |  Branch (1005:9): [True: 0, False: 458k]
  |  Branch (1005:28): [True: 0, False: 458k]
  ------------------
 1006|      0|        goto out_free;
 1007|   458k|    if (headerlen != 0 && BIO_read(headerB, *header, headerlen) != headerlen)
  ------------------
  |  Branch (1007:9): [True: 0, False: 458k]
  |  Branch (1007:27): [True: 0, False: 0]
  ------------------
 1008|      0|        goto out_free;
 1009|   458k|    (*header)[headerlen] = '\0';
 1010|   458k|    if (BIO_read(dataB, *data, len) != len)
  ------------------
  |  Branch (1010:9): [True: 0, False: 458k]
  ------------------
 1011|      0|        goto out_free;
 1012|   458k|    *len_out = len;
 1013|   458k|    *name_out = name;
 1014|   458k|    name = NULL;
 1015|   458k|    ret = 1;
 1016|   458k|    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|   465k|end:
 1024|   465k|    EVP_ENCODE_CTX_free(ctx);
 1025|   465k|    PEM_FREE(name, flags, 0);
  ------------------
  |  |  220|   465k|    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|   465k|    BIO_free(headerB);
 1027|   465k|    BIO_free(dataB);
 1028|   465k|    return ret;
 1029|      0|}
PEM_read_bio:
 1033|   462k|{
 1034|   462k|    return PEM_read_bio_ex(bp, name, header, data, len, PEM_FLAG_EAY_COMPATIBLE);
  ------------------
  |  |  383|   462k|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
 1035|   462k|}
pem_lib.c:pem_bytes_read_bio_flags:
  243|  3.37k|{
  244|  3.37k|    EVP_CIPHER_INFO cipher;
  245|  3.37k|    char *nm = NULL, *header = NULL;
  246|  3.37k|    unsigned char *data = NULL;
  247|  3.37k|    long len = 0;
  248|  3.37k|    int ret = 0;
  249|       |
  250|  3.37k|    do {
  251|  3.37k|        PEM_FREE(nm, flags, 0);
  ------------------
  |  |  220|  3.37k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  252|  3.37k|        PEM_FREE(header, flags, 0);
  ------------------
  |  |  220|  3.37k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  253|  3.37k|        PEM_FREE(data, flags, len);
  ------------------
  |  |  220|  3.37k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  254|  3.37k|        if (!PEM_read_bio_ex(bp, &nm, &header, &data, &len, flags)) {
  ------------------
  |  Branch (254:13): [True: 3.37k, False: 0]
  ------------------
  255|  3.37k|            if (ERR_GET_REASON(ERR_peek_error()) == PEM_R_NO_START_LINE)
  ------------------
  |  |   44|  3.37k|#define PEM_R_NO_START_LINE 108
  ------------------
  |  Branch (255:17): [True: 1.66k, False: 1.71k]
  ------------------
  256|  1.66k|                ERR_add_error_data(2, "Expecting: ", name);
  257|  3.37k|            return 0;
  258|  3.37k|        }
  259|  3.37k|    } 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|   465k|{
  773|   465k|    char *linebuf;
  774|   465k|    int ret = 0;
  775|   465k|    int len;
  776|   465k|    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|   465k|    linebuf = PEM_MALLOC(LINESIZE + 1, flags);
  ------------------
  |  |  231|   465k|    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|   465k|    if (linebuf == NULL)
  ------------------
  |  Branch (783:9): [True: 0, False: 465k]
  ------------------
  784|      0|        return 0;
  785|       |
  786|   465k|    do {
  787|   465k|        len = BIO_gets(bp, linebuf, LINESIZE);
  ------------------
  |  |  763|   465k|#define LINESIZE 255
  ------------------
  788|       |
  789|   465k|        if (len <= 0) {
  ------------------
  |  Branch (789:13): [True: 7.17k, False: 458k]
  ------------------
  790|  7.17k|            ERR_raise(ERR_LIB_PEM, PEM_R_NO_START_LINE);
  ------------------
  |  |  357|  7.17k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  7.17k|    (ERR_new(),                                                  \
  |  |  |  |  360|  7.17k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       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.17k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  7.17k|        ERR_set_error)
  |  |  ------------------
  ------------------
  791|  7.17k|            goto err;
  792|  7.17k|        }
  793|       |
  794|       |        /* Strip trailing garbage and standardize ending. */
  795|   458k|        len = sanitize_line(linebuf, len, flags & ~PEM_FLAG_ONLY_B64, first_call);
  ------------------
  |  |  384|   458k|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  796|   458k|        first_call = 0;
  797|       |
  798|       |        /* Allow leading empty or non-matching lines. */
  799|   458k|    } while (!HAS_PREFIX(linebuf, BEGINSTR)
  ------------------
  |  |   58|   916k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  ------------------
  |  Branch (799:14): [True: 0, False: 458k]
  ------------------
  800|   458k|        || len < TAILLEN
  ------------------
  |  |  770|   916k|#define TAILLEN ((int)(sizeof(TAILSTR) - 1))
  |  |  ------------------
  |  |  |  |  767|   458k|#define TAILSTR "-----\n"
  |  |  ------------------
  ------------------
  |  Branch (800:12): [True: 0, False: 458k]
  ------------------
  801|   458k|        || !HAS_PREFIX(linebuf + len - TAILLEN, TAILSTR));
  ------------------
  |  |   58|   458k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  ------------------
  |  Branch (801:12): [True: 0, False: 458k]
  ------------------
  802|   458k|    linebuf[len - TAILLEN] = '\0';
  ------------------
  |  |  770|   458k|#define TAILLEN ((int)(sizeof(TAILSTR) - 1))
  |  |  ------------------
  |  |  |  |  767|   458k|#define TAILSTR "-----\n"
  |  |  ------------------
  ------------------
  803|   458k|    len = len - BEGINLEN - TAILLEN + 1;
  ------------------
  |  |  768|   458k|#define BEGINLEN ((int)(sizeof(BEGINSTR) - 1))
  |  |  ------------------
  |  |  |  |  765|   458k|#define BEGINSTR "-----BEGIN "
  |  |  ------------------
  ------------------
                  len = len - BEGINLEN - TAILLEN + 1;
  ------------------
  |  |  770|   458k|#define TAILLEN ((int)(sizeof(TAILSTR) - 1))
  |  |  ------------------
  |  |  |  |  767|   458k|#define TAILSTR "-----\n"
  |  |  ------------------
  ------------------
  804|   458k|    *name = PEM_MALLOC(len, flags);
  ------------------
  |  |  231|   458k|    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|   458k|    if (*name == NULL)
  ------------------
  |  Branch (805:9): [True: 0, False: 458k]
  ------------------
  806|      0|        goto err;
  807|   458k|    memcpy(*name, linebuf + BEGINLEN, len);
  ------------------
  |  |  768|   458k|#define BEGINLEN ((int)(sizeof(BEGINSTR) - 1))
  |  |  ------------------
  |  |  |  |  765|   458k|#define BEGINSTR "-----BEGIN "
  |  |  ------------------
  ------------------
  808|   458k|    ret = 1;
  809|       |
  810|   465k|err:
  811|   465k|    PEM_FREE(linebuf, flags, LINESIZE + 1);
  ------------------
  |  |  220|   465k|    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|   465k|    return ret;
  813|   458k|}
pem_lib.c:sanitize_line:
  719|  11.3M|{
  720|  11.3M|    int i;
  721|  11.3M|    if (first_call) {
  ------------------
  |  Branch (721:9): [True: 458k, False: 10.9M]
  ------------------
  722|       |        /* Other BOMs imply unsupported multibyte encoding,
  723|       |         * so don't strip them and let the error raise */
  724|   458k|        const unsigned char utf8_bom[3] = { 0xEF, 0xBB, 0xBF };
  725|       |
  726|   458k|        if (len > 3 && memcmp(linebuf, utf8_bom, 3) == 0) {
  ------------------
  |  Branch (726:13): [True: 458k, False: 0]
  |  Branch (726:24): [True: 0, False: 458k]
  ------------------
  727|      0|            memmove(linebuf, linebuf + 3, len - 3);
  728|      0|            linebuf[len - 3] = 0;
  729|      0|            len -= 3;
  730|      0|        }
  731|   458k|    }
  732|       |
  733|  11.3M|    if (flags & PEM_FLAG_EAY_COMPATIBLE) {
  ------------------
  |  |  383|  11.3M|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
  |  Branch (733:9): [True: 11.3M, False: 0]
  ------------------
  734|       |        /* Strip trailing whitespace */
  735|  34.0M|        while ((len >= 0) && (linebuf[len] <= ' '))
  ------------------
  |  Branch (735:16): [True: 34.0M, False: 0]
  |  Branch (735:30): [True: 22.7M, False: 11.3M]
  ------------------
  736|  22.7M|            len--;
  737|       |        /* Go back to whitespace before applying uniform line ending. */
  738|  11.3M|        len++;
  739|  11.3M|    } 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|  11.3M|    linebuf[len++] = '\n';
  759|  11.3M|    linebuf[len] = '\0';
  760|  11.3M|    return len;
  761|  11.3M|}
pem_lib.c:get_header_and_data:
  835|   458k|{
  836|   458k|    BIO *tmp = *header;
  837|   458k|    char *linebuf, *p;
  838|   458k|    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|   458k|    enum header_status got_header = MAYBE_HEADER;
  841|   458k|    unsigned int flags_mask;
  842|   458k|    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|   458k|    linebuf = PEM_MALLOC(LINESIZE + 1, flags);
  ------------------
  |  |  231|   458k|    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|   458k|    if (linebuf == NULL)
  ------------------
  |  Branch (847:9): [True: 0, False: 458k]
  ------------------
  848|      0|        return 0;
  849|       |
  850|  10.9M|    while (1) {
  ------------------
  |  Branch (850:12): [True: 10.9M, Folded]
  ------------------
  851|  10.9M|        flags_mask = ~0u;
  852|  10.9M|        len = BIO_gets(bp, linebuf, LINESIZE);
  ------------------
  |  |  763|  10.9M|#define LINESIZE 255
  ------------------
  853|  10.9M|        if (len <= 0) {
  ------------------
  |  Branch (853:13): [True: 0, False: 10.9M]
  ------------------
  854|      0|            ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  855|      0|            goto err;
  856|      0|        }
  857|       |
  858|       |        /*
  859|       |         * Check if line has been read completely or if only part of the line
  860|       |         * has been read. Keep the previous value to ignore newlines that
  861|       |         * appear due to reading a line up until the char before the newline.
  862|       |         */
  863|  10.9M|        prev_partial_line_read = partial_line_read;
  864|  10.9M|        partial_line_read = len == LINESIZE - 1 && linebuf[LINESIZE - 2] != '\n';
  ------------------
  |  |  763|  10.9M|#define LINESIZE 255
  ------------------
                      partial_line_read = len == LINESIZE - 1 && linebuf[LINESIZE - 2] != '\n';
  ------------------
  |  |  763|      0|#define LINESIZE 255
  ------------------
  |  Branch (864:29): [True: 0, False: 10.9M]
  |  Branch (864:52): [True: 0, False: 0]
  ------------------
  865|       |
  866|  10.9M|        if (got_header == MAYBE_HEADER) {
  ------------------
  |  Branch (866:13): [True: 10.9M, False: 0]
  ------------------
  867|  10.9M|            if (memchr(linebuf, ':', len) != NULL)
  ------------------
  |  Branch (867:17): [True: 0, False: 10.9M]
  ------------------
  868|      0|                got_header = IN_HEADER;
  869|  10.9M|        }
  870|  10.9M|        if (HAS_PREFIX(linebuf, ENDSTR) || got_header == IN_HEADER)
  ------------------
  |  |   58|  21.8M|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 458k, False: 10.4M]
  |  |  ------------------
  ------------------
  |  Branch (870:44): [True: 0, False: 10.4M]
  ------------------
  871|   458k|            flags_mask &= ~PEM_FLAG_ONLY_B64;
  ------------------
  |  |  384|   458k|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  872|  10.9M|        len = sanitize_line(linebuf, len, flags & flags_mask, 0);
  873|       |
  874|       |        /* Check for end of header. */
  875|  10.9M|        if (linebuf[0] == '\n') {
  ------------------
  |  Branch (875:13): [True: 0, False: 10.9M]
  ------------------
  876|       |            /*
  877|       |             * If previous line has been read only partially this newline is a
  878|       |             * regular newline at the end of a line and not an empty line.
  879|       |             */
  880|      0|            if (!prev_partial_line_read) {
  ------------------
  |  Branch (880:17): [True: 0, False: 0]
  ------------------
  881|      0|                if (got_header == POST_HEADER) {
  ------------------
  |  Branch (881:21): [True: 0, False: 0]
  ------------------
  882|       |                    /* Another blank line is an error. */
  883|      0|                    ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  884|      0|                    goto err;
  885|      0|                }
  886|      0|                got_header = POST_HEADER;
  887|      0|                tmp = *data;
  888|      0|            }
  889|      0|            continue;
  890|      0|        }
  891|       |
  892|       |        /* Check for end of stream (which means there is no header). */
  893|  10.9M|        p = linebuf;
  894|  10.9M|        if (CHECK_AND_SKIP_PREFIX(p, ENDSTR)) {
  ------------------
  |  |   61|  10.9M|    (HAS_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   58|  10.9M|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (58:30): [True: 458k, False: 10.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (61:5): [True: 458k, False: 10.4M]
  |  |  ------------------
  ------------------
  895|   458k|            namelen = strlen(name);
  896|   458k|            if (strncmp(p, name, namelen) != 0 || !HAS_PREFIX(p + namelen, TAILSTR)) {
  ------------------
  |  |   58|   458k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  ------------------
  |  Branch (896:17): [True: 0, False: 458k]
  |  Branch (896:51): [True: 0, False: 458k]
  ------------------
  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|   458k|            if (got_header == MAYBE_HEADER) {
  ------------------
  |  Branch (900:17): [True: 458k, False: 0]
  ------------------
  901|   458k|                *header = *data;
  902|   458k|                *data = tmp;
  903|   458k|            }
  904|   458k|            break;
  905|  10.4M|        } else if (end) {
  ------------------
  |  Branch (905:20): [True: 0, False: 10.4M]
  ------------------
  906|       |            /* Malformed input; short line not at end of data. */
  907|      0|            ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  908|      0|            goto err;
  909|      0|        }
  910|       |        /*
  911|       |         * Else, a line of text -- could be header or data; we don't
  912|       |         * know yet.  Just pass it through.
  913|       |         */
  914|  10.4M|        if (BIO_puts(tmp, linebuf) < 0)
  ------------------
  |  Branch (914:13): [True: 0, False: 10.4M]
  ------------------
  915|      0|            goto err;
  916|       |        /*
  917|       |         * Only encrypted files need the line length check applied.
  918|       |         */
  919|  10.4M|        if (got_header == POST_HEADER) {
  ------------------
  |  Branch (919:13): [True: 0, False: 10.4M]
  ------------------
  920|       |            /* 65 includes the trailing newline */
  921|      0|            if (len > 65)
  ------------------
  |  Branch (921:17): [True: 0, False: 0]
  ------------------
  922|      0|                goto err;
  923|      0|            if (len < 65)
  ------------------
  |  Branch (923:17): [True: 0, False: 0]
  ------------------
  924|      0|                end = 1;
  925|      0|        }
  926|  10.4M|    }
  927|       |
  928|   458k|    ret = 1;
  929|   458k|err:
  930|   458k|    PEM_FREE(linebuf, flags, LINESIZE + 1);
  ------------------
  |  |  220|   458k|    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|   458k|    return ret;
  932|   458k|}
pem_lib.c:pem_malloc:
  234|  2.29M|{
  235|  2.29M|    return (flags & PEM_FLAG_SECURE) ? CRYPTO_secure_malloc(num, file, line)
  ------------------
  |  |  382|  2.29M|#define PEM_FLAG_SECURE 0x1
  ------------------
  |  Branch (235:12): [True: 0, False: 2.29M]
  ------------------
  236|  2.29M|                                     : CRYPTO_malloc(num, file, line);
  237|  2.29M|}
pem_lib.c:pem_free:
  223|  1.39M|{
  224|  1.39M|    if (flags & PEM_FLAG_SECURE)
  ------------------
  |  |  382|  1.39M|#define PEM_FLAG_SECURE 0x1
  ------------------
  |  Branch (224:9): [True: 0, False: 1.39M]
  ------------------
  225|      0|        CRYPTO_secure_clear_free(p, num, file, line);
  226|  1.39M|    else
  227|  1.39M|        CRYPTO_free(p, file, line);
  228|  1.39M|}

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

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

ossl_ctx_global_properties_free:
  132|    768|{
  133|    768|    OSSL_GLOBAL_PROPERTIES *globp = vglobp;
  134|       |
  135|    768|    if (globp != NULL) {
  ------------------
  |  Branch (135:9): [True: 768, False: 0]
  ------------------
  136|    768|        ossl_property_free(globp->list);
  137|    768|        OPENSSL_free(globp);
  ------------------
  |  |  132|    768|    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|    768|    }
  139|    768|}
ossl_ctx_global_properties_new:
  142|    769|{
  143|    769|    return OPENSSL_zalloc(sizeof(OSSL_GLOBAL_PROPERTIES));
  ------------------
  |  |  109|    769|    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|    769|}
ossl_ctx_global_properties:
  148|  38.4k|{
  149|  38.4k|    OSSL_GLOBAL_PROPERTIES *globp;
  150|       |
  151|  38.4k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
  152|  38.4k|    if (loadconfig && !OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL))
  ------------------
  |  |  511|      0|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  |  Branch (152:9): [True: 0, False: 38.4k]
  |  Branch (152:23): [True: 0, False: 0]
  ------------------
  153|      0|        return NULL;
  154|  38.4k|#endif
  155|  38.4k|    globp = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_GLOBAL_PROPERTIES);
  ------------------
  |  |  111|  38.4k|#define OSSL_LIB_CTX_GLOBAL_PROPERTIES 14
  ------------------
  156|       |
  157|  38.4k|    return globp != NULL ? &globp->list : NULL;
  ------------------
  |  Branch (157:12): [True: 38.4k, False: 0]
  ------------------
  158|  38.4k|}
ossl_method_store_new:
  301|  3.07k|{
  302|  3.07k|    OSSL_METHOD_STORE *res;
  303|       |
  304|  3.07k|    res = OPENSSL_zalloc(sizeof(*res));
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
  305|  3.07k|    if (res != NULL) {
  ------------------
  |  Branch (305:9): [True: 3.07k, False: 0]
  ------------------
  306|  3.07k|        res->ctx = ctx;
  307|  3.07k|        if ((res->algs = stored_algs_new()) == NULL
  ------------------
  |  Branch (307:13): [True: 0, False: 3.07k]
  ------------------
  308|  3.07k|            || (res->biglock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (308:16): [True: 0, False: 3.07k]
  ------------------
  309|      0|            ossl_method_store_free(res);
  310|      0|            return NULL;
  311|      0|        }
  312|  3.07k|    }
  313|  3.07k|    return res;
  314|  3.07k|}
ossl_method_store_free:
  317|  3.07k|{
  318|  3.07k|    if (store == NULL)
  ------------------
  |  Branch (318:9): [True: 0, False: 3.07k]
  ------------------
  319|      0|        return;
  320|       |
  321|  3.07k|    stored_algs_free(store->algs);
  322|  3.07k|    CRYPTO_THREAD_lock_free(store->biglock);
  323|  3.07k|    OPENSSL_free(store);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
  324|  3.07k|}
ossl_method_lock_store:
  327|   147k|{
  328|   147k|    return store != NULL ? CRYPTO_THREAD_write_lock(store->biglock) : 0;
  ------------------
  |  Branch (328:12): [True: 147k, False: 0]
  ------------------
  329|   147k|}
ossl_method_unlock_store:
  332|   147k|{
  333|   147k|    return store != NULL ? CRYPTO_THREAD_unlock(store->biglock) : 0;
  ------------------
  |  Branch (333:12): [True: 147k, False: 0]
  ------------------
  334|   147k|}
ossl_method_store_add:
  375|   184k|{
  376|   184k|    STORED_ALGORITHMS *sa;
  377|   184k|    ALGORITHM *alg = NULL;
  378|   184k|    IMPLEMENTATION *impl;
  379|   184k|    int ret = 0;
  380|   184k|    int i;
  381|       |
  382|   184k|    if (nid <= 0 || method == NULL || store == NULL)
  ------------------
  |  Branch (382:9): [True: 0, False: 184k]
  |  Branch (382:21): [True: 0, False: 184k]
  |  Branch (382:39): [True: 0, False: 184k]
  ------------------
  383|      0|        return 0;
  384|       |
  385|   184k|    if (properties == NULL)
  ------------------
  |  Branch (385:9): [True: 0, False: 184k]
  ------------------
  386|      0|        properties = "";
  387|       |
  388|   184k|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|   184k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   184k|    __FILE__, __LINE__)
  ------------------
  |  Branch (388:9): [True: 0, False: 184k]
  ------------------
  389|      0|        return 0;
  390|       |
  391|       |    /* Create new entry */
  392|   184k|    impl = OPENSSL_malloc(sizeof(*impl));
  ------------------
  |  |  107|   184k|    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|   184k|    if (impl == NULL)
  ------------------
  |  Branch (393:9): [True: 0, False: 184k]
  ------------------
  394|      0|        return 0;
  395|   184k|    impl->method.method = method;
  396|   184k|    impl->method.up_ref = method_up_ref;
  397|   184k|    impl->method.free = method_destruct;
  398|   184k|    if (!ossl_method_up_ref(&impl->method)) {
  ------------------
  |  Branch (398:9): [True: 0, False: 184k]
  ------------------
  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|   184k|    impl->provider = prov;
  403|       |
  404|   184k|    sa = stored_algs_shard(store, nid);
  ------------------
  |  |  124|   184k|#define stored_algs_shard(store, nid) (&(store)->algs[(nid) & (NUM_SHARDS - 1)])
  |  |  ------------------
  |  |  |  |   32|   184k|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  405|       |
  406|       |    /* Insert into the hash table if required */
  407|   184k|    if (!ossl_property_write_lock(sa)) {
  ------------------
  |  Branch (407:9): [True: 0, False: 184k]
  ------------------
  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|   184k|    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|   184k|    if ((impl->properties = ossl_prop_defn_get(store->ctx, properties)) == NULL) {
  ------------------
  |  Branch (430:9): [True: 1.23k, False: 182k]
  ------------------
  431|  1.23k|        impl->properties = ossl_parse_property(store->ctx, properties);
  432|  1.23k|        if (impl->properties == NULL)
  ------------------
  |  Branch (432:13): [True: 0, False: 1.23k]
  ------------------
  433|      0|            goto err;
  434|  1.23k|        if (!ossl_prop_defn_set(store->ctx, properties, &impl->properties)) {
  ------------------
  |  Branch (434:13): [True: 0, False: 1.23k]
  ------------------
  435|      0|            ossl_property_free(impl->properties);
  436|      0|            impl->properties = NULL;
  437|      0|            goto err;
  438|      0|        }
  439|  1.23k|    }
  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|   184k|    alg = ossl_method_store_retrieve(sa, nid);
  446|   184k|    if (alg == NULL) {
  ------------------
  |  Branch (446:9): [True: 183k, False: 592]
  ------------------
  447|   183k|        if ((alg = OPENSSL_zalloc(sizeof(*alg))) == NULL
  ------------------
  |  |  109|   183k|    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: 183k]
  ------------------
  448|   183k|            || (alg->impls = sk_IMPLEMENTATION_new_null()) == NULL
  ------------------
  |  Branch (448:16): [True: 0, False: 183k]
  ------------------
  449|   183k|            || (alg->cache = lh_QUERY_new(&query_hash, &query_cmp)) == NULL)
  ------------------
  |  Branch (449:16): [True: 0, False: 183k]
  ------------------
  450|      0|            goto err;
  451|   183k|        alg->nid = nid;
  452|   183k|        if (!ossl_method_store_insert(sa, alg))
  ------------------
  |  Branch (452:13): [True: 0, False: 183k]
  ------------------
  453|      0|            goto err;
  454|   183k|        OSSL_TRACE2(QUERY, "Inserted an alg with nid %d into the stored algorithms %p\n",
  ------------------
  |  |  293|   183k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|   183k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  455|   183k|            nid, (void *)sa);
  456|   183k|    }
  457|       |
  458|       |    /* Push onto stack if there isn't one there already */
  459|   184k|    for (i = 0; i < sk_IMPLEMENTATION_num(alg->impls); i++) {
  ------------------
  |  Branch (459:17): [True: 623, False: 184k]
  ------------------
  460|    623|        const IMPLEMENTATION *tmpimpl = sk_IMPLEMENTATION_value(alg->impls, i);
  461|       |
  462|    623|        if (tmpimpl->provider == impl->provider
  ------------------
  |  Branch (462:13): [True: 77, False: 546]
  ------------------
  463|     77|            && tmpimpl->properties == impl->properties)
  ------------------
  |  Branch (463:16): [True: 0, False: 77]
  ------------------
  464|      0|            break;
  465|    623|    }
  466|       |
  467|   184k|    if (i == sk_IMPLEMENTATION_num(alg->impls)
  ------------------
  |  Branch (467:9): [True: 184k, False: 0]
  ------------------
  468|   184k|        && sk_IMPLEMENTATION_push(alg->impls, impl)) {
  ------------------
  |  Branch (468:12): [True: 184k, False: 0]
  ------------------
  469|   184k|        ret = 1;
  470|   184k|#ifndef FIPS_MODULE
  471|   184k|        OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  219|   184k|    do {                           \
  |  |  220|   184k|        BIO *trc_out = NULL;       \
  |  |  221|   184k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 184k]
  |  |  ------------------
  ------------------
  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|   184k|        OSSL_TRACE_END(QUERY);
  ------------------
  |  |  224|   184k|    }                            \
  |  |  225|   184k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 184k]
  |  |  ------------------
  ------------------
  479|   184k|#endif
  480|   184k|    }
  481|   184k|    ossl_property_unlock(sa);
  482|   184k|    if (ret == 0)
  ------------------
  |  Branch (482:9): [True: 0, False: 184k]
  ------------------
  483|      0|        impl_free(impl);
  484|   184k|    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|   184k|}
ossl_method_store_remove_all_provided:
  600|  3.37k|{
  601|  3.37k|    struct alg_cleanup_by_provider_data_st data;
  602|       |
  603|  16.8k|    for (int k = 0; k < NUM_SHARDS; ++k) {
  ------------------
  |  |   32|  16.8k|#define NUM_SHARDS 4
  ------------------
  |  Branch (603:21): [True: 13.4k, False: 3.37k]
  ------------------
  604|  13.4k|        STORED_ALGORITHMS *sa = &store->algs[k];
  605|       |
  606|  13.4k|        if (!ossl_property_write_lock(sa))
  ------------------
  |  Branch (606:13): [True: 0, False: 13.4k]
  ------------------
  607|      0|            return 0;
  608|  13.4k|        data.prov = prov;
  609|  13.4k|        data.sa = sa;
  610|  13.4k|        ossl_sa_ALGORITHM_doall_arg(sa->algs, &alg_cleanup_by_provider, &data);
  611|  13.4k|        ossl_property_unlock(sa);
  612|  13.4k|    }
  613|  3.37k|    return 1;
  614|  3.37k|}
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|  54.0k|{
  707|  54.0k|    OSSL_PROPERTY_LIST **plp;
  708|  54.0k|    ALGORITHM *alg;
  709|  54.0k|    IMPLEMENTATION *impl, *best_impl = NULL;
  710|  54.0k|    OSSL_PROPERTY_LIST *pq = NULL, *p2 = NULL;
  711|  54.0k|    const OSSL_PROVIDER *prov = prov_rw != NULL ? *prov_rw : NULL;
  ------------------
  |  Branch (711:33): [True: 54.0k, False: 0]
  ------------------
  712|  54.0k|    int ret = 0;
  713|  54.0k|    int j, best = -1, score, optional;
  714|  54.0k|    STORED_ALGORITHMS *sa;
  715|       |
  716|  54.0k|    if (nid <= 0 || method == NULL || store == NULL)
  ------------------
  |  Branch (716:9): [True: 0, False: 54.0k]
  |  Branch (716:21): [True: 0, False: 54.0k]
  |  Branch (716:39): [True: 0, False: 54.0k]
  ------------------
  717|      0|        return 0;
  718|       |
  719|  54.0k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
  720|  54.0k|    if (ossl_lib_ctx_is_default(store->ctx)
  ------------------
  |  Branch (720:9): [True: 12.3k, False: 41.7k]
  ------------------
  721|  12.3k|        && !OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL))
  ------------------
  |  |  511|  12.3k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  |  Branch (721:12): [True: 0, False: 12.3k]
  ------------------
  722|      0|        return 0;
  723|  54.0k|#endif
  724|       |
  725|  54.0k|    sa = stored_algs_shard(store, nid);
  ------------------
  |  |  124|  54.0k|#define stored_algs_shard(store, nid) (&(store)->algs[(nid) & (NUM_SHARDS - 1)])
  |  |  ------------------
  |  |  |  |   32|  54.0k|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  726|       |
  727|       |    /* This only needs to be a read lock, because the query won't create anything */
  728|  54.0k|    if (!ossl_property_read_lock(sa))
  ------------------
  |  Branch (728:9): [True: 0, False: 54.0k]
  ------------------
  729|      0|        return 0;
  730|       |
  731|  54.0k|    OSSL_TRACE2(QUERY, "Retrieving by nid %d from stored algorithms %p\n",
  ------------------
  |  |  293|  54.0k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|  54.0k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  732|  54.0k|        nid, (void *)sa);
  733|  54.0k|    alg = ossl_method_store_retrieve(sa, nid);
  734|  54.0k|    if (alg == NULL) {
  ------------------
  |  Branch (734:9): [True: 15.6k, False: 38.4k]
  ------------------
  735|  15.6k|        ossl_property_unlock(sa);
  736|  15.6k|        OSSL_TRACE2(QUERY, "Failed to retrieve by nid %d from stored algorithms %p\n",
  ------------------
  |  |  293|  15.6k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|  15.6k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  737|  15.6k|            nid, (void *)sa);
  738|  15.6k|        return 0;
  739|  15.6k|    }
  740|  38.4k|    OSSL_TRACE2(QUERY, "Retrieved by nid %d from stored algorithms %p\n",
  ------------------
  |  |  293|  38.4k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|  38.4k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  741|  38.4k|        nid, (void *)sa);
  742|       |
  743|       |    /*
  744|       |     * If a property query string is provided, convert it to an
  745|       |     * OSSL_PROPERTY_LIST structure
  746|       |     */
  747|  38.4k|    if (prop_query != NULL)
  ------------------
  |  Branch (747:9): [True: 38.4k, False: 0]
  ------------------
  748|  38.4k|        p2 = pq = ossl_parse_query(store->ctx, prop_query, 0);
  749|       |
  750|       |    /*
  751|       |     * If the library context has default properties specified
  752|       |     * then merge those with the properties passed to this function
  753|       |     */
  754|  38.4k|    plp = ossl_ctx_global_properties(store->ctx, 0);
  755|  38.4k|    if (plp != NULL && *plp != NULL) {
  ------------------
  |  Branch (755:9): [True: 38.4k, False: 0]
  |  Branch (755:24): [True: 0, False: 38.4k]
  ------------------
  756|      0|        if (pq == NULL) {
  ------------------
  |  Branch (756:13): [True: 0, False: 0]
  ------------------
  757|      0|            pq = *plp;
  758|      0|        } else {
  759|      0|            p2 = ossl_property_merge(pq, *plp);
  760|      0|            ossl_property_free(pq);
  761|      0|            if (p2 == NULL)
  ------------------
  |  Branch (761:17): [True: 0, False: 0]
  ------------------
  762|      0|                goto fin;
  763|      0|            pq = p2;
  764|      0|        }
  765|      0|    }
  766|       |
  767|       |    /*
  768|       |     * Search for a provider that provides this implementation.
  769|       |     * If the requested provider is NULL, then any provider will do,
  770|       |     * otherwise we should try to find the one that matches the requested
  771|       |     * provider.  Note that providers are given implicit preference via the
  772|       |     * ordering of the implementation stack
  773|       |     */
  774|  38.4k|    if (pq == NULL) {
  ------------------
  |  Branch (774:9): [True: 24.1k, False: 14.3k]
  ------------------
  775|  24.1k|        for (j = 0; j < sk_IMPLEMENTATION_num(alg->impls); j++) {
  ------------------
  |  Branch (775:21): [True: 24.1k, False: 0]
  ------------------
  776|  24.1k|            impl = sk_IMPLEMENTATION_value(alg->impls, j);
  777|  24.1k|            if (impl != NULL
  ------------------
  |  Branch (777:17): [True: 24.1k, False: 0]
  ------------------
  778|  24.1k|                && (prov == NULL || impl->provider == prov)) {
  ------------------
  |  Branch (778:21): [True: 24.1k, False: 0]
  |  Branch (778:37): [True: 0, False: 0]
  ------------------
  779|  24.1k|                best_impl = impl;
  780|  24.1k|                ret = 1;
  781|  24.1k|                break;
  782|  24.1k|            }
  783|  24.1k|        }
  784|  24.1k|        goto fin;
  785|  24.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|  14.3k|    optional = ossl_property_has_optional(pq);
  793|  20.3k|    for (j = 0; j < sk_IMPLEMENTATION_num(alg->impls); j++) {
  ------------------
  |  Branch (793:17): [True: 14.3k, False: 6.07k]
  ------------------
  794|  14.3k|        impl = sk_IMPLEMENTATION_value(alg->impls, j);
  795|  14.3k|        if (impl != NULL
  ------------------
  |  Branch (795:13): [True: 14.3k, False: 0]
  ------------------
  796|  14.3k|            && (prov == NULL || impl->provider == prov)) {
  ------------------
  |  Branch (796:17): [True: 13.1k, False: 1.15k]
  |  Branch (796:33): [True: 1.15k, False: 0]
  ------------------
  797|  14.3k|            score = ossl_property_match_count(pq, impl->properties);
  798|  14.3k|            if (score > best) {
  ------------------
  |  Branch (798:17): [True: 8.52k, False: 5.79k]
  ------------------
  799|  8.52k|                best_impl = impl;
  800|  8.52k|                best = score;
  801|  8.52k|                ret = 1;
  802|  8.52k|                if (!optional)
  ------------------
  |  Branch (802:21): [True: 8.24k, False: 282]
  ------------------
  803|  8.24k|                    goto fin;
  804|  8.52k|            }
  805|  14.3k|        }
  806|  14.3k|    }
  807|  38.4k|fin:
  808|  38.4k|    if (ret && ossl_method_up_ref(&best_impl->method)) {
  ------------------
  |  Branch (808:9): [True: 32.6k, False: 5.79k]
  |  Branch (808:16): [True: 32.6k, False: 0]
  ------------------
  809|  32.6k|        *method = best_impl->method.method;
  810|  32.6k|        if (prov_rw != NULL)
  ------------------
  |  Branch (810:13): [True: 32.6k, False: 0]
  ------------------
  811|  32.6k|            *prov_rw = best_impl->provider;
  812|  32.6k|    } else {
  813|  5.79k|        ret = 0;
  814|  5.79k|    }
  815|       |
  816|  38.4k|#ifndef FIPS_MODULE
  817|  38.4k|    OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  219|  38.4k|    do {                           \
  |  |  220|  38.4k|        BIO *trc_out = NULL;       \
  |  |  221|  38.4k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 38.4k]
  |  |  ------------------
  ------------------
  818|      0|    {
  819|      0|        char buf[512];
  820|      0|        size_t size;
  821|       |
  822|      0|        size = ossl_property_list_to_string(NULL, pq, buf, 512);
  823|      0|        BIO_printf(trc_out, "method store query with properties %s "
  824|      0|                            "resolves to provider %s\n",
  825|      0|            size == 0 ? "none" : buf,
  ------------------
  |  Branch (825:13): [True: 0, False: 0]
  ------------------
  826|      0|            best_impl == NULL ? "none" : ossl_provider_name(best_impl->provider));
  ------------------
  |  Branch (826:13): [True: 0, False: 0]
  ------------------
  827|      0|    }
  828|  38.4k|    OSSL_TRACE_END(QUERY);
  ------------------
  |  |  224|  38.4k|    }                            \
  |  |  225|  38.4k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 38.4k]
  |  |  ------------------
  ------------------
  829|  38.4k|#endif
  830|       |
  831|  38.4k|    ossl_property_unlock(sa);
  832|  38.4k|    ossl_property_free(p2);
  833|  38.4k|    return ret;
  834|  14.3k|}
ossl_method_store_cache_flush_all:
  852|  3.37k|{
  853|  16.8k|    for (int i = 0; i < NUM_SHARDS; ++i) {
  ------------------
  |  |   32|  16.8k|#define NUM_SHARDS 4
  ------------------
  |  Branch (853:21): [True: 13.4k, False: 3.37k]
  ------------------
  854|  13.4k|        STORED_ALGORITHMS *sa = &store->algs[i];
  855|       |
  856|  13.4k|        if (!ossl_property_write_lock(sa))
  ------------------
  |  Branch (856:13): [True: 0, False: 13.4k]
  ------------------
  857|      0|            return 0;
  858|  13.4k|        ossl_sa_ALGORITHM_doall(sa->algs, &impl_cache_flush_alg);
  859|  13.4k|        sa->cache_nelem = 0;
  860|  13.4k|        ossl_property_unlock(sa);
  861|  13.4k|    }
  862|       |
  863|  3.37k|    return 1;
  864|  3.37k|}
ossl_method_store_cache_get:
  944|   717k|{
  945|   717k|    ALGORITHM *alg;
  946|   717k|    QUERY elem, *r;
  947|   717k|    int res = 0;
  948|   717k|    STORED_ALGORITHMS *sa;
  949|       |
  950|   717k|    if (nid <= 0 || store == NULL || prop_query == NULL)
  ------------------
  |  Branch (950:9): [True: 0, False: 717k]
  |  Branch (950:21): [True: 0, False: 717k]
  |  Branch (950:38): [True: 0, False: 717k]
  ------------------
  951|      0|        return 0;
  952|       |
  953|   717k|    sa = stored_algs_shard(store, nid);
  ------------------
  |  |  124|   717k|#define stored_algs_shard(store, nid) (&(store)->algs[(nid) & (NUM_SHARDS - 1)])
  |  |  ------------------
  |  |  |  |   32|   717k|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  954|   717k|    if (!ossl_property_read_lock(sa))
  ------------------
  |  Branch (954:9): [True: 0, False: 717k]
  ------------------
  955|      0|        return 0;
  956|   717k|    alg = ossl_method_store_retrieve(sa, nid);
  957|   717k|    if (alg == NULL)
  ------------------
  |  Branch (957:9): [True: 17.6k, False: 700k]
  ------------------
  958|  17.6k|        goto err;
  959|       |
  960|   700k|    elem.query = prop_query;
  961|   700k|    elem.provider = prov;
  962|   700k|    r = lh_QUERY_retrieve(alg->cache, &elem);
  963|   700k|    if (r == NULL)
  ------------------
  |  Branch (963:9): [True: 35.1k, False: 664k]
  ------------------
  964|  35.1k|        goto err;
  965|   664k|    if (ossl_method_up_ref(&r->method)) {
  ------------------
  |  Branch (965:9): [True: 664k, False: 0]
  ------------------
  966|   664k|        *method = r->method.method;
  967|   664k|        res = 1;
  968|   664k|    }
  969|   717k|err:
  970|   717k|    ossl_property_unlock(sa);
  971|   717k|    return res;
  972|   664k|}
ossl_method_store_cache_set:
  978|  32.6k|{
  979|  32.6k|    QUERY elem, *old, *p = NULL;
  980|  32.6k|    ALGORITHM *alg;
  981|  32.6k|    STORED_ALGORITHMS *sa;
  982|  32.6k|    size_t len;
  983|  32.6k|    int res = 1;
  984|       |
  985|  32.6k|    if (nid <= 0 || store == NULL || prop_query == NULL)
  ------------------
  |  Branch (985:9): [True: 0, False: 32.6k]
  |  Branch (985:21): [True: 0, False: 32.6k]
  |  Branch (985:38): [True: 0, False: 32.6k]
  ------------------
  986|      0|        return 0;
  987|       |
  988|  32.6k|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|  32.6k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  32.6k|    __FILE__, __LINE__)
  ------------------
  |  Branch (988:9): [True: 0, False: 32.6k]
  ------------------
  989|      0|        return 0;
  990|       |
  991|  32.6k|    sa = stored_algs_shard(store, nid);
  ------------------
  |  |  124|  32.6k|#define stored_algs_shard(store, nid) (&(store)->algs[(nid) & (NUM_SHARDS - 1)])
  |  |  ------------------
  |  |  |  |   32|  32.6k|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  992|  32.6k|    if (!ossl_property_write_lock(sa))
  ------------------
  |  Branch (992:9): [True: 0, False: 32.6k]
  ------------------
  993|      0|        return 0;
  994|  32.6k|    if (sa->cache_need_flush)
  ------------------
  |  Branch (994:9): [True: 0, False: 32.6k]
  ------------------
  995|      0|        ossl_method_cache_flush_some(sa);
  996|  32.6k|    alg = ossl_method_store_retrieve(sa, nid);
  997|  32.6k|    if (alg == NULL)
  ------------------
  |  Branch (997:9): [True: 0, False: 32.6k]
  ------------------
  998|      0|        goto err;
  999|       |
 1000|  32.6k|    if (method == NULL) {
  ------------------
  |  Branch (1000:9): [True: 0, False: 32.6k]
  ------------------
 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|  32.6k|    p = OPENSSL_malloc(sizeof(*p) + (len = strlen(prop_query)));
  ------------------
  |  |  107|  32.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__
  |  |  ------------------
  ------------------
 1010|  32.6k|    if (p != NULL) {
  ------------------
  |  Branch (1010:9): [True: 32.6k, False: 0]
  ------------------
 1011|  32.6k|        p->query = p->body;
 1012|  32.6k|        p->provider = prov;
 1013|  32.6k|        p->method.method = method;
 1014|  32.6k|        p->method.up_ref = method_up_ref;
 1015|  32.6k|        p->method.free = method_destruct;
 1016|  32.6k|        if (!ossl_method_up_ref(&p->method))
  ------------------
  |  Branch (1016:13): [True: 0, False: 32.6k]
  ------------------
 1017|      0|            goto err;
 1018|  32.6k|        memcpy((char *)p->query, prop_query, len + 1);
 1019|  32.6k|        if ((old = lh_QUERY_insert(alg->cache, p)) != NULL) {
  ------------------
  |  Branch (1019:13): [True: 0, False: 32.6k]
  ------------------
 1020|      0|            impl_cache_free(old);
 1021|      0|            goto end;
 1022|      0|        }
 1023|  32.6k|        if (!lh_QUERY_error(alg->cache)) {
  ------------------
  |  Branch (1023:13): [True: 32.6k, False: 0]
  ------------------
 1024|  32.6k|            if (++sa->cache_nelem >= IMPL_CACHE_FLUSH_THRESHOLD)
  ------------------
  |  |   44|  32.6k|#define IMPL_CACHE_FLUSH_THRESHOLD (CACHE_SIZE / NUM_SHARDS)
  |  |  ------------------
  |  |  |  |   36|  32.6k|#define CACHE_SIZE 512
  |  |  ------------------
  |  |               #define IMPL_CACHE_FLUSH_THRESHOLD (CACHE_SIZE / NUM_SHARDS)
  |  |  ------------------
  |  |  |  |   32|  32.6k|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  |  Branch (1024:17): [True: 0, False: 32.6k]
  ------------------
 1025|      0|                sa->cache_need_flush = 1;
 1026|  32.6k|            goto end;
 1027|  32.6k|        }
 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|  32.6k|end:
 1034|  32.6k|    ossl_property_unlock(sa);
 1035|  32.6k|    return res;
 1036|      0|}
property.c:stored_algs_new:
  271|  3.07k|{
  272|  3.07k|    STORED_ALGORITHMS *ret;
  273|       |
  274|  3.07k|    ret = OPENSSL_calloc(NUM_SHARDS, sizeof(STORED_ALGORITHMS));
  ------------------
  |  |  113|  3.07k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  275|  3.07k|    if (ret == NULL)
  ------------------
  |  Branch (275:9): [True: 0, False: 3.07k]
  ------------------
  276|      0|        return NULL;
  277|       |
  278|  15.3k|    for (int i = 0; i < NUM_SHARDS; ++i) {
  ------------------
  |  |   32|  15.3k|#define NUM_SHARDS 4
  ------------------
  |  Branch (278:21): [True: 12.3k, False: 3.07k]
  ------------------
  279|  12.3k|        ret[i].algs = ossl_sa_ALGORITHM_new();
  280|  12.3k|        if (ret[i].algs == NULL)
  ------------------
  |  Branch (280:13): [True: 0, False: 12.3k]
  ------------------
  281|      0|            goto err;
  282|       |
  283|  12.3k|        ret[i].lock = CRYPTO_THREAD_lock_new();
  284|  12.3k|        if (ret[i].lock == NULL)
  ------------------
  |  Branch (284:13): [True: 0, False: 12.3k]
  ------------------
  285|      0|            goto err;
  286|  12.3k|    }
  287|       |
  288|  3.07k|    return ret;
  289|       |
  290|      0|err:
  291|      0|    stored_algs_free(ret);
  292|       |
  293|       |    return NULL;
  294|  3.07k|}
property.c:stored_algs_free:
  257|  3.07k|{
  258|  3.07k|    if (sa == NULL)
  ------------------
  |  Branch (258:9): [True: 0, False: 3.07k]
  ------------------
  259|      0|        return;
  260|       |
  261|  15.3k|    for (int i = 0; i < NUM_SHARDS; ++i) {
  ------------------
  |  |   32|  15.3k|#define NUM_SHARDS 4
  ------------------
  |  Branch (261:21): [True: 12.2k, False: 3.07k]
  ------------------
  262|  12.2k|        ossl_sa_ALGORITHM_doall_arg(sa[i].algs, &alg_cleanup, &sa[i]);
  263|  12.2k|        ossl_sa_ALGORITHM_free(sa[i].algs);
  264|  12.2k|        CRYPTO_THREAD_lock_free(sa[i].lock);
  265|  12.2k|    }
  266|       |
  267|  3.07k|    OPENSSL_free(sa);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
  268|  3.07k|}
property.c:ossl_method_up_ref:
  180|   914k|{
  181|   914k|    return (*method->up_ref)(method->method);
  182|   914k|}
property.c:ossl_property_write_lock:
  195|   243k|{
  196|   243k|    return p != NULL ? CRYPTO_THREAD_write_lock(p->lock) : 0;
  ------------------
  |  Branch (196:12): [True: 243k, False: 0]
  ------------------
  197|   243k|}
property.c:impl_free:
  221|   183k|{
  222|   183k|    if (impl != NULL) {
  ------------------
  |  Branch (222:9): [True: 183k, False: 0]
  ------------------
  223|   183k|        ossl_method_free(&impl->method);
  224|   183k|        OPENSSL_free(impl);
  ------------------
  |  |  132|   183k|    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|   183k|    }
  226|   183k|}
property.c:ossl_method_store_retrieve:
  337|  1.17M|{
  338|  1.17M|    return ossl_sa_ALGORITHM_get(sa->algs, nid);
  339|  1.17M|}
property.c:query_hash:
  205|   732k|{
  206|   732k|    return OPENSSL_LH_strhash(a->query);
  207|   732k|}
property.c:query_cmp:
  210|   664k|{
  211|   664k|    int res = strcmp(a->query, b->query);
  212|       |
  213|   664k|    if (res == 0 && a->provider != NULL && b->provider != NULL)
  ------------------
  |  Branch (213:9): [True: 664k, False: 12]
  |  Branch (213:21): [True: 664k, False: 0]
  |  Branch (213:44): [True: 2.31k, False: 662k]
  ------------------
  214|  2.31k|        res = b->provider > a->provider ? 1
  ------------------
  |  Branch (214:15): [True: 0, False: 2.31k]
  ------------------
  215|  2.31k|            : b->provider < a->provider ? -1
  ------------------
  |  Branch (215:15): [True: 0, False: 2.31k]
  ------------------
  216|  2.31k|                                        : 0;
  217|   664k|    return res;
  218|   664k|}
property.c:ossl_method_store_insert:
  342|   183k|{
  343|   183k|    return ossl_sa_ALGORITHM_set(sa->algs, alg->nid, alg);
  344|   183k|}
property.c:ossl_property_unlock:
  200|  1.01M|{
  201|  1.01M|    return p != 0 ? CRYPTO_THREAD_unlock(p->lock) : 0;
  ------------------
  |  Branch (201:12): [True: 1.01M, False: 0]
  ------------------
  202|  1.01M|}
property.c:alg_cleanup:
  243|   183k|{
  244|   183k|    STORED_ALGORITHMS *sa = arg;
  245|       |
  246|   183k|    if (a != NULL) {
  ------------------
  |  Branch (246:9): [True: 183k, False: 0]
  ------------------
  247|   183k|        sk_IMPLEMENTATION_pop_free(a->impls, &impl_free);
  248|   183k|        lh_QUERY_doall(a->cache, &impl_cache_free);
  249|   183k|        lh_QUERY_free(a->cache);
  250|   183k|        OPENSSL_free(a);
  ------------------
  |  |  132|   183k|    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|   183k|    }
  252|   183k|    if (sa != NULL)
  ------------------
  |  Branch (252:9): [True: 183k, False: 0]
  ------------------
  253|   183k|        ossl_sa_ALGORITHM_set(sa->algs, idx, NULL);
  254|   183k|}
property.c:alg_cleanup_by_provider:
  554|   226k|{
  555|   226k|    struct alg_cleanup_by_provider_data_st *data = arg;
  556|   226k|    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|   452k|    for (count = 0, i = sk_IMPLEMENTATION_num(alg->impls); i-- > 0;) {
  ------------------
  |  Branch (562:60): [True: 226k, False: 226k]
  ------------------
  563|   226k|        IMPLEMENTATION *impl = sk_IMPLEMENTATION_value(alg->impls, i);
  564|       |
  565|   226k|        if (impl->provider == data->prov) {
  ------------------
  |  Branch (565:13): [True: 546, False: 226k]
  ------------------
  566|    546|#ifndef FIPS_MODULE
  567|    546|            OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  219|    546|    do {                           \
  |  |  220|    546|        BIO *trc_out = NULL;       \
  |  |  221|    546|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 546]
  |  |  ------------------
  ------------------
  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|    546|            OSSL_TRACE_END(QUERY);
  ------------------
  |  |  224|    546|    }                            \
  |  |  225|    546|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 546]
  |  |  ------------------
  ------------------
  580|    546|#endif
  581|       |
  582|    546|            (void)sk_IMPLEMENTATION_delete(alg->impls, i);
  583|    546|            count++;
  584|    546|            impl_free(impl);
  585|    546|        }
  586|   226k|    }
  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|   226k|    if (count > 0)
  ------------------
  |  Branch (594:9): [True: 546, False: 225k]
  ------------------
  595|    546|        ossl_method_cache_flush_alg(data->sa, alg);
  596|   226k|}
property.c:ossl_method_cache_flush_alg:
  838|  1.13k|{
  839|  1.13k|    sa->cache_nelem -= lh_QUERY_num_items(alg->cache);
  840|  1.13k|    impl_cache_flush_alg(0, alg);
  841|  1.13k|}
property.c:ossl_property_read_lock:
  190|   771k|{
  191|   771k|    return p != NULL ? CRYPTO_THREAD_read_lock(p->lock) : 0;
  ------------------
  |  Branch (191:12): [True: 771k, False: 0]
  ------------------
  192|   771k|}
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|   184k|{
  845|   184k|    ALGORITHM *alg = ossl_method_store_retrieve(sa, nid);
  846|       |
  847|   184k|    if (alg != NULL)
  ------------------
  |  Branch (847:9): [True: 592, False: 183k]
  ------------------
  848|    592|        ossl_method_cache_flush_alg(sa, alg);
  849|   184k|}
property.c:impl_cache_flush_alg:
  237|  1.13k|{
  238|  1.13k|    lh_QUERY_doall(alg->cache, &impl_cache_free);
  239|  1.13k|    lh_QUERY_flush(alg->cache);
  240|  1.13k|}
property.c:impl_cache_free:
  229|  32.5k|{
  230|  32.5k|    if (elem != NULL) {
  ------------------
  |  Branch (230:9): [True: 32.5k, False: 0]
  ------------------
  231|  32.5k|        ossl_method_free(&elem->method);
  232|  32.5k|        OPENSSL_free(elem);
  ------------------
  |  |  132|  32.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__
  |  |  ------------------
  ------------------
  233|  32.5k|    }
  234|  32.5k|}
property.c:ossl_method_free:
  185|   216k|{
  186|   216k|    (*method->free)(method->method);
  187|   216k|}

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.31k|{
  347|  1.31k|    OSSL_PROPERTY_DEFINITION *prop = NULL;
  348|  1.31k|    OSSL_PROPERTY_LIST *res = NULL;
  349|  1.31k|    STACK_OF(OSSL_PROPERTY_DEFINITION) *sk;
  ------------------
  |  |   33|  1.31k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  350|  1.31k|    const char *s = defn;
  351|  1.31k|    int done;
  352|       |
  353|  1.31k|    if (s == NULL || (sk = sk_OSSL_PROPERTY_DEFINITION_new(&pd_compare)) == NULL)
  ------------------
  |  Branch (353:9): [True: 0, False: 1.31k]
  |  Branch (353:22): [True: 0, False: 1.31k]
  ------------------
  354|      0|        return NULL;
  355|       |
  356|  1.31k|    s = skip_space(s);
  357|  1.31k|    done = *s == '\0';
  358|  2.88k|    while (!done) {
  ------------------
  |  Branch (358:12): [True: 1.57k, False: 1.31k]
  ------------------
  359|  1.57k|        const char *start = s;
  360|       |
  361|  1.57k|        prop = OPENSSL_malloc(sizeof(*prop));
  ------------------
  |  |  107|  1.57k|    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.57k|        if (prop == NULL)
  ------------------
  |  Branch (362:13): [True: 0, False: 1.57k]
  ------------------
  363|      0|            goto err;
  364|  1.57k|        memset(&prop->v, 0, sizeof(prop->v));
  365|  1.57k|        prop->optional = 0;
  366|  1.57k|        if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (366:13): [True: 0, False: 1.57k]
  ------------------
  367|      0|            goto err;
  368|  1.57k|        prop->oper = OSSL_PROPERTY_OPER_EQ;
  369|  1.57k|        if (prop->name_idx == 0) {
  ------------------
  |  Branch (369:13): [True: 0, False: 1.57k]
  ------------------
  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.57k|        if (match_ch(&s, '=')) {
  ------------------
  |  Branch (374:13): [True: 1.57k, False: 0]
  ------------------
  375|  1.57k|            if (!parse_value(ctx, &s, prop, 1)) {
  ------------------
  |  Branch (375:17): [True: 0, False: 1.57k]
  ------------------
  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.57k|        } 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.57k|        if (!sk_OSSL_PROPERTY_DEFINITION_push(sk, prop))
  ------------------
  |  Branch (386:13): [True: 0, False: 1.57k]
  ------------------
  387|      0|            goto err;
  388|  1.57k|        prop = NULL;
  389|  1.57k|        done = !match_ch(&s, ',');
  390|  1.57k|    }
  391|  1.31k|    if (*s != '\0') {
  ------------------
  |  Branch (391:9): [True: 0, False: 1.31k]
  ------------------
  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.31k|    res = stack_to_property_list(ctx, sk);
  397|       |
  398|  1.31k|err:
  399|  1.31k|    OPENSSL_free(prop);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
  400|  1.31k|    sk_OSSL_PROPERTY_DEFINITION_pop_free(sk, &pd_free);
  401|  1.31k|    return res;
  402|  1.31k|}
ossl_parse_query:
  406|  38.4k|{
  407|  38.4k|    STACK_OF(OSSL_PROPERTY_DEFINITION) *sk;
  ------------------
  |  |   33|  38.4k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  408|  38.4k|    OSSL_PROPERTY_LIST *res = NULL;
  409|  38.4k|    OSSL_PROPERTY_DEFINITION *prop = NULL;
  410|  38.4k|    int done;
  411|       |
  412|  38.4k|    if (s == NULL || (sk = sk_OSSL_PROPERTY_DEFINITION_new(&pd_compare)) == NULL)
  ------------------
  |  Branch (412:9): [True: 0, False: 38.4k]
  |  Branch (412:22): [True: 0, False: 38.4k]
  ------------------
  413|      0|        return NULL;
  414|       |
  415|  38.4k|    s = skip_space(s);
  416|  38.4k|    done = *s == '\0';
  417|   132k|    while (!done) {
  ------------------
  |  Branch (417:12): [True: 98.8k, False: 33.9k]
  ------------------
  418|  98.8k|        prop = OPENSSL_malloc(sizeof(*prop));
  ------------------
  |  |  107|  98.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__
  |  |  ------------------
  ------------------
  419|  98.8k|        if (prop == NULL)
  ------------------
  |  Branch (419:13): [True: 0, False: 98.8k]
  ------------------
  420|      0|            goto err;
  421|  98.8k|        memset(&prop->v, 0, sizeof(prop->v));
  422|       |
  423|  98.8k|        if (match_ch(&s, '-')) {
  ------------------
  |  Branch (423:13): [True: 935, False: 97.8k]
  ------------------
  424|    935|            prop->oper = OSSL_PROPERTY_OVERRIDE;
  425|    935|            prop->optional = 0;
  426|    935|            if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (426:17): [True: 376, False: 559]
  ------------------
  427|    376|                goto err;
  428|    559|            goto skip_value;
  429|    935|        }
  430|  97.8k|        prop->optional = match_ch(&s, '?');
  431|  97.8k|        if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (431:13): [True: 4.13k, False: 93.7k]
  ------------------
  432|  4.13k|            goto err;
  433|       |
  434|  93.7k|        if (match_ch(&s, '=')) {
  ------------------
  |  Branch (434:13): [True: 30.2k, False: 63.4k]
  ------------------
  435|  30.2k|            prop->oper = OSSL_PROPERTY_OPER_EQ;
  436|  63.4k|        } else if (MATCH(&s, "!=")) {
  ------------------
  |  |   43|  63.4k|#define MATCH(s, m) match(s, m, sizeof(m) - 1)
  |  |  ------------------
  |  |  |  Branch (43:21): [True: 1.49k, False: 61.9k]
  |  |  ------------------
  ------------------
  437|  1.49k|            prop->oper = OSSL_PROPERTY_OPER_NE;
  438|  61.9k|        } else {
  439|       |            /* A name alone is a Boolean comparison for true */
  440|  61.9k|            prop->oper = OSSL_PROPERTY_OPER_EQ;
  441|  61.9k|            prop->type = OSSL_PROPERTY_TYPE_STRING;
  442|  61.9k|            prop->v.str_val = OSSL_PROPERTY_TRUE;
  ------------------
  |  |   39|  61.9k|#define OSSL_PROPERTY_TRUE 1
  ------------------
  443|  61.9k|            goto skip_value;
  444|  61.9k|        }
  445|  31.7k|        if (!parse_value(ctx, &s, prop, create_values))
  ------------------
  |  Branch (445:13): [True: 25.8k, False: 5.86k]
  ------------------
  446|  25.8k|            prop->type = OSSL_PROPERTY_TYPE_VALUE_UNDEFINED;
  447|       |
  448|  94.3k|    skip_value:
  449|  94.3k|        if (!sk_OSSL_PROPERTY_DEFINITION_push(sk, prop))
  ------------------
  |  Branch (449:13): [True: 0, False: 94.3k]
  ------------------
  450|      0|            goto err;
  451|  94.3k|        prop = NULL;
  452|  94.3k|        done = !match_ch(&s, ',');
  453|  94.3k|    }
  454|  33.9k|    if (*s != '\0') {
  ------------------
  |  Branch (454:9): [True: 17.4k, False: 16.4k]
  ------------------
  455|  17.4k|        ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  359|  17.4k|    (ERR_new(),                                                  \
  |  |  360|  17.4k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  17.4k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  17.4k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   99|  17.4k|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   37|  17.4k|#define PROP_R_TRAILING_CHARACTERS 110
  ------------------
  456|  17.4k|            "HERE-->%s", s);
  457|  17.4k|        goto err;
  458|  17.4k|    }
  459|  16.4k|    res = stack_to_property_list(ctx, sk);
  460|       |
  461|  38.4k|err:
  462|  38.4k|    OPENSSL_free(prop);
  ------------------
  |  |  132|  38.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  463|  38.4k|    sk_OSSL_PROPERTY_DEFINITION_pop_free(sk, &pd_free);
  464|  38.4k|    return res;
  465|  16.4k|}
ossl_property_match_count:
  473|  14.3k|{
  474|  14.3k|    const OSSL_PROPERTY_DEFINITION *const q = query->properties;
  475|  14.3k|    const OSSL_PROPERTY_DEFINITION *const d = defn->properties;
  476|  14.3k|    int i = 0, j = 0, matches = 0;
  477|  14.3k|    OSSL_PROPERTY_OPER oper;
  478|       |
  479|  16.9k|    while (i < query->num_properties) {
  ------------------
  |  Branch (479:12): [True: 8.43k, False: 8.52k]
  ------------------
  480|  8.43k|        if ((oper = q[i].oper) == OSSL_PROPERTY_OVERRIDE) {
  ------------------
  |  Branch (480:13): [True: 108, False: 8.33k]
  ------------------
  481|    108|            i++;
  482|    108|            continue;
  483|    108|        }
  484|  8.33k|        if (j < defn->num_properties) {
  ------------------
  |  Branch (484:13): [True: 6.50k, False: 1.82k]
  ------------------
  485|  6.50k|            if (q[i].name_idx > d[j].name_idx) { /* skip defn, not in query */
  ------------------
  |  Branch (485:17): [True: 1.36k, False: 5.14k]
  ------------------
  486|  1.36k|                j++;
  487|  1.36k|                continue;
  488|  1.36k|            }
  489|  5.14k|            if (q[i].name_idx == d[j].name_idx) { /* both in defn and query */
  ------------------
  |  Branch (489:17): [True: 108, False: 5.04k]
  ------------------
  490|    108|                const int eq = q[i].type == d[j].type
  ------------------
  |  Branch (490:32): [True: 61, False: 47]
  ------------------
  491|     61|                    && memcmp(&q[i].v, &d[j].v, sizeof(q[i].v)) == 0;
  ------------------
  |  Branch (491:24): [True: 0, False: 61]
  ------------------
  492|       |
  493|    108|                if ((eq && oper == OSSL_PROPERTY_OPER_EQ)
  ------------------
  |  Branch (493:22): [True: 0, False: 108]
  |  Branch (493:28): [True: 0, False: 0]
  ------------------
  494|    108|                    || (!eq && oper == OSSL_PROPERTY_OPER_NE))
  ------------------
  |  Branch (494:25): [True: 108, False: 0]
  |  Branch (494:32): [True: 47, False: 61]
  ------------------
  495|     47|                    matches++;
  496|     61|                else if (!q[i].optional)
  ------------------
  |  Branch (496:26): [True: 61, False: 0]
  ------------------
  497|     61|                    return -1;
  498|     47|                i++;
  499|     47|                j++;
  500|     47|                continue;
  501|    108|            }
  502|  5.14k|        }
  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|  6.86k|        if (q[i].type == OSSL_PROPERTY_TYPE_VALUE_UNDEFINED) {
  ------------------
  |  Branch (509:13): [True: 1.44k, False: 5.42k]
  ------------------
  510|  1.44k|            if (oper == OSSL_PROPERTY_OPER_NE)
  ------------------
  |  Branch (510:17): [True: 94, False: 1.34k]
  ------------------
  511|     94|                matches++;
  512|  1.34k|            else if (!q[i].optional)
  ------------------
  |  Branch (512:22): [True: 1.15k, False: 188]
  ------------------
  513|  1.15k|                return -1;
  514|  5.42k|        } else if (q[i].type != OSSL_PROPERTY_TYPE_STRING
  ------------------
  |  Branch (514:20): [True: 2.15k, False: 3.26k]
  ------------------
  515|  3.26k|            || (oper == OSSL_PROPERTY_OPER_EQ
  ------------------
  |  Branch (515:17): [True: 3.21k, False: 47]
  ------------------
  516|  3.21k|                && q[i].v.str_val != OSSL_PROPERTY_FALSE)
  ------------------
  |  |   40|  3.21k|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (516:20): [True: 3.21k, False: 0]
  ------------------
  517|     47|            || (oper == OSSL_PROPERTY_OPER_NE
  ------------------
  |  Branch (517:17): [True: 47, False: 0]
  ------------------
  518|  5.37k|                && q[i].v.str_val == OSSL_PROPERTY_FALSE)) {
  ------------------
  |  |   40|     47|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (518:20): [True: 0, False: 47]
  ------------------
  519|  5.37k|            if (!q[i].optional)
  ------------------
  |  Branch (519:17): [True: 4.57k, False: 798]
  ------------------
  520|  4.57k|                return -1;
  521|  5.37k|        } else {
  522|     47|            matches++;
  523|     47|        }
  524|  1.12k|        i++;
  525|  1.12k|    }
  526|  8.52k|    return matches;
  527|  14.3k|}
ossl_property_free:
  530|  40.4k|{
  531|  40.4k|    OPENSSL_free(p);
  ------------------
  |  |  132|  40.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  532|  40.4k|}
ossl_property_parse_init:
  575|    769|{
  576|    769|    static const char *const predefined_names[] = {
  577|    769|        "provider", /* Name of provider (default, legacy, fips) */
  578|    769|        "version", /* Version number of this provider */
  579|    769|        "fips", /* FIPS validated or FIPS supporting algorithm */
  580|    769|        "output", /* Output type for encoders */
  581|    769|        "input", /* Input type for decoders */
  582|    769|        "structure", /* Structure name for encoders and decoders */
  583|    769|    };
  584|    769|    size_t i;
  585|       |
  586|  5.38k|    for (i = 0; i < OSSL_NELEM(predefined_names); i++)
  ------------------
  |  |   14|  5.38k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (586:17): [True: 4.61k, False: 769]
  ------------------
  587|  4.61k|        if (ossl_property_name(ctx, predefined_names[i], 1) == 0)
  ------------------
  |  Branch (587:13): [True: 0, False: 4.61k]
  ------------------
  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|    769|    if ((ossl_property_value(ctx, "yes", 1) != OSSL_PROPERTY_TRUE)
  ------------------
  |  |   39|    769|#define OSSL_PROPERTY_TRUE 1
  ------------------
  |  Branch (595:9): [True: 0, False: 769]
  ------------------
  596|    769|        || (ossl_property_value(ctx, "no", 1) != OSSL_PROPERTY_FALSE))
  ------------------
  |  |   40|    769|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (596:12): [True: 0, False: 769]
  ------------------
  597|      0|        goto err;
  598|       |
  599|    769|    return 1;
  600|      0|err:
  601|      0|    return 0;
  602|    769|}
property_parse.c:pd_compare:
  289|   121k|{
  290|   121k|    const OSSL_PROPERTY_DEFINITION *pd1 = *p1;
  291|   121k|    const OSSL_PROPERTY_DEFINITION *pd2 = *p2;
  292|       |
  293|   121k|    if (pd1->name_idx < pd2->name_idx)
  ------------------
  |  Branch (293:9): [True: 53.1k, False: 67.9k]
  ------------------
  294|  53.1k|        return -1;
  295|  67.9k|    if (pd1->name_idx > pd2->name_idx)
  ------------------
  |  Branch (295:9): [True: 24.3k, False: 43.6k]
  ------------------
  296|  24.3k|        return 1;
  297|  43.6k|    return 0;
  298|  67.9k|}
property_parse.c:skip_space:
   26|   261k|{
   27|   412k|    while (ossl_isspace(*s))
  ------------------
  |  |   82|   412k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|   412k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 151k, False: 261k]
  |  |  ------------------
  ------------------
   28|   151k|        s++;
   29|   261k|    return s;
   30|   261k|}
property_parse.c:parse_name:
   58|   100k|{
   59|   100k|    char name[100];
   60|   100k|    int err = 0;
   61|   100k|    size_t i = 0;
   62|   100k|    const char *s = *t;
   63|   100k|    int user_name = 0;
   64|       |
   65|   140k|    for (;;) {
   66|   140k|        if (!ossl_isalpha(*s)) {
  ------------------
  |  |   71|   140k|#define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha))
  |  |  ------------------
  |  |  |  |   40|   140k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   140k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|   140k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (66:13): [True: 3.80k, False: 136k]
  ------------------
   67|  3.80k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |  359|  3.80k|    (ERR_new(),                                                  \
  |  |  360|  3.80k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       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.80k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  3.80k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |   99|  3.80k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |   30|  3.80k|#define PROP_R_NOT_AN_IDENTIFIER 103
  ------------------
   68|  3.80k|                "HERE-->%s", *t);
   69|  3.80k|            return 0;
   70|  3.80k|        }
   71|   430k|        do {
   72|   430k|            if (i < sizeof(name) - 1)
  ------------------
  |  Branch (72:17): [True: 384k, False: 45.9k]
  ------------------
   73|   384k|                name[i++] = ossl_tolower(*s);
   74|  45.9k|            else
   75|  45.9k|                err = 1;
   76|   430k|        } while (*++s == '_' || ossl_isalnum(*s));
  ------------------
  |  |   70|   416k|#define ossl_isalnum(c) (ossl_ctype_check((c), CTYPE_MASK_alnum))
  |  |  ------------------
  |  |  |  |   41|   416k|#define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit)
  |  |  |  |  ------------------
  |  |  |  |  |  |   40|   416k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   27|   416k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|   416k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit)
  |  |  |  |  ------------------
  |  |  |  |  |  |   29|   416k|#define CTYPE_MASK_digit 0x4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (70:25): [True: 280k, False: 136k]
  |  |  ------------------
  ------------------
  |  Branch (76:18): [True: 13.7k, False: 416k]
  ------------------
   77|   136k|        if (*s != '.')
  ------------------
  |  Branch (77:13): [True: 96.5k, False: 39.6k]
  ------------------
   78|  96.5k|            break;
   79|  39.6k|        user_name = 1;
   80|  39.6k|        if (i < sizeof(name) - 1)
  ------------------
  |  Branch (80:13): [True: 38.2k, False: 1.41k]
  ------------------
   81|  38.2k|            name[i++] = *s;
   82|  1.41k|        else
   83|  1.41k|            err = 1;
   84|  39.6k|        s++;
   85|  39.6k|    }
   86|  96.5k|    name[i] = '\0';
   87|  96.5k|    if (err) {
  ------------------
  |  Branch (87:9): [True: 705, False: 95.8k]
  ------------------
   88|    705|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  359|    705|    (ERR_new(),                                                  \
  |  |  360|    705|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    705|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    705|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   99|    705|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   27|    705|#define PROP_R_NAME_TOO_LONG 100
  ------------------
   89|    705|        return 0;
   90|    705|    }
   91|  95.8k|    *t = skip_space(s);
   92|  95.8k|    *idx = ossl_property_name(ctx, name, user_name && create);
  ------------------
  |  Branch (92:42): [True: 32.3k, False: 63.5k]
  |  Branch (92:55): [True: 32.3k, False: 0]
  ------------------
   93|  95.8k|    return 1;
   94|  96.5k|}
property_parse.c:match_ch:
   33|   387k|{
   34|   387k|    const char *s = *t;
   35|       |
   36|   387k|    if (*s == m) {
  ------------------
  |  Branch (36:9): [True: 108k, False: 279k]
  ------------------
   37|   108k|        *t = skip_space(s + 1);
   38|   108k|        return 1;
   39|   108k|    }
   40|   279k|    return 0;
   41|   387k|}
property_parse.c:parse_value:
  258|  33.3k|{
  259|  33.3k|    const char *s = *t;
  260|  33.3k|    int r = 0;
  261|       |
  262|  33.3k|    if (*s == '"' || *s == '\'') {
  ------------------
  |  Branch (262:9): [True: 705, False: 32.6k]
  |  Branch (262:22): [True: 883, False: 31.7k]
  ------------------
  263|  1.58k|        s++;
  264|  1.58k|        r = parse_string(ctx, &s, s[-1], res, create);
  265|  31.7k|    } else if (*s == '+') {
  ------------------
  |  Branch (265:16): [True: 108, False: 31.6k]
  ------------------
  266|    108|        s++;
  267|    108|        r = parse_number(&s, res);
  268|  31.6k|    } else if (*s == '-') {
  ------------------
  |  Branch (268:16): [True: 507, False: 31.1k]
  ------------------
  269|    507|        s++;
  270|    507|        r = parse_number(&s, res);
  271|    507|        res->v.int_val = -res->v.int_val;
  272|  31.1k|    } else if (*s == '0' && s[1] == 'x') {
  ------------------
  |  Branch (272:16): [True: 11.1k, False: 19.9k]
  |  Branch (272:29): [True: 4.60k, False: 6.58k]
  ------------------
  273|  4.60k|        s += 2;
  274|  4.60k|        r = parse_hex(&s, res);
  275|  26.5k|    } else if (*s == '0' && ossl_isdigit(s[1])) {
  ------------------
  |  Branch (275:16): [True: 6.58k, False: 19.9k]
  |  Branch (275:29): [True: 5.16k, False: 1.42k]
  ------------------
  276|  5.16k|        s++;
  277|  5.16k|        r = parse_oct(&s, res);
  278|  21.3k|    } else if (ossl_isdigit(*s)) {
  ------------------
  |  Branch (278:16): [True: 5.40k, False: 15.9k]
  ------------------
  279|  5.40k|        return parse_number(t, res);
  280|  15.9k|    } else if (ossl_isalpha(*s))
  ------------------
  |  |   71|  15.9k|#define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha))
  |  |  ------------------
  |  |  |  |   40|  15.9k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  15.9k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  15.9k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (71:25): [True: 10.4k, False: 5.49k]
  |  |  ------------------
  ------------------
  281|  10.4k|        return parse_unquoted(ctx, t, res, create);
  282|  17.4k|    if (r)
  ------------------
  |  Branch (282:9): [True: 3.84k, False: 13.6k]
  ------------------
  283|  3.84k|        *t = s;
  284|  17.4k|    return r;
  285|  33.3k|}
property_parse.c:parse_string:
  195|  1.58k|{
  196|  1.58k|    char v[1000];
  197|  1.58k|    const char *s = *t;
  198|  1.58k|    size_t i = 0;
  199|  1.58k|    int err = 0;
  200|       |
  201|   382k|    while (*s != '\0' && *s != delim) {
  ------------------
  |  Branch (201:12): [True: 382k, False: 517]
  |  Branch (201:26): [True: 381k, False: 1.07k]
  ------------------
  202|   381k|        if (i < sizeof(v) - 1)
  ------------------
  |  Branch (202:13): [True: 379k, False: 2.11k]
  ------------------
  203|   379k|            v[i++] = *s;
  204|  2.11k|        else
  205|  2.11k|            err = 1;
  206|   381k|        s++;
  207|   381k|    }
  208|  1.58k|    if (*s == '\0') {
  ------------------
  |  Branch (208:9): [True: 517, False: 1.07k]
  ------------------
  209|    517|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |  359|    517|    (ERR_new(),                                                  \
  |  |  360|    517|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    517|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    517|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |   99|    517|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |   33|    517|#define PROP_R_NO_MATCHING_STRING_DELIMITER 106
  ------------------
  210|    517|            "HERE-->%c%s", delim, *t);
  211|    517|        return 0;
  212|    517|    }
  213|  1.07k|    v[i] = '\0';
  214|  1.07k|    if (err) {
  ------------------
  |  Branch (214:9): [True: 94, False: 977]
  ------------------
  215|     94|        ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  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_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   99|     94|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   36|     94|#define PROP_R_STRING_TOO_LONG 109
  ------------------
  216|    977|    } else {
  217|    977|        res->v.str_val = ossl_property_value(ctx, v, create);
  218|    977|    }
  219|  1.07k|    *t = skip_space(s + 1);
  220|  1.07k|    res->type = OSSL_PROPERTY_TYPE_STRING;
  221|  1.07k|    return !err;
  222|  1.58k|}
property_parse.c:parse_number:
   97|  6.02k|{
   98|  6.02k|    const char *s = *t;
   99|  6.02k|    int64_t v = 0;
  100|       |
  101|  60.3k|    do {
  102|  60.3k|        if (!ossl_isdigit(*s)) {
  ------------------
  |  Branch (102:13): [True: 94, False: 60.2k]
  ------------------
  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|  60.2k|        if (v > ((INT64_MAX - (*s - '0')) / 10)) {
  ------------------
  |  Branch (108:13): [True: 1.97k, False: 58.2k]
  ------------------
  109|  1.97k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|  1.97k|    (ERR_new(),                                                  \
  |  |  360|  1.97k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       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.97k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  1.97k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|  1.97k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  1.97k|#define PROP_R_PARSE_FAILED 108
  ------------------
  110|  1.97k|                "Property %s overflows", *t);
  111|  1.97k|            return 0;
  112|  1.97k|        }
  113|  58.2k|        v = v * 10 + (*s++ - '0');
  114|  58.2k|    } while (ossl_isdigit(*s));
  ------------------
  |  Branch (114:14): [True: 54.3k, False: 3.95k]
  ------------------
  115|  3.95k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  7.91k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  3.95k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 2.75k, False: 1.19k]
  |  Branch (115:30): [True: 2.23k, False: 521]
  |  Branch (115:44): [True: 1.50k, False: 733]
  ------------------
  116|  1.50k|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |  359|  1.50k|    (ERR_new(),                                                  \
  |  |  360|  1.50k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       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.50k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  1.50k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   99|  1.50k|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   32|  1.50k|#define PROP_R_NOT_A_DECIMAL_DIGIT 105
  ------------------
  117|  1.50k|            "HERE-->%s", *t);
  118|  1.50k|        return 0;
  119|  1.50k|    }
  120|  2.45k|    *t = skip_space(s);
  121|  2.45k|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  122|  2.45k|    res->v.int_val = v;
  123|  2.45k|    return 1;
  124|  3.95k|}
property_parse.c:parse_hex:
  127|  4.60k|{
  128|  4.60k|    const char *s = *t;
  129|  4.60k|    int64_t v = 0;
  130|  4.60k|    int sval;
  131|       |
  132|  71.8k|    do {
  133|  71.8k|        if (ossl_isdigit(*s)) {
  ------------------
  |  Branch (133:13): [True: 65.6k, False: 6.21k]
  ------------------
  134|  65.6k|            sval = *s - '0';
  135|  65.6k|        } else if (ossl_isxdigit(*s)) {
  ------------------
  |  |   83|  6.21k|#define ossl_isxdigit(c) (ossl_ctype_check((c), CTYPE_MASK_xdigit))
  |  |  ------------------
  |  |  |  |   31|  6.21k|#define CTYPE_MASK_xdigit 0x10
  |  |  ------------------
  |  |  |  Branch (83:26): [True: 6.12k, False: 94]
  |  |  ------------------
  ------------------
  136|  6.12k|            sval = ossl_tolower(*s) - 'a' + 10;
  137|  6.12k|        } else {
  138|     94|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |  359|     94|    (ERR_new(),                                                  \
  |  |  360|     94|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     94|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     94|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   99|     94|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   29|     94|#define PROP_R_NOT_AN_HEXADECIMAL_DIGIT 102
  ------------------
  139|     94|                "%s", *t);
  140|     94|            return 0;
  141|     94|        }
  142|       |
  143|  71.7k|        if (v > ((INT64_MAX - sval) / 16)) {
  ------------------
  |  Branch (143:13): [True: 3.14k, False: 68.6k]
  ------------------
  144|  3.14k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|  3.14k|    (ERR_new(),                                                  \
  |  |  360|  3.14k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  3.14k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  3.14k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|  3.14k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  3.14k|#define PROP_R_PARSE_FAILED 108
  ------------------
  145|  3.14k|                "Property %s overflows", *t);
  146|  3.14k|            return 0;
  147|  3.14k|        }
  148|       |
  149|  68.6k|        v <<= 4;
  150|  68.6k|        v += sval;
  151|  68.6k|    } while (ossl_isxdigit(*++s));
  ------------------
  |  |   83|  68.6k|#define ossl_isxdigit(c) (ossl_ctype_check((c), CTYPE_MASK_xdigit))
  |  |  ------------------
  |  |  |  |   31|  68.6k|#define CTYPE_MASK_xdigit 0x10
  |  |  ------------------
  |  |  |  Branch (83:26): [True: 67.2k, False: 1.36k]
  |  |  ------------------
  ------------------
  152|  1.36k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  2.72k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  1.36k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (152:9): [True: 841, False: 521]
  |  Branch (152:30): [True: 611, False: 230]
  |  Branch (152:44): [True: 564, False: 47]
  ------------------
  153|    564|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_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_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   99|    564|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   29|    564|#define PROP_R_NOT_AN_HEXADECIMAL_DIGIT 102
  ------------------
  154|    564|            "HERE-->%s", *t);
  155|    564|        return 0;
  156|    564|    }
  157|    798|    *t = skip_space(s);
  158|    798|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  159|    798|    res->v.int_val = v;
  160|    798|    return 1;
  161|  1.36k|}
property_parse.c:parse_oct:
  164|  5.16k|{
  165|  5.16k|    const char *s = *t;
  166|  5.16k|    int64_t v = 0;
  167|       |
  168|  73.0k|    do {
  169|  73.0k|        if (*s == '9' || *s == '8' || !ossl_isdigit(*s)) {
  ------------------
  |  Branch (169:13): [True: 47, False: 73.0k]
  |  Branch (169:26): [True: 47, False: 73.0k]
  |  Branch (169:39): [True: 0, False: 73.0k]
  ------------------
  170|     94|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  359|     94|    (ERR_new(),                                                  \
  |  |  360|     94|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     94|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     94|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   99|     94|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   31|     94|#define PROP_R_NOT_AN_OCTAL_DIGIT 104
  ------------------
  171|     94|                "HERE-->%s", *t);
  172|     94|            return 0;
  173|     94|        }
  174|  73.0k|        if (v > ((INT64_MAX - (*s - '0')) / 8)) {
  ------------------
  |  Branch (174:13): [True: 2.67k, False: 70.3k]
  ------------------
  175|  2.67k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|  2.67k|    (ERR_new(),                                                  \
  |  |  360|  2.67k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|  2.67k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  2.67k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|  2.67k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  2.67k|#define PROP_R_PARSE_FAILED 108
  ------------------
  176|  2.67k|                "Property %s overflows", *t);
  177|  2.67k|            return 0;
  178|  2.67k|        }
  179|       |
  180|  70.3k|        v = (v << 3) + (*s - '0');
  181|  70.3k|    } while (ossl_isdigit(*++s) && *s != '9' && *s != '8');
  ------------------
  |  Branch (181:14): [True: 68.0k, False: 2.25k]
  |  Branch (181:36): [True: 67.9k, False: 94]
  |  Branch (181:49): [True: 67.9k, False: 47]
  ------------------
  182|  2.39k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  4.78k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  2.39k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (182:9): [True: 1.86k, False: 526]
  |  Branch (182:30): [True: 1.49k, False: 366]
  |  Branch (182:44): [True: 752, False: 747]
  ------------------
  183|    752|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  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_OCTAL_DIGIT,
  ------------------
  |  |   99|    752|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   31|    752|#define PROP_R_NOT_AN_OCTAL_DIGIT 104
  ------------------
  184|    752|            "HERE-->%s", *t);
  185|    752|        return 0;
  186|    752|    }
  187|  1.63k|    *t = skip_space(s);
  188|  1.63k|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  189|  1.63k|    res->v.int_val = v;
  190|  1.63k|    return 1;
  191|  2.39k|}
property_parse.c:parse_unquoted:
  226|  10.4k|{
  227|  10.4k|    char v[1000];
  228|  10.4k|    const char *s = *t;
  229|  10.4k|    size_t i = 0;
  230|  10.4k|    int err = 0;
  231|       |
  232|  10.4k|    if (*s == '\0' || *s == ',')
  ------------------
  |  Branch (232:9): [True: 0, False: 10.4k]
  |  Branch (232:23): [True: 0, False: 10.4k]
  ------------------
  233|      0|        return 0;
  234|   622k|    while (ossl_isprint(*s) && !ossl_isspace(*s) && *s != ',') {
  ------------------
  |  |   80|  1.24M|#define ossl_isprint(c) (ossl_ctype_check((c), CTYPE_MASK_print))
  |  |  ------------------
  |  |  |  |   35|   622k|#define CTYPE_MASK_print 0x100
  |  |  ------------------
  |  |  |  Branch (80:25): [True: 619k, False: 3.17k]
  |  |  ------------------
  ------------------
                  while (ossl_isprint(*s) && !ossl_isspace(*s) && *s != ',') {
  ------------------
  |  |   82|  1.24M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|   619k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (234:32): [True: 618k, False: 1.07k]
  |  Branch (234:53): [True: 611k, False: 6.20k]
  ------------------
  235|   611k|        if (i < sizeof(v) - 1)
  ------------------
  |  Branch (235:13): [True: 601k, False: 10.1k]
  ------------------
  236|   601k|            v[i++] = ossl_tolower(*s);
  237|  10.1k|        else
  238|  10.1k|            err = 1;
  239|   611k|        s++;
  240|   611k|    }
  241|  10.4k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  20.9k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  10.4k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (241:9): [True: 8.80k, False: 1.64k]
  |  Branch (241:30): [True: 6.81k, False: 1.98k]
  |  Branch (241:44): [True: 611, False: 6.20k]
  ------------------
  242|    611|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |  359|    611|    (ERR_new(),                                                  \
  |  |  360|    611|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    611|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    611|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |   99|    611|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |   28|    611|#define PROP_R_NOT_AN_ASCII_CHARACTER 101
  ------------------
  243|    611|            "HERE-->%s", s);
  244|    611|        return 0;
  245|    611|    }
  246|  9.84k|    v[i] = 0;
  247|  9.84k|    if (err)
  ------------------
  |  Branch (247:9): [True: 244, False: 9.59k]
  ------------------
  248|    244|        ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  359|    244|    (ERR_new(),                                                  \
  |  |  360|    244|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|    244|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|    244|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   99|    244|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   36|    244|#define PROP_R_STRING_TOO_LONG 109
  ------------------
  249|  9.59k|    else if ((res->v.str_val = ossl_property_value(ctx, v, create)) == 0)
  ------------------
  |  Branch (249:14): [True: 8.02k, False: 1.57k]
  ------------------
  250|  8.02k|        err = 1;
  251|  9.84k|    *t = skip_space(s);
  252|  9.84k|    res->type = OSSL_PROPERTY_TYPE_STRING;
  253|  9.84k|    return !err;
  254|  10.4k|}
property_parse.c:stack_to_property_list:
  314|  17.7k|{
  315|  17.7k|    const int n = sk_OSSL_PROPERTY_DEFINITION_num(sk);
  316|  17.7k|    OSSL_PROPERTY_LIST *r;
  317|  17.7k|    OSSL_PROPERTY_IDX prev_name_idx = 0;
  318|  17.7k|    int i;
  319|       |
  320|  17.7k|    r = OPENSSL_malloc(sizeof(*r)
  ------------------
  |  |  107|  35.5k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (107:19): [True: 8.00k, False: 9.78k]
  |  |  ------------------
  ------------------
  321|  17.7k|        + (n <= 0 ? 0 : n - 1) * sizeof(r->properties[0]));
  322|  17.7k|    if (r != NULL) {
  ------------------
  |  Branch (322:9): [True: 17.7k, False: 0]
  ------------------
  323|  17.7k|        sk_OSSL_PROPERTY_DEFINITION_sort(sk);
  324|       |
  325|  17.7k|        r->has_optional = 0;
  326|  43.6k|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (326:21): [True: 28.0k, False: 15.6k]
  ------------------
  327|  28.0k|            r->properties[i] = *sk_OSSL_PROPERTY_DEFINITION_value(sk, i);
  328|  28.0k|            r->has_optional |= r->properties[i].optional;
  329|       |
  330|       |            /* Check for duplicated names */
  331|  28.0k|            if (i > 0 && r->properties[i].name_idx == prev_name_idx) {
  ------------------
  |  Branch (331:17): [True: 18.2k, False: 9.78k]
  |  Branch (331:26): [True: 2.16k, False: 16.1k]
  ------------------
  332|  2.16k|                OPENSSL_free(r);
  ------------------
  |  |  132|  2.16k|    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.16k|                ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|  2.16k|    (ERR_new(),                                                  \
  |  |  360|  2.16k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       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.16k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|  2.16k|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|  2.16k|#define ERR_LIB_PROP 55
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  2.16k|#define PROP_R_PARSE_FAILED 108
  ------------------
  334|  2.16k|                    "Duplicated name `%s'",
  335|  2.16k|                    ossl_property_name_str(ctx, prev_name_idx));
  336|  2.16k|                return NULL;
  337|  2.16k|            }
  338|  25.8k|            prev_name_idx = r->properties[i].name_idx;
  339|  25.8k|        }
  340|  15.6k|        r->num_properties = n;
  341|  15.6k|    }
  342|  15.6k|    return r;
  343|  17.7k|}
property_parse.c:pd_free:
  301|  95.8k|{
  302|  95.8k|    OPENSSL_free(pd);
  ------------------
  |  |  132|  95.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__
  |  |  ------------------
  ------------------
  303|  95.8k|}
property_parse.c:match:
   46|  63.4k|{
   47|  63.4k|    const char *s = *t;
   48|       |
   49|  63.4k|    if (OPENSSL_strncasecmp(s, m, m_len) == 0) {
  ------------------
  |  Branch (49:9): [True: 1.49k, False: 61.9k]
  ------------------
   50|  1.49k|        *t = skip_space(s + m_len);
   51|  1.49k|        return 1;
   52|  1.49k|    }
   53|  61.9k|    return 0;
   54|  63.4k|}

ossl_property_find_property:
   25|     34|{
   26|     34|    OSSL_PROPERTY_IDX name_idx;
   27|       |
   28|     34|    if (list == NULL || name == NULL
  ------------------
  |  Branch (28:9): [True: 0, False: 34]
  |  Branch (28:25): [True: 0, False: 34]
  ------------------
   29|     34|        || (name_idx = ossl_property_name(libctx, name, 0)) == 0)
  ------------------
  |  Branch (29:12): [True: 0, False: 34]
  ------------------
   30|      0|        return NULL;
   31|       |
   32|     34|    return ossl_bsearch(&name_idx, list->properties, list->num_properties,
   33|       |        sizeof(*list->properties), &property_idx_cmp, NULL, 0);
   34|     34|}
ossl_property_get_string_value:
   43|     26|{
   44|     26|    const char *value = NULL;
   45|       |
   46|     26|    if (prop != NULL && prop->type == OSSL_PROPERTY_TYPE_STRING)
  ------------------
  |  Branch (46:9): [True: 26, False: 0]
  |  Branch (46:25): [True: 26, False: 0]
  ------------------
   47|     26|        value = ossl_property_value_str(libctx, prop->v.str_val);
   48|     26|    return value;
   49|     26|}
ossl_property_has_optional:
   62|  14.3k|{
   63|  14.3k|    return query->has_optional ? 1 : 0;
  ------------------
  |  Branch (63:12): [True: 1.44k, False: 12.8k]
  ------------------
   64|  14.3k|}
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|    768|{
   78|    768|    PROPERTY_STRING_DATA *propdata = vpropdata;
   79|       |
   80|    768|    if (propdata == NULL)
  ------------------
  |  Branch (80:9): [True: 0, False: 768]
  ------------------
   81|      0|        return;
   82|       |
   83|    768|    CRYPTO_THREAD_lock_free(propdata->lock);
   84|    768|    property_table_free(&propdata->prop_names);
   85|    768|    property_table_free(&propdata->prop_values);
   86|    768|#ifndef OPENSSL_SMALL_FOOTPRINT
   87|    768|    sk_OPENSSL_CSTRING_free(propdata->prop_namelist);
  ------------------
  |  |  288|    768|#define sk_OPENSSL_CSTRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_CSTRING_sk_type(sk))
  ------------------
   88|    768|    sk_OPENSSL_CSTRING_free(propdata->prop_valuelist);
  ------------------
  |  |  288|    768|#define sk_OPENSSL_CSTRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_CSTRING_sk_type(sk))
  ------------------
   89|    768|    propdata->prop_namelist = propdata->prop_valuelist = NULL;
   90|    768|#endif
   91|    768|    propdata->prop_name_idx = propdata->prop_value_idx = 0;
   92|       |
   93|    768|    OPENSSL_free(propdata);
  ------------------
  |  |  132|    768|    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|    768|}
ossl_property_string_data_new:
   97|    769|{
   98|    769|    PROPERTY_STRING_DATA *propdata = OPENSSL_zalloc(sizeof(*propdata));
  ------------------
  |  |  109|    769|    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|    769|    if (propdata == NULL)
  ------------------
  |  Branch (100:9): [True: 0, False: 769]
  ------------------
  101|      0|        return NULL;
  102|       |
  103|    769|    propdata->lock = CRYPTO_THREAD_lock_new();
  104|    769|    propdata->prop_names = lh_PROPERTY_STRING_new(&property_hash,
  105|    769|        &property_cmp);
  106|    769|    propdata->prop_values = lh_PROPERTY_STRING_new(&property_hash,
  107|    769|        &property_cmp);
  108|    769|#ifndef OPENSSL_SMALL_FOOTPRINT
  109|    769|    propdata->prop_namelist = sk_OPENSSL_CSTRING_new_null();
  ------------------
  |  |  285|    769|#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OPENSSL_CSTRING_freefunc_thunk))
  ------------------
  110|    769|    propdata->prop_valuelist = sk_OPENSSL_CSTRING_new_null();
  ------------------
  |  |  285|    769|#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OPENSSL_CSTRING_freefunc_thunk))
  ------------------
  111|    769|#endif
  112|    769|    if (propdata->lock == NULL
  ------------------
  |  Branch (112:9): [True: 0, False: 769]
  ------------------
  113|    769|#ifndef OPENSSL_SMALL_FOOTPRINT
  114|    769|        || propdata->prop_namelist == NULL
  ------------------
  |  Branch (114:12): [True: 0, False: 769]
  ------------------
  115|    769|        || propdata->prop_valuelist == NULL
  ------------------
  |  Branch (115:12): [True: 0, False: 769]
  ------------------
  116|    769|#endif
  117|    769|        || propdata->prop_names == NULL
  ------------------
  |  Branch (117:12): [True: 0, False: 769]
  ------------------
  118|    769|        || propdata->prop_values == NULL) {
  ------------------
  |  Branch (118:12): [True: 0, False: 769]
  ------------------
  119|      0|        ossl_property_string_data_free(propdata);
  120|      0|        return NULL;
  121|      0|    }
  122|    769|    return propdata;
  123|    769|}
ossl_property_name:
  255|   100k|{
  256|   100k|    return ossl_property_string(ctx, 1, create, s);
  257|   100k|}
ossl_property_name_str:
  260|  2.16k|{
  261|  2.16k|    return ossl_property_str(1, ctx, idx);
  262|  2.16k|}
ossl_property_value:
  266|  12.1k|{
  267|  12.1k|    return ossl_property_string(ctx, 0, create, s);
  268|  12.1k|}
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.53k|{
   67|  1.53k|    PROP_TABLE *t = *pt;
   68|       |
   69|  1.53k|    if (t != NULL) {
  ------------------
  |  Branch (69:9): [True: 1.53k, False: 0]
  ------------------
   70|  1.53k|        lh_PROPERTY_STRING_doall(t, &property_free);
   71|  1.53k|        lh_PROPERTY_STRING_free(t);
   72|       |        *pt = NULL;
   73|  1.53k|    }
   74|  1.53k|}
property_string.c:property_free:
   61|  7.95k|{
   62|  7.95k|    OPENSSL_free(ps);
  ------------------
  |  |  132|  7.95k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   63|  7.95k|}
property_string.c:property_hash:
   51|   128k|{
   52|   128k|    return OPENSSL_LH_strhash(a->s);
   53|   128k|}
property_string.c:property_cmp:
   56|  33.8k|{
   57|  33.8k|    return strcmp(a->s, b->s);
   58|  33.8k|}
property_string.c:ossl_property_string:
  145|   112k|{
  146|   112k|    PROPERTY_STRING p, *ps, *ps_new;
  147|   112k|    PROP_TABLE *t;
  148|   112k|    OSSL_PROPERTY_IDX *pidx;
  149|   112k|    PROPERTY_STRING_DATA *propdata
  150|   112k|        = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_PROPERTY_STRING_INDEX);
  ------------------
  |  |   98|   112k|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  151|       |
  152|   112k|    if (propdata == NULL)
  ------------------
  |  Branch (152:9): [True: 0, False: 112k]
  ------------------
  153|      0|        return 0;
  154|       |
  155|   112k|    t = name ? propdata->prop_names : propdata->prop_values;
  ------------------
  |  Branch (155:9): [True: 100k, False: 12.1k]
  ------------------
  156|   112k|    p.s = s;
  157|   112k|    if (!CRYPTO_THREAD_read_lock(propdata->lock)) {
  ------------------
  |  Branch (157:9): [True: 0, False: 112k]
  ------------------
  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|   112k|    ps = lh_PROPERTY_STRING_retrieve(t, &p);
  162|   112k|    if (ps == NULL && create) {
  ------------------
  |  Branch (162:9): [True: 78.8k, False: 33.8k]
  |  Branch (162:23): [True: 7.98k, False: 70.8k]
  ------------------
  163|  7.98k|        CRYPTO_THREAD_unlock(propdata->lock);
  164|  7.98k|        if (!CRYPTO_THREAD_write_lock(propdata->lock)) {
  ------------------
  |  Branch (164:13): [True: 0, False: 7.98k]
  ------------------
  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.98k|        pidx = name ? &propdata->prop_name_idx : &propdata->prop_value_idx;
  ------------------
  |  Branch (168:16): [True: 5.21k, False: 2.77k]
  ------------------
  169|  7.98k|        ps = lh_PROPERTY_STRING_retrieve(t, &p);
  170|  7.98k|        if (ps == NULL && (ps_new = new_property_string(s, pidx)) != NULL) {
  ------------------
  |  Branch (170:13): [True: 7.98k, False: 0]
  |  Branch (170:27): [True: 7.98k, False: 0]
  ------------------
  171|  7.98k|#ifndef OPENSSL_SMALL_FOOTPRINT
  172|  7.98k|            STACK_OF(OPENSSL_CSTRING) *slist;
  ------------------
  |  |   33|  7.98k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  173|       |
  174|  7.98k|            slist = name ? propdata->prop_namelist : propdata->prop_valuelist;
  ------------------
  |  Branch (174:21): [True: 5.21k, False: 2.77k]
  ------------------
  175|  7.98k|            if (sk_OPENSSL_CSTRING_push(slist, ps_new->s) <= 0) {
  ------------------
  |  |  292|  7.98k|#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.98k]
  ------------------
  176|      0|                property_free(ps_new);
  177|      0|                CRYPTO_THREAD_unlock(propdata->lock);
  178|      0|                return 0;
  179|      0|            }
  180|  7.98k|#endif
  181|  7.98k|            lh_PROPERTY_STRING_insert(t, ps_new);
  182|  7.98k|            if (lh_PROPERTY_STRING_error(t)) {
  ------------------
  |  Branch (182:17): [True: 0, False: 7.98k]
  ------------------
  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.98k|            ps = ps_new;
  196|  7.98k|        }
  197|  7.98k|    }
  198|   112k|    CRYPTO_THREAD_unlock(propdata->lock);
  199|   112k|    return ps != NULL ? ps->idx : 0;
  ------------------
  |  Branch (199:12): [True: 41.8k, False: 70.8k]
  ------------------
  200|   112k|}
property_string.c:new_property_string:
  127|  7.98k|{
  128|  7.98k|    const size_t l = strlen(s);
  129|  7.98k|    PROPERTY_STRING *ps = OPENSSL_malloc(sizeof(*ps) + l);
  ------------------
  |  |  107|  7.98k|    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.98k|    if (ps != NULL) {
  ------------------
  |  Branch (131:9): [True: 7.98k, False: 0]
  ------------------
  132|  7.98k|        memcpy(ps->body, s, l + 1);
  133|  7.98k|        ps->s = ps->body;
  134|  7.98k|        ps->idx = ++*pidx;
  135|  7.98k|        if (ps->idx == 0) {
  ------------------
  |  Branch (135:13): [True: 0, False: 7.98k]
  ------------------
  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.98k|    }
  140|  7.98k|    return ps;
  141|  7.98k|}
property_string.c:ossl_property_str:
  219|  2.18k|{
  220|  2.18k|    const char *r;
  221|  2.18k|    PROPERTY_STRING_DATA *propdata
  222|  2.18k|        = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_PROPERTY_STRING_INDEX);
  ------------------
  |  |   98|  2.18k|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  223|       |
  224|  2.18k|    if (propdata == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 2.18k]
  ------------------
  225|      0|        return NULL;
  226|       |
  227|  2.18k|    if (!CRYPTO_THREAD_read_lock(propdata->lock)) {
  ------------------
  |  Branch (227:9): [True: 0, False: 2.18k]
  ------------------
  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.18k|    r = sk_OPENSSL_CSTRING_value(name ? propdata->prop_namelist
  ------------------
  |  |  283|  4.37k|#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.16k, False: 26]
  |  |  ------------------
  ------------------
  245|  2.18k|                                      : propdata->prop_valuelist,
  246|  2.18k|        idx - 1);
  247|  2.18k|#endif
  248|  2.18k|    CRYPTO_THREAD_unlock(propdata->lock);
  249|       |
  250|  2.18k|    return r;
  251|  2.18k|}

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

ossl_child_prov_ctx_new:
   38|    769|{
   39|    769|    return OPENSSL_zalloc(sizeof(struct child_prov_globals));
  ------------------
  |  |  109|    769|    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|    769|}
ossl_child_prov_ctx_free:
   43|    768|{
   44|    768|    struct child_prov_globals *gbl = vgbl;
   45|       |
   46|    768|    CRYPTO_THREAD_lock_free(gbl->lock);
   47|    768|    OPENSSL_free(gbl);
  ------------------
  |  |  132|    768|    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|    768|}

ossl_prov_conf_ctx_new:
   31|    769|{
   32|    769|    PROVIDER_CONF_GLOBAL *pcgbl = OPENSSL_zalloc(sizeof(*pcgbl));
  ------------------
  |  |  109|    769|    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|    769|    if (pcgbl == NULL)
  ------------------
  |  Branch (34:9): [True: 0, False: 769]
  ------------------
   35|      0|        return NULL;
   36|       |
   37|    769|    pcgbl->lock = CRYPTO_THREAD_lock_new();
   38|    769|    if (pcgbl->lock == NULL) {
  ------------------
  |  Branch (38:9): [True: 0, False: 769]
  ------------------
   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|    769|    return pcgbl;
   44|    769|}
ossl_prov_conf_ctx_free:
   47|    768|{
   48|    768|    PROVIDER_CONF_GLOBAL *pcgbl = vpcgbl;
   49|       |
   50|    768|    sk_OSSL_PROVIDER_pop_free(pcgbl->activated_providers,
   51|    768|        ossl_provider_free);
   52|       |
   53|    768|    OSSL_TRACE(CONF, "Cleaned up providers\n");
  ------------------
  |  |  288|    768|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|    768|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   54|    768|    CRYPTO_THREAD_lock_free(pcgbl->lock);
   55|    768|    OPENSSL_free(pcgbl);
  ------------------
  |  |  132|    768|    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|    768|}

ossl_provider_store_free:
  288|    768|{
  289|    768|    struct provider_store_st *store = vstore;
  290|    768|    size_t i;
  291|       |
  292|    768|    if (store == NULL)
  ------------------
  |  Branch (292:9): [True: 0, False: 768]
  ------------------
  293|      0|        return;
  294|    768|    store->freeing = 1;
  295|    768|    OPENSSL_free(store->default_path);
  ------------------
  |  |  132|    768|    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|    768|    sk_OSSL_PROVIDER_pop_free(store->providers, provider_deactivate_free);
  297|    768|#ifndef FIPS_MODULE
  298|    768|    sk_OSSL_PROVIDER_CHILD_CB_pop_free(store->child_cbs,
  299|    768|        ossl_provider_child_cb_free);
  300|    768|#endif
  301|    768|    CRYPTO_THREAD_lock_free(store->default_path_lock);
  302|    768|    CRYPTO_THREAD_lock_free(store->lock);
  303|    768|    for (i = 0; i < store->numprovinfo; i++)
  ------------------
  |  Branch (303:17): [True: 0, False: 768]
  ------------------
  304|      0|        ossl_provider_info_clear(&store->provinfo[i]);
  305|    768|    OPENSSL_free(store->provinfo);
  ------------------
  |  |  132|    768|    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|    768|    OPENSSL_free(store);
  ------------------
  |  |  132|    768|    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|    768|}
ossl_provider_store_new:
  310|    769|{
  311|    769|    struct provider_store_st *store = OPENSSL_zalloc(sizeof(*store));
  ------------------
  |  |  109|    769|    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|    769|    if (store == NULL
  ------------------
  |  Branch (313:9): [True: 0, False: 769]
  ------------------
  314|    769|        || (store->providers = sk_OSSL_PROVIDER_new(ossl_provider_cmp)) == NULL
  ------------------
  |  Branch (314:12): [True: 0, False: 769]
  ------------------
  315|    769|        || (store->default_path_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (315:12): [True: 0, False: 769]
  ------------------
  316|    769|#ifndef FIPS_MODULE
  317|    769|        || (store->child_cbs = sk_OSSL_PROVIDER_CHILD_CB_new_null()) == NULL
  ------------------
  |  Branch (317:12): [True: 0, False: 769]
  ------------------
  318|    769|#endif
  319|    769|        || (store->lock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (319:12): [True: 0, False: 769]
  ------------------
  320|      0|        ossl_provider_store_free(store);
  321|      0|        return NULL;
  322|      0|    }
  323|    769|    store->libctx = ctx;
  324|    769|    store->use_fallbacks = 1;
  325|       |
  326|    769|    return store;
  327|    769|}
ossl_provider_find:
  401|  3.87k|{
  402|  3.87k|    struct provider_store_st *store = NULL;
  403|  3.87k|    OSSL_PROVIDER *prov = NULL;
  404|       |
  405|  3.87k|    if ((store = get_provider_store(libctx)) != NULL) {
  ------------------
  |  Branch (405:9): [True: 3.87k, False: 0]
  ------------------
  406|  3.87k|        OSSL_PROVIDER tmpl = {
  407|  3.87k|            0,
  408|  3.87k|        };
  409|  3.87k|        int i;
  410|       |
  411|  3.87k|#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.87k|        if (!noconfig) {
  ------------------
  |  Branch (416:13): [True: 2.13k, False: 1.73k]
  ------------------
  417|  2.13k|            if (ossl_lib_ctx_is_default(libctx))
  ------------------
  |  Branch (417:17): [True: 0, False: 2.13k]
  ------------------
  418|      0|                OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  ------------------
  |  |  511|      0|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  419|  2.13k|        }
  420|  3.87k|#endif
  421|       |
  422|  3.87k|        tmpl.name = (char *)name;
  423|  3.87k|        if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (423:13): [True: 0, False: 3.87k]
  ------------------
  424|      0|            return NULL;
  425|  3.87k|        if (!sk_OSSL_PROVIDER_is_sorted(store->providers)) {
  ------------------
  |  Branch (425:13): [True: 595, False: 3.28k]
  ------------------
  426|    595|            CRYPTO_THREAD_unlock(store->lock);
  427|    595|            if (!CRYPTO_THREAD_write_lock(store->lock))
  ------------------
  |  Branch (427:17): [True: 0, False: 595]
  ------------------
  428|      0|                return NULL;
  429|    595|            if (!sk_OSSL_PROVIDER_is_sorted(store->providers))
  ------------------
  |  Branch (429:17): [True: 595, False: 0]
  ------------------
  430|    595|                sk_OSSL_PROVIDER_sort(store->providers);
  431|    595|        }
  432|  3.87k|        if ((i = sk_OSSL_PROVIDER_find(store->providers, &tmpl)) != -1)
  ------------------
  |  Branch (432:13): [True: 2.21k, False: 1.65k]
  ------------------
  433|  2.21k|            prov = sk_OSSL_PROVIDER_value(store->providers, i);
  434|  3.87k|        CRYPTO_THREAD_unlock(store->lock);
  435|  3.87k|        if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (435:13): [True: 2.21k, False: 1.65k]
  |  Branch (435:29): [True: 0, False: 2.21k]
  ------------------
  436|      0|            prov = NULL;
  437|  3.87k|    }
  438|       |
  439|  3.87k|    return prov;
  440|  3.87k|}
ossl_provider_up_ref:
  486|   187k|{
  487|   187k|    int ref = 0;
  488|       |
  489|   187k|    if (CRYPTO_UP_REF(&prov->refcnt, &ref) <= 0)
  ------------------
  |  Branch (489:9): [True: 0, False: 187k]
  ------------------
  490|      0|        return 0;
  491|       |
  492|   187k|#ifndef FIPS_MODULE
  493|   187k|    if (prov->ischild) {
  ------------------
  |  Branch (493:9): [True: 0, False: 187k]
  ------------------
  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|   187k|#endif
  500|       |
  501|   187k|    return ref;
  502|   187k|}
ossl_provider_new:
  531|    930|{
  532|    930|    struct provider_store_st *store = NULL;
  533|    930|    OSSL_PROVIDER_INFO template;
  534|    930|    OSSL_PROVIDER *prov = NULL;
  535|       |
  536|    930|    if ((store = get_provider_store(libctx)) == NULL)
  ------------------
  |  Branch (536:9): [True: 0, False: 930]
  ------------------
  537|      0|        return NULL;
  538|       |
  539|    930|    memset(&template, 0, sizeof(template));
  540|    930|    if (init_function == NULL) {
  ------------------
  |  Branch (540:9): [True: 930, False: 0]
  ------------------
  541|    930|        const OSSL_PROVIDER_INFO *p;
  542|    930|        size_t i;
  543|    930|        int chosen = 0;
  544|       |
  545|       |        /* Check if this is a predefined builtin provider */
  546|  2.23k|        for (p = ossl_predefined_providers; p->name != NULL; p++) {
  ------------------
  |  Branch (546:45): [True: 2.14k, False: 87]
  ------------------
  547|  2.14k|            if (strcmp(p->name, name) != 0)
  ------------------
  |  Branch (547:17): [True: 1.30k, False: 843]
  ------------------
  548|  1.30k|                continue;
  549|       |            /* These compile-time templates always have NULL parameters */
  550|    843|            template = *p;
  551|    843|            chosen = 1;
  552|    843|            break;
  553|  2.14k|        }
  554|    930|        if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (554:13): [True: 0, False: 930]
  ------------------
  555|      0|            return NULL;
  556|    930|        for (i = 0, p = store->provinfo; i < store->numprovinfo; p++, i++) {
  ------------------
  |  Branch (556:42): [True: 0, False: 930]
  ------------------
  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|    930|        CRYPTO_THREAD_unlock(store->lock);
  581|    930|    } else {
  582|      0|        template.init = init_function;
  583|      0|    }
  584|       |
  585|    930|    if (params != NULL) {
  ------------------
  |  Branch (585:9): [True: 0, False: 930]
  ------------------
  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|    930|    prov = provider_new(name, template.init, template.parameters);
  608|       |
  609|       |    /* If we copied the parameters, free them */
  610|    930|    if (template.parameters != NULL)
  ------------------
  |  Branch (610:9): [True: 0, False: 930]
  ------------------
  611|      0|        sk_INFOPAIR_pop_free(template.parameters, infopair_free);
  612|       |
  613|    930|    if (prov == NULL)
  ------------------
  |  Branch (613:9): [True: 0, False: 930]
  ------------------
  614|      0|        return NULL;
  615|       |
  616|    930|    if (!ossl_provider_set_module_path(prov, template.path)) {
  ------------------
  |  Branch (616:9): [True: 0, False: 930]
  ------------------
  617|      0|        ossl_provider_free(prov);
  618|      0|        return NULL;
  619|      0|    }
  620|       |
  621|    930|    prov->libctx = libctx;
  622|    930|#ifndef FIPS_MODULE
  623|    930|    prov->error_lib = ERR_get_next_error_library();
  624|    930|#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|    930|    return prov;
  633|    930|}
ossl_provider_add_to_store:
  660|    843|{
  661|    843|    struct provider_store_st *store;
  662|    843|    int idx;
  663|    843|    OSSL_PROVIDER tmpl = {
  664|    843|        0,
  665|    843|    };
  666|    843|    OSSL_PROVIDER *actualtmp = NULL;
  667|       |
  668|    843|    if (actualprov != NULL)
  ------------------
  |  Branch (668:9): [True: 843, False: 0]
  ------------------
  669|    843|        *actualprov = NULL;
  670|       |
  671|    843|    if ((store = get_provider_store(prov->libctx)) == NULL)
  ------------------
  |  Branch (671:9): [True: 0, False: 843]
  ------------------
  672|      0|        return 0;
  673|       |
  674|    843|    if (!CRYPTO_THREAD_write_lock(store->lock))
  ------------------
  |  Branch (674:9): [True: 0, False: 843]
  ------------------
  675|      0|        return 0;
  676|       |
  677|    843|    tmpl.name = (char *)prov->name;
  678|    843|    idx = sk_OSSL_PROVIDER_find(store->providers, &tmpl);
  679|    843|    if (idx == -1)
  ------------------
  |  Branch (679:9): [True: 843, False: 0]
  ------------------
  680|    843|        actualtmp = prov;
  681|      0|    else
  682|      0|        actualtmp = sk_OSSL_PROVIDER_value(store->providers, idx);
  683|       |
  684|    843|    if (idx == -1) {
  ------------------
  |  Branch (684:9): [True: 843, False: 0]
  ------------------
  685|    843|        if (sk_OSSL_PROVIDER_push(store->providers, prov) == 0)
  ------------------
  |  Branch (685:13): [True: 0, False: 843]
  ------------------
  686|      0|            goto err;
  687|    843|        prov->store = store;
  688|    843|        if (!create_provider_children(prov)) {
  ------------------
  |  Branch (688:13): [True: 0, False: 843]
  ------------------
  689|      0|            sk_OSSL_PROVIDER_delete_ptr(store->providers, prov);
  690|      0|            goto err;
  691|      0|        }
  692|    843|        if (!retain_fallbacks)
  ------------------
  |  Branch (692:13): [True: 0, False: 843]
  ------------------
  693|      0|            store->use_fallbacks = 0;
  694|    843|    }
  695|       |
  696|    843|    CRYPTO_THREAD_unlock(store->lock);
  697|       |
  698|    843|    if (actualprov != NULL) {
  ------------------
  |  Branch (698:9): [True: 843, False: 0]
  ------------------
  699|    843|        if (!ossl_provider_up_ref(actualtmp)) {
  ------------------
  |  Branch (699:13): [True: 0, False: 843]
  ------------------
  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|    843|        *actualprov = actualtmp;
  705|    843|    }
  706|       |
  707|    843|    if (idx >= 0) {
  ------------------
  |  Branch (707:9): [True: 0, False: 843]
  ------------------
  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|    843|#ifndef FIPS_MODULE
  722|    843|    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|    843|        ossl_decoder_cache_flush(prov->libctx);
  728|    843|    }
  729|    843|#endif
  730|       |
  731|    843|    return 1;
  732|       |
  733|      0|err:
  734|      0|    CRYPTO_THREAD_unlock(store->lock);
  735|      0|    return 0;
  736|    843|}
ossl_provider_free:
  739|   188k|{
  740|   188k|    if (prov != NULL) {
  ------------------
  |  Branch (740:9): [True: 188k, False: 0]
  ------------------
  741|   188k|        int ref = 0;
  742|       |
  743|   188k|        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|   188k|        if (ref == 0) {
  ------------------
  |  Branch (753:13): [True: 1.69k, False: 186k]
  ------------------
  754|  1.69k|            if (prov->flag_initialized) {
  ------------------
  |  Branch (754:17): [True: 1.61k, False: 87]
  ------------------
  755|  1.61k|                ossl_provider_teardown(prov);
  756|  1.61k|#ifndef OPENSSL_NO_ERR
  757|  1.61k|#ifndef FIPS_MODULE
  758|  1.61k|                if (prov->error_strings != NULL) {
  ------------------
  |  Branch (758:21): [True: 0, False: 1.61k]
  ------------------
  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.61k|#endif
  764|  1.61k|#endif
  765|  1.61k|                OPENSSL_free(prov->operation_bits);
  ------------------
  |  |  132|  1.61k|    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.61k|                prov->operation_bits = NULL;
  767|  1.61k|                prov->operation_bits_sz = 0;
  768|  1.61k|                prov->flag_initialized = 0;
  769|  1.61k|            }
  770|       |
  771|  1.69k|#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.69k|            ossl_init_thread_deregister(prov);
  778|  1.69k|            DSO_free(prov->module);
  779|  1.69k|#endif
  780|  1.69k|            OPENSSL_free(prov->name);
  ------------------
  |  |  132|  1.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__
  |  |  ------------------
  ------------------
  781|  1.69k|            OPENSSL_free(prov->path);
  ------------------
  |  |  132|  1.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__
  |  |  ------------------
  ------------------
  782|  1.69k|            sk_INFOPAIR_pop_free(prov->parameters, infopair_free);
  783|  1.69k|            CRYPTO_THREAD_lock_free(prov->opbits_lock);
  784|  1.69k|            CRYPTO_THREAD_lock_free(prov->flag_lock);
  785|  1.69k|            CRYPTO_THREAD_lock_free(prov->activatecnt_lock);
  786|  1.69k|            CRYPTO_FREE_REF(&prov->refcnt);
  787|  1.69k|            OPENSSL_free(prov);
  ------------------
  |  |  132|  1.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__
  |  |  ------------------
  ------------------
  788|  1.69k|        }
  789|   186k|#ifndef FIPS_MODULE
  790|   186k|        else if (prov->ischild) {
  ------------------
  |  Branch (790:18): [True: 0, False: 186k]
  ------------------
  791|      0|            ossl_provider_free_parent(prov, 0);
  792|      0|        }
  793|   188k|#endif
  794|   188k|    }
  795|   188k|}
ossl_provider_set_module_path:
  799|    930|{
  800|    930|    OPENSSL_free(prov->path);
  ------------------
  |  |  132|    930|    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|    930|    prov->path = NULL;
  802|    930|    if (module_path == NULL)
  ------------------
  |  Branch (802:9): [True: 930, False: 0]
  ------------------
  803|    930|        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|  5.64k|{
  846|  5.64k|    int i;
  847|       |
  848|  5.64k|    if (prov->parameters == NULL)
  ------------------
  |  Branch (848:9): [True: 0, False: 5.64k]
  ------------------
  849|      0|        return 1;
  850|       |
  851|  5.64k|    for (i = 0; i < sk_INFOPAIR_num(prov->parameters); i++) {
  ------------------
  |  Branch (851:17): [True: 0, False: 5.64k]
  ------------------
  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|  5.64k|    return 1;
  860|  5.64k|}
ossl_provider_activate:
 1402|  1.37k|{
 1403|  1.37k|    int count;
 1404|       |
 1405|  1.37k|    if (prov == NULL)
  ------------------
  |  Branch (1405:9): [True: 0, False: 1.37k]
  ------------------
 1406|      0|        return 0;
 1407|  1.37k|#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.37k|    if (aschild && !prov->ischild)
  ------------------
  |  Branch (1412:9): [True: 0, False: 1.37k]
  |  Branch (1412:20): [True: 0, False: 0]
  ------------------
 1413|      0|        return 1;
 1414|  1.37k|#endif
 1415|  1.37k|    if ((count = provider_activate(prov, 1, upcalls)) > 0)
  ------------------
  |  Branch (1415:9): [True: 1.28k, False: 87]
  ------------------
 1416|  1.28k|        return count == 1 ? provider_flush_store_cache(prov) : 1;
  ------------------
  |  Branch (1416:16): [True: 843, False: 441]
  ------------------
 1417|       |
 1418|     87|    return 0;
 1419|  1.37k|}
ossl_provider_deactivate:
 1422|  2.05k|{
 1423|  2.05k|    int count;
 1424|       |
 1425|  2.05k|    if (prov == NULL
  ------------------
  |  Branch (1425:9): [True: 0, False: 2.05k]
  ------------------
 1426|  2.05k|        || (count = provider_deactivate(prov, 1, removechildren)) < 0)
  ------------------
  |  Branch (1426:12): [True: 0, False: 2.05k]
  ------------------
 1427|      0|        return 0;
 1428|  2.05k|    return count == 0 ? provider_remove_store_methods(prov) : 1;
  ------------------
  |  Branch (1428:12): [True: 1.61k, False: 441]
  ------------------
 1429|  2.05k|}
ossl_provider_ctx:
 1432|  3.12M|{
 1433|  3.12M|    return prov != NULL ? prov->provctx : NULL;
  ------------------
  |  Branch (1433:12): [True: 3.12M, False: 0]
  ------------------
 1434|  3.12M|}
ossl_provider_doall_activated:
 1533|  93.6k|{
 1534|  93.6k|    int ret = 0, curr, max, ref = 0;
 1535|  93.6k|    struct provider_store_st *store = get_provider_store(ctx);
 1536|  93.6k|    STACK_OF(OSSL_PROVIDER) *provs = NULL;
  ------------------
  |  |   33|  93.6k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1537|       |
 1538|  93.6k|#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|  93.6k|    if (ossl_lib_ctx_is_default(ctx))
  ------------------
  |  Branch (1543:9): [True: 44.3k, False: 49.3k]
  ------------------
 1544|  44.3k|        OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  ------------------
  |  |  511|  44.3k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
 1545|  93.6k|#endif
 1546|       |
 1547|  93.6k|    if (store == NULL)
  ------------------
  |  Branch (1547:9): [True: 0, False: 93.6k]
  ------------------
 1548|      0|        return 1;
 1549|  93.6k|    if (!provider_activate_fallbacks(store))
  ------------------
  |  Branch (1549:9): [True: 0, False: 93.6k]
  ------------------
 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|  93.6k|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1556:9): [True: 0, False: 93.6k]
  ------------------
 1557|      0|        return 0;
 1558|  93.6k|    provs = sk_OSSL_PROVIDER_dup(store->providers);
 1559|  93.6k|    if (provs == NULL) {
  ------------------
  |  Branch (1559:9): [True: 0, False: 93.6k]
  ------------------
 1560|      0|        CRYPTO_THREAD_unlock(store->lock);
 1561|      0|        return 0;
 1562|      0|    }
 1563|  93.6k|    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|   248k|    for (curr = max - 1; curr >= 0; curr--) {
  ------------------
  |  Branch (1568:26): [True: 154k, False: 93.6k]
  ------------------
 1569|   154k|        OSSL_PROVIDER *prov = sk_OSSL_PROVIDER_value(provs, curr);
 1570|       |
 1571|   154k|        if (!CRYPTO_THREAD_read_lock(prov->flag_lock))
  ------------------
  |  Branch (1571:13): [True: 0, False: 154k]
  ------------------
 1572|      0|            goto err_unlock;
 1573|   154k|        if (prov->flag_activated) {
  ------------------
  |  Branch (1573:13): [True: 154k, 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|   154k|            if (CRYPTO_UP_REF(&prov->refcnt, &ref) <= 0) {
  ------------------
  |  Branch (1579:17): [True: 0, False: 154k]
  ------------------
 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|   154k|            if (!CRYPTO_atomic_add(&prov->activatecnt, 1, &ref,
  ------------------
  |  Branch (1589:17): [True: 0, False: 154k]
  ------------------
 1590|   154k|                    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|   154k|        } else {
 1596|      0|            sk_OSSL_PROVIDER_delete(provs, curr);
 1597|      0|            max--;
 1598|      0|        }
 1599|   154k|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1600|   154k|    }
 1601|  93.6k|    CRYPTO_THREAD_unlock(store->lock);
 1602|       |
 1603|       |    /*
 1604|       |     * Now, we sweep through all providers not under lock
 1605|       |     */
 1606|   248k|    for (curr = 0; curr < max; curr++) {
  ------------------
  |  Branch (1606:20): [True: 154k, False: 93.6k]
  ------------------
 1607|   154k|        OSSL_PROVIDER *prov = sk_OSSL_PROVIDER_value(provs, curr);
 1608|       |
 1609|   154k|        if (!cb(prov, cbdata)) {
  ------------------
  |  Branch (1609:13): [True: 0, False: 154k]
  ------------------
 1610|      0|            curr = -1;
 1611|      0|            goto finish;
 1612|      0|        }
 1613|   154k|    }
 1614|  93.6k|    curr = -1;
 1615|       |
 1616|  93.6k|    ret = 1;
 1617|  93.6k|    goto finish;
 1618|       |
 1619|      0|err_unlock:
 1620|      0|    CRYPTO_THREAD_unlock(store->lock);
 1621|  93.6k|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|   248k|    for (curr++; curr < max; curr++) {
  ------------------
  |  Branch (1627:18): [True: 154k, False: 93.6k]
  ------------------
 1628|   154k|        OSSL_PROVIDER *prov = sk_OSSL_PROVIDER_value(provs, curr);
 1629|       |
 1630|   154k|        if (!CRYPTO_atomic_add(&prov->activatecnt, -1, &ref,
  ------------------
  |  Branch (1630:13): [True: 0, False: 154k]
  ------------------
 1631|   154k|                prov->activatecnt_lock)) {
 1632|      0|            ret = 0;
 1633|      0|            continue;
 1634|      0|        }
 1635|   154k|        if (ref < 1) {
  ------------------
  |  Branch (1635:13): [True: 0, False: 154k]
  ------------------
 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|   154k|        if (!CRYPTO_DOWN_REF(&prov->refcnt, &ref)) {
  ------------------
  |  Branch (1652:13): [True: 0, False: 154k]
  ------------------
 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|   154k|        assert(ref > 0);
  ------------------
  |  Branch (1660:9): [True: 0, False: 154k]
  |  Branch (1660:9): [True: 154k, False: 0]
  ------------------
 1661|   154k|    }
 1662|  93.6k|    sk_OSSL_PROVIDER_free(provs);
 1663|  93.6k|    return ret;
 1664|  93.6k|}
OSSL_PROVIDER_available:
 1667|    768|{
 1668|    768|    OSSL_PROVIDER *prov = NULL;
 1669|    768|    int available = 0;
 1670|    768|    struct provider_store_st *store = get_provider_store(libctx);
 1671|       |
 1672|    768|    if (store == NULL || !provider_activate_fallbacks(store))
  ------------------
  |  Branch (1672:9): [True: 0, False: 768]
  |  Branch (1672:26): [True: 0, False: 768]
  ------------------
 1673|      0|        return 0;
 1674|       |
 1675|    768|    prov = ossl_provider_find(libctx, name, 0);
 1676|    768|    if (prov != NULL) {
  ------------------
  |  Branch (1676:9): [True: 39, False: 729]
  ------------------
 1677|     39|        if (!CRYPTO_THREAD_read_lock(prov->flag_lock))
  ------------------
  |  Branch (1677:13): [True: 0, False: 39]
  ------------------
 1678|      0|            return 0;
 1679|     39|        available = prov->flag_activated;
 1680|     39|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1681|     39|        ossl_provider_free(prov);
 1682|     39|    }
 1683|    768|    return available;
 1684|    768|}
ossl_provider_name:
 1688|  1.73k|{
 1689|  1.73k|    return prov->name;
 1690|  1.73k|}
ossl_provider_libctx:
 1725|  4.50M|{
 1726|  4.50M|    return prov != NULL ? prov->libctx : NULL;
  ------------------
  |  Branch (1726:12): [True: 4.10M, False: 399k]
  ------------------
 1727|  4.50M|}
ossl_provider_teardown:
 1742|  1.61k|{
 1743|  1.61k|    if (prov->teardown != NULL
  ------------------
  |  Branch (1743:9): [True: 1.41k, False: 201]
  ------------------
 1744|  1.41k|#ifndef FIPS_MODULE
 1745|  1.41k|        && !prov->ischild
  ------------------
  |  Branch (1745:12): [True: 1.41k, False: 0]
  ------------------
 1746|  1.61k|#endif
 1747|  1.61k|    ) {
 1748|  1.41k|#ifndef FIPS_MODULE
 1749|  1.41k|        OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|  1.41k|    do {                           \
  |  |  220|  1.41k|        BIO *trc_out = NULL;       \
  |  |  221|  1.41k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 1.41k]
  |  |  ------------------
  ------------------
 1750|      0|        {
 1751|      0|            BIO_printf(trc_out, "(provider %s) calling teardown\n",
 1752|      0|                ossl_provider_name(prov));
 1753|      0|        }
 1754|  1.41k|        OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|  1.41k|    }                            \
  |  |  225|  1.41k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 1.41k]
  |  |  ------------------
  ------------------
 1755|  1.41k|#endif
 1756|  1.41k|        prov->teardown(prov->provctx);
 1757|  1.41k|    }
 1758|  1.61k|}
ossl_provider_get_capabilities:
 1913|  7.92k|{
 1914|  7.92k|    if (prov->get_capabilities != NULL) {
  ------------------
  |  Branch (1914:9): [True: 6.26k, False: 1.66k]
  ------------------
 1915|  6.26k|#ifndef FIPS_MODULE
 1916|  6.26k|        OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|  6.26k|    do {                           \
  |  |  220|  6.26k|        BIO *trc_out = NULL;       \
  |  |  221|  6.26k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 6.26k]
  |  |  ------------------
  ------------------
 1917|      0|        {
 1918|      0|            BIO_printf(trc_out,
 1919|      0|                "(provider %s) Calling get_capabilities "
 1920|      0|                "with capabilities %s\n",
 1921|      0|                prov->name,
 1922|      0|                capability == NULL ? "none" : capability);
  ------------------
  |  Branch (1922:17): [True: 0, False: 0]
  ------------------
 1923|      0|        }
 1924|  6.26k|        OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|  6.26k|    }                            \
  |  |  225|  6.26k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 6.26k]
  |  |  ------------------
  ------------------
 1925|  6.26k|#endif
 1926|  6.26k|        return prov->get_capabilities(prov->provctx, capability, cb, arg);
 1927|  6.26k|    }
 1928|  1.66k|    return 1;
 1929|  7.92k|}
ossl_provider_query_operation:
 1952|   147k|{
 1953|   147k|    const OSSL_ALGORITHM *res;
 1954|       |
 1955|   147k|    if (prov->query_operation == NULL) {
  ------------------
  |  Branch (1955:9): [True: 0, False: 147k]
  ------------------
 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|   147k|    res = prov->query_operation(prov->provctx, operation_id, no_cache);
 1968|   147k|#ifndef FIPS_MODULE
 1969|   147k|    OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|   147k|    do {                           \
  |  |  220|   147k|        BIO *trc_out = NULL;       \
  |  |  221|   147k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 147k]
  |  |  ------------------
  ------------------
 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|   147k|    OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|   147k|    }                            \
  |  |  225|   147k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 147k]
  |  |  ------------------
  ------------------
 1989|   147k|#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|   147k|    return res;
 1997|   147k|}
ossl_provider_unquery_operation:
 2016|   147k|{
 2017|   147k|    if (prov->unquery_operation != NULL) {
  ------------------
  |  Branch (2017:9): [True: 0, False: 147k]
  ------------------
 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|   147k|}
ossl_provider_set_operation_bit:
 2034|  8.80k|{
 2035|  8.80k|    size_t byte = bitnum / 8;
 2036|  8.80k|    unsigned char bit = (1 << (bitnum % 8)) & 0xFF;
 2037|       |
 2038|  8.80k|    if (!CRYPTO_THREAD_write_lock(provider->opbits_lock))
  ------------------
  |  Branch (2038:9): [True: 0, False: 8.80k]
  ------------------
 2039|      0|        return 0;
 2040|  8.80k|    if (provider->operation_bits_sz <= byte) {
  ------------------
  |  Branch (2040:9): [True: 3.01k, False: 5.79k]
  ------------------
 2041|  3.01k|        unsigned char *tmp = OPENSSL_realloc(provider->operation_bits,
  ------------------
  |  |  121|  3.01k|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2042|  3.01k|            byte + 1);
 2043|       |
 2044|  3.01k|        if (tmp == NULL) {
  ------------------
  |  Branch (2044:13): [True: 0, False: 3.01k]
  ------------------
 2045|      0|            CRYPTO_THREAD_unlock(provider->opbits_lock);
 2046|      0|            return 0;
 2047|      0|        }
 2048|  3.01k|        provider->operation_bits = tmp;
 2049|  3.01k|        memset(provider->operation_bits + provider->operation_bits_sz,
 2050|  3.01k|            '\0', byte + 1 - provider->operation_bits_sz);
 2051|  3.01k|        provider->operation_bits_sz = byte + 1;
 2052|  3.01k|    }
 2053|  8.80k|    provider->operation_bits[byte] |= bit;
 2054|  8.80k|    CRYPTO_THREAD_unlock(provider->opbits_lock);
 2055|  8.80k|    return 1;
 2056|  8.80k|}
ossl_provider_test_operation_bit:
 2060|   147k|{
 2061|   147k|    size_t byte = bitnum / 8;
 2062|   147k|    unsigned char bit = (1 << (bitnum % 8)) & 0xFF;
 2063|       |
 2064|   147k|    if (!ossl_assert(result != NULL)) {
  ------------------
  |  |   52|   147k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   147k|    __FILE__, __LINE__)
  ------------------
  |  Branch (2064:9): [True: 0, False: 147k]
  ------------------
 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|   147k|    *result = 0;
 2070|   147k|    if (!CRYPTO_THREAD_read_lock(provider->opbits_lock))
  ------------------
  |  Branch (2070:9): [True: 0, False: 147k]
  ------------------
 2071|      0|        return 0;
 2072|   147k|    if (provider->operation_bits_sz > byte)
  ------------------
  |  Branch (2072:9): [True: 144k, False: 3.01k]
  ------------------
 2073|   144k|        *result = ((provider->operation_bits[byte] & bit) != 0);
 2074|   147k|    CRYPTO_THREAD_unlock(provider->opbits_lock);
 2075|   147k|    return 1;
 2076|   147k|}
provider_core.c:provider_deactivate_free:
  237|  1.61k|{
  238|  1.61k|    if (prov->flag_activated)
  ------------------
  |  Branch (238:9): [True: 768, False: 843]
  ------------------
  239|    768|        ossl_provider_deactivate(prov, 1);
  240|  1.61k|    ossl_provider_free(prov);
  241|  1.61k|}
provider_core.c:ossl_provider_cmp:
  204|  8.94k|{
  205|  8.94k|    return strcmp((*a)->name, (*b)->name);
  206|  8.94k|}
provider_core.c:get_provider_store:
  330|   104k|{
  331|   104k|    struct provider_store_st *store = NULL;
  332|       |
  333|   104k|    store = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_PROVIDER_STORE_INDEX);
  ------------------
  |  |   96|   104k|#define OSSL_LIB_CTX_PROVIDER_STORE_INDEX 1
  ------------------
  334|   104k|    if (store == NULL)
  ------------------
  |  Branch (334:9): [True: 0, False: 104k]
  ------------------
  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|   104k|    return store;
  337|   104k|}
provider_core.c:provider_new:
  450|  1.69k|{
  451|  1.69k|    OSSL_PROVIDER *prov = NULL;
  452|       |
  453|  1.69k|    if ((prov = OPENSSL_zalloc(sizeof(*prov))) == NULL)
  ------------------
  |  |  109|  1.69k|    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.69k]
  ------------------
  454|      0|        return NULL;
  455|  1.69k|    if (!CRYPTO_NEW_REF(&prov->refcnt, 1)) {
  ------------------
  |  Branch (455:9): [True: 0, False: 1.69k]
  ------------------
  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.69k|    if ((prov->activatecnt_lock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (459:9): [True: 0, False: 1.69k]
  ------------------
  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.69k|    if ((prov->opbits_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (465:9): [True: 0, False: 1.69k]
  ------------------
  466|  1.69k|        || (prov->flag_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (466:12): [True: 0, False: 1.69k]
  ------------------
  467|  1.69k|        || (prov->parameters = sk_INFOPAIR_deep_copy(parameters,
  ------------------
  |  Branch (467:12): [True: 0, False: 1.69k]
  ------------------
  468|  1.69k|                infopair_copy,
  469|  1.69k|                infopair_free))
  470|  1.69k|            == 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.69k|    if ((prov->name = OPENSSL_strdup(name)) == NULL) {
  ------------------
  |  |  136|  1.69k|    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.69k]
  ------------------
  476|      0|        ossl_provider_free(prov);
  477|      0|        return NULL;
  478|      0|    }
  479|       |
  480|  1.69k|    prov->init_function = init_function;
  481|       |
  482|  1.69k|    return prov;
  483|  1.69k|}
provider_core.c:create_provider_children:
  637|    843|{
  638|    843|    int ret = 1;
  639|    843|#ifndef FIPS_MODULE
  640|    843|    struct provider_store_st *store = prov->store;
  641|    843|    OSSL_PROVIDER_CHILD_CB *child_cb;
  642|    843|    int i, max;
  643|       |
  644|    843|    max = sk_OSSL_PROVIDER_CHILD_CB_num(store->child_cbs);
  645|    843|    for (i = 0; i < max; i++) {
  ------------------
  |  Branch (645:17): [True: 0, False: 843]
  ------------------
  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|    843|#endif
  654|       |
  655|    843|    return ret;
  656|    843|}
provider_core.c:provider_activate:
 1262|  2.14k|{
 1263|  2.14k|    int count = -1;
 1264|  2.14k|    struct provider_store_st *store;
 1265|  2.14k|    int ret = 1;
 1266|       |
 1267|  2.14k|    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.14k|    if (store == NULL) {
  ------------------
  |  Branch (1272:9): [True: 1.69k, False: 441]
  ------------------
 1273|  1.69k|        lock = 0;
 1274|  1.69k|        if (!provider_init(prov))
  ------------------
  |  Branch (1274:13): [True: 87, False: 1.61k]
  ------------------
 1275|     87|            return -1;
 1276|  1.69k|    }
 1277|       |
 1278|  2.05k|#ifndef FIPS_MODULE
 1279|  2.05k|    if (prov->random_bytes != NULL
  ------------------
  |  Branch (1279:9): [True: 0, False: 2.05k]
  ------------------
 1280|      0|        && !ossl_rand_check_random_provider_on_load(prov->libctx, prov))
  ------------------
  |  Branch (1280:12): [True: 0, False: 0]
  ------------------
 1281|      0|        return -1;
 1282|       |
 1283|  2.05k|    if (prov->ischild && upcalls && !ossl_provider_up_ref_parent(prov, 1))
  ------------------
  |  Branch (1283:9): [True: 0, False: 2.05k]
  |  Branch (1283:26): [True: 0, False: 0]
  |  Branch (1283:37): [True: 0, False: 0]
  ------------------
 1284|      0|        return -1;
 1285|  2.05k|#endif
 1286|       |
 1287|  2.05k|    if (lock && !CRYPTO_THREAD_read_lock(store->lock)) {
  ------------------
  |  Branch (1287:9): [True: 441, False: 1.61k]
  |  Branch (1287:17): [True: 0, False: 441]
  ------------------
 1288|      0|#ifndef FIPS_MODULE
 1289|      0|        if (prov->ischild && upcalls)
  ------------------
  |  Branch (1289:13): [True: 0, False: 0]
  |  Branch (1289:30): [True: 0, False: 0]
  ------------------
 1290|      0|            ossl_provider_free_parent(prov, 1);
 1291|      0|#endif
 1292|      0|        return -1;
 1293|      0|    }
 1294|       |
 1295|  2.05k|    if (lock && !CRYPTO_THREAD_write_lock(prov->flag_lock)) {
  ------------------
  |  Branch (1295:9): [True: 441, False: 1.61k]
  |  Branch (1295:17): [True: 0, False: 441]
  ------------------
 1296|      0|        CRYPTO_THREAD_unlock(store->lock);
 1297|      0|#ifndef FIPS_MODULE
 1298|      0|        if (prov->ischild && upcalls)
  ------------------
  |  Branch (1298:13): [True: 0, False: 0]
  |  Branch (1298:30): [True: 0, False: 0]
  ------------------
 1299|      0|            ossl_provider_free_parent(prov, 1);
 1300|      0|#endif
 1301|      0|        return -1;
 1302|      0|    }
 1303|  2.05k|    if (CRYPTO_atomic_add(&prov->activatecnt, 1, &count, prov->activatecnt_lock)) {
  ------------------
  |  Branch (1303:9): [True: 2.05k, False: 0]
  ------------------
 1304|  2.05k|        prov->flag_activated = 1;
 1305|       |
 1306|  2.05k|        if (count == 1 && store != NULL) {
  ------------------
  |  Branch (1306:13): [True: 1.61k, False: 441]
  |  Branch (1306:27): [True: 0, False: 1.61k]
  ------------------
 1307|      0|            ret = create_provider_children(prov);
 1308|      0|        }
 1309|  2.05k|    }
 1310|  2.05k|    if (lock) {
  ------------------
  |  Branch (1310:9): [True: 441, False: 1.61k]
  ------------------
 1311|    441|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1312|    441|        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|    441|#ifndef FIPS_MODULE
 1318|    441|        if (count == 1)
  ------------------
  |  Branch (1318:13): [True: 0, False: 441]
  ------------------
 1319|      0|            ossl_decoder_cache_flush(prov->libctx);
 1320|    441|#endif
 1321|    441|    }
 1322|       |
 1323|  2.05k|    if (!ret)
  ------------------
  |  Branch (1323:9): [True: 0, False: 2.05k]
  ------------------
 1324|      0|        return -1;
 1325|       |
 1326|  2.05k|    return count;
 1327|  2.05k|}
provider_core.c:provider_init:
  954|  1.69k|{
  955|  1.69k|    const OSSL_DISPATCH *provider_dispatch = NULL;
  956|  1.69k|    void *tmp_provctx = NULL; /* safety measure */
  957|  1.69k|#ifndef OPENSSL_NO_ERR
  958|  1.69k|#ifndef FIPS_MODULE
  959|  1.69k|    OSSL_FUNC_provider_get_reason_strings_fn *p_get_reason_strings = NULL;
  960|  1.69k|#endif
  961|  1.69k|#endif
  962|  1.69k|    int ok = 0;
  963|       |
  964|  1.69k|    if (!ossl_assert(!prov->flag_initialized)) {
  ------------------
  |  |   52|  1.69k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.69k|    __FILE__, __LINE__)
  ------------------
  |  Branch (964:9): [True: 0, False: 1.69k]
  ------------------
  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.69k|    if (prov->init_function == NULL) {
  ------------------
  |  Branch (973:9): [True: 87, False: 1.61k]
  ------------------
  974|       |#ifdef FIPS_MODULE
  975|       |        goto end;
  976|       |#else
  977|     87|        if (prov->module == NULL) {
  ------------------
  |  Branch (977:13): [True: 87, False: 0]
  ------------------
  978|     87|            char *allocated_path = NULL;
  979|     87|            const char *module_path = NULL;
  980|     87|            char *merged_path = NULL;
  981|     87|            const char *load_dir = NULL;
  982|     87|            char *allocated_load_dir = NULL;
  983|     87|            struct provider_store_st *store;
  984|       |
  985|     87|            if ((prov->module = DSO_new()) == NULL) {
  ------------------
  |  Branch (985:17): [True: 0, False: 87]
  ------------------
  986|       |                /* DSO_new() generates an error already */
  987|      0|                goto end;
  988|      0|            }
  989|       |
  990|     87|            if ((store = get_provider_store(prov->libctx)) == NULL
  ------------------
  |  Branch (990:17): [True: 0, False: 87]
  ------------------
  991|     87|                || !CRYPTO_THREAD_read_lock(store->default_path_lock))
  ------------------
  |  Branch (991:20): [True: 0, False: 87]
  ------------------
  992|      0|                goto end;
  993|       |
  994|     87|            if (store->default_path != NULL) {
  ------------------
  |  Branch (994:17): [True: 0, False: 87]
  ------------------
  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|     87|            } else {
 1001|     87|                CRYPTO_THREAD_unlock(store->default_path_lock);
 1002|     87|            }
 1003|       |
 1004|     87|            if (load_dir == NULL) {
  ------------------
  |  Branch (1004:17): [True: 87, False: 0]
  ------------------
 1005|     87|                load_dir = ossl_safe_getenv("OPENSSL_MODULES");
 1006|     87|                if (load_dir == NULL)
  ------------------
  |  Branch (1006:21): [True: 87, False: 0]
  ------------------
 1007|     87|                    load_dir = ossl_get_modulesdir();
 1008|     87|            }
 1009|       |
 1010|     87|            DSO_ctrl(prov->module, DSO_CTRL_SET_FLAGS,
  ------------------
  |  |   19|     87|#define DSO_CTRL_SET_FLAGS 2
  ------------------
 1011|     87|                DSO_FLAG_NAME_TRANSLATION_EXT_ONLY, NULL);
  ------------------
  |  |   41|     87|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
 1012|       |
 1013|     87|            module_path = prov->path;
 1014|     87|            if (module_path == NULL)
  ------------------
  |  Branch (1014:17): [True: 87, False: 0]
  ------------------
 1015|     87|                module_path = allocated_path = DSO_convert_filename(prov->module, prov->name);
 1016|     87|            if (module_path != NULL)
  ------------------
  |  Branch (1016:17): [True: 87, False: 0]
  ------------------
 1017|     87|                merged_path = DSO_merge(prov->module, module_path, load_dir);
 1018|       |
 1019|     87|            if (merged_path == NULL
  ------------------
  |  Branch (1019:17): [True: 0, False: 87]
  ------------------
 1020|     87|                || (DSO_load(prov->module, merged_path, NULL, 0)) == NULL) {
  ------------------
  |  Branch (1020:20): [True: 87, False: 0]
  ------------------
 1021|     87|                DSO_free(prov->module);
 1022|     87|                prov->module = NULL;
 1023|     87|            }
 1024|       |
 1025|     87|            OPENSSL_free(merged_path);
  ------------------
  |  |  132|     87|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1026|     87|            OPENSSL_free(allocated_path);
  ------------------
  |  |  132|     87|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1027|     87|            OPENSSL_free(allocated_load_dir);
  ------------------
  |  |  132|     87|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1028|     87|        }
 1029|       |
 1030|     87|        if (prov->module == NULL) {
  ------------------
  |  Branch (1030:13): [True: 87, False: 0]
  ------------------
 1031|       |            /* DSO has already recorded errors, this is just a tracepoint */
 1032|     87|            ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |  359|     87|    (ERR_new(),                                                  \
  |  |  360|     87|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     87|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     87|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |   68|     87|#define ERR_LIB_CRYPTO 15
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |  289|     87|#define ERR_R_DSO_LIB (ERR_LIB_DSO /* 37 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   81|     87|#define ERR_LIB_DSO 37
  |  |  ------------------
  |  |               #define ERR_R_DSO_LIB (ERR_LIB_DSO /* 37 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|     87|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|     87|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1033|     87|                "name=%s", prov->name);
 1034|     87|            goto end;
 1035|     87|        }
 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.61k|    if (prov->init_function == NULL) {
  ------------------
  |  Branch (1043:9): [True: 0, False: 1.61k]
  ------------------
 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.61k|#ifndef FIPS_MODULE
 1050|  1.61k|    OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|  1.61k|    do {                           \
  |  |  220|  1.61k|        BIO *trc_out = NULL;       \
  |  |  221|  1.61k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 1.61k]
  |  |  ------------------
  ------------------
 1051|      0|    {
 1052|      0|        BIO_printf(trc_out,
 1053|      0|            "(provider %s) initializing\n", prov->name);
 1054|      0|    }
 1055|  1.61k|    OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|  1.61k|    }                            \
  |  |  225|  1.61k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 1.61k]
  |  |  ------------------
  ------------------
 1056|  1.61k|#endif
 1057|       |
 1058|  1.61k|    if (!prov->init_function((OSSL_CORE_HANDLE *)prov, core_dispatch,
  ------------------
  |  Branch (1058:9): [True: 0, False: 1.61k]
  ------------------
 1059|  1.61k|            &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.61k|    prov->provctx = tmp_provctx;
 1065|  1.61k|    prov->dispatch = provider_dispatch;
 1066|       |
 1067|  1.61k|    if (provider_dispatch != NULL) {
  ------------------
  |  Branch (1067:9): [True: 1.61k, False: 0]
  ------------------
 1068|  8.62k|        for (; provider_dispatch->function_id != 0; provider_dispatch++) {
  ------------------
  |  Branch (1068:16): [True: 7.01k, False: 1.61k]
  ------------------
 1069|  7.01k|            switch (provider_dispatch->function_id) {
  ------------------
  |  Branch (1069:21): [True: 7.01k, False: 0]
  ------------------
 1070|  1.41k|            case OSSL_FUNC_PROVIDER_TEARDOWN:
  ------------------
  |  |  234|  1.41k|#define OSSL_FUNC_PROVIDER_TEARDOWN 1024
  ------------------
  |  Branch (1070:13): [True: 1.41k, False: 5.60k]
  ------------------
 1071|  1.41k|                prov->teardown = OSSL_FUNC_provider_teardown(provider_dispatch);
 1072|  1.41k|                break;
 1073|  1.61k|            case OSSL_FUNC_PROVIDER_GETTABLE_PARAMS:
  ------------------
  |  |  236|  1.61k|#define OSSL_FUNC_PROVIDER_GETTABLE_PARAMS 1025
  ------------------
  |  Branch (1073:13): [True: 1.61k, False: 5.40k]
  ------------------
 1074|  1.61k|                prov->gettable_params = OSSL_FUNC_provider_gettable_params(provider_dispatch);
 1075|  1.61k|                break;
 1076|  1.61k|            case OSSL_FUNC_PROVIDER_GET_PARAMS:
  ------------------
  |  |  239|  1.61k|#define OSSL_FUNC_PROVIDER_GET_PARAMS 1026
  ------------------
  |  Branch (1076:13): [True: 1.61k, False: 5.40k]
  ------------------
 1077|  1.61k|                prov->get_params = OSSL_FUNC_provider_get_params(provider_dispatch);
 1078|  1.61k|                break;
 1079|      0|            case OSSL_FUNC_PROVIDER_SELF_TEST:
  ------------------
  |  |  252|      0|#define OSSL_FUNC_PROVIDER_SELF_TEST 1031
  ------------------
  |  Branch (1079:13): [True: 0, False: 7.01k]
  ------------------
 1080|      0|                prov->self_test = OSSL_FUNC_provider_self_test(provider_dispatch);
 1081|      0|                break;
 1082|      0|            case OSSL_FUNC_PROVIDER_RANDOM_BYTES:
  ------------------
  |  |  254|      0|#define OSSL_FUNC_PROVIDER_RANDOM_BYTES 1032
  ------------------
  |  Branch (1082:13): [True: 0, False: 7.01k]
  ------------------
 1083|      0|                prov->random_bytes = OSSL_FUNC_provider_random_bytes(provider_dispatch);
 1084|      0|                break;
 1085|    769|            case OSSL_FUNC_PROVIDER_GET_CAPABILITIES:
  ------------------
  |  |  250|    769|#define OSSL_FUNC_PROVIDER_GET_CAPABILITIES 1030
  ------------------
  |  Branch (1085:13): [True: 769, False: 6.24k]
  ------------------
 1086|    769|                prov->get_capabilities = OSSL_FUNC_provider_get_capabilities(provider_dispatch);
 1087|    769|                break;
 1088|  1.61k|            case OSSL_FUNC_PROVIDER_QUERY_OPERATION:
  ------------------
  |  |  241|  1.61k|#define OSSL_FUNC_PROVIDER_QUERY_OPERATION 1027
  ------------------
  |  Branch (1088:13): [True: 1.61k, False: 5.40k]
  ------------------
 1089|  1.61k|                prov->query_operation = OSSL_FUNC_provider_query_operation(provider_dispatch);
 1090|  1.61k|                break;
 1091|      0|            case OSSL_FUNC_PROVIDER_UNQUERY_OPERATION:
  ------------------
  |  |  244|      0|#define OSSL_FUNC_PROVIDER_UNQUERY_OPERATION 1028
  ------------------
  |  Branch (1091:13): [True: 0, False: 7.01k]
  ------------------
 1092|      0|                prov->unquery_operation = OSSL_FUNC_provider_unquery_operation(provider_dispatch);
 1093|      0|                break;
 1094|      0|#ifndef OPENSSL_NO_ERR
 1095|      0|#ifndef FIPS_MODULE
 1096|      0|            case OSSL_FUNC_PROVIDER_GET_REASON_STRINGS:
  ------------------
  |  |  247|      0|#define OSSL_FUNC_PROVIDER_GET_REASON_STRINGS 1029
  ------------------
  |  Branch (1096:13): [True: 0, False: 7.01k]
  ------------------
 1097|      0|                p_get_reason_strings = OSSL_FUNC_provider_get_reason_strings(provider_dispatch);
 1098|      0|                break;
 1099|  7.01k|#endif
 1100|  7.01k|#endif
 1101|  7.01k|            }
 1102|  7.01k|        }
 1103|  1.61k|    }
 1104|       |
 1105|  1.61k|#ifndef OPENSSL_NO_ERR
 1106|  1.61k|#ifndef FIPS_MODULE
 1107|  1.61k|    if (p_get_reason_strings != NULL) {
  ------------------
  |  Branch (1107:9): [True: 0, False: 1.61k]
  ------------------
 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.61k|#endif
 1148|  1.61k|#endif
 1149|       |
 1150|       |    /* With this flag set, this provider has become fully "loaded". */
 1151|  1.61k|    prov->flag_initialized = 1;
 1152|  1.61k|    ok = 1;
 1153|       |
 1154|  1.69k|end:
 1155|  1.69k|    return ok;
 1156|  1.61k|}
provider_core.c:core_get_params:
 2328|  5.64k|{
 2329|  5.64k|    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|  5.64k|    OSSL_PROVIDER *prov = (OSSL_PROVIDER *)handle;
 2335|       |
 2336|  5.64k|    if ((p = OSSL_PARAM_locate(params, OSSL_PROV_PARAM_CORE_VERSION)) != NULL)
  ------------------
  |  |  514|  5.64k|# define OSSL_PROV_PARAM_CORE_VERSION "openssl-version"
  ------------------
  |  Branch (2336:9): [True: 0, False: 5.64k]
  ------------------
 2337|      0|        OSSL_PARAM_set_utf8_ptr(p, OPENSSL_VERSION_STR);
  ------------------
  |  |   90|      0|# define OPENSSL_VERSION_STR "4.0.1"
  ------------------
 2338|  5.64k|    if ((p = OSSL_PARAM_locate(params, OSSL_PROV_PARAM_CORE_PROV_NAME)) != NULL)
  ------------------
  |  |  513|  5.64k|# define OSSL_PROV_PARAM_CORE_PROV_NAME "provider-name"
  ------------------
  |  Branch (2338:9): [True: 0, False: 5.64k]
  ------------------
 2339|      0|        OSSL_PARAM_set_utf8_ptr(p, prov->name);
 2340|       |
 2341|  5.64k|#ifndef FIPS_MODULE
 2342|  5.64k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (2342:9): [True: 0, False: 5.64k]
  ------------------
 2343|  5.64k|             OSSL_PROV_PARAM_CORE_MODULE_FILENAME))
  ------------------
  |  |  512|  5.64k|# define OSSL_PROV_PARAM_CORE_MODULE_FILENAME "module-filename"
  ------------------
 2344|  5.64k|        != NULL)
 2345|      0|        OSSL_PARAM_set_utf8_ptr(p, ossl_provider_module_path(prov));
 2346|  5.64k|#endif
 2347|       |
 2348|  5.64k|    return OSSL_PROVIDER_get_conf_parameters(prov, params);
 2349|  5.64k|}
provider_core.c:core_get_libctx:
 2352|  1.41k|{
 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.41k|    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.41k|    assert(prov != NULL);
  ------------------
  |  Branch (2365:5): [True: 0, False: 1.41k]
  |  Branch (2365:5): [True: 1.41k, False: 0]
  ------------------
 2366|  1.41k|    return (OPENSSL_CORE_CTX *)prov->libctx;
 2367|  1.41k|}
provider_core.c:provider_flush_store_cache:
 1330|    843|{
 1331|    843|    struct provider_store_st *store;
 1332|    843|    int freeing;
 1333|       |
 1334|    843|    if ((store = get_provider_store(prov->libctx)) == NULL)
  ------------------
  |  Branch (1334:9): [True: 0, False: 843]
  ------------------
 1335|      0|        return 0;
 1336|       |
 1337|    843|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1337:9): [True: 0, False: 843]
  ------------------
 1338|      0|        return 0;
 1339|    843|    freeing = store->freeing;
 1340|    843|    CRYPTO_THREAD_unlock(store->lock);
 1341|       |
 1342|    843|    if (!freeing) {
  ------------------
  |  Branch (1342:9): [True: 843, False: 0]
  ------------------
 1343|    843|        int acc
 1344|    843|            = evp_method_store_cache_flush(prov->libctx)
 1345|    843|#ifndef FIPS_MODULE
 1346|    843|            + ossl_encoder_store_cache_flush(prov->libctx)
 1347|    843|            + ossl_decoder_store_cache_flush(prov->libctx)
 1348|    843|            + ossl_store_loader_store_cache_flush(prov->libctx)
 1349|    843|#endif
 1350|    843|            ;
 1351|       |
 1352|    843|#ifndef FIPS_MODULE
 1353|    843|        return acc == 4;
 1354|       |#else
 1355|       |        return acc == 1;
 1356|       |#endif
 1357|    843|    }
 1358|      0|    return 1;
 1359|    843|}
provider_core.c:provider_deactivate:
 1166|  2.05k|{
 1167|  2.05k|    int count;
 1168|  2.05k|    struct provider_store_st *store;
 1169|  2.05k|#ifndef FIPS_MODULE
 1170|  2.05k|    int freeparent = 0;
 1171|  2.05k|#endif
 1172|  2.05k|    int lock = 1;
 1173|       |
 1174|  2.05k|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|  2.05k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.05k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1174:9): [True: 0, False: 2.05k]
  ------------------
 1175|      0|        return -1;
 1176|       |
 1177|  2.05k|#ifndef FIPS_MODULE
 1178|  2.05k|    if (prov->random_bytes != NULL
  ------------------
  |  Branch (1178:9): [True: 0, False: 2.05k]
  ------------------
 1179|      0|        && !ossl_rand_check_random_provider_on_unload(prov->libctx, prov))
  ------------------
  |  Branch (1179:12): [True: 0, False: 0]
  ------------------
 1180|      0|        return -1;
 1181|  2.05k|#endif
 1182|       |
 1183|       |    /*
 1184|       |     * No need to lock if we've got no store because we've not been shared with
 1185|       |     * other threads.
 1186|       |     */
 1187|  2.05k|    store = get_provider_store(prov->libctx);
 1188|  2.05k|    if (store == NULL)
  ------------------
  |  Branch (1188:9): [True: 0, False: 2.05k]
  ------------------
 1189|      0|        lock = 0;
 1190|       |
 1191|  2.05k|    if (lock && !CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1191:9): [True: 2.05k, False: 0]
  |  Branch (1191:17): [True: 0, False: 2.05k]
  ------------------
 1192|      0|        return -1;
 1193|  2.05k|    if (lock && !CRYPTO_THREAD_write_lock(prov->flag_lock)) {
  ------------------
  |  Branch (1193:9): [True: 2.05k, False: 0]
  |  Branch (1193:17): [True: 0, False: 2.05k]
  ------------------
 1194|      0|        CRYPTO_THREAD_unlock(store->lock);
 1195|      0|        return -1;
 1196|      0|    }
 1197|       |
 1198|  2.05k|    if (!CRYPTO_atomic_add(&prov->activatecnt, -1, &count, prov->activatecnt_lock)) {
  ------------------
  |  Branch (1198:9): [True: 0, False: 2.05k]
  ------------------
 1199|      0|        if (lock) {
  ------------------
  |  Branch (1199:13): [True: 0, False: 0]
  ------------------
 1200|      0|            CRYPTO_THREAD_unlock(prov->flag_lock);
 1201|      0|            CRYPTO_THREAD_unlock(store->lock);
 1202|      0|        }
 1203|      0|        return -1;
 1204|      0|    }
 1205|       |
 1206|  2.05k|#ifndef FIPS_MODULE
 1207|  2.05k|    if (count >= 1 && prov->ischild && upcalls) {
  ------------------
  |  Branch (1207:9): [True: 441, False: 1.61k]
  |  Branch (1207:23): [True: 0, False: 441]
  |  Branch (1207:40): [True: 0, False: 0]
  ------------------
 1208|       |        /*
 1209|       |         * We have had a direct activation in this child libctx so we need to
 1210|       |         * now down the ref count in the parent provider. We do the actual down
 1211|       |         * ref outside of the flag_lock, since it could involve getting other
 1212|       |         * locks.
 1213|       |         */
 1214|      0|        freeparent = 1;
 1215|      0|    }
 1216|  2.05k|#endif
 1217|       |
 1218|  2.05k|    if (count < 1)
  ------------------
  |  Branch (1218:9): [True: 1.61k, False: 441]
  ------------------
 1219|  1.61k|        prov->flag_activated = 0;
 1220|    441|#ifndef FIPS_MODULE
 1221|    441|    else
 1222|    441|        removechildren = 0;
 1223|  2.05k|#endif
 1224|       |
 1225|  2.05k|#ifndef FIPS_MODULE
 1226|  2.05k|    if (removechildren && store != NULL) {
  ------------------
  |  Branch (1226:9): [True: 1.61k, False: 441]
  |  Branch (1226:27): [True: 1.61k, False: 0]
  ------------------
 1227|  1.61k|        int i, max = sk_OSSL_PROVIDER_CHILD_CB_num(store->child_cbs);
 1228|  1.61k|        OSSL_PROVIDER_CHILD_CB *child_cb;
 1229|       |
 1230|  1.61k|        for (i = 0; i < max; i++) {
  ------------------
  |  Branch (1230:21): [True: 0, False: 1.61k]
  ------------------
 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.61k|    }
 1235|  2.05k|#endif
 1236|  2.05k|    if (lock) {
  ------------------
  |  Branch (1236:9): [True: 2.05k, False: 0]
  ------------------
 1237|  2.05k|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1238|  2.05k|        CRYPTO_THREAD_unlock(store->lock);
 1239|       |        /*
 1240|       |         * This can be done outside the lock. We tolerate other threads getting
 1241|       |         * the wrong result briefly when creating OSSL_DECODER_CTXs.
 1242|       |         */
 1243|  2.05k|#ifndef FIPS_MODULE
 1244|  2.05k|        if (count < 1)
  ------------------
  |  Branch (1244:13): [True: 1.61k, False: 441]
  ------------------
 1245|  1.61k|            ossl_decoder_cache_flush(prov->libctx);
 1246|  2.05k|#endif
 1247|  2.05k|    }
 1248|  2.05k|#ifndef FIPS_MODULE
 1249|  2.05k|    if (freeparent)
  ------------------
  |  Branch (1249:9): [True: 0, False: 2.05k]
  ------------------
 1250|      0|        ossl_provider_free_parent(prov, 1);
 1251|  2.05k|#endif
 1252|       |
 1253|       |    /* We don't deinit here, that's done in ossl_provider_free() */
 1254|  2.05k|    return count;
 1255|  2.05k|}
provider_core.c:provider_remove_store_methods:
 1362|  1.61k|{
 1363|  1.61k|    struct provider_store_st *store;
 1364|  1.61k|    int freeing;
 1365|       |
 1366|  1.61k|    if ((store = get_provider_store(prov->libctx)) == NULL)
  ------------------
  |  Branch (1366:9): [True: 0, False: 1.61k]
  ------------------
 1367|      0|        return 0;
 1368|       |
 1369|  1.61k|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1369:9): [True: 0, False: 1.61k]
  ------------------
 1370|      0|        return 0;
 1371|  1.61k|    freeing = store->freeing;
 1372|  1.61k|    CRYPTO_THREAD_unlock(store->lock);
 1373|       |
 1374|  1.61k|    if (!freeing) {
  ------------------
  |  Branch (1374:9): [True: 843, False: 768]
  ------------------
 1375|    843|        int acc;
 1376|       |
 1377|    843|        if (!CRYPTO_THREAD_write_lock(prov->opbits_lock))
  ------------------
  |  Branch (1377:13): [True: 0, False: 843]
  ------------------
 1378|      0|            return 0;
 1379|    843|        OPENSSL_free(prov->operation_bits);
  ------------------
  |  |  132|    843|    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|    843|        prov->operation_bits = NULL;
 1381|    843|        prov->operation_bits_sz = 0;
 1382|    843|        CRYPTO_THREAD_unlock(prov->opbits_lock);
 1383|       |
 1384|    843|        acc = evp_method_store_remove_all_provided(prov)
 1385|    843|#ifndef FIPS_MODULE
 1386|    843|            + ossl_encoder_store_remove_all_provided(prov)
 1387|    843|            + ossl_decoder_store_remove_all_provided(prov)
 1388|    843|            + ossl_store_loader_store_remove_all_provided(prov)
 1389|    843|#endif
 1390|    843|            ;
 1391|       |
 1392|    843|#ifndef FIPS_MODULE
 1393|    843|        return acc == 4;
 1394|       |#else
 1395|       |        return acc == 1;
 1396|       |#endif
 1397|    843|    }
 1398|    768|    return 1;
 1399|  1.61k|}
provider_core.c:provider_activate_fallbacks:
 1442|  94.4k|{
 1443|  94.4k|    int use_fallbacks;
 1444|  94.4k|    int activated_fallback_count = 0;
 1445|  94.4k|    int ret = 0;
 1446|  94.4k|    const OSSL_PROVIDER_INFO *p;
 1447|       |
 1448|  94.4k|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1448:9): [True: 0, False: 94.4k]
  ------------------
 1449|      0|        return 0;
 1450|  94.4k|    use_fallbacks = store->use_fallbacks;
 1451|  94.4k|    CRYPTO_THREAD_unlock(store->lock);
 1452|  94.4k|    if (!use_fallbacks)
  ------------------
  |  Branch (1452:9): [True: 93.6k, False: 769]
  ------------------
 1453|  93.6k|        return 1;
 1454|       |
 1455|    769|    if (!CRYPTO_THREAD_write_lock(store->lock))
  ------------------
  |  Branch (1455:9): [True: 0, False: 769]
  ------------------
 1456|      0|        return 0;
 1457|       |    /* Check again, just in case another thread changed it */
 1458|    769|    use_fallbacks = store->use_fallbacks;
 1459|    769|    if (!use_fallbacks) {
  ------------------
  |  Branch (1459:9): [True: 0, False: 769]
  ------------------
 1460|      0|        CRYPTO_THREAD_unlock(store->lock);
 1461|      0|        return 1;
 1462|      0|    }
 1463|       |
 1464|  3.07k|    for (p = ossl_predefined_providers; p->name != NULL; p++) {
  ------------------
  |  Branch (1464:41): [True: 2.30k, False: 769]
  ------------------
 1465|  2.30k|        OSSL_PROVIDER *prov = NULL;
 1466|  2.30k|        OSSL_PROVIDER_INFO *info = store->provinfo;
 1467|  2.30k|        STACK_OF(INFOPAIR) *params = NULL;
  ------------------
  |  |   33|  2.30k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1468|  2.30k|        size_t i;
 1469|       |
 1470|  2.30k|        if (!p->is_fallback)
  ------------------
  |  Branch (1470:13): [True: 1.53k, False: 769]
  ------------------
 1471|  1.53k|            continue;
 1472|       |
 1473|    769|        for (i = 0; i < store->numprovinfo; info++, i++) {
  ------------------
  |  Branch (1473:21): [True: 0, False: 769]
  ------------------
 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|    769|        prov = provider_new(p->name, p->init, params);
 1485|    769|        if (prov == NULL)
  ------------------
  |  Branch (1485:13): [True: 0, False: 769]
  ------------------
 1486|      0|            goto err;
 1487|    769|        prov->libctx = store->libctx;
 1488|    769|#ifndef FIPS_MODULE
 1489|    769|        prov->error_lib = ERR_get_next_error_library();
 1490|    769|#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|    769|        if (provider_activate(prov, 0, 0) < 0) {
  ------------------
  |  Branch (1498:13): [True: 0, False: 769]
  ------------------
 1499|      0|            ossl_provider_free(prov);
 1500|      0|            goto err;
 1501|      0|        }
 1502|    769|        prov->store = store;
 1503|    769|        if (sk_OSSL_PROVIDER_push(store->providers, prov) == 0) {
  ------------------
  |  Branch (1503:13): [True: 0, False: 769]
  ------------------
 1504|      0|            ossl_provider_free(prov);
 1505|      0|            goto err;
 1506|      0|        }
 1507|    769|        activated_fallback_count++;
 1508|    769|    }
 1509|       |
 1510|    769|    if (activated_fallback_count > 0) {
  ------------------
  |  Branch (1510:9): [True: 769, False: 0]
  ------------------
 1511|    769|        store->use_fallbacks = 0;
 1512|    769|        ret = 1;
 1513|    769|    }
 1514|    769|err:
 1515|    769|    CRYPTO_THREAD_unlock(store->lock);
 1516|    769|    return ret;
 1517|    769|}

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|  34.0k|{
  250|  34.0k|    const RAND_METHOD *tmp_meth = NULL;
  251|       |
  252|  34.0k|    if (!RUN_ONCE(&rand_init, do_rand_init))
  ------------------
  |  |  130|  34.0k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 34.0k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (252:9): [True: 0, False: 34.0k]
  ------------------
  253|      0|        return NULL;
  254|       |
  255|  34.0k|    if (rand_meth_lock == NULL)
  ------------------
  |  Branch (255:9): [True: 0, False: 34.0k]
  ------------------
  256|      0|        return NULL;
  257|       |
  258|  34.0k|    if (!CRYPTO_THREAD_read_lock(rand_meth_lock))
  ------------------
  |  Branch (258:9): [True: 0, False: 34.0k]
  ------------------
  259|      0|        return NULL;
  260|  34.0k|    tmp_meth = default_RAND_meth;
  261|  34.0k|    CRYPTO_THREAD_unlock(rand_meth_lock);
  262|  34.0k|    if (tmp_meth != NULL)
  ------------------
  |  Branch (262:9): [True: 34.0k, False: 1]
  ------------------
  263|  34.0k|        return tmp_meth;
  264|       |
  265|      1|    if (!CRYPTO_THREAD_write_lock(rand_meth_lock))
  ------------------
  |  Branch (265:9): [True: 0, False: 1]
  ------------------
  266|      0|        return NULL;
  267|      1|    if (default_RAND_meth == NULL)
  ------------------
  |  Branch (267:9): [True: 1, False: 0]
  ------------------
  268|      1|        default_RAND_meth = &ossl_rand_meth;
  269|      1|    tmp_meth = default_RAND_meth;
  270|      1|    CRYPTO_THREAD_unlock(rand_meth_lock);
  271|      1|    return tmp_meth;
  272|      1|}
RAND_status:
  327|  7.01k|{
  328|  7.01k|    EVP_RAND_CTX *rand;
  329|  7.01k|#ifndef OPENSSL_NO_DEPRECATED_3_0
  330|  7.01k|    const RAND_METHOD *meth = RAND_get_rand_method();
  331|       |
  332|  7.01k|    if (meth != NULL && meth != RAND_OpenSSL())
  ------------------
  |  Branch (332:9): [True: 7.01k, False: 0]
  |  Branch (332:25): [True: 0, False: 7.01k]
  ------------------
  333|      0|        return meth->status != NULL ? meth->status() : 0;
  ------------------
  |  Branch (333:16): [True: 0, False: 0]
  ------------------
  334|  7.01k|#endif
  335|       |
  336|  7.01k|    if ((rand = RAND_get0_primary(NULL)) == NULL)
  ------------------
  |  Branch (336:9): [True: 0, False: 7.01k]
  ------------------
  337|      0|        return 0;
  338|  7.01k|    return EVP_RAND_get_state(rand) == EVP_RAND_STATE_READY;
  ------------------
  |  | 1250|  7.01k|#define EVP_RAND_STATE_READY 1
  ------------------
  339|  7.01k|}
RAND_priv_bytes_ex:
  357|  15.5k|{
  358|  15.5k|    RAND_GLOBAL *dgbl;
  359|  15.5k|    EVP_RAND_CTX *rand;
  360|  15.5k|#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(FIPS_MODULE)
  361|  15.5k|    const RAND_METHOD *meth = RAND_get_rand_method();
  362|       |
  363|  15.5k|    if (meth != NULL && meth != RAND_OpenSSL()) {
  ------------------
  |  Branch (363:9): [True: 15.5k, False: 0]
  |  Branch (363:25): [True: 0, False: 15.5k]
  ------------------
  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|  15.5k|#endif
  374|       |
  375|  15.5k|    dgbl = rand_get_global(ctx);
  376|  15.5k|    if (dgbl == NULL)
  ------------------
  |  Branch (376:9): [True: 0, False: 15.5k]
  ------------------
  377|      0|        return 0;
  378|  15.5k|#ifndef FIPS_MODULE
  379|  15.5k|    if (dgbl->random_provider != NULL)
  ------------------
  |  Branch (379:9): [True: 0, False: 15.5k]
  ------------------
  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|  15.5k|#endif /* !FIPS_MODULE */
  384|  15.5k|    rand = rand_get0_private(ctx, dgbl);
  385|  15.5k|    if (rand != NULL)
  ------------------
  |  Branch (385:9): [True: 15.5k, False: 0]
  ------------------
  386|  15.5k|        return EVP_RAND_generate(rand, buf, num, strength, 0, NULL, 0);
  387|       |
  388|      0|    return 0;
  389|  15.5k|}
RAND_bytes_ex:
  400|  11.5k|{
  401|  11.5k|    RAND_GLOBAL *dgbl;
  402|  11.5k|    EVP_RAND_CTX *rand;
  403|  11.5k|#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(FIPS_MODULE)
  404|  11.5k|    const RAND_METHOD *meth = RAND_get_rand_method();
  405|       |
  406|  11.5k|    if (meth != NULL && meth != RAND_OpenSSL()) {
  ------------------
  |  Branch (406:9): [True: 11.5k, False: 0]
  |  Branch (406:25): [True: 0, False: 11.5k]
  ------------------
  407|      0|        if (num > INT_MAX) {
  ------------------
  |  Branch (407:13): [True: 0, False: 0]
  ------------------
  408|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_ARGUMENT_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  409|      0|            return -1;
  410|      0|        }
  411|      0|        if (meth->bytes != NULL)
  ------------------
  |  Branch (411:13): [True: 0, False: 0]
  ------------------
  412|      0|            return meth->bytes(buf, (int)num);
  413|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_FUNC_NOT_IMPLEMENTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  414|      0|        return -1;
  415|      0|    }
  416|  11.5k|#endif
  417|       |
  418|  11.5k|    dgbl = rand_get_global(ctx);
  419|  11.5k|    if (dgbl == NULL)
  ------------------
  |  Branch (419:9): [True: 0, False: 11.5k]
  ------------------
  420|      0|        return 0;
  421|  11.5k|#ifndef FIPS_MODULE
  422|  11.5k|    if (dgbl->random_provider != NULL)
  ------------------
  |  Branch (422:9): [True: 0, False: 11.5k]
  ------------------
  423|      0|        return ossl_provider_random_bytes(dgbl->random_provider,
  424|      0|            OSSL_PROV_RANDOM_PUBLIC,
  ------------------
  |  |  123|      0|#define OSSL_PROV_RANDOM_PUBLIC 0
  ------------------
  425|      0|            buf, num, strength);
  426|  11.5k|#endif /* !FIPS_MODULE */
  427|       |
  428|  11.5k|    rand = rand_get0_public(ctx, dgbl);
  429|  11.5k|    if (rand != NULL)
  ------------------
  |  Branch (429:9): [True: 11.5k, False: 0]
  ------------------
  430|  11.5k|        return EVP_RAND_generate(rand, buf, num, strength, 0, NULL, 0);
  431|       |
  432|      0|    return 0;
  433|  11.5k|}
RAND_bytes:
  436|  3.90k|{
  437|  3.90k|    if (num < 0)
  ------------------
  |  Branch (437:9): [True: 0, False: 3.90k]
  ------------------
  438|      0|        return 0;
  439|  3.90k|    return RAND_bytes_ex(NULL, buf, (size_t)num, 0);
  440|  3.90k|}
ossl_rand_ctx_new:
  447|    769|{
  448|    769|    RAND_GLOBAL *dgbl = OPENSSL_zalloc(sizeof(*dgbl));
  ------------------
  |  |  109|    769|    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|    769|    if (dgbl == NULL)
  ------------------
  |  Branch (450:9): [True: 0, False: 769]
  ------------------
  451|      0|        return NULL;
  452|       |
  453|    769|#ifndef FIPS_MODULE
  454|       |    /*
  455|       |     * We need to ensure that base libcrypto thread handling has been
  456|       |     * initialised.
  457|       |     */
  458|    769|    OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL);
  ------------------
  |  |   31|    769|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  459|       |
  460|       |    /* Prepopulate the random provider name */
  461|    769|    dgbl->random_provider_name = OPENSSL_strdup(random_provider_fips_name);
  ------------------
  |  |  136|    769|    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|    769|    if (dgbl->random_provider_name == NULL)
  ------------------
  |  Branch (462:9): [True: 0, False: 769]
  ------------------
  463|      0|        goto err0;
  464|    769|#endif
  465|       |
  466|    769|    dgbl->lock = CRYPTO_THREAD_lock_new();
  467|    769|    if (dgbl->lock == NULL)
  ------------------
  |  Branch (467:9): [True: 0, False: 769]
  ------------------
  468|      0|        goto err1;
  469|       |
  470|    769|    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|    768|{
  484|    768|    RAND_GLOBAL *dgbl = vdgbl;
  485|       |
  486|    768|    if (dgbl == NULL)
  ------------------
  |  Branch (486:9): [True: 0, False: 768]
  ------------------
  487|      0|        return;
  488|       |
  489|    768|    CRYPTO_THREAD_lock_free(dgbl->lock);
  490|    768|    EVP_RAND_CTX_free(dgbl->primary);
  491|    768|    EVP_RAND_CTX_free(dgbl->seed);
  492|    768|#ifndef FIPS_MODULE
  493|    768|    OPENSSL_free(dgbl->random_provider_name);
  ------------------
  |  |  132|    768|    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|    768|#endif /* !FIPS_MODULE */
  495|    768|    OPENSSL_free(dgbl->rng_name);
  ------------------
  |  |  132|    768|    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|    768|    OPENSSL_free(dgbl->rng_cipher);
  ------------------
  |  |  132|    768|    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|    768|    OPENSSL_free(dgbl->rng_digest);
  ------------------
  |  |  132|    768|    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|    768|    OPENSSL_free(dgbl->rng_propq);
  ------------------
  |  |  132|    768|    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|    768|    OPENSSL_free(dgbl->seed_name);
  ------------------
  |  |  132|    768|    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|    768|    OPENSSL_free(dgbl->seed_propq);
  ------------------
  |  |  132|    768|    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|    768|    OPENSSL_free(dgbl);
  ------------------
  |  |  132|    768|    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|    768|}
RAND_get0_primary:
  762|  7.01k|{
  763|  7.01k|    RAND_GLOBAL *dgbl = rand_get_global(ctx);
  764|       |
  765|  7.01k|    return dgbl == NULL ? NULL : rand_get0_primary(ctx, dgbl);
  ------------------
  |  Branch (765:12): [True: 0, False: 7.01k]
  ------------------
  766|  7.01k|}
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|  36.9k|{
   85|  36.9k|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DRBG_INDEX);
  ------------------
  |  |  100|  36.9k|#define OSSL_LIB_CTX_DRBG_INDEX 5
  ------------------
   86|  36.9k|}
rand_lib.c:rand_get0_primary:
  685|  8.16k|{
  686|  8.16k|    EVP_RAND_CTX *ret, *seed, *newseed = NULL, *primary;
  687|       |
  688|  8.16k|    if (dgbl == NULL)
  ------------------
  |  Branch (688:9): [True: 0, False: 8.16k]
  ------------------
  689|      0|        return NULL;
  690|       |
  691|  8.16k|    if (!CRYPTO_THREAD_read_lock(dgbl->lock))
  ------------------
  |  Branch (691:9): [True: 0, False: 8.16k]
  ------------------
  692|      0|        return NULL;
  693|       |
  694|  8.16k|    ret = dgbl->primary;
  695|  8.16k|    seed = dgbl->seed;
  696|  8.16k|    CRYPTO_THREAD_unlock(dgbl->lock);
  697|       |
  698|  8.16k|    if (ret != NULL)
  ------------------
  |  Branch (698:9): [True: 7.59k, False: 579]
  ------------------
  699|  7.59k|        return ret;
  700|       |
  701|    579|#if !defined(FIPS_MODULE) || !defined(OPENSSL_NO_FIPS_JITTER)
  702|       |    /* Create a seed source for libcrypto or jitter enabled FIPS provider */
  703|    579|    if (seed == NULL) {
  ------------------
  |  Branch (703:9): [True: 579, False: 0]
  ------------------
  704|    579|        ERR_set_mark();
  705|    579|        seed = newseed = rand_new_seed(ctx);
  706|    579|        if (ERR_count_to_mark() > 0) {
  ------------------
  |  Branch (706:13): [True: 0, False: 579]
  ------------------
  707|      0|            EVP_RAND_CTX_free(newseed);
  708|      0|            ERR_clear_last_mark();
  709|      0|            return NULL;
  710|      0|        }
  711|    579|        ERR_pop_to_mark();
  712|    579|    }
  713|    579|#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|    579|    ret = rand_new_drbg(ctx, seed, PRIMARY_RESEED_INTERVAL,
  ------------------
  |  |   23|    579|#define PRIMARY_RESEED_INTERVAL (1 << 8)
  ------------------
  720|    579|        PRIMARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   25|    579|#define PRIMARY_RESEED_TIME_INTERVAL (60 * 60) /* 1 hour */
  ------------------
  721|    579|#endif /* FIPS_MODULE */
  722|       |
  723|       |    /*
  724|       |     * The primary DRBG may be shared between multiple threads so we must
  725|       |     * enable locking.
  726|       |     */
  727|    579|    if (ret == NULL || !EVP_RAND_enable_locking(ret)) {
  ------------------
  |  Branch (727:9): [True: 0, False: 579]
  |  Branch (727:24): [True: 0, False: 579]
  ------------------
  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|    579|    if (!CRYPTO_THREAD_write_lock(dgbl->lock))
  ------------------
  |  Branch (738:9): [True: 0, False: 579]
  ------------------
  739|      0|        return NULL;
  740|       |
  741|    579|    primary = dgbl->primary;
  742|    579|    if (primary != NULL) {
  ------------------
  |  Branch (742:9): [True: 0, False: 579]
  ------------------
  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|    579|    if (newseed != NULL)
  ------------------
  |  Branch (748:9): [True: 579, False: 0]
  ------------------
  749|    579|        dgbl->seed = newseed;
  750|    579|    dgbl->primary = ret;
  751|    579|    CRYPTO_THREAD_unlock(dgbl->lock);
  752|       |
  753|    579|    return ret;
  754|    579|}
rand_lib.c:rand_new_seed:
  525|    579|{
  526|    579|    EVP_RAND *rand;
  527|    579|    const char *propq;
  528|    579|    char *name;
  529|    579|    EVP_RAND_CTX *ctx = NULL;
  530|    579|    int fallback = 0;
  531|    579|#ifdef OPENSSL_NO_FIPS_JITTER
  532|    579|    RAND_GLOBAL *dgbl = rand_get_global(libctx);
  533|       |
  534|    579|    if (dgbl == NULL)
  ------------------
  |  Branch (534:9): [True: 0, False: 579]
  ------------------
  535|      0|        return NULL;
  536|    579|    propq = dgbl->seed_propq;
  537|    579|    if (dgbl->seed_name != NULL) {
  ------------------
  |  Branch (537:9): [True: 0, False: 579]
  ------------------
  538|      0|        name = dgbl->seed_name;
  539|    579|    } else {
  540|    579|        fallback = 1;
  541|    579|        name = OPENSSL_MSTR(OPENSSL_DEFAULT_SEED_SRC);
  ------------------
  |  |   19|    579|#define OPENSSL_MSTR(x) OPENSSL_MSTR_HELPER(x)
  |  |  ------------------
  |  |  |  |   18|    579|#define OPENSSL_MSTR_HELPER(x) #x
  |  |  ------------------
  ------------------
  542|    579|    }
  543|       |#else /* !OPENSSL_NO_FIPS_JITTER */
  544|       |    name = "JITTER";
  545|       |    propq = "";
  546|       |#endif /* OPENSSL_NO_FIPS_JITTER */
  547|       |
  548|    579|    ERR_set_mark();
  549|    579|    rand = EVP_RAND_fetch(libctx, name, propq);
  550|    579|    ERR_pop_to_mark();
  551|    579|    if (rand == NULL) {
  ------------------
  |  Branch (551:9): [True: 0, False: 579]
  ------------------
  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|    579|    ctx = EVP_RAND_CTX_new(rand, NULL);
  557|    579|    EVP_RAND_free(rand);
  558|    579|    if (ctx == NULL) {
  ------------------
  |  Branch (558:9): [True: 0, False: 579]
  ------------------
  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|    579|    if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, NULL)) {
  ------------------
  |  Branch (562:9): [True: 0, False: 579]
  ------------------
  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|    579|    return ctx;
  567|      0|err:
  568|      0|    EVP_RAND_CTX_free(ctx);
  569|       |    return NULL;
  570|    579|}
rand_lib.c:rand_new_drbg:
  593|  1.73k|{
  594|  1.73k|    EVP_RAND *rand;
  595|  1.73k|    RAND_GLOBAL *dgbl = rand_get_global(libctx);
  596|  1.73k|    EVP_RAND_CTX *ctx;
  597|  1.73k|    OSSL_PARAM params[9], *p = params;
  598|  1.73k|    const OSSL_PARAM *settables;
  599|  1.73k|    const char *prov_name;
  600|  1.73k|    char *name, *cipher;
  601|  1.73k|    int use_df = 1;
  602|       |
  603|  1.73k|    if (dgbl == NULL)
  ------------------
  |  Branch (603:9): [True: 0, False: 1.73k]
  ------------------
  604|      0|        return NULL;
  605|  1.73k|    name = dgbl->rng_name != NULL ? dgbl->rng_name : "CTR-DRBG";
  ------------------
  |  Branch (605:12): [True: 0, False: 1.73k]
  ------------------
  606|  1.73k|    rand = EVP_RAND_fetch(libctx, name, dgbl->rng_propq);
  607|  1.73k|    if (rand == NULL) {
  ------------------
  |  Branch (607:9): [True: 0, False: 1.73k]
  ------------------
  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.73k|    prov_name = ossl_provider_name(EVP_RAND_get0_provider(rand));
  612|  1.73k|    ctx = EVP_RAND_CTX_new(rand, parent);
  613|  1.73k|    EVP_RAND_free(rand);
  614|  1.73k|    if (ctx == NULL) {
  ------------------
  |  Branch (614:9): [True: 0, False: 1.73k]
  ------------------
  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.73k|    settables = EVP_RAND_CTX_settable_params(ctx);
  620|  1.73k|    if (OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_CIPHER)) {
  ------------------
  |  |  237|  1.73k|# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
  |  |  ------------------
  |  |  |  |  126|  1.73k|# define OSSL_ALG_PARAM_CIPHER "cipher"
  |  |  ------------------
  ------------------
  |  Branch (620:9): [True: 1.73k, False: 0]
  ------------------
  621|  1.73k|        cipher = dgbl->rng_cipher != NULL ? dgbl->rng_cipher : "AES-256-CTR";
  ------------------
  |  Branch (621:18): [True: 0, False: 1.73k]
  ------------------
  622|  1.73k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_CIPHER,
  ------------------
  |  |  237|  1.73k|# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
  |  |  ------------------
  |  |  |  |  126|  1.73k|# define OSSL_ALG_PARAM_CIPHER "cipher"
  |  |  ------------------
  ------------------
  623|  1.73k|            cipher, 0);
  624|  1.73k|    }
  625|  1.73k|    if (dgbl->rng_digest != NULL
  ------------------
  |  Branch (625:9): [True: 0, False: 1.73k]
  ------------------
  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.73k|    if (prov_name != NULL)
  ------------------
  |  Branch (629:9): [True: 1.73k, False: 0]
  ------------------
  630|  1.73k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_PROV_PARAM_CORE_PROV_NAME,
  ------------------
  |  |  513|  1.73k|# define OSSL_PROV_PARAM_CORE_PROV_NAME "provider-name"
  ------------------
  631|  1.73k|            (char *)prov_name, 0);
  632|  1.73k|    if (dgbl->rng_propq != NULL)
  ------------------
  |  Branch (632:9): [True: 0, False: 1.73k]
  ------------------
  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.73k|    if (OSSL_PARAM_locate_const(settables, OSSL_ALG_PARAM_MAC))
  ------------------
  |  |  129|  1.73k|# define OSSL_ALG_PARAM_MAC "mac"
  ------------------
  |  Branch (635:9): [True: 0, False: 1.73k]
  ------------------
  636|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_ALG_PARAM_MAC, "HMAC", 0);
  ------------------
  |  |  129|      0|# define OSSL_ALG_PARAM_MAC "mac"
  ------------------
  637|  1.73k|    if (OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_USE_DF))
  ------------------
  |  |  259|  1.73k|# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
  ------------------
  |  Branch (637:9): [True: 1.73k, False: 0]
  ------------------
  638|  1.73k|        *p++ = OSSL_PARAM_construct_int(OSSL_DRBG_PARAM_USE_DF, &use_df);
  ------------------
  |  |  259|  1.73k|# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
  ------------------
  639|  1.73k|    *p++ = OSSL_PARAM_construct_uint(OSSL_DRBG_PARAM_RESEED_REQUESTS,
  ------------------
  |  |  255|  1.73k|# define OSSL_DRBG_PARAM_RESEED_REQUESTS "reseed_requests"
  ------------------
  640|  1.73k|        &reseed_interval);
  641|  1.73k|    *p++ = OSSL_PARAM_construct_time_t(OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL,
  ------------------
  |  |  257|  1.73k|# define OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL "reseed_time_interval"
  ------------------
  642|  1.73k|        &reseed_time_interval);
  643|  1.73k|    *p = OSSL_PARAM_construct_end();
  644|  1.73k|    if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, params)) {
  ------------------
  |  Branch (644:9): [True: 0, False: 1.73k]
  ------------------
  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.73k|    return ctx;
  650|  1.73k|}
rand_lib.c:rand_get0_public:
  769|  11.5k|{
  770|  11.5k|    EVP_RAND_CTX *rand, *primary;
  771|  11.5k|    OSSL_LIB_CTX *origctx = ctx;
  772|       |
  773|  11.5k|    ctx = ossl_lib_ctx_get_concrete(ctx);
  774|       |
  775|  11.5k|    if (ctx == NULL)
  ------------------
  |  Branch (775:9): [True: 0, False: 11.5k]
  ------------------
  776|      0|        return NULL;
  777|       |
  778|  11.5k|    if (dgbl == NULL)
  ------------------
  |  Branch (778:9): [True: 0, False: 11.5k]
  ------------------
  779|      0|        return NULL;
  780|       |
  781|  11.5k|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx);
  782|  11.5k|    if (rand == NULL) {
  ------------------
  |  Branch (782:9): [True: 579, False: 10.9k]
  ------------------
  783|    579|        primary = rand_get0_primary(origctx, dgbl);
  784|    579|        if (primary == NULL)
  ------------------
  |  Branch (784:13): [True: 0, False: 579]
  ------------------
  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|    579|        if (CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx) == NULL
  ------------------
  |  Branch (791:13): [True: 579, False: 0]
  ------------------
  792|    579|            && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state))
  ------------------
  |  Branch (792:16): [True: 0, False: 579]
  ------------------
  793|      0|            return NULL;
  794|    579|        rand = rand_new_drbg(ctx, primary, SECONDARY_RESEED_INTERVAL,
  ------------------
  |  |   24|    579|#define SECONDARY_RESEED_INTERVAL (1 << 16)
  ------------------
  795|    579|            SECONDARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   26|    579|#define SECONDARY_RESEED_TIME_INTERVAL (7 * 60) /* 7 minutes */
  ------------------
  796|    579|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx, rand)) {
  ------------------
  |  Branch (796:13): [True: 0, False: 579]
  ------------------
  797|      0|            EVP_RAND_CTX_free(rand);
  798|      0|            rand = NULL;
  799|      0|        }
  800|    579|    }
  801|  11.5k|    return rand;
  802|  11.5k|}
rand_lib.c:rand_delete_thread_state:
  506|    578|{
  507|    578|    OSSL_LIB_CTX *ctx = arg;
  508|    578|    RAND_GLOBAL *dgbl = rand_get_global(ctx);
  509|    578|    EVP_RAND_CTX *rand;
  510|       |
  511|    578|    if (dgbl == NULL)
  ------------------
  |  Branch (511:9): [True: 0, False: 578]
  ------------------
  512|      0|        return;
  513|       |
  514|    578|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx);
  515|    578|    CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx, NULL);
  516|    578|    EVP_RAND_CTX_free(rand);
  517|       |
  518|    578|    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|    578|    EVP_RAND_CTX_free(rand);
  521|    578|}
rand_lib.c:rand_get0_private:
  816|  15.5k|{
  817|  15.5k|    EVP_RAND_CTX *rand, *primary;
  818|  15.5k|    OSSL_LIB_CTX *origctx = ctx;
  819|       |
  820|  15.5k|    ctx = ossl_lib_ctx_get_concrete(ctx);
  821|  15.5k|    if (ctx == NULL)
  ------------------
  |  Branch (821:9): [True: 0, False: 15.5k]
  ------------------
  822|      0|        return NULL;
  823|       |
  824|  15.5k|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx);
  825|  15.5k|    if (rand == NULL) {
  ------------------
  |  Branch (825:9): [True: 579, False: 14.9k]
  ------------------
  826|    579|        primary = rand_get0_primary(origctx, dgbl);
  827|    579|        if (primary == NULL)
  ------------------
  |  Branch (827:13): [True: 0, False: 579]
  ------------------
  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|    579|        if (CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx) == NULL
  ------------------
  |  Branch (834:13): [True: 0, False: 579]
  ------------------
  835|      0|            && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state))
  ------------------
  |  Branch (835:16): [True: 0, False: 0]
  ------------------
  836|      0|            return NULL;
  837|    579|        rand = rand_new_drbg(ctx, primary, SECONDARY_RESEED_INTERVAL,
  ------------------
  |  |   24|    579|#define SECONDARY_RESEED_INTERVAL (1 << 16)
  ------------------
  838|    579|            SECONDARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   26|    579|#define SECONDARY_RESEED_TIME_INTERVAL (7 * 60) /* 7 minutes */
  ------------------
  839|    579|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx, rand)) {
  ------------------
  |  Branch (839:13): [True: 0, False: 579]
  ------------------
  840|      0|            EVP_RAND_CTX_free(rand);
  841|      0|            rand = NULL;
  842|      0|        }
  843|    579|    }
  844|  15.5k|    return rand;
  845|  15.5k|}

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

ossl_rand_pool_new:
   23|    579|{
   24|    579|    RAND_POOL *pool = OPENSSL_zalloc(sizeof(*pool));
  ------------------
  |  |  109|    579|    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|    579|    size_t min_alloc_size = RAND_POOL_MIN_ALLOCATION(secure);
  ------------------
  |  |   59|    579|#define RAND_POOL_MIN_ALLOCATION(secure) ((secure) ? 16 : 48)
  |  |  ------------------
  |  |  |  Branch (59:43): [True: 579, False: 0]
  |  |  ------------------
  ------------------
   26|       |
   27|    579|    if (pool == NULL)
  ------------------
  |  Branch (27:9): [True: 0, False: 579]
  ------------------
   28|      0|        return NULL;
   29|       |
   30|    579|    pool->min_len = min_len;
   31|    579|    pool->max_len = (max_len > RAND_POOL_MAX_LENGTH) ? RAND_POOL_MAX_LENGTH : max_len;
  ------------------
  |  |   36|    579|#define RAND_POOL_MAX_LENGTH (RAND_POOL_FACTOR * 3 * (RAND_DRBG_STRENGTH / 16))
  |  |  ------------------
  |  |  |  |   35|    579|#define RAND_POOL_FACTOR 256
  |  |  ------------------
  |  |               #define RAND_POOL_MAX_LENGTH (RAND_POOL_FACTOR * 3 * (RAND_DRBG_STRENGTH / 16))
  |  |  ------------------
  |  |  |  |   37|    579|#define RAND_DRBG_STRENGTH 256
  |  |  ------------------
  ------------------
                  pool->max_len = (max_len > RAND_POOL_MAX_LENGTH) ? RAND_POOL_MAX_LENGTH : max_len;
  ------------------
  |  |   36|    579|#define RAND_POOL_MAX_LENGTH (RAND_POOL_FACTOR * 3 * (RAND_DRBG_STRENGTH / 16))
  |  |  ------------------
  |  |  |  |   35|    579|#define RAND_POOL_FACTOR 256
  |  |  ------------------
  |  |               #define RAND_POOL_MAX_LENGTH (RAND_POOL_FACTOR * 3 * (RAND_DRBG_STRENGTH / 16))
  |  |  ------------------
  |  |  |  |   37|    579|#define RAND_DRBG_STRENGTH 256
  |  |  ------------------
  ------------------
  |  Branch (31:21): [True: 579, False: 0]
  ------------------
   32|    579|    pool->alloc_len = min_len < min_alloc_size ? min_alloc_size : min_len;
  ------------------
  |  Branch (32:23): [True: 0, False: 579]
  ------------------
   33|    579|    if (pool->alloc_len > pool->max_len)
  ------------------
  |  Branch (33:9): [True: 0, False: 579]
  ------------------
   34|      0|        pool->alloc_len = pool->max_len;
   35|       |
   36|    579|    if (secure)
  ------------------
  |  Branch (36:9): [True: 579, False: 0]
  ------------------
   37|    579|        pool->buffer = OPENSSL_secure_zalloc(pool->alloc_len);
  ------------------
  |  |  142|    579|    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|    579|    if (pool->buffer == NULL)
  ------------------
  |  Branch (41:9): [True: 0, False: 579]
  ------------------
   42|      0|        goto err;
   43|       |
   44|    579|    pool->entropy_requested = entropy_requested;
   45|    579|    pool->secure = secure;
   46|    579|    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|    579|}
ossl_rand_pool_free:
   87|    579|{
   88|    579|    if (pool == NULL)
  ------------------
  |  Branch (88:9): [True: 0, False: 579]
  ------------------
   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|    579|    if (!pool->attached) {
  ------------------
  |  Branch (97:9): [True: 579, False: 0]
  ------------------
   98|    579|        if (pool->secure)
  ------------------
  |  Branch (98:13): [True: 579, False: 0]
  ------------------
   99|    579|            OPENSSL_secure_clear_free(pool->buffer, pool->alloc_len);
  ------------------
  |  |  150|    579|    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|    579|    }
  103|       |
  104|    579|    OPENSSL_free(pool);
  ------------------
  |  |  132|    579|    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|    579|}
ossl_rand_pool_length:
  127|    579|{
  128|    579|    return pool->len;
  129|    579|}
ossl_rand_pool_detach:
  138|    579|{
  139|    579|    unsigned char *ret = pool->buffer;
  140|       |    pool->buffer = NULL;
  141|    579|    pool->entropy = 0;
  142|    579|    return ret;
  143|    579|}
ossl_rand_pool_entropy_available:
  172|    579|{
  173|    579|    if (pool->entropy < pool->entropy_requested)
  ------------------
  |  Branch (173:9): [True: 0, False: 579]
  ------------------
  174|      0|        return 0;
  175|       |
  176|    579|    if (pool->len < pool->min_len)
  ------------------
  |  Branch (176:9): [True: 0, False: 579]
  ------------------
  177|      0|        return 0;
  178|       |
  179|    579|    return pool->entropy;
  180|    579|}
ossl_rand_pool_entropy_needed:
  188|    579|{
  189|    579|    if (pool->entropy < pool->entropy_requested)
  ------------------
  |  Branch (189:9): [True: 579, False: 0]
  ------------------
  190|    579|        return pool->entropy_requested - pool->entropy;
  191|       |
  192|      0|    return 0;
  193|    579|}
ossl_rand_pool_bytes_needed:
  236|    579|{
  237|    579|    size_t bytes_needed;
  238|    579|    size_t entropy_needed = ossl_rand_pool_entropy_needed(pool);
  239|       |
  240|    579|    if (entropy_factor < 1) {
  ------------------
  |  Branch (240:9): [True: 0, False: 579]
  ------------------
  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|    579|    bytes_needed = ENTROPY_TO_BYTES(entropy_needed, entropy_factor);
  ------------------
  |  |  161|    579|    (((bits) * (entropy_factor) + 7) / 8)
  ------------------
  246|       |
  247|    579|    if (bytes_needed > pool->max_len - pool->len) {
  ------------------
  |  Branch (247:9): [True: 0, False: 579]
  ------------------
  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|    579|    if (pool->len < pool->min_len && bytes_needed < pool->min_len - pool->len)
  ------------------
  |  Branch (257:9): [True: 579, False: 0]
  |  Branch (257:38): [True: 0, False: 579]
  ------------------
  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|    579|    if (!rand_pool_grow(pool, bytes_needed)) {
  ------------------
  |  Branch (273:9): [True: 0, False: 579]
  ------------------
  274|       |        /* persistent error for this pool */
  275|      0|        pool->max_len = pool->len = 0;
  276|      0|        return 0;
  277|      0|    }
  278|       |
  279|    579|    return bytes_needed;
  280|    579|}
ossl_rand_pool_add_begin:
  353|    579|{
  354|    579|    if (len == 0)
  ------------------
  |  Branch (354:9): [True: 0, False: 579]
  ------------------
  355|      0|        return NULL;
  356|       |
  357|    579|    if (len > pool->max_len - pool->len) {
  ------------------
  |  Branch (357:9): [True: 0, False: 579]
  ------------------
  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|    579|    if (pool->buffer == NULL) {
  ------------------
  |  Branch (362:9): [True: 0, False: 579]
  ------------------
  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|    579|    if (!rand_pool_grow(pool, len))
  ------------------
  |  Branch (376:9): [True: 0, False: 579]
  ------------------
  377|      0|        return NULL;
  378|       |
  379|    579|    return pool->buffer + pool->len;
  380|    579|}
ossl_rand_pool_add_end:
  392|    579|{
  393|    579|    if (len > pool->alloc_len - pool->len) {
  ------------------
  |  Branch (393:9): [True: 0, False: 579]
  ------------------
  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|    579|    if (len > 0) {
  ------------------
  |  Branch (398:9): [True: 579, False: 0]
  ------------------
  399|    579|        pool->len += len;
  400|    579|        pool->entropy += entropy;
  401|    579|    }
  402|       |
  403|    579|    return 1;
  404|    579|}
ossl_rand_pool_adin_mix_in:
  419|    579|{
  420|    579|    if (adin == NULL || adin_len == 0)
  ------------------
  |  Branch (420:9): [True: 0, False: 579]
  |  Branch (420:25): [True: 0, False: 579]
  ------------------
  421|       |        /* Nothing to mix in -> success */
  422|      0|        return 1;
  423|       |
  424|    579|    if (pool->buffer == NULL) {
  ------------------
  |  Branch (424:9): [True: 0, False: 579]
  ------------------
  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|    579|    if (pool->len == 0) {
  ------------------
  |  Branch (429:9): [True: 0, False: 579]
  ------------------
  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|    579|    if (adin != NULL && adin_len > 0) {
  ------------------
  |  Branch (434:9): [True: 579, False: 0]
  |  Branch (434:25): [True: 579, False: 0]
  ------------------
  435|    579|        size_t i;
  436|       |
  437|       |        /* xor the additional data into the pool */
  438|  5.21k|        for (i = 0; i < adin_len; ++i)
  ------------------
  |  Branch (438:21): [True: 4.63k, False: 579]
  ------------------
  439|  4.63k|            pool->buffer[i % pool->len] ^= adin[i];
  440|    579|    }
  441|       |
  442|    579|    return 1;
  443|    579|}
rand_pool.c:rand_pool_grow:
  197|  1.15k|{
  198|  1.15k|    if (len > pool->alloc_len - pool->len) {
  ------------------
  |  Branch (198:9): [True: 0, False: 1.15k]
  ------------------
  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.15k|    return 1;
  227|  1.15k|}

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

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

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

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|   310k|{
   35|       |    return rsa_new_intern(NULL);
   36|   310k|}
RSA_get_method:
   39|   310k|{
   40|   310k|    return rsa->meth;
   41|   310k|}
RSA_free:
  118|   931k|{
  119|   931k|    int i;
  120|       |
  121|   931k|    if (r == NULL)
  ------------------
  |  Branch (121:9): [True: 310k, False: 621k]
  ------------------
  122|   310k|        return;
  123|       |
  124|   621k|    CRYPTO_DOWN_REF(&r->references, &i);
  125|   621k|    REF_PRINT_COUNT("RSA", i, r);
  ------------------
  |  |  301|   621k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   621k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   621k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   621k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  126|   621k|    if (i > 0)
  ------------------
  |  Branch (126:9): [True: 310k, False: 310k]
  ------------------
  127|   310k|        return;
  128|   310k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|   310k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 310k]
  |  |  ------------------
  ------------------
  129|       |
  130|   310k|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (130:9): [True: 310k, False: 0]
  |  Branch (130:28): [True: 310k, False: 0]
  ------------------
  131|   310k|        r->meth->finish(r);
  132|       |
  133|   310k|#ifndef FIPS_MODULE
  134|   310k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, r, &r->ex_data);
  ------------------
  |  |  260|   310k|#define CRYPTO_EX_INDEX_RSA 9
  ------------------
  135|   310k|#endif
  136|       |
  137|   310k|    CRYPTO_THREAD_lock_free(r->lock);
  138|   310k|    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|   310k|    BN_free(r->n);
  145|   310k|    BN_free(r->e);
  146|   310k|#endif
  147|   310k|    BN_clear_free(r->d);
  148|   310k|    BN_clear_free(r->p);
  149|   310k|    BN_clear_free(r->q);
  150|   310k|    BN_clear_free(r->dmp1);
  151|   310k|    BN_clear_free(r->dmq1);
  152|   310k|    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|   310k|#ifndef FIPS_MODULE
  159|   310k|    RSA_PSS_PARAMS_free(r->pss);
  160|   310k|    sk_RSA_PRIME_INFO_pop_free(r->prime_infos, ossl_rsa_multip_info_free);
  161|   310k|#endif
  162|   310k|    ossl_rsa_free_blinding(r);
  163|   310k|    OPENSSL_free(r);
  ------------------
  |  |  132|   310k|    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|   310k|}
RSA_up_ref:
  167|   310k|{
  168|   310k|    int i;
  169|       |
  170|   310k|    if (CRYPTO_UP_REF(&r->references, &i) <= 0)
  ------------------
  |  Branch (170:9): [True: 0, False: 310k]
  ------------------
  171|      0|        return 0;
  172|       |
  173|   310k|    REF_PRINT_COUNT("RSA", i, r);
  ------------------
  |  |  301|   310k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   310k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   310k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   310k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  174|   310k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   310k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 310k]
  |  |  ------------------
  ------------------
  175|   310k|    return i > 1 ? 1 : 0;
  ------------------
  |  Branch (175:12): [True: 310k, False: 0]
  ------------------
  176|   310k|}
ossl_rsa_set0_libctx:
  184|   310k|{
  185|   310k|    r->libctx = libctx;
  186|   310k|}
ossl_ifc_ffc_compute_security_bits:
  300|   310k|{
  301|   310k|    uint64_t x;
  302|   310k|    uint32_t lx;
  303|   310k|    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|   310k|    switch (n) {
  ------------------
  |  Branch (310:13): [True: 310k, False: 0]
  ------------------
  311|  90.9k|    case 2048: /* SP 800-56B rev 2 Appendix D and FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (311:5): [True: 90.9k, False: 219k]
  ------------------
  312|  90.9k|        return 112;
  313|     17|    case 3072: /* SP 800-56B rev 2 Appendix D and FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (313:5): [True: 17, False: 310k]
  ------------------
  314|     17|        return 128;
  315|   219k|    case 4096: /* SP 800-56B rev 2 Appendix D */
  ------------------
  |  Branch (315:5): [True: 219k, False: 91.0k]
  ------------------
  316|   219k|        return 152;
  317|     18|    case 6144: /* SP 800-56B rev 2 Appendix D */
  ------------------
  |  Branch (317:5): [True: 18, False: 310k]
  ------------------
  318|     18|        return 176;
  319|      0|    case 7680: /* FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (319:5): [True: 0, False: 310k]
  ------------------
  320|      0|        return 192;
  321|     22|    case 8192: /* SP 800-56B rev 2 Appendix D */
  ------------------
  |  Branch (321:5): [True: 22, False: 310k]
  ------------------
  322|     22|        return 200;
  323|      0|    case 15360: /* FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (323:5): [True: 0, False: 310k]
  ------------------
  324|      0|        return 256;
  325|   310k|    }
  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|   310k|{
  362|   310k|    int bits = BN_num_bits(rsa->n);
  363|       |
  364|   310k|#ifndef FIPS_MODULE
  365|   310k|    if (rsa->version == RSA_ASN1_VERSION_MULTI) {
  ------------------
  |  |   60|   310k|#define RSA_ASN1_VERSION_MULTI 1
  ------------------
  |  Branch (365:9): [True: 0, False: 310k]
  ------------------
  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|   310k|#endif
  373|   310k|    return ossl_ifc_ffc_compute_security_bits(bits);
  374|   310k|}
RSA_get0_key:
  531|   310k|{
  532|   310k|    if (n != NULL)
  ------------------
  |  Branch (532:9): [True: 310k, False: 0]
  ------------------
  533|   310k|        *n = r->n;
  534|   310k|    if (e != NULL)
  ------------------
  |  Branch (534:9): [True: 310k, False: 0]
  ------------------
  535|   310k|        *e = r->e;
  536|   310k|    if (d != NULL)
  ------------------
  |  Branch (536:9): [True: 310k, False: 0]
  ------------------
  537|   310k|        *d = r->d;
  538|   310k|}
RSA_get0_n:
  621|   931k|{
  622|   931k|    return r->n;
  623|   931k|}
RSA_get0_d:
  631|   310k|{
  632|   310k|    return r->d;
  633|   310k|}
RSA_get0_p:
  636|   621k|{
  637|   621k|    return r->p;
  638|   621k|}
ossl_rsa_get0_pss_params_30:
  683|   310k|{
  684|   310k|    return &r->pss_params;
  685|   310k|}
RSA_clear_flags:
  688|   310k|{
  689|   310k|    r->flags &= ~flags;
  690|   310k|}
RSA_test_flags:
  693|   931k|{
  694|   931k|    return r->flags & flags;
  695|   931k|}
RSA_set_flags:
  698|   310k|{
  699|   310k|    r->flags |= flags;
  700|   310k|}
ossl_rsa_get0_all_params:
  847|   621k|{
  848|   621k|#ifndef FIPS_MODULE
  849|   621k|    RSA_PRIME_INFO *pinfo;
  850|   621k|    int i, pnum;
  851|   621k|#endif
  852|       |
  853|   621k|    if (r == NULL)
  ------------------
  |  Branch (853:9): [True: 0, False: 621k]
  ------------------
  854|      0|        return 0;
  855|       |
  856|       |    /* If |p| is NULL, there are no CRT parameters */
  857|   621k|    if (RSA_get0_p(r) == NULL)
  ------------------
  |  Branch (857:9): [True: 621k, False: 0]
  ------------------
  858|   621k|        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|   621k|}
ossl_rsa_check_factors:
  881|   310k|{
  882|   310k|    int valid = 0;
  883|   310k|    int n, i, bits;
  884|   310k|    STACK_OF(BIGNUM_const) *factors = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   310k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  885|   310k|    STACK_OF(BIGNUM_const) *exps = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   310k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  886|   310k|    STACK_OF(BIGNUM_const) *coeffs = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   310k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  887|       |
  888|   310k|    if (factors == NULL || exps == NULL || coeffs == NULL)
  ------------------
  |  Branch (888:9): [True: 0, False: 310k]
  |  Branch (888:28): [True: 0, False: 310k]
  |  Branch (888:44): [True: 0, False: 310k]
  ------------------
  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|   310k|    ossl_rsa_get0_all_params(r, factors, exps, coeffs);
  896|   310k|    n = safe_BN_num_bits(RSA_get0_n(r));
  ------------------
  |  |  879|   310k|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (879:32): [True: 0, False: 310k]
  |  |  ------------------
  ------------------
  897|       |
  898|   310k|    if (safe_BN_num_bits(RSA_get0_d(r)) > n)
  ------------------
  |  |  879|   310k|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (879:32): [True: 310k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (898:9): [True: 0, False: 310k]
  ------------------
  899|      0|        goto done;
  900|       |
  901|   310k|    for (i = 0; i < sk_BIGNUM_const_num(exps); i++) {
  ------------------
  |  Branch (901:17): [True: 0, False: 310k]
  ------------------
  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|   310k|    for (i = 0; i < sk_BIGNUM_const_num(factors); i++) {
  ------------------
  |  Branch (907:17): [True: 0, False: 310k]
  ------------------
  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|   310k|    for (i = 0; i < sk_BIGNUM_const_num(coeffs); i++) {
  ------------------
  |  Branch (913:17): [True: 0, False: 310k]
  ------------------
  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|   310k|    valid = 1;
  920|       |
  921|   310k|done:
  922|   310k|    sk_BIGNUM_const_free(factors);
  923|   310k|    sk_BIGNUM_const_free(exps);
  924|   310k|    sk_BIGNUM_const_free(coeffs);
  925|       |
  926|   310k|    return valid;
  927|   310k|}
rsa_lib.c:rsa_new_intern:
   73|   310k|{
   74|   310k|    RSA *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   310k|    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|   310k|    if (ret == NULL)
  ------------------
  |  Branch (76:9): [True: 0, False: 310k]
  ------------------
   77|      0|        return NULL;
   78|       |
   79|   310k|    ret->lock = CRYPTO_THREAD_lock_new();
   80|   310k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (80:9): [True: 0, False: 310k]
  ------------------
   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|   310k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 310k]
  ------------------
   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|   310k|    ret->blindings_sa = ossl_rsa_alloc_blinding();
   93|   310k|    if (ret->blindings_sa == NULL)
  ------------------
  |  Branch (93:9): [True: 0, False: 310k]
  ------------------
   94|      0|        goto err;
   95|       |
   96|   310k|    ret->libctx = libctx;
   97|   310k|    ret->meth = RSA_get_default_method();
   98|   310k|    ret->flags = ret->meth->flags & ~RSA_FLAG_NON_FIPS_ALLOW;
  ------------------
  |  |  475|   310k|#define RSA_FLAG_NON_FIPS_ALLOW 0x0400
  ------------------
   99|   310k|#ifndef FIPS_MODULE
  100|   310k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data)) {
  ------------------
  |  |  260|   310k|#define CRYPTO_EX_INDEX_RSA 9
  ------------------
  |  Branch (100:9): [True: 0, False: 310k]
  ------------------
  101|      0|        goto err;
  102|      0|    }
  103|   310k|#endif
  104|       |
  105|   310k|    if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
  ------------------
  |  Branch (105:9): [True: 310k, False: 0]
  |  Branch (105:38): [True: 0, False: 310k]
  ------------------
  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|   310k|    return ret;
  111|       |
  112|      0|err:
  113|      0|    RSA_free(ret);
  114|       |    return NULL;
  115|   310k|}

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

ossl_self_test_set_callback_new:
   35|    769|{
   36|    769|    SELF_TEST_CB *stcb;
   37|       |
   38|    769|    stcb = OPENSSL_zalloc(sizeof(*stcb));
  ------------------
  |  |  109|    769|    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|    769|    return stcb;
   40|    769|}
ossl_self_test_set_callback_free:
   43|    768|{
   44|    768|    OPENSSL_free(stcb);
  ------------------
  |  |  132|    768|    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|    768|}

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

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

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

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|   322k|{
   60|   322k|    OPENSSL_SA *res = OPENSSL_zalloc(sizeof(*res));
  ------------------
  |  |  109|   322k|    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|   322k|    return res;
   63|   322k|}
ossl_sa_free:
  111|   322k|{
  112|   322k|    if (sa != NULL) {
  ------------------
  |  Branch (112:9): [True: 322k, False: 0]
  ------------------
  113|   322k|        sa_doall(sa, &sa_free_node, NULL, NULL);
  114|   322k|        OPENSSL_free(sa);
  ------------------
  |  |  132|   322k|    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|   322k|    }
  116|   322k|}
ossl_sa_doall:
  135|  13.4k|{
  136|  13.4k|    struct trampoline_st tramp;
  137|       |
  138|  13.4k|    tramp.func = leaf;
  139|  13.4k|    if (sa != NULL)
  ------------------
  |  Branch (139:9): [True: 13.4k, False: 0]
  ------------------
  140|  13.4k|        sa_doall(sa, NULL, &trampoline, &tramp);
  141|  13.4k|}
ossl_sa_doall_arg:
  146|   336k|{
  147|   336k|    if (sa != NULL)
  ------------------
  |  Branch (147:9): [True: 336k, False: 0]
  ------------------
  148|   336k|        sa_doall(sa, NULL, leaf, arg);
  149|   336k|}
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|  23.3M|{
  158|  23.3M|    int level;
  159|  23.3M|    void **p, *r = NULL;
  160|       |
  161|  23.3M|    if (sa == NULL || sa->nelem == 0)
  ------------------
  |  Branch (161:9): [True: 0, False: 23.3M]
  |  Branch (161:23): [True: 8.09k, False: 23.3M]
  ------------------
  162|  8.09k|        return NULL;
  163|       |
  164|  23.3M|    if (n <= sa->top) {
  ------------------
  |  Branch (164:9): [True: 23.1M, False: 197k]
  ------------------
  165|  23.1M|        p = sa->nodes;
  166|  26.3M|        for (level = sa->levels - 1; p != NULL && level > 0; level--)
  ------------------
  |  Branch (166:38): [True: 26.1M, False: 195k]
  |  Branch (166:51): [True: 3.23M, False: 22.9M]
  ------------------
  167|  3.23M|            p = (void **)p[(n >> (OPENSSL_SA_BLOCK_BITS * level))
  ------------------
  |  |   34|  3.23M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
  168|  3.23M|                & SA_BLOCK_MASK];
  ------------------
  |  |   46|  3.23M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  3.23M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  3.23M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  169|  23.1M|        r = p == NULL ? NULL : p[n & SA_BLOCK_MASK];
  ------------------
  |  |   46|  22.9M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  22.9M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  22.9M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (169:13): [True: 195k, False: 22.9M]
  ------------------
  170|  23.1M|    }
  171|  23.3M|    return r;
  172|  23.3M|}
ossl_sa_set:
  180|   369k|{
  181|   369k|    int i, level = 1;
  182|   369k|    ossl_uintmax_t n = posn;
  183|   369k|    void **p;
  184|       |
  185|   369k|    if (sa == NULL)
  ------------------
  |  Branch (185:9): [True: 0, False: 369k]
  ------------------
  186|      0|        return 0;
  187|       |
  188|  1.48M|    for (level = 1; level < SA_BLOCK_MAX_LEVELS; level++)
  ------------------
  |  |   47|  1.48M|#define SA_BLOCK_MAX_LEVELS (((int)sizeof(ossl_uintmax_t) * 8 \
  |  |   48|  1.48M|                                 + OPENSSL_SA_BLOCK_BITS - 1) \
  |  |  ------------------
  |  |  |  |   34|  1.48M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  |  |   49|  1.48M|    / OPENSSL_SA_BLOCK_BITS)
  |  |  ------------------
  |  |  |  |   34|  1.48M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  ------------------
  |  Branch (188:21): [True: 1.48M, False: 0]
  ------------------
  189|  1.48M|        if ((n >>= OPENSSL_SA_BLOCK_BITS) == 0)
  ------------------
  |  |   34|  1.48M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
  |  Branch (189:13): [True: 369k, False: 1.11M]
  ------------------
  190|   369k|            break;
  191|       |
  192|   380k|    for (; sa->levels < level; sa->levels++) {
  ------------------
  |  Branch (192:12): [True: 11.3k, False: 369k]
  ------------------
  193|  11.3k|        p = alloc_node();
  194|  11.3k|        if (p == NULL)
  ------------------
  |  Branch (194:13): [True: 0, False: 11.3k]
  ------------------
  195|      0|            return 0;
  196|  11.3k|        p[0] = sa->nodes;
  197|  11.3k|        sa->nodes = p;
  198|  11.3k|    }
  199|   369k|    if (sa->top < posn)
  ------------------
  |  Branch (199:9): [True: 101k, False: 267k]
  ------------------
  200|   101k|        sa->top = posn;
  201|       |
  202|   369k|    p = sa->nodes;
  203|  1.51M|    for (level = sa->levels - 1; level > 0; level--) {
  ------------------
  |  Branch (203:34): [True: 1.14M, False: 369k]
  ------------------
  204|  1.14M|        i = (posn >> (OPENSSL_SA_BLOCK_BITS * level)) & SA_BLOCK_MASK;
  ------------------
  |  |   34|  1.14M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
                      i = (posn >> (OPENSSL_SA_BLOCK_BITS * level)) & SA_BLOCK_MASK;
  ------------------
  |  |   46|  1.14M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  1.14M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.14M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|  1.14M|        if (p[i] == NULL && (p[i] = alloc_node()) == NULL)
  ------------------
  |  Branch (205:13): [True: 388k, False: 760k]
  |  Branch (205:29): [True: 0, False: 388k]
  ------------------
  206|      0|            return 0;
  207|  1.14M|        p = p[i];
  208|  1.14M|    }
  209|   369k|    p += posn & SA_BLOCK_MASK;
  ------------------
  |  |   46|   369k|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|   369k|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   369k|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|   369k|    if (val == NULL && *p != NULL)
  ------------------
  |  Branch (210:9): [True: 184k, False: 184k]
  |  Branch (210:24): [True: 184k, False: 0]
  ------------------
  211|   184k|        sa->nelem--;
  212|   184k|    else if (val != NULL && *p == NULL)
  ------------------
  |  Branch (212:14): [True: 184k, False: 0]
  |  Branch (212:29): [True: 184k, False: 3]
  ------------------
  213|   184k|        sa->nelem++;
  214|   369k|    *p = val;
  215|   369k|    return 1;
  216|   369k|}
sparse_array.c:sa_doall:
   67|   672k|{
   68|   672k|    int i[SA_BLOCK_MAX_LEVELS];
   69|   672k|    void *nodes[SA_BLOCK_MAX_LEVELS];
   70|   672k|    ossl_uintmax_t idx = 0;
   71|   672k|    int l = 0;
   72|       |
   73|   672k|    i[0] = 0;
   74|   672k|    nodes[0] = sa->nodes;
   75|  33.8M|    while (l >= 0) {
  ------------------
  |  Branch (75:12): [True: 33.2M, False: 672k]
  ------------------
   76|  33.2M|        const int n = i[l];
   77|  33.2M|        void **const p = nodes[l];
   78|       |
   79|  33.2M|        if (n >= SA_BLOCK_MAX) {
  ------------------
  |  |   45|  33.2M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  ------------------
  |  |  |  |   34|  33.2M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  ------------------
  |  Branch (79:13): [True: 1.95M, False: 31.2M]
  ------------------
   80|  1.95M|            if (p != NULL && node != NULL)
  ------------------
  |  Branch (80:17): [True: 1.28M, False: 664k]
  |  Branch (80:30): [True: 398k, False: 891k]
  ------------------
   81|   398k|                (*node)(p);
   82|  1.95M|            l--;
   83|  1.95M|            idx >>= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|  1.95M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
   84|  31.2M|        } else {
   85|  31.2M|            i[l] = n + 1;
   86|  31.2M|            if (p != NULL && p[n] != NULL) {
  ------------------
  |  Branch (86:17): [True: 20.6M, False: 10.6M]
  |  Branch (86:30): [True: 1.69M, False: 18.9M]
  ------------------
   87|  1.69M|                idx = (idx & ~SA_BLOCK_MASK) | n;
  ------------------
  |  |   46|  1.69M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  1.69M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.69M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   88|  1.69M|                if (l < sa->levels - 1) {
  ------------------
  |  Branch (88:21): [True: 1.28M, False: 410k]
  ------------------
   89|  1.28M|                    i[++l] = 0;
   90|  1.28M|                    nodes[l] = p[n];
   91|  1.28M|                    idx <<= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|  1.28M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
   92|  1.28M|                } else if (leaf != NULL) {
  ------------------
  |  Branch (92:28): [True: 410k, False: 0]
  ------------------
   93|   410k|                    (*leaf)(idx, p[n], arg);
   94|   410k|                }
   95|  1.69M|            }
   96|  31.2M|        }
   97|  33.2M|    }
   98|   672k|}
sparse_array.c:sa_free_node:
  101|   398k|{
  102|   398k|    OPENSSL_free(p);
  ------------------
  |  |  132|   398k|    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|   398k|}
sparse_array.c:alloc_node:
  175|   399k|{
  176|   399k|    return OPENSSL_calloc(SA_BLOCK_MAX, sizeof(void *));
  ------------------
  |  |  113|   399k|    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|   399k|}

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|  3.64k|{
   41|  3.64k|    OPENSSL_sk_compfunc old = sk->comp;
   42|       |
   43|  3.64k|    if (sk->comp != c && sk->num > 1)
  ------------------
  |  Branch (43:9): [True: 3.64k, False: 0]
  |  Branch (43:26): [True: 3.55k, False: 99]
  ------------------
   44|  3.55k|        sk->sorted = 0;
   45|  3.64k|    sk->comp = c;
   46|       |
   47|  3.64k|    return old;
   48|  3.64k|}
OPENSSL_sk_deep_copy:
  101|   918k|{
  102|   918k|    return internal_copy(sk, copy_func, free_func);
  103|   918k|}
OPENSSL_sk_dup:
  106|   702k|{
  107|   702k|    return internal_copy(sk, NULL, NULL);
  108|   702k|}
OPENSSL_sk_new_null:
  111|  14.5M|{
  112|       |    return OPENSSL_sk_new_reserve(NULL, 0);
  113|  14.5M|}
OPENSSL_sk_new:
  116|   308k|{
  117|   308k|    return OPENSSL_sk_new_reserve(c, 0);
  118|   308k|}
OPENSSL_sk_new_reserve:
  212|  14.9M|{
  213|  14.9M|    OPENSSL_STACK *st = OPENSSL_zalloc(sizeof(OPENSSL_STACK));
  ------------------
  |  |  109|  14.9M|    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|  14.9M|    if (st == NULL)
  ------------------
  |  Branch (215:9): [True: 0, False: 14.9M]
  ------------------
  216|      0|        return NULL;
  217|       |
  218|  14.9M|    st->comp = c;
  219|  14.9M|    st->sorted = 1; /* empty or single-element stack is considered sorted */
  220|       |
  221|  14.9M|    if (n <= 0)
  ------------------
  |  Branch (221:9): [True: 14.9M, False: 24]
  ------------------
  222|  14.9M|        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|  17.3M|{
  246|  17.3M|    if (st != NULL)
  ------------------
  |  Branch (246:9): [True: 16.0M, False: 1.29M]
  ------------------
  247|  16.0M|        st->free_thunk = f_thunk;
  248|       |
  249|  17.3M|    return st;
  250|  17.3M|}
OPENSSL_sk_set_cmp_thunks:
  253|   308k|{
  254|   308k|    if (st != NULL)
  ------------------
  |  Branch (254:9): [True: 308k, False: 0]
  ------------------
  255|   308k|        st->cmp_thunk = c_thunk;
  256|       |
  257|   308k|    return st;
  258|   308k|}
OPENSSL_sk_insert:
  261|  19.9M|{
  262|  19.9M|    int cmp_ret;
  263|       |
  264|  19.9M|    if (st == NULL) {
  ------------------
  |  Branch (264:9): [True: 0, False: 19.9M]
  ------------------
  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|  19.9M|    if (st->num == max_nodes) {
  ------------------
  |  Branch (268:9): [True: 0, False: 19.9M]
  ------------------
  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|  19.9M|    if (!sk_reserve(st, 1, 0))
  ------------------
  |  Branch (273:9): [True: 0, False: 19.9M]
  ------------------
  274|      0|        return 0;
  275|       |
  276|  19.9M|    if ((loc >= st->num) || (loc < 0)) {
  ------------------
  |  Branch (276:9): [True: 19.9M, False: 20]
  |  Branch (276:29): [True: 0, False: 20]
  ------------------
  277|  19.9M|        loc = st->num;
  278|  19.9M|        st->data[loc] = data;
  279|  19.9M|    } else {
  280|     20|        memmove(&st->data[loc + 1], &st->data[loc],
  281|     20|            sizeof(st->data[0]) * (st->num - loc));
  282|     20|        st->data[loc] = data;
  283|     20|    }
  284|  19.9M|    st->num++;
  285|  19.9M|    if (st->sorted && st->num > 1) {
  ------------------
  |  Branch (285:9): [True: 13.8M, False: 6.01M]
  |  Branch (285:23): [True: 3.42M, False: 10.4M]
  ------------------
  286|  3.42M|        if (st->comp != NULL) {
  ------------------
  |  Branch (286:13): [True: 44.2k, False: 3.38M]
  ------------------
  287|  44.2k|            if (loc > 0) {
  ------------------
  |  Branch (287:17): [True: 44.2k, False: 0]
  ------------------
  288|  44.2k|                cmp_ret = cmp_with_thunk(st, &st->data[loc - 1], &st->data[loc]);
  289|  44.2k|                if (cmp_ret > 0)
  ------------------
  |  Branch (289:21): [True: 5.72k, False: 38.4k]
  ------------------
  290|  5.72k|                    st->sorted = 0;
  291|  44.2k|            }
  292|  44.2k|            if (loc < st->num - 1) {
  ------------------
  |  Branch (292:17): [True: 0, False: 44.2k]
  ------------------
  293|      0|                cmp_ret = cmp_with_thunk(st, &st->data[loc + 1], &st->data[loc]);
  294|      0|                if (cmp_ret < 0)
  ------------------
  |  Branch (294:21): [True: 0, False: 0]
  ------------------
  295|      0|                    st->sorted = 0;
  296|      0|            }
  297|  3.38M|        } else {
  298|  3.38M|            st->sorted = 0;
  299|  3.38M|        }
  300|  3.42M|    }
  301|  19.9M|    return st->num;
  302|  19.9M|}
OPENSSL_sk_delete:
  331|    996|{
  332|    996|    if (st == NULL || loc < 0 || loc >= st->num)
  ------------------
  |  Branch (332:9): [True: 0, False: 996]
  |  Branch (332:23): [True: 0, False: 996]
  |  Branch (332:34): [True: 0, False: 996]
  ------------------
  333|      0|        return NULL;
  334|       |
  335|    996|    return internal_delete(st, loc);
  336|    996|}
OPENSSL_sk_find:
  408|   207k|{
  409|   207k|    return internal_find(st, data, OSSL_BSEARCH_FIRST_VALUE_ON_MATCH, NULL);
  ------------------
  |  |  150|   207k|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  410|   207k|}
OPENSSL_sk_push:
  423|  19.9M|{
  424|  19.9M|    if (st == NULL)
  ------------------
  |  Branch (424:9): [True: 0, False: 19.9M]
  ------------------
  425|      0|        return 0;
  426|  19.9M|    return OPENSSL_sk_insert(st, data, st->num);
  427|  19.9M|}
OPENSSL_sk_unshift:
  430|     20|{
  431|     20|    return OPENSSL_sk_insert(st, data, 0);
  432|     20|}
OPENSSL_sk_pop:
  442|  4.00k|{
  443|  4.00k|    if (st == NULL || st->num == 0)
  ------------------
  |  Branch (443:9): [True: 0, False: 4.00k]
  |  Branch (443:23): [True: 0, False: 4.00k]
  ------------------
  444|      0|        return NULL;
  445|  4.00k|    return internal_delete(st, st->num - 1);
  446|  4.00k|}
OPENSSL_sk_pop_free:
  457|  12.9M|{
  458|  12.9M|    int i;
  459|       |
  460|  12.9M|    if (st == NULL)
  ------------------
  |  Branch (460:9): [True: 4.44M, False: 8.52M]
  ------------------
  461|  4.44M|        return;
  462|       |
  463|  26.3M|    for (i = 0; i < st->num; i++) {
  ------------------
  |  Branch (463:17): [True: 17.7M, False: 8.52M]
  ------------------
  464|  17.7M|        if (st->data[i] != NULL) {
  ------------------
  |  Branch (464:13): [True: 17.7M, False: 0]
  ------------------
  465|  17.7M|            if (st->free_thunk != NULL)
  ------------------
  |  Branch (465:17): [True: 17.5M, False: 258k]
  ------------------
  466|  17.5M|                st->free_thunk(func, (void *)st->data[i]);
  467|   258k|            else
  468|   258k|                func((void *)st->data[i]);
  469|  17.7M|        }
  470|  17.7M|    }
  471|  8.52M|    OPENSSL_sk_free(st);
  472|  8.52M|}
OPENSSL_sk_free:
  475|  22.0M|{
  476|  22.0M|    if (st == NULL)
  ------------------
  |  Branch (476:9): [True: 7.18M, False: 14.9M]
  ------------------
  477|  7.18M|        return;
  478|  14.9M|    OPENSSL_free(st->data);
  ------------------
  |  |  132|  14.9M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  479|  14.9M|    OPENSSL_free(st);
  ------------------
  |  |  132|  14.9M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  480|  14.9M|}
OPENSSL_sk_num:
  483|  93.9M|{
  484|  93.9M|    return st == NULL ? -1 : st->num;
  ------------------
  |  Branch (484:12): [True: 12.9M, False: 81.0M]
  ------------------
  485|  93.9M|}
OPENSSL_sk_value:
  488|  54.7M|{
  489|  54.7M|    if (st == NULL || i < 0 || i >= st->num)
  ------------------
  |  Branch (489:9): [True: 0, False: 54.7M]
  |  Branch (489:23): [True: 1.92k, False: 54.7M]
  |  Branch (489:32): [True: 0, False: 54.7M]
  ------------------
  490|  1.92k|        return NULL;
  491|  54.7M|    return (void *)st->data[i];
  492|  54.7M|}
OPENSSL_sk_set:
  495|  3.25M|{
  496|  3.25M|    if (st == NULL) {
  ------------------
  |  Branch (496:9): [True: 0, False: 3.25M]
  ------------------
  497|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  498|      0|        return NULL;
  499|      0|    }
  500|  3.25M|    if (i < 0 || i >= st->num) {
  ------------------
  |  Branch (500:9): [True: 0, False: 3.25M]
  |  Branch (500:18): [True: 0, False: 3.25M]
  ------------------
  501|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  311|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  502|      0|            "i=%d", i);
  503|      0|        return NULL;
  504|      0|    }
  505|  3.25M|    st->data[i] = data;
  506|  3.25M|    st->sorted = st->num <= 1;
  507|  3.25M|    return (void *)st->data[i];
  508|  3.25M|}
OPENSSL_sk_sort:
  511|  22.0k|{
  512|  22.0k|    if (st != NULL && !st->sorted && st->comp != NULL) {
  ------------------
  |  Branch (512:9): [True: 22.0k, False: 0]
  |  Branch (512:23): [True: 7.29k, False: 14.7k]
  |  Branch (512:38): [True: 7.29k, False: 0]
  ------------------
  513|  7.29k|        if (st->num > 1)
  ------------------
  |  Branch (513:13): [True: 7.29k, False: 0]
  ------------------
  514|  7.29k|            qsort(st->data, st->num, sizeof(void *), st->comp);
  515|  7.29k|        st->sorted = 1; /* empty or single-element stack is considered sorted */
  516|  7.29k|    }
  517|  22.0k|}
OPENSSL_sk_is_sorted:
  520|  4.47k|{
  521|  4.47k|    return st == NULL ? 1 : st->sorted;
  ------------------
  |  Branch (521:12): [True: 0, False: 4.47k]
  ------------------
  522|  4.47k|}
stack.c:internal_copy:
   53|  1.62M|{
   54|  1.62M|    OPENSSL_STACK *ret;
   55|  1.62M|    int i;
   56|       |
   57|  1.62M|    if ((ret = OPENSSL_sk_new_null()) == NULL)
  ------------------
  |  Branch (57:9): [True: 0, False: 1.62M]
  ------------------
   58|      0|        goto err;
   59|       |
   60|  1.62M|    if (sk == NULL)
  ------------------
  |  Branch (60:9): [True: 1.69k, False: 1.61M]
  ------------------
   61|  1.69k|        goto done;
   62|       |
   63|       |    /* direct structure assignment */
   64|  1.61M|    *ret = *sk;
   65|  1.61M|    ret->data = NULL;
   66|  1.61M|    ret->num_alloc = 0;
   67|       |
   68|  1.61M|    if (ret->num == 0)
  ------------------
  |  Branch (68:9): [True: 138, False: 1.61M]
  ------------------
   69|    138|        goto done; /* nothing to copy */
   70|       |
   71|  1.61M|    ret->num_alloc = ret->num > min_nodes ? ret->num : min_nodes;
  ------------------
  |  Branch (71:22): [True: 463k, False: 1.15M]
  ------------------
   72|  1.61M|    ret->data = OPENSSL_calloc(ret->num_alloc, sizeof(*ret->data));
  ------------------
  |  |  113|  1.61M|    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.61M|    if (ret->data == NULL)
  ------------------
  |  Branch (73:9): [True: 0, False: 1.61M]
  ------------------
   74|      0|        goto err;
   75|  1.61M|    if (copy_func == NULL) {
  ------------------
  |  Branch (75:9): [True: 702k, False: 916k]
  ------------------
   76|   702k|        memcpy(ret->data, sk->data, sizeof(*ret->data) * ret->num);
   77|   916k|    } else {
   78|  4.12M|        for (i = 0; i < ret->num; ++i) {
  ------------------
  |  Branch (78:21): [True: 3.20M, False: 916k]
  ------------------
   79|  3.20M|            if (sk->data[i] == NULL)
  ------------------
  |  Branch (79:17): [True: 0, False: 3.20M]
  ------------------
   80|      0|                continue;
   81|  3.20M|            if ((ret->data[i] = copy_func(sk->data[i])) == NULL) {
  ------------------
  |  Branch (81:17): [True: 0, False: 3.20M]
  ------------------
   82|      0|                while (--i >= 0)
  ------------------
  |  Branch (82:24): [True: 0, False: 0]
  ------------------
   83|      0|                    if (ret->data[i] != NULL)
  ------------------
  |  Branch (83:25): [True: 0, False: 0]
  ------------------
   84|      0|                        free_func((void *)ret->data[i]);
   85|      0|                goto err;
   86|      0|            }
   87|  3.20M|        }
   88|   916k|    }
   89|       |
   90|  1.62M|done:
   91|  1.62M|    return ret;
   92|       |
   93|      0|err:
   94|      0|    OPENSSL_sk_free(ret);
   95|       |    return NULL;
   96|  1.61M|}
stack.c:sk_reserve:
  158|  19.9M|{
  159|  19.9M|    const void **tmpdata;
  160|  19.9M|    int num_alloc;
  161|       |
  162|       |    /* Check to see the reservation isn't exceeding the hard limit */
  163|  19.9M|    if (n > max_nodes - st->num) {
  ------------------
  |  Branch (163:9): [True: 0, False: 19.9M]
  ------------------
  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|  19.9M|    num_alloc = st->num + n;
  170|  19.9M|    if (num_alloc < min_nodes)
  ------------------
  |  Branch (170:9): [True: 17.1M, False: 2.77M]
  ------------------
  171|  17.1M|        num_alloc = min_nodes;
  172|       |
  173|       |    /* If |st->data| allocation was postponed */
  174|  19.9M|    if (st->data == NULL) {
  ------------------
  |  Branch (174:9): [True: 10.4M, False: 9.44M]
  ------------------
  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|  10.4M|        if ((st->data = OPENSSL_calloc(num_alloc, sizeof(void *))) == NULL)
  ------------------
  |  |  113|  10.4M|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (179:13): [True: 0, False: 10.4M]
  ------------------
  180|      0|            return 0;
  181|  10.4M|        st->num_alloc = num_alloc;
  182|  10.4M|        return 1;
  183|  10.4M|    }
  184|       |
  185|  9.44M|    if (!exact) {
  ------------------
  |  Branch (185:9): [True: 9.44M, False: 0]
  ------------------
  186|  9.44M|        if (num_alloc <= st->num_alloc)
  ------------------
  |  Branch (186:13): [True: 8.85M, False: 589k]
  ------------------
  187|  8.85M|            return 1;
  188|   589k|        num_alloc = compute_growth(num_alloc, st->num_alloc);
  189|   589k|        if (num_alloc == 0) {
  ------------------
  |  Branch (189:13): [True: 0, False: 589k]
  ------------------
  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|   589k|    } else if (num_alloc == st->num_alloc) {
  ------------------
  |  Branch (193:16): [True: 0, False: 0]
  ------------------
  194|      0|        return 1;
  195|      0|    }
  196|       |
  197|   589k|    tmpdata = OPENSSL_realloc_array((void *)st->data, num_alloc, sizeof(void *));
  ------------------
  |  |  125|   589k|    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|   589k|    if (tmpdata == NULL)
  ------------------
  |  Branch (198:9): [True: 0, False: 589k]
  ------------------
  199|      0|        return 0;
  200|       |
  201|   589k|    st->data = tmpdata;
  202|   589k|    st->num_alloc = num_alloc;
  203|   589k|    return 1;
  204|   589k|}
stack.c:compute_growth:
  140|   589k|{
  141|   589k|    int err = 0;
  142|       |
  143|  1.17M|    while (current < target) {
  ------------------
  |  Branch (143:12): [True: 589k, False: 589k]
  ------------------
  144|   589k|        if (current >= max_nodes)
  ------------------
  |  Branch (144:13): [True: 0, False: 589k]
  ------------------
  145|      0|            return 0;
  146|       |
  147|   589k|        current = safe_muldiv_int(current, 8, 5, &err);
  148|   589k|        if (err != 0)
  ------------------
  |  Branch (148:13): [True: 0, False: 589k]
  ------------------
  149|      0|            return 0;
  150|   589k|        if (current >= max_nodes)
  ------------------
  |  Branch (150:13): [True: 0, False: 589k]
  ------------------
  151|      0|            current = max_nodes;
  152|   589k|    }
  153|   589k|    return current;
  154|   589k|}
stack.c:cmp_with_thunk:
  207|  44.2k|{
  208|  44.2k|    return (st->cmp_thunk == NULL) ? st->comp(a, b) : st->cmp_thunk(st->comp, a, b);
  ------------------
  |  Branch (208:12): [True: 0, False: 44.2k]
  ------------------
  209|  44.2k|}
stack.c:internal_delete:
  305|  4.99k|{
  306|  4.99k|    const void *ret = st->data[loc];
  307|       |
  308|  4.99k|    if (loc != st->num - 1)
  ------------------
  |  Branch (308:9): [True: 747, False: 4.25k]
  ------------------
  309|    747|        memmove(&st->data[loc], &st->data[loc + 1],
  310|    747|            sizeof(st->data[0]) * (st->num - loc - 1));
  311|  4.99k|    st->num--;
  312|  4.99k|    st->sorted = st->sorted || st->num <= 1;
  ------------------
  |  Branch (312:18): [True: 4.09k, False: 901]
  |  Branch (312:32): [True: 645, False: 256]
  ------------------
  313|       |
  314|  4.99k|    return (void *)ret;
  315|  4.99k|}
stack.c:internal_find:
  340|   207k|{
  341|   207k|    const void *r;
  342|   207k|    int i, count = 0;
  343|   207k|    int cmp_ret;
  344|   207k|    int *pnum = pnum_matched;
  345|       |
  346|   207k|    if (st == NULL || st->num == 0)
  ------------------
  |  Branch (346:9): [True: 0, False: 207k]
  |  Branch (346:23): [True: 0, False: 207k]
  ------------------
  347|      0|        return -1;
  348|       |
  349|   207k|    if (pnum == NULL)
  ------------------
  |  Branch (349:9): [True: 207k, False: 0]
  ------------------
  350|   207k|        pnum = &count;
  351|       |
  352|   207k|    if (st->comp == NULL) {
  ------------------
  |  Branch (352:9): [True: 0, False: 207k]
  ------------------
  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|   207k|    if (data == NULL)
  ------------------
  |  Branch (362:9): [True: 0, False: 207k]
  ------------------
  363|      0|        return -1;
  364|       |
  365|   207k|    if (!st->sorted) {
  ------------------
  |  Branch (365:9): [True: 0, False: 207k]
  ------------------
  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|   207k|    if (pnum_matched != NULL)
  ------------------
  |  Branch (384:9): [True: 0, False: 207k]
  ------------------
  385|      0|        ret_val_options |= OSSL_BSEARCH_FIRST_VALUE_ON_MATCH;
  ------------------
  |  |  150|      0|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  386|   207k|    r = ossl_bsearch(&data, st->data, st->num, sizeof(void *), st->comp, st->cmp_thunk,
  387|   207k|        ret_val_options);
  388|       |
  389|   207k|    if (pnum_matched != NULL) {
  ------------------
  |  Branch (389:9): [True: 0, False: 207k]
  ------------------
  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|   207k|    return r == NULL ? -1 : (int)((const void **)r - st->data);
  ------------------
  |  Branch (404:12): [True: 2.50k, False: 205k]
  ------------------
  405|   207k|}

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

ossl_crypto_mutex_new:
   97|    769|{
   98|    769|    pthread_mutex_t *mutex;
   99|       |
  100|    769|    if ((mutex = OPENSSL_zalloc(sizeof(*mutex))) == NULL)
  ------------------
  |  |  109|    769|    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: 769]
  ------------------
  101|      0|        return NULL;
  102|    769|    if (pthread_mutex_init(mutex, NULL) != 0) {
  ------------------
  |  Branch (102:9): [True: 0, False: 769]
  ------------------
  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|    769|    return (CRYPTO_MUTEX *)mutex;
  107|    769|}
ossl_crypto_mutex_free:
  142|    768|{
  143|    768|    pthread_mutex_t **mutex_p;
  144|       |
  145|    768|    if (mutex == NULL)
  ------------------
  |  Branch (145:9): [True: 0, False: 768]
  ------------------
  146|      0|        return;
  147|       |
  148|    768|    mutex_p = (pthread_mutex_t **)mutex;
  149|    768|    if (*mutex_p != NULL)
  ------------------
  |  Branch (149:9): [True: 768, False: 0]
  ------------------
  150|    768|        pthread_mutex_destroy(*mutex_p);
  151|    768|    OPENSSL_free(*mutex_p);
  ------------------
  |  |  132|    768|    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|    768|}
ossl_crypto_condvar_new:
  156|    769|{
  157|    769|    pthread_cond_t *cv_p;
  158|       |
  159|    769|    if ((cv_p = OPENSSL_zalloc(sizeof(*cv_p))) == NULL)
  ------------------
  |  |  109|    769|    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: 769]
  ------------------
  160|      0|        return NULL;
  161|    769|    if (pthread_cond_init(cv_p, NULL) != 0) {
  ------------------
  |  Branch (161:9): [True: 0, False: 769]
  ------------------
  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|    769|    return (CRYPTO_CONDVAR *)cv_p;
  166|    769|}
ossl_crypto_condvar_free:
  220|    768|{
  221|    768|    pthread_cond_t **cv_p;
  222|       |
  223|    768|    if (cv == NULL)
  ------------------
  |  Branch (223:9): [True: 0, False: 768]
  ------------------
  224|      0|        return;
  225|       |
  226|    768|    cv_p = (pthread_cond_t **)cv;
  227|    768|    if (*cv_p != NULL)
  ------------------
  |  Branch (227:9): [True: 768, False: 0]
  ------------------
  228|    768|        pthread_cond_destroy(*cv_p);
  229|    768|    OPENSSL_free(*cv_p);
  ------------------
  |  |  132|    768|    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|    768|}

ossl_threads_ctx_new:
  128|    769|{
  129|    769|    struct openssl_threads_st *t = OPENSSL_zalloc(sizeof(*t));
  ------------------
  |  |  109|    769|    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|    769|    if (t == NULL)
  ------------------
  |  Branch (131:9): [True: 0, False: 769]
  ------------------
  132|      0|        return NULL;
  133|       |
  134|    769|    t->lock = ossl_crypto_mutex_new();
  135|    769|    t->cond_finished = ossl_crypto_condvar_new();
  136|       |
  137|    769|    if (t->lock == NULL || t->cond_finished == NULL)
  ------------------
  |  Branch (137:9): [True: 0, False: 769]
  |  Branch (137:28): [True: 0, False: 769]
  ------------------
  138|      0|        goto fail;
  139|       |
  140|    769|    return t;
  141|       |
  142|      0|fail:
  143|      0|    ossl_threads_ctx_free((void *)t);
  144|       |    return NULL;
  145|    769|}
ossl_threads_ctx_free:
  148|    768|{
  149|    768|    OSSL_LIB_CTX_THREADS *t = (OSSL_LIB_CTX_THREADS *)vdata;
  150|       |
  151|    768|    if (t == NULL)
  ------------------
  |  Branch (151:9): [True: 0, False: 768]
  ------------------
  152|      0|        return;
  153|       |
  154|    768|    ossl_crypto_mutex_free(&t->lock);
  155|    768|    ossl_crypto_condvar_free(&t->cond_finished);
  156|    768|    OPENSSL_free(t);
  ------------------
  |  |  132|    768|    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|    768|}

CRYPTO_THREAD_get_local_ex:
  259|  22.1M|{
  260|  22.1M|    MASTER_KEY_ENTRY *mkey;
  261|  22.1M|    CTX_TABLE_ENTRY ctxd;
  262|       |
  263|  22.1M|    ctx = (ctx == CRYPTO_THREAD_NO_CONTEXT) ? NULL : ossl_lib_ctx_get_concrete(ctx);
  ------------------
  |  |   42|  22.1M|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  |  Branch (263:11): [True: 22.1M, False: 29.3k]
  ------------------
  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|  22.1M|    if (!CRYPTO_THREAD_run_once(&master_once, init_master_key))
  ------------------
  |  Branch (276:9): [True: 0, False: 22.1M]
  ------------------
  277|      0|        return NULL;
  278|       |
  279|  22.1M|    if (!ossl_assert(id < CRYPTO_THREAD_LOCAL_KEY_MAX))
  ------------------
  |  |   52|  22.1M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  22.1M|    __FILE__, __LINE__)
  ------------------
  |  Branch (279:9): [True: 0, False: 22.1M]
  ------------------
  280|      0|        return NULL;
  281|       |
  282|       |    /*
  283|       |     * Get our master table sparse array, indexed by key id
  284|       |     */
  285|  22.1M|    mkey = CRYPTO_THREAD_get_local(&master_key);
  286|  22.1M|    if (mkey == NULL)
  ------------------
  |  Branch (286:9): [True: 1, False: 22.1M]
  ------------------
  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|  22.1M|    if (mkey[id].ctx_table == NULL)
  ------------------
  |  Branch (293:9): [True: 3, False: 22.1M]
  ------------------
  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|  22.1M|    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|  22.1M|    return ctxd;
  310|  22.1M|}
CRYPTO_THREAD_set_local_ex:
  338|  2.31k|{
  339|  2.31k|    MASTER_KEY_ENTRY *mkey;
  340|       |
  341|  2.31k|    ctx = (ctx == CRYPTO_THREAD_NO_CONTEXT) ? NULL : ossl_lib_ctx_get_concrete(ctx);
  ------------------
  |  |   42|  2.31k|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  |  Branch (341:11): [True: 4, False: 2.31k]
  ------------------
  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.31k|    if (!CRYPTO_THREAD_run_once(&master_once, init_master_key))
  ------------------
  |  Branch (346:9): [True: 0, False: 2.31k]
  ------------------
  347|      0|        return 0;
  348|       |
  349|  2.31k|    if (!ossl_assert(id < CRYPTO_THREAD_LOCAL_KEY_MAX))
  ------------------
  |  |   52|  2.31k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.31k|    __FILE__, __LINE__)
  ------------------
  |  Branch (349:9): [True: 0, False: 2.31k]
  ------------------
  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.31k|    mkey = CRYPTO_THREAD_get_local(&master_key);
  357|  2.31k|    if (mkey == NULL) {
  ------------------
  |  Branch (357:9): [True: 1, False: 2.31k]
  ------------------
  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.31k|    if (mkey[id].ctx_table == NULL) {
  ------------------
  |  Branch (377:9): [True: 3, False: 2.31k]
  ------------------
  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.31k|    return ossl_sa_CTX_TABLE_ENTRY_set(mkey[id].ctx_table,
  395|  2.31k|        (uintptr_t)ctx, data);
  396|  2.31k|}
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|    768|{
  476|    768|    pthread_mutex_lock(&lock->write_lock);
  477|    768|    TSAN_FAKE_UNLOCK(&lock->write_lock);
  478|    768|}
ossl_rcu_write_unlock:
  481|    768|{
  482|    768|    TSAN_FAKE_LOCK(&lock->write_lock);
  483|    768|    pthread_mutex_unlock(&lock->write_lock);
  484|    768|}
ossl_synchronize_rcu:
  487|  1.53k|{
  488|  1.53k|    struct rcu_qp *qp;
  489|  1.53k|    uint64_t count;
  490|  1.53k|    uint32_t curr_id;
  491|  1.53k|    struct rcu_cb_item *cb_items, *tmpcb;
  492|       |
  493|  1.53k|    pthread_mutex_lock(&lock->write_lock);
  494|  1.53k|    cb_items = lock->cb_items;
  495|  1.53k|    lock->cb_items = NULL;
  496|  1.53k|    pthread_mutex_unlock(&lock->write_lock);
  497|       |
  498|  1.53k|    qp = update_qp(lock, &curr_id);
  499|       |
  500|       |    /* retire in order */
  501|  1.53k|    pthread_mutex_lock(&lock->prior_lock);
  502|  1.53k|    while (lock->next_to_retire != curr_id)
  ------------------
  |  Branch (502:12): [True: 0, False: 1.53k]
  ------------------
  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.53k|    do {
  515|  1.53k|        count = ATOMIC_LOAD_N(uint64_t, &qp->users, __ATOMIC_ACQUIRE);
  ------------------
  |  |  122|  1.53k|#define ATOMIC_LOAD_N(t, p, o) __atomic_load_n(p, o)
  ------------------
  516|  1.53k|    } while (count != (uint64_t)0);
  ------------------
  |  Branch (516:14): [True: 0, False: 1.53k]
  ------------------
  517|       |
  518|  1.53k|    lock->next_to_retire++;
  519|  1.53k|    pthread_cond_broadcast(&lock->prior_signal);
  520|  1.53k|    pthread_mutex_unlock(&lock->prior_lock);
  521|       |
  522|  1.53k|    retire_qp(lock, qp);
  523|       |
  524|       |    /* handle any callbacks that we have */
  525|  2.30k|    while (cb_items != NULL) {
  ------------------
  |  Branch (525:12): [True: 768, False: 1.53k]
  ------------------
  526|    768|        tmpcb = cb_items;
  527|    768|        cb_items = cb_items->next;
  528|    768|        tmpcb->fn(tmpcb->data);
  529|    768|        OPENSSL_free(tmpcb);
  ------------------
  |  |  132|    768|    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|    768|    }
  531|  1.53k|}
ossl_rcu_cb_item_new:
  534|    768|{
  535|    768|    return OPENSSL_zalloc(sizeof(CRYPTO_RCU_CB_ITEM));
  ------------------
  |  |  109|    768|    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|    768|}
ossl_rcu_call:
  549|    768|{
  550|    768|    item->fn = cb;
  551|    768|    item->data = data;
  552|    768|    item->next = lock->cb_items;
  553|    768|    lock->cb_items = item;
  554|    768|}
ossl_rcu_uptr_deref:
  557|  17.0M|{
  558|  17.0M|    return ATOMIC_LOAD_N(pvoid, p, __ATOMIC_ACQUIRE);
  ------------------
  |  |  122|  17.0M|#define ATOMIC_LOAD_N(t, p, o) __atomic_load_n(p, o)
  ------------------
  559|  17.0M|}
ossl_rcu_assign_uptr:
  562|   403k|{
  563|   403k|    ATOMIC_STORE(pvoid, p, v, __ATOMIC_RELEASE);
  ------------------
  |  |  124|   403k|#define ATOMIC_STORE(t, p, v, o) __atomic_store(p, v, o)
  ------------------
  564|   403k|}
ossl_rcu_lock_new:
  567|    769|{
  568|    769|    struct rcu_lock_st *new;
  569|    769|    pthread_mutex_t *mutexes[3] = { NULL };
  570|    769|    pthread_cond_t *conds[2] = { NULL };
  571|    769|    int i;
  572|       |
  573|       |    /*
  574|       |     * We need a minimum of 2 qp's
  575|       |     */
  576|    769|    if (num_writers < 2)
  ------------------
  |  Branch (576:9): [True: 769, False: 0]
  ------------------
  577|    769|        num_writers = 2;
  578|       |
  579|    769|    ctx = ossl_lib_ctx_get_concrete(ctx);
  580|    769|    if (ctx == NULL)
  ------------------
  |  Branch (580:9): [True: 0, False: 769]
  ------------------
  581|      0|        return 0;
  582|       |
  583|    769|    new = OPENSSL_zalloc(sizeof(*new));
  ------------------
  |  |  109|    769|    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|    769|    if (new == NULL)
  ------------------
  |  Branch (584:9): [True: 0, False: 769]
  ------------------
  585|      0|        return NULL;
  586|       |
  587|    769|    new->ctx = ctx;
  588|    769|    i = 0;
  589|    769|    mutexes[i] = pthread_mutex_init(&new->write_lock, NULL) == 0 ? &new->write_lock : NULL;
  ------------------
  |  Branch (589:18): [True: 769, False: 0]
  ------------------
  590|    769|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (590:9): [True: 0, False: 769]
  ------------------
  591|      0|        goto err;
  592|    769|    mutexes[i] = pthread_mutex_init(&new->prior_lock, NULL) == 0 ? &new->prior_lock : NULL;
  ------------------
  |  Branch (592:18): [True: 769, False: 0]
  ------------------
  593|    769|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (593:9): [True: 0, False: 769]
  ------------------
  594|      0|        goto err;
  595|    769|    mutexes[i] = pthread_mutex_init(&new->alloc_lock, NULL) == 0 ? &new->alloc_lock : NULL;
  ------------------
  |  Branch (595:18): [True: 769, False: 0]
  ------------------
  596|    769|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (596:9): [True: 0, False: 769]
  ------------------
  597|      0|        goto err;
  598|    769|    conds[i - 3] = pthread_cond_init(&new->prior_signal, NULL) == 0 ? &new->prior_signal : NULL;
  ------------------
  |  Branch (598:20): [True: 769, False: 0]
  ------------------
  599|    769|    if (conds[i - 3] == NULL)
  ------------------
  |  Branch (599:9): [True: 0, False: 769]
  ------------------
  600|      0|        goto err;
  601|    769|    i++;
  602|    769|    conds[i - 3] = pthread_cond_init(&new->alloc_signal, NULL) == 0 ? &new->alloc_signal : NULL;
  ------------------
  |  Branch (602:20): [True: 769, False: 0]
  ------------------
  603|    769|    if (conds[i - 3] == NULL)
  ------------------
  |  Branch (603:9): [True: 0, False: 769]
  ------------------
  604|      0|        goto err;
  605|    769|    i++;
  606|    769|    new->qp_group = allocate_new_qp_group(new, num_writers);
  607|    769|    if (new->qp_group == NULL)
  ------------------
  |  Branch (607:9): [True: 0, False: 769]
  ------------------
  608|      0|        goto err;
  609|       |
  610|    769|    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|    769|}
ossl_rcu_lock_free:
  625|    768|{
  626|    768|    struct rcu_lock_st *rlock = (struct rcu_lock_st *)lock;
  627|       |
  628|    768|    if (lock == NULL)
  ------------------
  |  Branch (628:9): [True: 0, False: 768]
  ------------------
  629|      0|        return;
  630|       |
  631|       |    /* make sure we're synchronized */
  632|    768|    ossl_synchronize_rcu(rlock);
  633|       |
  634|    768|    OPENSSL_free(rlock->qp_group);
  ------------------
  |  |  132|    768|    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|    768|    pthread_mutex_destroy(&rlock->write_lock);
  641|    768|    pthread_mutex_destroy(&rlock->prior_lock);
  642|    768|    pthread_mutex_destroy(&rlock->alloc_lock);
  643|    768|    pthread_cond_destroy(&rlock->prior_signal);
  644|    768|    pthread_cond_destroy(&rlock->alloc_signal);
  645|       |
  646|       |    /* There should only be a single qp left now */
  647|    768|    OPENSSL_free(rlock);
  ------------------
  |  |  132|    768|    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|    768|}
CRYPTO_THREAD_lock_new:
  909|  1.73M|{
  910|  1.73M|#ifdef USE_RWLOCK
  911|  1.73M|    CRYPTO_RWLOCK *lock;
  912|       |
  913|  1.73M|    ossl_init_rwlock_contention_data();
  914|       |
  915|  1.73M|    if ((lock = OPENSSL_zalloc(sizeof(pthread_rwlock_t))) == NULL)
  ------------------
  |  |  109|  1.73M|    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.73M]
  ------------------
  916|       |        /* Don't set error, to avoid recursion blowup. */
  917|      0|        return NULL;
  918|       |
  919|  1.73M|    if (pthread_rwlock_init(lock, NULL) != 0) {
  ------------------
  |  Branch (919:9): [True: 0, False: 1.73M]
  ------------------
  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.73M|    return lock;
  953|  1.73M|}
CRYPTO_THREAD_read_lock:
  956|  14.4M|{
  957|  14.4M|#ifdef USE_RWLOCK
  958|  14.4M|    if (!ossl_assert(ossl_rwlock_rdlock(lock) == 0))
  ------------------
  |  |   52|  14.4M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  14.4M|    __FILE__, __LINE__)
  ------------------
  |  Branch (958:9): [True: 0, False: 14.4M]
  ------------------
  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|  14.4M|    return 1;
  968|  14.4M|}
CRYPTO_THREAD_write_lock:
  971|  1.91M|{
  972|  1.91M|#ifdef USE_RWLOCK
  973|  1.91M|    if (!ossl_assert(ossl_rwlock_wrlock(lock) == 0))
  ------------------
  |  |   52|  1.91M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.91M|    __FILE__, __LINE__)
  ------------------
  |  Branch (973:9): [True: 0, False: 1.91M]
  ------------------
  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.91M|    return 1;
  983|  1.91M|}
CRYPTO_THREAD_unlock:
  986|  16.3M|{
  987|  16.3M|#ifdef USE_RWLOCK
  988|  16.3M|    if (ossl_rwlock_unlock(lock) != 0)
  ------------------
  |  Branch (988:9): [True: 0, False: 16.3M]
  ------------------
  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|  16.3M|    return 1;
  998|  16.3M|}
CRYPTO_THREAD_lock_free:
 1001|  1.73M|{
 1002|  1.73M|    if (lock == NULL)
  ------------------
  |  Branch (1002:9): [True: 1.92k, False: 1.73M]
  ------------------
 1003|  1.92k|        return;
 1004|       |
 1005|  1.73M|#ifdef USE_RWLOCK
 1006|  1.73M|    pthread_rwlock_destroy(lock);
 1007|       |#else
 1008|       |    pthread_mutex_destroy(lock);
 1009|       |#endif
 1010|  1.73M|    OPENSSL_free(lock);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
 1011|       |
 1012|  1.73M|    return;
 1013|  1.73M|}
CRYPTO_THREAD_run_once:
 1016|  71.0M|{
 1017|  71.0M|    if (ossl_unlikely(pthread_once(once, init) != 0))
  ------------------
  |  |   23|  71.0M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 71.0M]
  |  |  ------------------
  ------------------
 1018|      0|        return 0;
 1019|       |
 1020|  71.0M|    return 1;
 1021|  71.0M|}
CRYPTO_THREAD_init_local:
 1024|      4|{
 1025|      4|    if (pthread_key_create(key, cleanup) != 0)
  ------------------
  |  Branch (1025:9): [True: 0, False: 4]
  ------------------
 1026|      0|        return 0;
 1027|       |
 1028|      4|    return 1;
 1029|      4|}
CRYPTO_THREAD_get_local:
 1032|  34.9M|{
 1033|  34.9M|    return pthread_getspecific(*key);
 1034|  34.9M|}
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|   313k|{
 1064|   313k|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1065|   313k|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1065:9): [True: 313k, Folded]
  ------------------
 1066|   313k|        *ret = __atomic_add_fetch(val, amount, __ATOMIC_ACQ_REL);
 1067|   313k|        return 1;
 1068|   313k|    }
 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|  32.2M|{
 1168|  32.2M|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1169|  32.2M|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1169:9): [True: 32.2M, Folded]
  ------------------
 1170|  32.2M|        __atomic_load(val, ret, __ATOMIC_ACQUIRE);
 1171|  32.2M|        return 1;
 1172|  32.2M|    }
 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|   402k|{
 1191|   402k|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1192|   402k|    if (__atomic_is_lock_free(sizeof(*dst), dst)) {
  ------------------
  |  Branch (1192:9): [True: 402k, Folded]
  ------------------
 1193|   402k|        __atomic_store(dst, &val, __ATOMIC_RELEASE);
 1194|   402k|        return 1;
 1195|   402k|    }
 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|  31.0k|{
 1267|  31.0k|    return getpid();
 1268|  31.0k|}
threads_pthread.c:update_qp:
  412|  1.53k|{
  413|  1.53k|    uint32_t current_idx;
  414|       |
  415|  1.53k|    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.53k|    while (lock->group_count - lock->writers_alloced < 2)
  ------------------
  |  Branch (422:12): [True: 0, False: 1.53k]
  ------------------
  423|       |        /* we have to wait for one to be free */
  424|      0|        pthread_cond_wait(&lock->alloc_signal, &lock->alloc_lock);
  425|       |
  426|  1.53k|    current_idx = lock->current_alloc_idx;
  427|       |
  428|       |    /* Allocate the qp */
  429|  1.53k|    lock->writers_alloced++;
  430|       |
  431|       |    /* increment the allocation index */
  432|  1.53k|    lock->current_alloc_idx = (lock->current_alloc_idx + 1) % lock->group_count;
  433|       |
  434|  1.53k|    *curr_id = lock->id_ctr;
  435|  1.53k|    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.53k|    ATOMIC_STORE_N(uint32_t, &lock->reader_idx, lock->current_alloc_idx,
  ------------------
  |  |  123|  1.53k|#define ATOMIC_STORE_N(t, p, v, o) __atomic_store_n(p, v, o)
  ------------------
  442|  1.53k|        __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.53k|    ATOMIC_ADD_FETCH(&lock->qp_group[current_idx].users, (uint64_t)0,
  ------------------
  |  |  125|  1.53k|#define ATOMIC_ADD_FETCH(p, v, o) __atomic_add_fetch(p, v, o)
  ------------------
  449|  1.53k|        __ATOMIC_RELEASE);
  450|       |
  451|       |    /* wake up any waiters */
  452|  1.53k|    pthread_cond_signal(&lock->alloc_signal);
  453|  1.53k|    pthread_mutex_unlock(&lock->alloc_lock);
  454|  1.53k|    return &lock->qp_group[current_idx];
  455|  1.53k|}
threads_pthread.c:retire_qp:
  458|  1.53k|{
  459|  1.53k|    pthread_mutex_lock(&lock->alloc_lock);
  460|  1.53k|    lock->writers_alloced--;
  461|  1.53k|    pthread_cond_signal(&lock->alloc_signal);
  462|  1.53k|    pthread_mutex_unlock(&lock->alloc_lock);
  463|  1.53k|}
threads_pthread.c:allocate_new_qp_group:
  467|    769|{
  468|    769|    struct rcu_qp *new = OPENSSL_calloc(count, sizeof(*new));
  ------------------
  |  |  113|    769|    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|    769|    lock->group_count = count;
  471|    769|    return new;
  472|    769|}
threads_pthread.c:ossl_init_rwlock_contention_data:
  888|  1.73M|{
  889|  1.73M|}
threads_pthread.c:ossl_rwlock_rdlock:
  892|  14.4M|{
  893|  14.4M|    return pthread_rwlock_rdlock(rwlock);
  894|  14.4M|}
threads_pthread.c:ossl_rwlock_wrlock:
  897|  1.91M|{
  898|  1.91M|    return pthread_rwlock_wrlock(rwlock);
  899|  1.91M|}
threads_pthread.c:ossl_rwlock_unlock:
  902|  16.3M|{
  903|  16.3M|    return pthread_rwlock_unlock(rwlock);
  904|  16.3M|}

ossl_time_now:
   16|  4.53k|{
   17|  4.53k|    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|  4.53k|    struct timeval t;
   37|       |
   38|  4.53k|    if (gettimeofday(&t, NULL) < 0) {
  ------------------
  |  Branch (38:9): [True: 0, False: 4.53k]
  ------------------
   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|  4.53k|    if (t.tv_sec <= 0)
  ------------------
  |  Branch (43:9): [True: 0, False: 4.53k]
  ------------------
   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|  4.53k|    else
   46|  4.53k|        r.t = ((uint64_t)t.tv_sec * 1000000 + t.tv_usec) * OSSL_TIME_US;
  ------------------
  |  |   37|  4.53k|#define OSSL_TIME_US (OSSL_TIME_MS / 1000)
  |  |  ------------------
  |  |  |  |   34|  4.53k|#define OSSL_TIME_MS (OSSL_TIME_SECOND / 1000)
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.53k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   47|  4.53k|#endif /* defined(_WIN32) */
   48|  4.53k|    return r;
   49|  4.53k|}

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

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

ossl_policy_cache_free:
  178|   916k|{
  179|   916k|    if (!cache)
  ------------------
  |  Branch (179:9): [True: 916k, False: 0]
  ------------------
  180|   916k|        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|  80.5k|{
   23|  80.5k|    sk_X509_pop_free(certs, X509_free);
  ------------------
  |  |   96|  80.5k|#define sk_X509_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_sk_type(sk), ossl_check_X509_freefunc_type(freefunc))
  ------------------
   24|  80.5k|}

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

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

X509_check_purpose:
   83|   399k|{
   84|   399k|    int idx;
   85|   399k|    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|   399k|    if (!ossl_x509v3_cache_extensions((X509 *)x))
  ------------------
  |  Branch (91:9): [True: 0, False: 399k]
  ------------------
   92|      0|        return -1;
   93|   399k|    if (id == -1)
  ------------------
  |  Branch (93:9): [True: 399k, False: 0]
  ------------------
   94|   399k|        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|   789k|{
  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|   789k|    static const int supported_nids[] = {
  317|   789k|        NID_netscape_cert_type, /* 71 */
  ------------------
  |  | 2949|   789k|#define NID_netscape_cert_type          71
  ------------------
  318|   789k|        NID_key_usage, /* 83 */
  ------------------
  |  | 2689|   789k|#define NID_key_usage           83
  ------------------
  319|   789k|        NID_subject_alt_name, /* 85 */
  ------------------
  |  | 2699|   789k|#define NID_subject_alt_name            85
  ------------------
  320|   789k|        NID_basic_constraints, /* 87 */
  ------------------
  |  | 2709|   789k|#define NID_basic_constraints           87
  ------------------
  321|   789k|        NID_certificate_policies, /* 89 */
  ------------------
  |  | 2754|   789k|#define NID_certificate_policies                89
  ------------------
  322|   789k|        NID_crl_distribution_points, /* 103 */
  ------------------
  |  | 2749|   789k|#define NID_crl_distribution_points             103
  ------------------
  323|   789k|        NID_ext_key_usage, /* 126 */
  ------------------
  |  | 2779|   789k|#define NID_ext_key_usage               126
  ------------------
  324|   789k|#ifndef OPENSSL_NO_RFC3779
  325|   789k|        NID_sbgp_ipAddrBlock, /* 290 */
  ------------------
  |  | 1630|   789k|#define NID_sbgp_ipAddrBlock            290
  ------------------
  326|   789k|        NID_sbgp_autonomousSysNum, /* 291 */
  ------------------
  |  | 1634|   789k|#define NID_sbgp_autonomousSysNum               291
  ------------------
  327|   789k|#endif
  328|   789k|        NID_id_pkix_OCSP_noCheck, /* 369 */
  ------------------
  |  | 2228|   789k|#define NID_id_pkix_OCSP_noCheck                369
  ------------------
  329|   789k|        NID_policy_constraints, /* 401 */
  ------------------
  |  | 2774|   789k|#define NID_policy_constraints          401
  ------------------
  330|   789k|        NID_proxyCertInfo, /* 663 */
  ------------------
  |  | 1652|   789k|#define NID_proxyCertInfo               663
  ------------------
  331|   789k|        NID_name_constraints, /* 666 */
  ------------------
  |  | 2744|   789k|#define NID_name_constraints            666
  ------------------
  332|   789k|        NID_policy_mappings, /* 747 */
  ------------------
  |  | 2764|   789k|#define NID_policy_mappings             747
  ------------------
  333|   789k|        NID_inhibit_any_policy /* 748 */
  ------------------
  |  | 2834|   789k|#define NID_inhibit_any_policy          748
  ------------------
  334|   789k|    };
  335|       |
  336|   789k|    int ex_nid = OBJ_obj2nid(X509_EXTENSION_get_object(ex));
  337|       |
  338|   789k|    if (ex_nid == NID_undef)
  ------------------
  |  |   18|   789k|#define NID_undef                       0
  ------------------
  |  Branch (338:9): [True: 0, False: 789k]
  ------------------
  339|      0|        return 0;
  340|       |
  341|   789k|    if (OBJ_bsearch_nid(&ex_nid, supported_nids, OSSL_NELEM(supported_nids)))
  ------------------
  |  |   14|   789k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (341:9): [True: 789k, False: 0]
  ------------------
  342|   789k|        return 1;
  343|      0|    return 0;
  344|   789k|}
ossl_x509v3_cache_extensions:
  444|   399k|{
  445|   399k|    BASIC_CONSTRAINTS *bs;
  446|   399k|    PROXY_CERT_INFO_EXTENSION *pci;
  447|   399k|    ASN1_BIT_STRING *usage;
  448|   399k|    ASN1_BIT_STRING *ns;
  449|   399k|    EXTENDED_KEY_USAGE *extusage;
  450|   399k|    int i;
  451|   399k|    int res;
  452|   399k|    uint32_t tmp_ex_flags;
  453|   399k|    unsigned char tmp_sha1_hash[SHA_DIGEST_LENGTH];
  454|   399k|    long tmp_ex_pathlen;
  455|   399k|    long tmp_ex_pcpathlen;
  456|   399k|    uint32_t tmp_ex_kusage;
  457|   399k|    uint32_t tmp_ex_xkusage;
  458|   399k|    uint32_t tmp_ex_nscert;
  459|   399k|    ASN1_OCTET_STRING *tmp_skid;
  460|   399k|    AUTHORITY_KEYID *tmp_akid;
  461|   399k|    STACK_OF(GENERAL_NAME) *tmp_altname;
  ------------------
  |  |   33|   399k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  462|   399k|    NAME_CONSTRAINTS *tmp_nc;
  463|   399k|    STACK_OF(DIST_POINT) *tmp_crldp = NULL;
  ------------------
  |  |   33|   399k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  464|   399k|    X509_SIG_INFO tmp_siginf;
  465|       |
  466|   399k|#ifdef tsan_ld_acq
  467|       |    /* Fast lock-free check, see end of the function for details. */
  468|   399k|    if (tsan_ld_acq((TSAN_QUALIFIER int *)&const_x->ex_cached))
  ------------------
  |  |   64|   399k|#define tsan_ld_acq(ptr) atomic_load_explicit((ptr), memory_order_acquire)
  |  |  ------------------
  |  |  |  Branch (64:26): [True: 0, False: 399k]
  |  |  ------------------
  ------------------
  469|      0|        return (const_x->ex_flags & EXFLAG_INVALID) == 0;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  470|   399k|#endif
  471|       |
  472|   399k|    if (!CRYPTO_THREAD_read_lock(const_x->lock))
  ------------------
  |  Branch (472:9): [True: 0, False: 399k]
  ------------------
  473|      0|        return 0;
  474|   399k|    tmp_ex_flags = const_x->ex_flags;
  475|   399k|    tmp_ex_pcpathlen = const_x->ex_pcpathlen;
  476|   399k|    tmp_ex_kusage = const_x->ex_kusage;
  477|   399k|    tmp_ex_nscert = const_x->ex_nscert;
  478|       |
  479|   399k|    if ((tmp_ex_flags & EXFLAG_SET) != 0) { /* Cert has already been processed */
  ------------------
  |  |  678|   399k|#define EXFLAG_SET 0x100
  ------------------
  |  Branch (479:9): [True: 0, False: 399k]
  ------------------
  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|   399k|    ERR_set_mark();
  485|       |
  486|       |    /* Cache the SHA1 digest of the cert */
  487|   399k|    if (!X509_digest(const_x, EVP_sha1(), tmp_sha1_hash, NULL))
  ------------------
  |  Branch (487:9): [True: 0, False: 399k]
  ------------------
  488|      0|        tmp_ex_flags |= EXFLAG_NO_FINGERPRINT;
  ------------------
  |  |  686|      0|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  489|       |
  490|       |    /* V1 should mean no extensions ... */
  491|   399k|    if (X509_get_version(const_x) == X509_VERSION_1)
  ------------------
  |  |  850|   399k|#define X509_VERSION_1 0
  ------------------
  |  Branch (491:9): [True: 0, False: 399k]
  ------------------
  492|      0|        tmp_ex_flags |= EXFLAG_V1;
  ------------------
  |  |  675|      0|#define EXFLAG_V1 0x40
  ------------------
  493|       |
  494|       |    /* Handle basic constraints */
  495|   399k|    tmp_ex_pathlen = -1;
  496|   399k|    if ((bs = X509_get_ext_d2i(const_x, NID_basic_constraints, &i, NULL)) != NULL) {
  ------------------
  |  | 2709|   399k|#define NID_basic_constraints           87
  ------------------
  |  Branch (496:9): [True: 399k, False: 0]
  ------------------
  497|   399k|        if (bs->ca)
  ------------------
  |  Branch (497:13): [True: 399k, False: 0]
  ------------------
  498|   399k|            tmp_ex_flags |= EXFLAG_CA;
  ------------------
  |  |  673|   399k|#define EXFLAG_CA 0x10
  ------------------
  499|   399k|        if (bs->pathlen != NULL) {
  ------------------
  |  Branch (499:13): [True: 6.60k, False: 393k]
  ------------------
  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|  6.60k|            if (bs->pathlen->type == V_ASN1_NEG_INTEGER) {
  ------------------
  |  |  100|  6.60k|#define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG)
  |  |  ------------------
  |  |  |  |   99|  6.60k|#define V_ASN1_NEG 0x100
  |  |  ------------------
  ------------------
  |  Branch (504:17): [True: 0, False: 6.60k]
  ------------------
  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|  6.60k|            } else {
  508|  6.60k|                tmp_ex_pathlen = ASN1_INTEGER_get(bs->pathlen);
  509|  6.60k|            }
  510|  6.60k|        }
  511|   399k|        BASIC_CONSTRAINTS_free(bs);
  512|   399k|        tmp_ex_flags |= EXFLAG_BCONS;
  ------------------
  |  |  668|   399k|#define EXFLAG_BCONS 0x1
  ------------------
  513|   399k|    } 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|   399k|    if ((pci = X509_get_ext_d2i(const_x, NID_proxyCertInfo, &i, NULL)) != NULL) {
  ------------------
  |  | 1652|   399k|#define NID_proxyCertInfo               663
  ------------------
  |  Branch (518:9): [True: 0, False: 399k]
  ------------------
  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|   399k|    } else if (i != -1) {
  ------------------
  |  Branch (530:16): [True: 0, False: 399k]
  ------------------
  531|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  532|      0|    }
  533|       |
  534|       |    /* Handle (basic) key usage */
  535|   399k|    if ((usage = X509_get_ext_d2i(const_x, NID_key_usage, &i, NULL)) != NULL) {
  ------------------
  |  | 2689|   399k|#define NID_key_usage           83
  ------------------
  |  Branch (535:9): [True: 396k, False: 3.30k]
  ------------------
  536|   396k|        tmp_ex_kusage = 0;
  537|   396k|        if (usage->length > 0) {
  ------------------
  |  Branch (537:13): [True: 396k, False: 0]
  ------------------
  538|   396k|            tmp_ex_kusage = usage->data[0];
  539|   396k|            if (usage->length > 1)
  ------------------
  |  Branch (539:17): [True: 0, False: 396k]
  ------------------
  540|      0|                tmp_ex_kusage |= usage->data[1] << 8;
  541|   396k|        }
  542|   396k|        tmp_ex_flags |= EXFLAG_KUSAGE;
  ------------------
  |  |  669|   396k|#define EXFLAG_KUSAGE 0x2
  ------------------
  543|   396k|        ASN1_BIT_STRING_free(usage);
  544|       |        /* Check for empty key usage according to RFC 5280 section 4.2.1.3 */
  545|   396k|        if (tmp_ex_kusage == 0) {
  ------------------
  |  Branch (545:13): [True: 0, False: 396k]
  ------------------
  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|   396k|    } else if (i != -1) {
  ------------------
  |  Branch (549:16): [True: 0, False: 3.30k]
  ------------------
  550|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  551|      0|    }
  552|       |
  553|       |    /* Handle extended key usage */
  554|   399k|    tmp_ex_xkusage = 0;
  555|   399k|    if ((extusage = X509_get_ext_d2i(const_x, NID_ext_key_usage, &i, NULL)) != NULL) {
  ------------------
  |  | 2779|   399k|#define NID_ext_key_usage               126
  ------------------
  |  Branch (555:9): [True: 0, False: 399k]
  ------------------
  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|   399k|    } else if (i != -1) {
  ------------------
  |  Branch (593:16): [True: 0, False: 399k]
  ------------------
  594|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  595|      0|    }
  596|       |
  597|       |    /* Handle legacy Netscape extension */
  598|   399k|    if ((ns = X509_get_ext_d2i(const_x, NID_netscape_cert_type, &i, NULL)) != NULL) {
  ------------------
  |  | 2949|   399k|#define NID_netscape_cert_type          71
  ------------------
  |  Branch (598:9): [True: 0, False: 399k]
  ------------------
  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|   399k|    } else if (i != -1) {
  ------------------
  |  Branch (605:16): [True: 0, False: 399k]
  ------------------
  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|   399k|    tmp_skid = X509_get_ext_d2i(const_x, NID_subject_key_identifier, &i, NULL);
  ------------------
  |  | 2684|   399k|#define NID_subject_key_identifier              82
  ------------------
  611|   399k|    if (tmp_skid == NULL && i != -1)
  ------------------
  |  Branch (611:9): [True: 3.30k, False: 396k]
  |  Branch (611:29): [True: 0, False: 3.30k]
  ------------------
  612|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  613|       |
  614|   399k|    tmp_akid = X509_get_ext_d2i(const_x, NID_authority_key_identifier, &i, NULL);
  ------------------
  |  | 2769|   399k|#define NID_authority_key_identifier            90
  ------------------
  615|   399k|    if (tmp_akid == NULL && i != -1)
  ------------------
  |  Branch (615:9): [True: 310k, False: 89.2k]
  |  Branch (615:29): [True: 0, False: 310k]
  ------------------
  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|   399k|    if (X509_NAME_cmp(X509_get_subject_name(const_x), X509_get_issuer_name(const_x)) == 0) {
  ------------------
  |  Branch (619:9): [True: 399k, False: 0]
  ------------------
  620|   399k|        tmp_ex_flags |= EXFLAG_SI; /* Certificate is self-issued: subject == issuer */
  ------------------
  |  |  674|   399k|#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|   399k|        if (X509_check_akid(const_x, tmp_akid) == X509_V_OK
  ------------------
  |  |  312|   799k|#define X509_V_OK 0
  ------------------
  |  Branch (627:13): [True: 399k, False: 0]
  ------------------
  628|   399k|            && check_sig_alg_match(X509_get0_pubkey(const_x), const_x) == X509_V_OK) {
  ------------------
  |  |  312|   399k|#define X509_V_OK 0
  ------------------
  |  Branch (628:16): [True: 399k, 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|   399k|            tmp_ex_flags |= EXFLAG_SS;
  ------------------
  |  |  684|   399k|#define EXFLAG_SS 0x2000 /* cert is apparently self-signed */
  ------------------
  635|   399k|        }
  636|   399k|    }
  637|       |
  638|       |    /* Handle subject alternative names and various other extensions */
  639|   399k|    tmp_altname = X509_get_ext_d2i(const_x, NID_subject_alt_name, &i, NULL);
  ------------------
  |  | 2699|   399k|#define NID_subject_alt_name            85
  ------------------
  640|   399k|    if (tmp_altname == NULL && i != -1)
  ------------------
  |  Branch (640:9): [True: 389k, False: 9.91k]
  |  Branch (640:32): [True: 0, False: 389k]
  ------------------
  641|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  642|   399k|    tmp_nc = X509_get_ext_d2i(const_x, NID_name_constraints, &i, NULL);
  ------------------
  |  | 2744|   399k|#define NID_name_constraints            666
  ------------------
  643|   399k|    if (tmp_nc == NULL && i != -1)
  ------------------
  |  Branch (643:9): [True: 399k, False: 0]
  |  Branch (643:27): [True: 0, False: 399k]
  ------------------
  644|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  645|       |
  646|       |    /* Handle CRL distribution point entries */
  647|   399k|    res = setup_crldp(const_x, &tmp_crldp);
  648|   399k|    if (res == 0)
  ------------------
  |  Branch (648:9): [True: 0, False: 399k]
  ------------------
  649|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  650|       |
  651|   399k|#ifndef OPENSSL_NO_RFC3779
  652|   399k|    STACK_OF(IPAddressFamily) *tmp_rfc3779_addr
  ------------------
  |  |   33|   399k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  653|   399k|        = X509_get_ext_d2i(const_x, NID_sbgp_ipAddrBlock, &i, NULL);
  ------------------
  |  | 1630|   399k|#define NID_sbgp_ipAddrBlock            290
  ------------------
  654|   399k|    if (tmp_rfc3779_addr == NULL && i != -1)
  ------------------
  |  Branch (654:9): [True: 399k, False: 0]
  |  Branch (654:37): [True: 0, False: 399k]
  ------------------
  655|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  656|       |
  657|   399k|    struct ASIdentifiers_st *tmp_rfc3779_asid
  658|   399k|        = X509_get_ext_d2i(const_x, NID_sbgp_autonomousSysNum, &i, NULL);
  ------------------
  |  | 1634|   399k|#define NID_sbgp_autonomousSysNum               291
  ------------------
  659|   399k|    if (tmp_rfc3779_asid == NULL && i != -1)
  ------------------
  |  Branch (659:9): [True: 399k, False: 0]
  |  Branch (659:37): [True: 0, False: 399k]
  ------------------
  660|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  661|   399k|#endif
  662|       |
  663|  1.76M|    for (i = 0; i < X509_get_ext_count(const_x); i++) {
  ------------------
  |  Branch (663:17): [True: 1.36M, False: 399k]
  ------------------
  664|  1.36M|        const X509_EXTENSION *ex = X509_get_ext(const_x, i);
  665|  1.36M|        int nid = OBJ_obj2nid(X509_EXTENSION_get_object(ex));
  666|       |
  667|  1.36M|        if (nid == NID_freshest_crl)
  ------------------
  |  | 2809|  1.36M|#define NID_freshest_crl                857
  ------------------
  |  Branch (667:13): [True: 0, False: 1.36M]
  ------------------
  668|      0|            tmp_ex_flags |= EXFLAG_FRESHEST;
  ------------------
  |  |  683|      0|#define EXFLAG_FRESHEST 0x1000
  ------------------
  669|  1.36M|        if (!X509_EXTENSION_get_critical(ex))
  ------------------
  |  Branch (669:13): [True: 571k, False: 789k]
  ------------------
  670|   571k|            continue;
  671|   789k|        if (!X509_supported_extension(ex)) {
  ------------------
  |  Branch (671:13): [True: 0, False: 789k]
  ------------------
  672|      0|            tmp_ex_flags |= EXFLAG_CRITICAL;
  ------------------
  |  |  679|      0|#define EXFLAG_CRITICAL 0x200
  ------------------
  673|      0|            break;
  674|      0|        }
  675|   789k|    }
  676|       |
  677|       |    /* Set x->siginf, ignoring errors due to unsupported algos */
  678|   399k|    (void)ossl_x509_init_sig_info(const_x, &tmp_siginf);
  679|       |
  680|   399k|    tmp_ex_flags |= EXFLAG_SET; /* Indicate that cert has been processed */
  ------------------
  |  |  678|   399k|#define EXFLAG_SET 0x100
  ------------------
  681|   399k|    ERR_pop_to_mark();
  682|       |
  683|   399k|    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|   399k|    if (!CRYPTO_THREAD_write_lock(const_x->lock))
  ------------------
  |  Branch (688:9): [True: 0, False: 399k]
  ------------------
  689|      0|        return 0;
  690|   399k|    ((X509 *)const_x)->ex_flags = tmp_ex_flags;
  691|   399k|    ((X509 *)const_x)->ex_pathlen = tmp_ex_pathlen;
  692|   399k|    ((X509 *)const_x)->ex_pcpathlen = tmp_ex_pcpathlen;
  693|   399k|    if (!(tmp_ex_flags & EXFLAG_NO_FINGERPRINT))
  ------------------
  |  |  686|   399k|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (693:9): [True: 399k, False: 0]
  ------------------
  694|   399k|        memcpy(((X509 *)const_x)->sha1_hash, tmp_sha1_hash, SHA_DIGEST_LENGTH);
  ------------------
  |  |   26|   399k|#define SHA_DIGEST_LENGTH 20
  ------------------
  695|   399k|    if (tmp_ex_flags & EXFLAG_KUSAGE)
  ------------------
  |  |  669|   399k|#define EXFLAG_KUSAGE 0x2
  ------------------
  |  Branch (695:9): [True: 396k, False: 3.30k]
  ------------------
  696|   396k|        ((X509 *)const_x)->ex_kusage = tmp_ex_kusage;
  697|   399k|    ((X509 *)const_x)->ex_xkusage = tmp_ex_xkusage;
  698|   399k|    if (tmp_ex_flags & EXFLAG_NSCERT)
  ------------------
  |  |  671|   399k|#define EXFLAG_NSCERT 0x8
  ------------------
  |  Branch (698:9): [True: 0, False: 399k]
  ------------------
  699|      0|        ((X509 *)const_x)->ex_nscert = tmp_ex_nscert;
  700|   399k|    ASN1_OCTET_STRING_free(((X509 *)const_x)->skid);
  701|   399k|    ((X509 *)const_x)->skid = tmp_skid;
  702|   399k|    AUTHORITY_KEYID_free(((X509 *)const_x)->akid);
  703|   399k|    ((X509 *)const_x)->akid = tmp_akid;
  704|   399k|    sk_GENERAL_NAME_pop_free(((X509 *)const_x)->altname, GENERAL_NAME_free);
  ------------------
  |  |  256|   399k|#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|   399k|    ((X509 *)const_x)->altname = tmp_altname;
  706|   399k|    NAME_CONSTRAINTS_free(((X509 *)const_x)->nc);
  707|   399k|    ((X509 *)const_x)->nc = tmp_nc;
  708|   399k|    sk_DIST_POINT_pop_free(((X509 *)const_x)->crldp, DIST_POINT_free);
  ------------------
  |  |  353|   399k|#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|   399k|    ((X509 *)const_x)->crldp = tmp_crldp;
  710|   399k|#ifndef OPENSSL_NO_RFC3779
  711|   399k|    sk_IPAddressFamily_pop_free(((X509 *)const_x)->rfc3779_addr, IPAddressFamily_free);
  ------------------
  |  | 1269|   399k|#define sk_IPAddressFamily_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_freefunc_type(freefunc))
  ------------------
  712|   399k|    ((X509 *)const_x)->rfc3779_addr = tmp_rfc3779_addr;
  713|   399k|    ASIdentifiers_free(((X509 *)const_x)->rfc3779_asid);
  714|   399k|    ((X509 *)const_x)->rfc3779_asid = tmp_rfc3779_asid;
  715|   399k|#endif
  716|   399k|    ((X509 *)const_x)->siginf = tmp_siginf;
  717|       |
  718|   399k|#ifdef tsan_st_rel
  719|   399k|    tsan_st_rel((TSAN_QUALIFIER int *)&const_x->ex_cached, 1);
  ------------------
  |  |   65|   399k|#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|   399k|#endif
  726|   399k|    CRYPTO_THREAD_unlock(const_x->lock);
  727|   399k|    if (tmp_ex_flags & EXFLAG_INVALID) {
  ------------------
  |  |  676|   399k|#define EXFLAG_INVALID 0x80
  ------------------
  |  Branch (727:9): [True: 0, False: 399k]
  ------------------
  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|   399k|    return 1;
  732|   399k|}
X509_check_akid:
 1123|   399k|{
 1124|   399k|    if (akid == NULL)
  ------------------
  |  Branch (1124:9): [True: 310k, False: 89.2k]
  ------------------
 1125|   310k|        return X509_V_OK;
  ------------------
  |  |  312|   310k|#define X509_V_OK 0
  ------------------
 1126|       |
 1127|       |    /* Check key ids (if present) */
 1128|  89.2k|    if (akid->keyid && issuer->skid && ASN1_OCTET_STRING_cmp(akid->keyid, issuer->skid))
  ------------------
  |  Branch (1128:9): [True: 89.2k, False: 0]
  |  Branch (1128:24): [True: 0, False: 89.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|  89.2k|    if (akid->serial && ASN1_INTEGER_cmp(X509_get0_serialNumber(issuer), akid->serial))
  ------------------
  |  Branch (1131:9): [True: 0, False: 89.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|  89.2k|    if (akid->issuer) {
  ------------------
  |  Branch (1134:9): [True: 0, False: 89.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|  89.2k|    return X509_V_OK;
  ------------------
  |  |  312|  89.2k|#define X509_V_OK 0
  ------------------
 1156|  89.2k|}
v3_purp.c:nid_cmp:
  300|  1.97M|{
  301|  1.97M|    return *a - *b;
  302|  1.97M|}
v3_purp.c:check_sig_alg_match:
  408|   399k|{
  409|   399k|    int subj_sig_nid;
  410|       |
  411|   399k|    if (issuer_key == NULL)
  ------------------
  |  Branch (411:9): [True: 0, False: 399k]
  ------------------
  412|      0|        return X509_V_ERR_NO_ISSUER_PUBLIC_KEY;
  ------------------
  |  |  336|      0|#define X509_V_ERR_NO_ISSUER_PUBLIC_KEY 24
  ------------------
  413|   399k|    if (OBJ_find_sigid_algs(OBJ_obj2nid(subject->cert_info.signature.algorithm),
  ------------------
  |  Branch (413:9): [True: 0, False: 399k]
  ------------------
  414|   399k|            NULL, &subj_sig_nid)
  415|   399k|        == 0)
  416|      0|        return X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM;
  ------------------
  |  |  402|      0|#define X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM 76
  ------------------
  417|   399k|    if (EVP_PKEY_is_a(issuer_key, OBJ_nid2sn(subj_sig_nid))
  ------------------
  |  Branch (417:9): [True: 399k, 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|   399k|        return X509_V_OK;
  ------------------
  |  |  312|   399k|#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|   399k|}
v3_purp.c:setup_crldp:
  390|   399k|{
  391|   399k|    int i;
  392|       |
  393|   399k|    *tmp_crldp = X509_get_ext_d2i(x, NID_crl_distribution_points, &i, NULL);
  ------------------
  |  | 2749|   399k|#define NID_crl_distribution_points             103
  ------------------
  394|   399k|    if (*tmp_crldp == NULL && i != -1)
  ------------------
  |  Branch (394:9): [True: 373k, False: 26.4k]
  |  Branch (394:31): [True: 0, False: 373k]
  ------------------
  395|      0|        return 0;
  396|       |
  397|   442k|    for (i = 0; i < sk_DIST_POINT_num(*tmp_crldp); i++) {
  ------------------
  |  |  339|   442k|#define sk_DIST_POINT_num(sk) OPENSSL_sk_num(ossl_check_const_DIST_POINT_sk_type(sk))
  ------------------
  |  Branch (397:17): [True: 42.9k, False: 399k]
  ------------------
  398|  42.9k|        int res = setup_dp(x, sk_DIST_POINT_value(*tmp_crldp, i));
  ------------------
  |  |  340|  42.9k|#define sk_DIST_POINT_value(sk, idx) ((DIST_POINT *)OPENSSL_sk_value(ossl_check_const_DIST_POINT_sk_type(sk), (idx)))
  ------------------
  399|       |
  400|  42.9k|        if (res < 1)
  ------------------
  |  Branch (400:13): [True: 0, False: 42.9k]
  ------------------
  401|      0|            return res;
  402|  42.9k|    }
  403|   399k|    return 1;
  404|   399k|}
v3_purp.c:setup_dp:
  348|  42.9k|{
  349|  42.9k|    const X509_NAME *iname = NULL;
  350|  42.9k|    int i;
  351|       |
  352|  42.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: 42.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|  42.9k|    if (dp->reasons != NULL) {
  ------------------
  |  Branch (356:9): [True: 0, False: 42.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|  42.9k|    } else {
  363|  42.9k|        dp->dp_reasons = CRLDP_ALL_REASONS;
  ------------------
  |  |  316|  42.9k|#define CRLDP_ALL_REASONS 0x807f
  ------------------
  364|  42.9k|    }
  365|  42.9k|    if (dp->distpoint == NULL || dp->distpoint->type != 1)
  ------------------
  |  Branch (365:9): [True: 0, False: 42.9k]
  |  Branch (365:34): [True: 42.9k, False: 0]
  ------------------
  366|  42.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|  42.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|   399k|{
   79|   399k|    return X509_NAME_cmp(a->cert_info.subject, b->cert_info.subject);
   80|   399k|}
X509_get_issuer_name:
  101|   399k|{
  102|   399k|    return a->cert_info.issuer;
  103|   399k|}
X509_get_subject_name:
  118|   399k|{
  119|   399k|    return a->cert_info.subject;
  120|   399k|}
X509_cmp:
  153|   199k|{
  154|   199k|    int rv = 0;
  155|       |
  156|   199k|    if (a == b) /* for efficiency */
  ------------------
  |  Branch (156:9): [True: 0, False: 199k]
  ------------------
  157|      0|        return 0;
  158|       |
  159|       |    /* attempt to compute cert hash */
  160|   199k|    (void)X509_check_purpose((X509 *)a, -1, 0);
  161|   199k|    (void)X509_check_purpose((X509 *)b, -1, 0);
  162|       |
  163|   199k|    if ((a->ex_flags & EXFLAG_NO_FINGERPRINT) == 0
  ------------------
  |  |  686|   199k|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (163:9): [True: 199k, False: 0]
  ------------------
  164|   199k|        && (b->ex_flags & EXFLAG_NO_FINGERPRINT) == 0)
  ------------------
  |  |  686|   199k|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (164:12): [True: 199k, False: 0]
  ------------------
  165|   199k|        rv = memcmp(a->sha1_hash, b->sha1_hash, SHA_DIGEST_LENGTH);
  ------------------
  |  |   26|   199k|#define SHA_DIGEST_LENGTH 20
  ------------------
  166|   199k|    if (rv != 0)
  ------------------
  |  Branch (166:9): [True: 0, False: 199k]
  ------------------
  167|      0|        return rv < 0 ? -1 : 1;
  ------------------
  |  Branch (167:16): [True: 0, False: 0]
  ------------------
  168|       |
  169|       |    /* Check for match against stored encoding too */
  170|   199k|    if (!a->cert_info.enc.modified && !b->cert_info.enc.modified) {
  ------------------
  |  Branch (170:9): [True: 199k, False: 0]
  |  Branch (170:39): [True: 199k, False: 0]
  ------------------
  171|   199k|        if (a->cert_info.enc.len < b->cert_info.enc.len)
  ------------------
  |  Branch (171:13): [True: 0, False: 199k]
  ------------------
  172|      0|            return -1;
  173|   199k|        if (a->cert_info.enc.len > b->cert_info.enc.len)
  ------------------
  |  Branch (173:13): [True: 0, False: 199k]
  ------------------
  174|      0|            return 1;
  175|   199k|        rv = memcmp(a->cert_info.enc.enc,
  176|   199k|            b->cert_info.enc.enc, a->cert_info.enc.len);
  177|   199k|    }
  178|   199k|    return rv < 0 ? -1 : rv > 0;
  ------------------
  |  Branch (178:12): [True: 0, False: 199k]
  ------------------
  179|   199k|}
X509_NAME_cmp:
  259|   799k|{
  260|   799k|    int ret;
  261|       |
  262|   799k|    if (b == NULL)
  ------------------
  |  Branch (262:9): [True: 0, False: 799k]
  ------------------
  263|      0|        return a != NULL;
  264|   799k|    if (a == NULL)
  ------------------
  |  Branch (264:9): [True: 0, False: 799k]
  ------------------
  265|      0|        return -1;
  266|       |
  267|       |    /* Ensure canonical encoding is present and up to date */
  268|   799k|    if (a->canon_enc == NULL || a->modified) {
  ------------------
  |  Branch (268:9): [True: 0, False: 799k]
  |  Branch (268:33): [True: 0, False: 799k]
  ------------------
  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|   799k|    if (b->canon_enc == NULL || b->modified) {
  ------------------
  |  Branch (274:9): [True: 0, False: 799k]
  |  Branch (274:33): [True: 0, False: 799k]
  ------------------
  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|   799k|    ret = a->canon_enclen - b->canon_enclen;
  281|   799k|    if (ret == 0 && a->canon_enclen == 0)
  ------------------
  |  Branch (281:9): [True: 799k, False: 0]
  |  Branch (281:21): [True: 0, False: 799k]
  ------------------
  282|      0|        return 0;
  283|       |
  284|   799k|    if (ret == 0) {
  ------------------
  |  Branch (284:9): [True: 799k, False: 0]
  ------------------
  285|   799k|        if (a->canon_enc == NULL || b->canon_enc == NULL)
  ------------------
  |  Branch (285:13): [True: 0, False: 799k]
  |  Branch (285:37): [True: 0, False: 799k]
  ------------------
  286|      0|            return -2;
  287|   799k|        ret = memcmp(a->canon_enc, b->canon_enc, a->canon_enclen);
  288|   799k|    }
  289|       |
  290|   799k|    return ret < 0 ? -1 : ret > 0;
  ------------------
  |  Branch (290:12): [True: 0, False: 799k]
  ------------------
  291|   799k|}
X509_get0_pubkey:
  382|   399k|{
  383|   399k|    if (x == NULL)
  ------------------
  |  Branch (383:9): [True: 0, False: 399k]
  ------------------
  384|      0|        return NULL;
  385|   399k|    return X509_PUBKEY_get0(x->cert_info.key);
  386|   399k|}

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

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

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.76M|{
   72|  1.76M|    return X509v3_get_ext_count(x->cert_info.extensions);
   73|  1.76M|}
X509_get_ext:
   91|  1.36M|{
   92|  1.36M|    return X509v3_get_ext(x->cert_info.extensions, loc);
   93|  1.36M|}
X509_get_ext_d2i:
  127|  4.79M|{
  128|  4.79M|    return X509V3_get_d2i(x->cert_info.extensions, nid, crit, idx);
  129|  4.79M|}

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

X509_up_ref:
  117|   458k|{
  118|   458k|    int i;
  119|       |
  120|   458k|    if (CRYPTO_UP_REF(&x->references, &i) <= 0)
  ------------------
  |  Branch (120:9): [True: 0, False: 458k]
  ------------------
  121|      0|        return 0;
  122|       |
  123|   458k|    REF_PRINT_COUNT("X509", i, x);
  ------------------
  |  |  301|   458k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   458k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   458k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   458k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  124|   458k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   458k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 458k]
  |  |  ------------------
  ------------------
  125|   458k|    return i > 1;
  126|   458k|}
X509_get_version:
  129|   399k|{
  130|   399k|    return ASN1_INTEGER_get(x->cert_info.version);
  131|   399k|}
ossl_x509_init_sig_info:
  302|   399k|{
  303|   399k|    return x509_sig_info_init(info, &x->sig_alg, &x->signature,
  304|   399k|        X509_PUBKEY_get0(x->cert_info.key));
  305|   399k|}
x509_set.c:x509_sig_info_init:
  215|   399k|{
  216|   399k|    int pknid, mdnid, md_size;
  217|   399k|    const EVP_MD *md;
  218|   399k|    const EVP_PKEY_ASN1_METHOD *ameth;
  219|       |
  220|   399k|    siginf->mdnid = NID_undef;
  ------------------
  |  |   18|   399k|#define NID_undef                       0
  ------------------
  221|   399k|    siginf->pknid = NID_undef;
  ------------------
  |  |   18|   399k|#define NID_undef                       0
  ------------------
  222|   399k|    siginf->secbits = -1;
  223|   399k|    siginf->flags = 0;
  224|   399k|    if (!OBJ_find_sigid_algs(OBJ_obj2nid(alg->algorithm), &mdnid, &pknid)
  ------------------
  |  Branch (224:9): [True: 0, False: 399k]
  ------------------
  225|   399k|        || pknid == NID_undef) {
  ------------------
  |  |   18|   399k|#define NID_undef                       0
  ------------------
  |  Branch (225:12): [True: 0, False: 399k]
  ------------------
  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|   399k|    siginf->mdnid = mdnid;
  230|   399k|    siginf->pknid = pknid;
  231|       |
  232|   399k|    switch (mdnid) {
  233|      0|    case NID_undef:
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (233:5): [True: 0, False: 399k]
  ------------------
  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|  16.5k|    case NID_sha1:
  ------------------
  |  | 2348|  16.5k|#define NID_sha1                64
  ------------------
  |  Branch (256:5): [True: 16.5k, False: 383k]
  ------------------
  257|       |        /*
  258|       |         * https://eprint.iacr.org/2020/014 puts a chosen-prefix attack
  259|       |         * for SHA1 at2^63.4
  260|       |         */
  261|  16.5k|        siginf->secbits = 63;
  262|  16.5k|        break;
  263|      0|    case NID_md5:
  ------------------
  |  | 1242|      0|#define NID_md5         4
  ------------------
  |  Branch (263:5): [True: 0, False: 399k]
  ------------------
  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: 399k]
  ------------------
  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|   383k|    default:
  ------------------
  |  Branch (277:5): [True: 383k, False: 16.5k]
  ------------------
  278|       |        /* Security bits: half number of bits in digest */
  279|   383k|        if ((md = EVP_get_digestbynid(mdnid)) == NULL) {
  ------------------
  |  |  446|   383k|#define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a))
  ------------------
  |  Branch (279:13): [True: 0, False: 383k]
  ------------------
  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|   383k|        md_size = EVP_MD_get_size(md);
  284|   383k|        if (md_size <= 0)
  ------------------
  |  Branch (284:13): [True: 0, False: 383k]
  ------------------
  285|      0|            return 0;
  286|   383k|        siginf->secbits = md_size * 4;
  287|   383k|        break;
  288|   399k|    }
  289|   399k|    switch (mdnid) {
  ------------------
  |  Branch (289:13): [True: 399k, False: 0]
  ------------------
  290|  16.5k|    case NID_sha1:
  ------------------
  |  | 2348|  16.5k|#define NID_sha1                64
  ------------------
  |  Branch (290:5): [True: 16.5k, False: 383k]
  ------------------
  291|   218k|    case NID_sha256:
  ------------------
  |  | 3291|   218k|#define NID_sha256              672
  ------------------
  |  Branch (291:5): [True: 201k, False: 198k]
  ------------------
  292|   383k|    case NID_sha384:
  ------------------
  |  | 3296|   383k|#define NID_sha384              673
  ------------------
  |  Branch (292:5): [True: 165k, False: 234k]
  ------------------
  293|   399k|    case NID_sha512:
  ------------------
  |  | 3301|   399k|#define NID_sha512              674
  ------------------
  |  Branch (293:5): [True: 16.5k, False: 383k]
  ------------------
  294|   399k|        siginf->flags |= X509_SIG_INFO_TLS;
  ------------------
  |  |  166|   399k|#define X509_SIG_INFO_TLS 0x2
  ------------------
  295|   399k|    }
  296|   399k|    siginf->flags |= X509_SIG_INFO_VALID;
  ------------------
  |  |  164|   399k|#define X509_SIG_INFO_VALID 0x1
  ------------------
  297|   399k|    return 1;
  298|   399k|}

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

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

X509_digest:
  540|   399k|{
  541|   399k|    if (EVP_MD_is_a(md, SN_sha1) && (cert->ex_flags & EXFLAG_SET) != 0
  ------------------
  |  | 2346|   399k|#define SN_sha1         "SHA1"
  ------------------
                  if (EVP_MD_is_a(md, SN_sha1) && (cert->ex_flags & EXFLAG_SET) != 0
  ------------------
  |  |  678|   399k|#define EXFLAG_SET 0x100
  ------------------
  |  Branch (541:9): [True: 399k, False: 0]
  |  Branch (541:37): [True: 0, False: 399k]
  ------------------
  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|   399k|    return ossl_asn1_item_digest_ex(ASN1_ITEM_rptr(X509), md, (char *)cert,
  ------------------
  |  |  399|   399k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  550|   399k|        data, len, cert->libctx, cert->propq);
  551|   399k|}

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

ossl_d2i_X509_PUBKEY_INTERNAL:
   68|   458k|{
   69|   458k|    X509_PUBKEY *xpub = OPENSSL_zalloc(sizeof(*xpub));
  ------------------
  |  |  109|   458k|    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|   458k|    if (xpub == NULL)
  ------------------
  |  Branch (71:9): [True: 0, False: 458k]
  ------------------
   72|      0|        return NULL;
   73|   458k|    return (X509_PUBKEY *)ASN1_item_d2i_ex((ASN1_VALUE **)&xpub, pp, len,
   74|   458k|        ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL),
  ------------------
  |  |  399|   458k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
   75|   458k|        libctx, propq);
   76|   458k|}
ossl_X509_PUBKEY_INTERNAL_free:
   79|   916k|{
   80|   916k|    ASN1_item_free((ASN1_VALUE *)xpub, ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL));
  ------------------
  |  |  399|   916k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
   81|   916k|}
X509_PUBKEY_get0:
  446|  1.25M|{
  447|  1.25M|    if (key == NULL) {
  ------------------
  |  Branch (447:9): [True: 0, False: 1.25M]
  ------------------
  448|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  449|      0|        return NULL;
  450|      0|    }
  451|       |
  452|  1.25M|    if (key->pkey == NULL) {
  ------------------
  |  Branch (452:9): [True: 0, False: 1.25M]
  ------------------
  453|       |        /* We failed to decode the key when we loaded it, or it was never set */
  454|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_DECODE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  455|      0|        return NULL;
  456|      0|    }
  457|       |
  458|  1.25M|    return key->pkey;
  459|  1.25M|}
X509_PUBKEY_get:
  462|   458k|{
  463|   458k|    EVP_PKEY *ret = X509_PUBKEY_get0(key);
  464|       |
  465|   458k|    if (ret != NULL && !EVP_PKEY_up_ref(ret)) {
  ------------------
  |  Branch (465:9): [True: 458k, False: 0]
  |  Branch (465:24): [True: 0, False: 458k]
  ------------------
  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|   458k|    return ret;
  470|   458k|}
ossl_d2i_PUBKEY_legacy:
  525|   458k|{
  526|   458k|    return d2i_PUBKEY_int(a, pp, length, NULL, NULL, 1, d2i_X509_PUBKEY);
  527|   458k|}
d2i_RSA_PUBKEY:
  594|   310k|{
  595|   310k|    EVP_PKEY *pkey;
  596|   310k|    RSA *key = NULL;
  597|   310k|    const unsigned char *q;
  598|       |
  599|   310k|    q = *pp;
  600|   310k|    pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length);
  601|   310k|    if (pkey == NULL)
  ------------------
  |  Branch (601:9): [True: 0, False: 310k]
  ------------------
  602|      0|        return NULL;
  603|   310k|    key = EVP_PKEY_get1_RSA(pkey);
  604|   310k|    EVP_PKEY_free(pkey);
  605|   310k|    if (key == NULL)
  ------------------
  |  Branch (605:9): [True: 0, False: 310k]
  ------------------
  606|      0|        return NULL;
  607|   310k|    *pp = q;
  608|   310k|    if (a != NULL) {
  ------------------
  |  Branch (608:9): [True: 0, False: 310k]
  ------------------
  609|      0|        RSA_free(*a);
  610|      0|        *a = key;
  611|      0|    }
  612|   310k|    return key;
  613|   310k|}
d2i_EC_PUBKEY:
  785|   147k|{
  786|   147k|    EVP_PKEY *pkey;
  787|   147k|    EC_KEY *key = NULL;
  788|   147k|    const unsigned char *q;
  789|   147k|    int type;
  790|       |
  791|   147k|    q = *pp;
  792|   147k|    pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length);
  793|   147k|    if (pkey == NULL)
  ------------------
  |  Branch (793:9): [True: 0, False: 147k]
  ------------------
  794|      0|        return NULL;
  795|   147k|    type = EVP_PKEY_get_id(pkey);
  796|   147k|    if (type == EVP_PKEY_EC || type == EVP_PKEY_SM2)
  ------------------
  |  |   73|   147k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|   295k|#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: 147k, False: 0]
  |  Branch (796:32): [True: 0, False: 0]
  ------------------
  797|   147k|        key = EVP_PKEY_get1_EC_KEY(pkey);
  798|   147k|    EVP_PKEY_free(pkey);
  799|   147k|    if (key == NULL)
  ------------------
  |  Branch (799:9): [True: 0, False: 147k]
  ------------------
  800|      0|        return NULL;
  801|   147k|    *pp = q;
  802|   147k|    if (a != NULL) {
  ------------------
  |  Branch (802:9): [True: 0, False: 147k]
  ------------------
  803|      0|        EC_KEY_free(*a);
  804|      0|        *a = key;
  805|      0|    }
  806|   147k|    return key;
  807|   147k|}
X509_PUBKEY_get0_param:
 1019|   916k|{
 1020|   916k|    if (ppkalg)
  ------------------
  |  Branch (1020:9): [True: 0, False: 916k]
  ------------------
 1021|      0|        *ppkalg = pub->algor->algorithm;
 1022|   916k|    if (pk) {
  ------------------
  |  Branch (1022:9): [True: 458k, False: 458k]
  ------------------
 1023|   458k|        *pk = pub->public_key->data;
 1024|   458k|        *ppklen = pub->public_key->length;
 1025|   458k|    }
 1026|   916k|    if (pa)
  ------------------
  |  Branch (1026:9): [True: 916k, False: 0]
  ------------------
 1027|   916k|        *pa = pub->algor;
 1028|   916k|    return 1;
 1029|   916k|}
ossl_x509_PUBKEY_get0_libctx:
 1061|   147k|{
 1062|   147k|    if (plibctx)
  ------------------
  |  Branch (1062:9): [True: 147k, False: 0]
  ------------------
 1063|   147k|        *plibctx = key->libctx;
 1064|   147k|    if (ppropq)
  ------------------
  |  Branch (1064:9): [True: 147k, False: 0]
  ------------------
 1065|   147k|        *ppropq = key->propq;
 1066|   147k|    return 1;
 1067|   147k|}
x_pubkey.c:x509_pubkey_ex_new_ex:
  109|   458k|{
  110|   458k|    X509_PUBKEY *ret;
  111|       |
  112|   458k|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  109|   458k|    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: 458k]
  ------------------
  113|      0|        return 0;
  114|   458k|    if (!x509_pubkey_ex_populate((ASN1_VALUE **)&ret, NULL)
  ------------------
  |  Branch (114:9): [True: 0, False: 458k]
  ------------------
  115|   458k|        || !x509_pubkey_set0_libctx(ret, libctx, propq)) {
  ------------------
  |  Branch (115:12): [True: 0, False: 458k]
  ------------------
  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|   458k|    } else {
  120|   458k|        *pval = (ASN1_VALUE *)ret;
  121|   458k|    }
  122|       |
  123|       |    return ret != NULL;
  124|   458k|}
x_pubkey.c:x509_pubkey_ex_populate:
   98|  1.37M|{
   99|  1.37M|    X509_PUBKEY *pubkey = (X509_PUBKEY *)*pval;
  100|       |
  101|  1.37M|    return (pubkey->algor != NULL
  ------------------
  |  Branch (101:13): [True: 458k, False: 916k]
  ------------------
  102|   916k|               || (pubkey->algor = X509_ALGOR_new()) != NULL)
  ------------------
  |  Branch (102:19): [True: 916k, False: 0]
  ------------------
  103|  1.37M|        && (pubkey->public_key != NULL
  ------------------
  |  Branch (103:13): [True: 458k, False: 916k]
  ------------------
  104|   916k|            || (pubkey->public_key = ASN1_BIT_STRING_new()) != NULL);
  ------------------
  |  Branch (104:16): [True: 916k, False: 0]
  ------------------
  105|  1.37M|}
x_pubkey.c:x509_pubkey_ex_d2i_ex:
  131|   916k|{
  132|   916k|    const unsigned char *in_saved = *in;
  133|   916k|    size_t publen;
  134|   916k|    X509_PUBKEY *pubkey;
  135|   916k|    int ret;
  136|   916k|    OSSL_DECODER_CTX *dctx = NULL;
  137|   916k|    unsigned char *tmpbuf = NULL;
  138|       |
  139|   916k|    if (*pval == NULL && !x509_pubkey_ex_new_ex(pval, it, libctx, propq))
  ------------------
  |  Branch (139:9): [True: 0, False: 916k]
  |  Branch (139:26): [True: 0, False: 0]
  ------------------
  140|      0|        return 0;
  141|   916k|    if (!x509_pubkey_ex_populate(pval, NULL)) {
  ------------------
  |  Branch (141:9): [True: 0, False: 916k]
  ------------------
  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|   916k|    if ((ret = asn1_item_embed_d2i(pval, in, len,
  ------------------
  |  Branch (147:9): [True: 0, False: 916k]
  ------------------
  148|   916k|             ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL),
  ------------------
  |  |  399|   916k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  149|   916k|             tag, aclass, opt, ctx, 0,
  150|   916k|             NULL, NULL))
  151|   916k|        <= 0) {
  152|      0|        x509_pubkey_ex_free(pval, it);
  153|      0|        return ret;
  154|      0|    }
  155|       |
  156|   916k|    publen = *in - in_saved;
  157|   916k|    if (!ossl_assert(publen > 0)) {
  ------------------
  |  |   52|   916k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   916k|    __FILE__, __LINE__)
  ------------------
  |  Branch (157:9): [True: 0, False: 916k]
  ------------------
  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|   916k|    pubkey = (X509_PUBKEY *)*pval;
  163|   916k|    EVP_PKEY_free(pubkey->pkey);
  164|   916k|    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|   916k|    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|   916k|    if ((ret = x509_pubkey_decode(&pubkey->pkey, pubkey)) == -1) {
  ------------------
  |  Branch (177:9): [True: 0, False: 916k]
  ------------------
  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|   916k|    if (ret <= 0 && !pubkey->flag_force_legacy) {
  ------------------
  |  Branch (184:9): [True: 458k, False: 458k]
  |  Branch (184:21): [True: 458k, False: 0]
  ------------------
  185|   458k|        const unsigned char *p;
  186|   458k|        char txtoidname[OSSL_MAX_NAME_SIZE];
  187|   458k|        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|   458k|        if (aclass != V_ASN1_UNIVERSAL) {
  ------------------
  |  |   49|   458k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (193:13): [True: 0, False: 458k]
  ------------------
  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|   458k|        p = in_saved;
  201|       |
  202|   458k|        if (OBJ_obj2txt(txtoidname, sizeof(txtoidname),
  ------------------
  |  Branch (202:13): [True: 0, False: 458k]
  ------------------
  203|   458k|                pubkey->algor->algorithm, 0)
  204|   458k|            <= 0) {
  205|      0|            ERR_clear_last_mark();
  206|      0|            goto end;
  207|      0|        }
  208|   458k|        if ((dctx = OSSL_DECODER_CTX_new_for_pkey(&pubkey->pkey,
  ------------------
  |  Branch (208:13): [True: 458k, False: 0]
  ------------------
  209|   458k|                 "DER", "SubjectPublicKeyInfo",
  210|   458k|                 txtoidname, EVP_PKEY_PUBLIC_KEY,
  ------------------
  |  |  112|   458k|    (EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  108|   458k|    (OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  653|   458k|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  648|   458k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  654|   458k|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  649|   458k|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|   458k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  211|   458k|                 pubkey->libctx,
  212|   458k|                 pubkey->propq))
  213|   458k|            != NULL)
  214|       |            /*
  215|       |             * As said higher up, we're being opportunistic.  In other words,
  216|       |             * we don't care if we fail.
  217|       |             */
  218|   458k|            if (OSSL_DECODER_from_data(dctx, &p, &slen)) {
  ------------------
  |  Branch (218:17): [True: 458k, False: 0]
  ------------------
  219|   458k|                if (slen != 0) {
  ------------------
  |  Branch (219:21): [True: 0, False: 458k]
  ------------------
  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|   458k|            }
  229|   458k|    }
  230|       |
  231|   916k|    ERR_pop_to_mark();
  232|   916k|    ret = 1;
  233|   916k|end:
  234|   916k|    OSSL_DECODER_CTX_free(dctx);
  235|   916k|    OPENSSL_free(tmpbuf);
  ------------------
  |  |  132|   916k|    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|   916k|    return ret;
  237|   916k|}
x_pubkey.c:x509_pubkey_set0_libctx:
   48|   916k|{
   49|   916k|    if (x != NULL) {
  ------------------
  |  Branch (49:9): [True: 916k, False: 0]
  ------------------
   50|   916k|        x->libctx = libctx;
   51|   916k|        OPENSSL_free(x->propq);
  ------------------
  |  |  132|   916k|    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|   916k|        x->propq = NULL;
   53|   916k|        if (propq != NULL) {
  ------------------
  |  Branch (53:13): [True: 1, False: 916k]
  ------------------
   54|      1|            x->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|      1|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   55|      1|            if (x->propq == NULL)
  ------------------
  |  Branch (55:17): [True: 0, False: 1]
  ------------------
   56|      0|                return 0;
   57|      1|        }
   58|   916k|    }
   59|   916k|    return 1;
   60|   916k|}
x_pubkey.c:x509_pubkey_ex_free:
   84|   916k|{
   85|   916k|    X509_PUBKEY *pubkey;
   86|       |
   87|   916k|    if (pval != NULL && (pubkey = (X509_PUBKEY *)*pval) != NULL) {
  ------------------
  |  Branch (87:9): [True: 916k, False: 0]
  |  Branch (87:25): [True: 916k, False: 0]
  ------------------
   88|   916k|        X509_ALGOR_free(pubkey->algor);
   89|   916k|        ASN1_BIT_STRING_free(pubkey->public_key);
   90|   916k|        EVP_PKEY_free(pubkey->pkey);
   91|   916k|        OPENSSL_free(pubkey->propq);
  ------------------
  |  |  132|   916k|    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|   916k|        OPENSSL_free(pubkey);
  ------------------
  |  |  132|   916k|    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|   916k|    }
   95|   916k|}
x_pubkey.c:x509_pubkey_decode:
  405|   916k|{
  406|   916k|    EVP_PKEY *pkey;
  407|   916k|    int nid;
  408|       |
  409|   916k|    nid = OBJ_obj2nid(key->algor->algorithm);
  410|   916k|    if (!key->flag_force_legacy)
  ------------------
  |  Branch (410:9): [True: 458k, False: 458k]
  ------------------
  411|   458k|        return 0;
  412|       |
  413|   458k|    pkey = EVP_PKEY_new();
  414|   458k|    if (pkey == NULL) {
  ------------------
  |  Branch (414:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    if (!EVP_PKEY_set_type(pkey, nid)) {
  ------------------
  |  Branch (419:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    if (pkey->ameth->pub_decode) {
  ------------------
  |  Branch (424:9): [True: 458k, 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|   458k|        if (!pkey->ameth->pub_decode(pkey, key))
  ------------------
  |  Branch (430:13): [True: 0, False: 458k]
  ------------------
  431|      0|            goto error;
  432|   458k|    } 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|   458k|    *ppkey = pkey;
  438|   458k|    return 1;
  439|       |
  440|      0|error:
  441|      0|    EVP_PKEY_free(pkey);
  442|      0|    return 0;
  443|   458k|}
x_pubkey.c:d2i_PUBKEY_int:
  483|   458k|{
  484|   458k|    X509_PUBKEY *xpk, *xpk2 = NULL, **pxpk = NULL;
  485|   458k|    EVP_PKEY *pktmp = NULL;
  486|   458k|    const unsigned char *q;
  487|       |
  488|   458k|    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|   458k|    if (libctx != NULL || propq != NULL || force_legacy) {
  ------------------
  |  Branch (495:9): [True: 0, False: 458k]
  |  Branch (495:27): [True: 0, False: 458k]
  |  Branch (495:44): [True: 458k, False: 0]
  ------------------
  496|   458k|        xpk2 = OPENSSL_zalloc(sizeof(*xpk2));
  ------------------
  |  |  109|   458k|    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|   458k|        if (xpk2 == NULL)
  ------------------
  |  Branch (497:13): [True: 0, False: 458k]
  ------------------
  498|      0|            return NULL;
  499|   458k|        if (!x509_pubkey_set0_libctx(xpk2, libctx, propq))
  ------------------
  |  Branch (499:13): [True: 0, False: 458k]
  ------------------
  500|      0|            goto end;
  501|   458k|        xpk2->flag_force_legacy = !!force_legacy;
  502|   458k|        pxpk = &xpk2;
  503|   458k|    }
  504|   458k|    xpk = d2i_x509_pubkey(pxpk, &q, length);
  505|   458k|    if (xpk == NULL)
  ------------------
  |  Branch (505:9): [True: 0, False: 458k]
  ------------------
  506|      0|        goto end;
  507|   458k|    pktmp = X509_PUBKEY_get(xpk);
  508|   458k|    X509_PUBKEY_free(xpk);
  509|   458k|    xpk2 = NULL; /* We know that xpk == xpk2 */
  510|   458k|    if (pktmp == NULL)
  ------------------
  |  Branch (510:9): [True: 0, False: 458k]
  ------------------
  511|      0|        goto end;
  512|   458k|    *pp = q;
  513|   458k|    if (a != NULL) {
  ------------------
  |  Branch (513:9): [True: 0, False: 458k]
  ------------------
  514|      0|        EVP_PKEY_free(*a);
  515|      0|        *a = pktmp;
  516|      0|    }
  517|   458k|end:
  518|   458k|    X509_PUBKEY_free(xpk2);
  519|   458k|    return pktmp;
  520|   458k|}

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

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

threads_common.c:ossl_sa_CTX_TABLE_ENTRY_get:
   60|  22.1M|    {                                                                                                              \
   61|  22.1M|        return (type *)ossl_sa_get((OPENSSL_SA *)sa, n);                                                           \
   62|  22.1M|    }                                                                                                              \
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.31k|    {                                                                                                              \
   67|  2.31k|        return ossl_sa_set((OPENSSL_SA *)sa, n, (void *)val);                                                      \
   68|  2.31k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_new:
   26|  12.3k|    {                                                                                                              \
   27|  12.3k|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|  12.3k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_free:
   31|  12.2k|    {                                                                                                              \
   32|  12.2k|        ossl_sa_free((OPENSSL_SA *)sa);                                                                            \
   33|  12.2k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_get:
   60|  1.17M|    {                                                                                                              \
   61|  1.17M|        return (type *)ossl_sa_get((OPENSSL_SA *)sa, n);                                                           \
   62|  1.17M|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_set:
   66|   366k|    {                                                                                                              \
   67|   366k|        return ossl_sa_set((OPENSSL_SA *)sa, n, (void *)val);                                                      \
   68|   366k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_doall_arg:
   55|  25.8k|    {                                                                                                              \
   56|  25.8k|        ossl_sa_doall_arg((OPENSSL_SA *)sa,                                                                        \
   57|  25.8k|            (void (*)(ossl_uintmax_t, void *, void *))leaf, arg);                                                  \
   58|  25.8k|    }                                                                                                              \
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|  13.4k|    {                                                                                                              \
   48|  13.4k|        ossl_sa_doall((OPENSSL_SA *)sa,                                                                            \
   49|  13.4k|            (void (*)(ossl_uintmax_t, void *))leaf);                                                               \
   50|  13.4k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_doall_arg:
   55|   310k|    {                                                                                                              \
   56|   310k|        ossl_sa_doall_arg((OPENSSL_SA *)sa,                                                                        \
   57|   310k|            (void (*)(ossl_uintmax_t, void *, void *))leaf, arg);                                                  \
   58|   310k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_free:
   31|   310k|    {                                                                                                              \
   32|   310k|        ossl_sa_free((OPENSSL_SA *)sa);                                                                            \
   33|   310k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_new:
   26|   310k|    {                                                                                                              \
   27|   310k|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|   310k|    }                                                                                                              \

s3_lib.c:ossl_assert_int:
   45|  4.62k|{
   46|  4.62k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 4.62k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  4.62k|    return expr;
   50|  4.62k|}
ssl_cert.c:ossl_assert_int:
   45|  3.13k|{
   46|  3.13k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.13k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.13k|    return expr;
   50|  3.13k|}
ssl_ciph.c:ossl_assert_int:
   45|  24.2k|{
   46|  24.2k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 24.2k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  24.2k|    return expr;
   50|  24.2k|}
ssl_lib.c:ossl_assert_int:
   45|  2.32k|{
   46|  2.32k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.32k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.32k|    return expr;
   50|  2.32k|}
rec_layer_s3.c:ossl_assert_int:
   45|  14.0k|{
   46|  14.0k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 14.0k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  14.0k|    return expr;
   50|  14.0k|}
tls_common.c:ossl_assert_int:
   45|  12.3k|{
   46|  12.3k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 12.3k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  12.3k|    return expr;
   50|  12.3k|}
statem.c:ossl_assert_int:
   45|    184|{
   46|    184|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 184]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|    184|    return expr;
   50|    184|}
decoder_lib.c:ossl_assert_int:
   45|     17|{
   46|     17|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 17]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|     17|    return expr;
   50|     17|}
decoder_meth.c:ossl_assert_int:
   45|  4.74M|{
   46|  4.74M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 4.74M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  4.74M|    return expr;
   50|  4.74M|}
digest.c:ossl_assert_int:
   45|   874k|{
   46|   874k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 874k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   874k|    return expr;
   50|   874k|}
evp_enc.c:ossl_assert_int:
   45|   221k|{
   46|   221k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 221k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   221k|    return expr;
   50|   221k|}
evp_fetch.c:ossl_assert_int:
   45|  2.73M|{
   46|  2.73M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.73M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.73M|    return expr;
   50|  2.73M|}
p_lib.c:ossl_assert_int:
   45|  3.62M|{
   46|  3.62M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.62M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.62M|    return expr;
   50|  3.62M|}
pmeth_lib.c:ossl_assert_int:
   45|  82.9k|{
   46|  82.9k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 82.9k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  82.9k|    return expr;
   50|  82.9k|}
core_algorithm.c:ossl_assert_int:
   45|  1.15k|{
   46|  1.15k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.15k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  1.15k|    return expr;
   50|  1.15k|}
core_fetch.c:ossl_assert_int:
   45|   156k|{
   46|   156k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 156k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   156k|    return expr;
   50|   156k|}
core_namemap.c:ossl_assert_int:
   45|   412k|{
   46|   412k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 412k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   412k|    return expr;
   50|   412k|}
packet.c:ossl_assert_int:
   45|  3.40M|{
   46|  3.40M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.40M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.40M|    return expr;
   50|  3.40M|}
provider_core.c:ossl_assert_int:
   45|   151k|{
   46|   151k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 151k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   151k|    return expr;
   50|   151k|}
threads_common.c:ossl_assert_int:
   45|  22.1M|{
   46|  22.1M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 22.1M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  22.1M|    return expr;
   50|  22.1M|}
threads_pthread.c:ossl_assert_int:
   45|  16.3M|{
   46|  16.3M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 16.3M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  16.3M|    return expr;
   50|  16.3M|}
defn_cache.c:ossl_assert_int:
   45|   368k|{
   46|   368k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 368k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   368k|    return expr;
   50|   368k|}
property.c:ossl_assert_int:
   45|   216k|{
   46|   216k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 216k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   216k|    return expr;
   50|   216k|}
x_pubkey.c:ossl_assert_int:
   45|   916k|{
   46|   916k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 916k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   916k|    return expr;
   50|   916k|}
dh_kmgmt.c:ossl_assert_int:
   45|    132|{
   46|    132|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 132]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|    132|    return expr;
   50|    132|}
drbg_ctr.c:ossl_assert_int:
   45|  7.52k|{
   46|  7.52k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 7.52k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  7.52k|    return expr;
   50|  7.52k|}
ml_kem.c:ossl_assert_int:
   45|  3.76k|{
   46|  3.76k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.76k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.76k|    return expr;
   50|  3.76k|}

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

core_namemap.c:ossl_ht_strcase:
  320|  6.77M|{
  321|  6.77M|    size_t i;
  322|       |#if defined(CHARSET_EBCDIC) && !defined(CHARSET_EBCDIC_TEST)
  323|       |    const long int case_adjust = ~0x40;
  324|       |#else
  325|  6.77M|    const long int case_adjust = ~0x20;
  326|  6.77M|#endif
  327|       |
  328|  6.77M|    if (src == NULL)
  ------------------
  |  Branch (328:9): [True: 0, False: 6.77M]
  ------------------
  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|  6.77M|    if (key != NULL && key->keysize + len > key->bufsize)
  ------------------
  |  Branch (336:9): [True: 6.77M, False: 0]
  |  Branch (336:24): [True: 0, False: 6.77M]
  ------------------
  337|      0|        len = (size_t)(key->bufsize - key->keysize);
  338|       |
  339|  68.0M|    for (i = 0; src[i] != '\0' && i < len; i++)
  ------------------
  |  Branch (339:17): [True: 61.3M, False: 6.65M]
  |  Branch (339:35): [True: 61.2M, False: 126k]
  ------------------
  340|  61.2M|        tgt[i] = case_adjust & src[i];
  341|  6.77M|}

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

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

ssl_cert.c:CRYPTO_NEW_REF:
  280|  5.45k|{
  281|  5.45k|    refcnt->val = n;
  282|  5.45k|    return 1;
  283|  5.45k|}
ssl_cert.c:CRYPTO_DOWN_REF:
   56|  5.45k|{
   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|  5.45k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  5.45k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 5.45k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  5.45k|#endif
   68|  5.45k|    return 1;
   69|  5.45k|}
ssl_cert.c:CRYPTO_FREE_REF:
  286|  5.45k|{
  287|  5.45k|}
ssl_lib.c:CRYPTO_NEW_REF:
  280|  5.45k|{
  281|  5.45k|    refcnt->val = n;
  282|  5.45k|    return 1;
  283|  5.45k|}
ssl_lib.c:CRYPTO_FREE_REF:
  286|  5.45k|{
  287|  5.45k|}
ssl_lib.c:CRYPTO_UP_REF:
   40|  4.64k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  4.64k|    return 1;
   43|  4.64k|}
ssl_lib.c:CRYPTO_DOWN_REF:
   56|  10.0k|{
   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|  10.0k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  10.0k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 5.45k, False: 4.64k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  10.0k|#endif
   68|  10.0k|    return 1;
   69|  10.0k|}
ssl_sess.c:CRYPTO_NEW_REF:
  280|  2.31k|{
  281|  2.31k|    refcnt->val = n;
  282|  2.31k|    return 1;
  283|  2.31k|}
ssl_sess.c:CRYPTO_FREE_REF:
  286|  2.31k|{
  287|  2.31k|}
ssl_sess.c:CRYPTO_DOWN_REF:
   56|  2.31k|{
   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.31k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  2.31k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 2.31k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  2.31k|#endif
   68|  2.31k|    return 1;
   69|  2.31k|}
tasn_utl.c:CRYPTO_NEW_REF:
  280|   458k|{
  281|   458k|    refcnt->val = n;
  282|   458k|    return 1;
  283|   458k|}
tasn_utl.c:CRYPTO_FREE_REF:
  286|   458k|{
  287|   458k|}
tasn_utl.c:CRYPTO_DOWN_REF:
   56|   916k|{
   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|   916k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   916k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 458k, False: 458k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   916k|#endif
   68|   916k|    return 1;
   69|   916k|}
bio_lib.c:CRYPTO_NEW_REF:
  280|  2.78M|{
  281|  2.78M|    refcnt->val = n;
  282|  2.78M|    return 1;
  283|  2.78M|}
bio_lib.c:CRYPTO_FREE_REF:
  286|  2.78M|{
  287|  2.78M|}
bio_lib.c:CRYPTO_DOWN_REF:
   56|  3.72M|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  3.72M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  3.72M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 2.78M, False: 939k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  3.72M|#endif
   68|  3.72M|    return 1;
   69|  3.72M|}
bio_lib.c:CRYPTO_UP_REF:
   40|   939k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   939k|    return 1;
   43|   939k|}
bio_lib.c:CRYPTO_GET_REF:
   72|  18.5k|{
   73|       |    *ret = atomic_load_explicit(&refcnt->val, memory_order_acquire);
   74|  18.5k|    return 1;
   75|  18.5k|}
dso_lib.c:CRYPTO_NEW_REF:
  280|     87|{
  281|     87|    refcnt->val = n;
  282|     87|    return 1;
  283|     87|}
dso_lib.c:CRYPTO_DOWN_REF:
   56|     87|{
   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|     87|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|     87|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 87, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|     87|#endif
   68|     87|    return 1;
   69|     87|}
dso_lib.c:CRYPTO_FREE_REF:
  286|     87|{
  287|     87|}
ec_key.c:CRYPTO_DOWN_REF:
   56|   295k|{
   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|   295k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   295k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 147k, False: 147k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   295k|#endif
   68|   295k|    return 1;
   69|   295k|}
ec_key.c:CRYPTO_FREE_REF:
  286|   147k|{
  287|   147k|}
ec_key.c:CRYPTO_UP_REF:
   40|   147k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   147k|    return 1;
   43|   147k|}
ec_kmeth.c:CRYPTO_NEW_REF:
  280|   147k|{
  281|   147k|    refcnt->val = n;
  282|   147k|    return 1;
  283|   147k|}
decoder_meth.c:CRYPTO_UP_REF:
   40|  2.60M|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  2.60M|    return 1;
   43|  2.60M|}
decoder_meth.c:CRYPTO_DOWN_REF:
   56|  2.60M|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  2.60M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  2.60M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 2.60M]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  2.60M|#endif
   68|  2.60M|    return 1;
   69|  2.60M|}
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|  20.2k|{
  281|  20.2k|    refcnt->val = n;
  282|  20.2k|    return 1;
  283|  20.2k|}
digest.c:CRYPTO_UP_REF:
   40|   884k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   884k|    return 1;
   43|   884k|}
digest.c:CRYPTO_DOWN_REF:
   56|   904k|{
   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|   904k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   904k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 20.1k, False: 884k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   904k|#endif
   68|   904k|    return 1;
   69|   904k|}
digest.c:CRYPTO_FREE_REF:
  286|  20.1k|{
  287|  20.1k|}
evp_enc.c:CRYPTO_NEW_REF:
  280|  87.6k|{
  281|  87.6k|    refcnt->val = n;
  282|  87.6k|    return 1;
  283|  87.6k|}
evp_enc.c:CRYPTO_UP_REF:
   40|   154k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   154k|    return 1;
   43|   154k|}
evp_enc.c:CRYPTO_FREE_REF:
  286|  87.4k|{
  287|  87.4k|}
evp_enc.c:CRYPTO_DOWN_REF:
   56|   241k|{
   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|   241k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   241k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 87.4k, False: 154k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   241k|#endif
   68|   241k|    return 1;
   69|   241k|}
exchange.c:CRYPTO_DOWN_REF:
   56|  16.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|  16.6k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  16.6k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 4.71k, False: 11.9k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  16.6k|#endif
   68|  16.6k|    return 1;
   69|  16.6k|}
exchange.c:CRYPTO_FREE_REF:
  286|  4.71k|{
  287|  4.71k|}
exchange.c:CRYPTO_UP_REF:
   40|  11.9k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  11.9k|    return 1;
   43|  11.9k|}
exchange.c:CRYPTO_NEW_REF:
  280|  4.71k|{
  281|  4.71k|    refcnt->val = n;
  282|  4.71k|    return 1;
  283|  4.71k|}
keymgmt_meth.c:CRYPTO_NEW_REF:
  280|  28.3k|{
  281|  28.3k|    refcnt->val = n;
  282|  28.3k|    return 1;
  283|  28.3k|}
keymgmt_meth.c:CRYPTO_UP_REF:
   40|  1.75M|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  1.75M|    return 1;
   43|  1.75M|}
keymgmt_meth.c:CRYPTO_DOWN_REF:
   56|  1.78M|{
   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.78M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.78M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 28.2k, False: 1.75M]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.78M|#endif
   68|  1.78M|    return 1;
   69|  1.78M|}
keymgmt_meth.c:CRYPTO_FREE_REF:
  286|  28.2k|{
  287|  28.2k|}
p_lib.c:CRYPTO_NEW_REF:
  280|   927k|{
  281|   927k|    refcnt->val = n;
  282|   927k|    return 1;
  283|   927k|}
p_lib.c:CRYPTO_FREE_REF:
  286|   927k|{
  287|   927k|}
p_lib.c:CRYPTO_UP_REF:
   40|   537k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   537k|    return 1;
   43|   537k|}
p_lib.c:CRYPTO_DOWN_REF:
   56|  1.46M|{
   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.46M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.46M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 927k, False: 537k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.46M|#endif
   68|  1.46M|    return 1;
   69|  1.46M|}
signature.c:CRYPTO_DOWN_REF:
   56|  86.7k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  86.7k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  86.7k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 39.7k, False: 46.9k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  86.7k|#endif
   68|  86.7k|    return 1;
   69|  86.7k|}
signature.c:CRYPTO_FREE_REF:
  286|  39.7k|{
  287|  39.7k|}
signature.c:CRYPTO_UP_REF:
   40|  46.9k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  46.9k|    return 1;
   43|  46.9k|}
signature.c:CRYPTO_NEW_REF:
  280|  39.7k|{
  281|  39.7k|    refcnt->val = n;
  282|  39.7k|    return 1;
  283|  39.7k|}
provider_core.c:CRYPTO_UP_REF:
   40|   341k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   341k|    return 1;
   43|   341k|}
provider_core.c:CRYPTO_NEW_REF:
  280|  1.69k|{
  281|  1.69k|    refcnt->val = n;
  282|  1.69k|    return 1;
  283|  1.69k|}
provider_core.c:CRYPTO_DOWN_REF:
   56|   343k|{
   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|   343k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   343k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 1.69k, False: 341k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   343k|#endif
   68|   343k|    return 1;
   69|   343k|}
provider_core.c:CRYPTO_FREE_REF:
  286|  1.69k|{
  287|  1.69k|}
rsa_lib.c:CRYPTO_NEW_REF:
  280|   310k|{
  281|   310k|    refcnt->val = n;
  282|   310k|    return 1;
  283|   310k|}
rsa_lib.c:CRYPTO_DOWN_REF:
   56|   621k|{
   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|   621k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   621k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 310k, False: 310k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   621k|#endif
   68|   621k|    return 1;
   69|   621k|}
rsa_lib.c:CRYPTO_FREE_REF:
  286|   310k|{
  287|   310k|}
rsa_lib.c:CRYPTO_UP_REF:
   40|   310k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   310k|    return 1;
   43|   310k|}
x509_lu.c:CRYPTO_NEW_REF:
  280|  3.13k|{
  281|  3.13k|    refcnt->val = n;
  282|  3.13k|    return 1;
  283|  3.13k|}
x509_lu.c:CRYPTO_DOWN_REF:
   56|  3.13k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  3.13k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  3.13k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 3.13k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  3.13k|#endif
   68|  3.13k|    return 1;
   69|  3.13k|}
x509_lu.c:CRYPTO_FREE_REF:
  286|  3.13k|{
  287|  3.13k|}
x509_set.c:CRYPTO_UP_REF:
   40|   458k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   458k|    return 1;
   43|   458k|}
ossl_core_bio.c:CRYPTO_UP_REF:
   40|   916k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   916k|    return 1;
   43|   916k|}
ossl_core_bio.c:CRYPTO_DOWN_REF:
   56|  1.83M|{
   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.83M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.83M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 916k, False: 916k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.83M|#endif
   68|  1.83M|    return 1;
   69|  1.83M|}
ossl_core_bio.c:CRYPTO_FREE_REF:
  286|   916k|{
  287|   916k|}
ossl_core_bio.c:CRYPTO_NEW_REF:
  280|   916k|{
  281|   916k|    refcnt->val = n;
  282|   916k|    return 1;
  283|   916k|}
dh_lib.c:CRYPTO_NEW_REF:
  280|    132|{
  281|    132|    refcnt->val = n;
  282|    132|    return 1;
  283|    132|}
dh_lib.c:CRYPTO_DOWN_REF:
   56|    132|{
   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|    132|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|    132|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 132, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|    132|#endif
   68|    132|    return 1;
   69|    132|}
dh_lib.c:CRYPTO_FREE_REF:
  286|    132|{
  287|    132|}
ecx_key.c:CRYPTO_NEW_REF:
  280|  3.78k|{
  281|  3.78k|    refcnt->val = n;
  282|  3.78k|    return 1;
  283|  3.78k|}
ecx_key.c:CRYPTO_FREE_REF:
  286|  3.78k|{
  287|  3.78k|}
ecx_key.c:CRYPTO_DOWN_REF:
   56|  3.78k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  3.78k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  3.78k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 3.78k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  3.78k|#endif
   68|  3.78k|    return 1;
   69|  3.78k|}
evp_rand.c:CRYPTO_UP_REF:
   40|  10.9k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  10.9k|    return 1;
   43|  10.9k|}
evp_rand.c:CRYPTO_NEW_REF:
  280|  5.75k|{
  281|  5.75k|    refcnt->val = n;
  282|  5.75k|    return 1;
  283|  5.75k|}
evp_rand.c:CRYPTO_FREE_REF:
  286|  5.74k|{
  287|  5.74k|}
evp_rand.c:CRYPTO_DOWN_REF:
   56|  16.7k|{
   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|  16.7k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  16.7k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 5.74k, False: 10.9k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  16.7k|#endif
   68|  16.7k|    return 1;
   69|  16.7k|}

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

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

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

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

ASN1_TYPE_new:
  800|  1.99M|    {                                                               \
  801|  1.99M|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  399|  1.99M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|  1.99M|    }                                                               \
X509_ALGOR_new:
  800|   916k|    {                                                               \
  801|   916k|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  399|   916k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|   916k|    }                                                               \
X509_ALGOR_free:
  804|   916k|    {                                                               \
  805|   916k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   916k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   916k|    }
GENERAL_NAMES_free:
  804|   916k|    {                                                               \
  805|   916k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   916k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   916k|    }
NAME_CONSTRAINTS_free:
  804|  1.31M|    {                                                               \
  805|  1.31M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  1.31M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  1.31M|    }
X509_CRL_it:
  241|   461k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   461k|    {                                  \
  |  |   98|   461k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   461k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   461k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   461k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   461k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   461k|        tname##_seq_tt,                                 \
  245|   461k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   461k|        &tname##_aux,                                   \
  247|   461k|        sizeof(stname),                                 \
  248|   461k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   461k|    }                         \
  |  |  105|   461k|    ;                         \
  |  |  106|   461k|    return &local_it;         \
  |  |  107|   461k|    }
  ------------------
X509_CRL_free:
  804|   461k|    {                                                               \
  805|   461k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   461k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   461k|    }
X509_NAME_ENTRY_new:
  800|  3.24M|    {                                                               \
  801|  3.24M|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  399|  3.24M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|  3.24M|    }                                                               \
X509_NAME_ENTRY_free:
  804|  7.41M|    {                                                               \
  805|  7.41M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  7.41M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  7.41M|    }
X509_NAME_free:
  804|  42.9k|    {                                                               \
  805|  42.9k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  42.9k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  42.9k|    }
d2i_X509_PUBKEY:
  814|   458k|    {                                                                                      \
  815|   458k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|   458k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   458k|    }                                                                                      \
X509_PUBKEY_free:
  804|   916k|    {                                                               \
  805|   916k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   916k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   916k|    }
X509_CINF_it:
  241|  2.57M|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|  2.57M|    {                                  \
  |  |   98|  2.57M|        static const ASN1_ITEM local_it = {
  ------------------
  242|  2.57M|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|  2.57M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|  2.57M|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|  2.57M|#define V_ASN1_SEQUENCE 16
  ------------------
  244|  2.57M|        tname##_seq_tt,                                 \
  245|  2.57M|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|  2.57M|        &tname##_aux,                                   \
  247|  2.57M|        sizeof(stname),                                 \
  248|  2.57M|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|  2.57M|    }                         \
  |  |  105|  2.57M|    ;                         \
  |  |  106|  2.57M|    return &local_it;         \
  |  |  107|  2.57M|    }
  ------------------
X509_it:
  241|  2.31M|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|  2.31M|    {                                  \
  |  |   98|  2.31M|        static const ASN1_ITEM local_it = {
  ------------------
  242|  2.31M|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|  2.31M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|  2.31M|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|  2.31M|#define V_ASN1_SEQUENCE 16
  ------------------
  244|  2.31M|        tname##_seq_tt,                                 \
  245|  2.31M|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|  2.31M|        &tname##_aux,                                   \
  247|  2.31M|        sizeof(stname),                                 \
  248|  2.31M|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|  2.31M|    }                         \
  |  |  105|  2.31M|    ;                         \
  |  |  106|  2.31M|    return &local_it;         \
  |  |  107|  2.31M|    }
  ------------------
d2i_X509:
  814|   458k|    {                                                                                      \
  815|   458k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|   458k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   458k|    }                                                                                      \
X509_free:
  804|   996k|    {                                                               \
  805|   996k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   996k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   996k|    }
X509_CERT_AUX_free:
  804|   916k|    {                                                               \
  805|   916k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   916k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   916k|    }
RSAPublicKey_it:
  241|   310k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   310k|    {                                  \
  |  |   98|   310k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   310k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   310k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   310k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   310k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   310k|        tname##_seq_tt,                                 \
  245|   310k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   310k|        &tname##_aux,                                   \
  247|   310k|        sizeof(stname),                                 \
  248|   310k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   310k|    }                         \
  |  |  105|   310k|    ;                         \
  |  |  106|   310k|    return &local_it;         \
  |  |  107|   310k|    }
  ------------------
RSA_PSS_PARAMS_it:
  241|   310k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   310k|    {                                  \
  |  |   98|   310k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   310k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   310k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   310k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   310k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   310k|        tname##_seq_tt,                                 \
  245|   310k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   310k|        &tname##_aux,                                   \
  247|   310k|        sizeof(stname),                                 \
  248|   310k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   310k|    }                         \
  |  |  105|   310k|    ;                         \
  |  |  106|   310k|    return &local_it;         \
  |  |  107|   310k|    }
  ------------------
RSA_PSS_PARAMS_free:
  804|   310k|    {                                                               \
  805|   310k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   310k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   310k|    }
d2i_RSAPublicKey:
  814|   310k|    {                                                                                      \
  815|   310k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|   310k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   310k|    }                                                                                      \
AUTHORITY_KEYID_free:
  804|  1.31M|    {                                                               \
  805|  1.31M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  1.31M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  1.31M|    }
ASIdentifiers_free:
  804|  1.31M|    {                                                               \
  805|  1.31M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  1.31M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  1.31M|    }
BASIC_CONSTRAINTS_free:
  804|   399k|    {                                                               \
  805|   399k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   399k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   399k|    }
CRL_DIST_POINTS_free:
  804|   916k|    {                                                               \
  805|   916k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   916k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   916k|    }

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

tls_common.c:OSSL_FUNC_rlayer_skip_early_data:
   60|  13.9k|    {                                                  \
   61|  13.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  13.9k|    }
tls_common.c:OSSL_FUNC_rlayer_security:
   60|  13.9k|    {                                                  \
   61|  13.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  13.9k|    }
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|  20.2k|    {                                                  \
   61|  20.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  20.2k|    }
digest.c:OSSL_FUNC_digest_init:
   60|  20.2k|    {                                                  \
   61|  20.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  20.2k|    }
digest.c:OSSL_FUNC_digest_update:
   60|  20.2k|    {                                                  \
   61|  20.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  20.2k|    }
digest.c:OSSL_FUNC_digest_final:
   60|  20.2k|    {                                                  \
   61|  20.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  20.2k|    }
digest.c:OSSL_FUNC_digest_squeeze:
   60|  4.04k|    {                                                  \
   61|  4.04k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.04k|    }
digest.c:OSSL_FUNC_digest_freectx:
   60|  20.2k|    {                                                  \
   61|  20.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  20.2k|    }
digest.c:OSSL_FUNC_digest_dupctx:
   60|  20.2k|    {                                                  \
   61|  20.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  20.2k|    }
digest.c:OSSL_FUNC_digest_get_params:
   60|  20.2k|    {                                                  \
   61|  20.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  20.2k|    }
digest.c:OSSL_FUNC_digest_set_ctx_params:
   60|  7.41k|    {                                                  \
   61|  7.41k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  7.41k|    }
digest.c:OSSL_FUNC_digest_get_ctx_params:
   60|  6.06k|    {                                                  \
   61|  6.06k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  6.06k|    }
digest.c:OSSL_FUNC_digest_gettable_params:
   60|  20.2k|    {                                                  \
   61|  20.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  20.2k|    }
digest.c:OSSL_FUNC_digest_settable_ctx_params:
   60|  7.41k|    {                                                  \
   61|  7.41k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  7.41k|    }
digest.c:OSSL_FUNC_digest_gettable_ctx_params:
   60|  6.06k|    {                                                  \
   61|  6.06k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  6.06k|    }
digest.c:OSSL_FUNC_digest_copyctx:
   60|  18.1k|    {                                                  \
   61|  18.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  18.1k|    }
digest.c:OSSL_FUNC_digest_serialize:
   60|  12.8k|    {                                                  \
   61|  12.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  12.8k|    }
digest.c:OSSL_FUNC_digest_deserialize:
   60|  12.8k|    {                                                  \
   61|  12.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  12.8k|    }
evp_enc.c:OSSL_FUNC_cipher_newctx:
   60|  87.6k|    {                                                  \
   61|  87.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  87.6k|    }
evp_enc.c:OSSL_FUNC_cipher_encrypt_init:
   60|  87.6k|    {                                                  \
   61|  87.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  87.6k|    }
evp_enc.c:OSSL_FUNC_cipher_decrypt_init:
   60|  87.6k|    {                                                  \
   61|  87.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  87.6k|    }
evp_enc.c:OSSL_FUNC_cipher_encrypt_skey_init:
   60|  45.8k|    {                                                  \
   61|  45.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  45.8k|    }
evp_enc.c:OSSL_FUNC_cipher_decrypt_skey_init:
   60|  45.8k|    {                                                  \
   61|  45.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  45.8k|    }
evp_enc.c:OSSL_FUNC_cipher_update:
   60|  87.6k|    {                                                  \
   61|  87.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  87.6k|    }
evp_enc.c:OSSL_FUNC_cipher_final:
   60|  87.6k|    {                                                  \
   61|  87.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  87.6k|    }
evp_enc.c:OSSL_FUNC_cipher_cipher:
   60|  79.5k|    {                                                  \
   61|  79.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  79.5k|    }
evp_enc.c:OSSL_FUNC_cipher_freectx:
   60|  87.6k|    {                                                  \
   61|  87.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  87.6k|    }
evp_enc.c:OSSL_FUNC_cipher_dupctx:
   60|  86.9k|    {                                                  \
   61|  86.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  86.9k|    }
evp_enc.c:OSSL_FUNC_cipher_get_params:
   60|  87.6k|    {                                                  \
   61|  87.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  87.6k|    }
evp_enc.c:OSSL_FUNC_cipher_get_ctx_params:
   60|  87.6k|    {                                                  \
   61|  87.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  87.6k|    }
evp_enc.c:OSSL_FUNC_cipher_set_ctx_params:
   60|  87.6k|    {                                                  \
   61|  87.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  87.6k|    }
evp_enc.c:OSSL_FUNC_cipher_gettable_params:
   60|  87.6k|    {                                                  \
   61|  87.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  87.6k|    }
evp_enc.c:OSSL_FUNC_cipher_gettable_ctx_params:
   60|  87.6k|    {                                                  \
   61|  87.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  87.6k|    }
evp_enc.c:OSSL_FUNC_cipher_settable_ctx_params:
   60|  87.6k|    {                                                  \
   61|  87.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  87.6k|    }
exchange.c:OSSL_FUNC_keyexch_newctx:
   60|  4.71k|    {                                                  \
   61|  4.71k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.71k|    }
exchange.c:OSSL_FUNC_keyexch_init:
   60|  4.71k|    {                                                  \
   61|  4.71k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.71k|    }
exchange.c:OSSL_FUNC_keyexch_set_peer:
   60|  2.69k|    {                                                  \
   61|  2.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.69k|    }
exchange.c:OSSL_FUNC_keyexch_derive:
   60|  4.71k|    {                                                  \
   61|  4.71k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.71k|    }
exchange.c:OSSL_FUNC_keyexch_freectx:
   60|  4.71k|    {                                                  \
   61|  4.71k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.71k|    }
exchange.c:OSSL_FUNC_keyexch_dupctx:
   60|  4.71k|    {                                                  \
   61|  4.71k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.71k|    }
exchange.c:OSSL_FUNC_keyexch_get_ctx_params:
   60|  4.71k|    {                                                  \
   61|  4.71k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.71k|    }
exchange.c:OSSL_FUNC_keyexch_gettable_ctx_params:
   60|  4.71k|    {                                                  \
   61|  4.71k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.71k|    }
exchange.c:OSSL_FUNC_keyexch_set_ctx_params:
   60|  3.37k|    {                                                  \
   61|  3.37k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.37k|    }
exchange.c:OSSL_FUNC_keyexch_settable_ctx_params:
   60|  3.37k|    {                                                  \
   61|  3.37k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.37k|    }
exchange.c:OSSL_FUNC_keyexch_derive_skey:
   60|    674|    {                                                  \
   61|    674|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    674|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_new:
   60|  28.3k|    {                                                  \
   61|  28.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  28.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_new_ex:
   60|  4.04k|    {                                                  \
   61|  4.04k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.04k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_init:
   60|  26.2k|    {                                                  \
   61|  26.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_set_template:
   60|  4.04k|    {                                                  \
   61|  4.04k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.04k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_set_params:
   60|  26.2k|    {                                                  \
   61|  26.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_settable_params:
   60|  26.2k|    {                                                  \
   61|  26.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_get_params:
   60|  1.34k|    {                                                  \
   61|  1.34k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.34k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_gettable_params:
   60|  1.34k|    {                                                  \
   61|  1.34k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.34k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen:
   60|  26.2k|    {                                                  \
   61|  26.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_cleanup:
   60|  26.2k|    {                                                  \
   61|  26.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_free:
   60|  28.3k|    {                                                  \
   61|  28.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  28.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_load:
   60|  20.2k|    {                                                  \
   61|  20.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  20.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_get_params:
   60|  26.2k|    {                                                  \
   61|  26.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gettable_params:
   60|  26.2k|    {                                                  \
   61|  26.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_set_params:
   60|  14.1k|    {                                                  \
   61|  14.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_settable_params:
   60|  14.1k|    {                                                  \
   61|  14.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_query_operation_name:
   60|  3.37k|    {                                                  \
   61|  3.37k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.37k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_has:
   60|  28.3k|    {                                                  \
   61|  28.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  28.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_dup:
   60|  23.5k|    {                                                  \
   61|  23.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  23.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_validate:
   60|  20.2k|    {                                                  \
   61|  20.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  20.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_match:
   60|  26.2k|    {                                                  \
   61|  26.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_import:
   60|  26.2k|    {                                                  \
   61|  26.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_import_types:
   60|  26.2k|    {                                                  \
   61|  26.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_export:
   60|  26.2k|    {                                                  \
   61|  26.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.2k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_export_types:
   60|  26.2k|    {                                                  \
   61|  26.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.2k|    }
signature.c:OSSL_FUNC_signature_newctx:
   60|  39.7k|    {                                                  \
   61|  39.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  39.7k|    }
signature.c:OSSL_FUNC_signature_sign_init:
   60|  26.9k|    {                                                  \
   61|  26.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.9k|    }
signature.c:OSSL_FUNC_signature_sign:
   60|  37.0k|    {                                                  \
   61|  37.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  37.0k|    }
signature.c:OSSL_FUNC_signature_sign_message_init:
   60|  34.3k|    {                                                  \
   61|  34.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  34.3k|    }
signature.c:OSSL_FUNC_signature_sign_message_update:
   60|  22.9k|    {                                                  \
   61|  22.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  22.9k|    }
signature.c:OSSL_FUNC_signature_sign_message_final:
   60|  22.9k|    {                                                  \
   61|  22.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  22.9k|    }
signature.c:OSSL_FUNC_signature_verify_init:
   60|  26.9k|    {                                                  \
   61|  26.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.9k|    }
signature.c:OSSL_FUNC_signature_verify:
   60|  37.0k|    {                                                  \
   61|  37.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  37.0k|    }
signature.c:OSSL_FUNC_signature_verify_message_init:
   60|  34.3k|    {                                                  \
   61|  34.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  34.3k|    }
signature.c:OSSL_FUNC_signature_verify_message_update:
   60|  22.9k|    {                                                  \
   61|  22.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  22.9k|    }
signature.c:OSSL_FUNC_signature_verify_message_final:
   60|  22.9k|    {                                                  \
   61|  22.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  22.9k|    }
signature.c:OSSL_FUNC_signature_verify_recover_init:
   60|  9.43k|    {                                                  \
   61|  9.43k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  9.43k|    }
signature.c:OSSL_FUNC_signature_verify_recover:
   60|  9.43k|    {                                                  \
   61|  9.43k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  9.43k|    }
signature.c:OSSL_FUNC_signature_digest_sign_init:
   60|  16.8k|    {                                                  \
   61|  16.8k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  16.8k|    }
signature.c:OSSL_FUNC_signature_digest_sign_update:
   60|  5.39k|    {                                                  \
   61|  5.39k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  5.39k|    }
signature.c:OSSL_FUNC_signature_digest_sign_final:
   60|  5.39k|    {                                                  \
   61|  5.39k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  5.39k|    }
signature.c:OSSL_FUNC_signature_digest_sign:
   60|  11.4k|    {                                                  \
   61|  11.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  11.4k|    }
signature.c:OSSL_FUNC_signature_digest_verify_init:
   60|  14.1k|    {                                                  \
   61|  14.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.1k|    }
signature.c:OSSL_FUNC_signature_digest_verify_update:
   60|  2.69k|    {                                                  \
   61|  2.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.69k|    }
signature.c:OSSL_FUNC_signature_digest_verify_final:
   60|  2.69k|    {                                                  \
   61|  2.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.69k|    }
signature.c:OSSL_FUNC_signature_digest_verify:
   60|  11.4k|    {                                                  \
   61|  11.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  11.4k|    }
signature.c:OSSL_FUNC_signature_freectx:
   60|  39.7k|    {                                                  \
   61|  39.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  39.7k|    }
signature.c:OSSL_FUNC_signature_dupctx:
   60|  39.7k|    {                                                  \
   61|  39.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  39.7k|    }
signature.c:OSSL_FUNC_signature_get_ctx_params:
   60|  37.0k|    {                                                  \
   61|  37.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  37.0k|    }
signature.c:OSSL_FUNC_signature_gettable_ctx_params:
   60|  37.0k|    {                                                  \
   61|  37.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  37.0k|    }
signature.c:OSSL_FUNC_signature_set_ctx_params:
   60|  39.7k|    {                                                  \
   61|  39.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  39.7k|    }
signature.c:OSSL_FUNC_signature_settable_ctx_params:
   60|  39.7k|    {                                                  \
   61|  39.7k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  39.7k|    }
signature.c:OSSL_FUNC_signature_get_ctx_md_params:
   60|  2.69k|    {                                                  \
   61|  2.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.69k|    }
signature.c:OSSL_FUNC_signature_gettable_ctx_md_params:
   60|  2.69k|    {                                                  \
   61|  2.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.69k|    }
signature.c:OSSL_FUNC_signature_set_ctx_md_params:
   60|  2.69k|    {                                                  \
   61|  2.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.69k|    }
signature.c:OSSL_FUNC_signature_settable_ctx_md_params:
   60|  2.69k|    {                                                  \
   61|  2.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.69k|    }
signature.c:OSSL_FUNC_signature_query_key_types:
   60|  24.2k|    {                                                  \
   61|  24.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  24.2k|    }
provider_core.c:OSSL_FUNC_provider_teardown:
   60|  1.41k|    {                                                  \
   61|  1.41k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.41k|    }
provider_core.c:OSSL_FUNC_provider_gettable_params:
   60|  1.61k|    {                                                  \
   61|  1.61k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.61k|    }
provider_core.c:OSSL_FUNC_provider_get_params:
   60|  1.61k|    {                                                  \
   61|  1.61k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.61k|    }
provider_core.c:OSSL_FUNC_provider_get_capabilities:
   60|    769|    {                                                  \
   61|    769|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    769|    }
provider_core.c:OSSL_FUNC_provider_query_operation:
   60|  1.61k|    {                                                  \
   61|  1.61k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.61k|    }
baseprov.c:OSSL_FUNC_core_gettable_params:
   60|    642|    {                                                  \
   61|    642|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    642|    }
baseprov.c:OSSL_FUNC_core_get_params:
   60|    642|    {                                                  \
   61|    642|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    642|    }
baseprov.c:OSSL_FUNC_core_get_libctx:
   60|    642|    {                                                  \
   61|    642|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    642|    }
defltprov.c:OSSL_FUNC_core_gettable_params:
   60|    769|    {                                                  \
   61|    769|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    769|    }
defltprov.c:OSSL_FUNC_core_get_params:
   60|    769|    {                                                  \
   61|    769|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    769|    }
defltprov.c:OSSL_FUNC_core_get_libctx:
   60|    769|    {                                                  \
   61|    769|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    769|    }
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|    769|    {                                                  \
   61|    769|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    769|    }
provider_seeding.c:OSSL_FUNC_get_user_entropy:
   60|    769|    {                                                  \
   61|    769|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    769|    }
provider_seeding.c:OSSL_FUNC_cleanup_entropy:
   60|    769|    {                                                  \
   61|    769|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    769|    }
provider_seeding.c:OSSL_FUNC_cleanup_user_entropy:
   60|    769|    {                                                  \
   61|    769|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    769|    }
provider_seeding.c:OSSL_FUNC_get_nonce:
   60|    769|    {                                                  \
   61|    769|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    769|    }
provider_seeding.c:OSSL_FUNC_get_user_nonce:
   60|    769|    {                                                  \
   61|    769|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    769|    }
provider_seeding.c:OSSL_FUNC_cleanup_nonce:
   60|    769|    {                                                  \
   61|    769|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    769|    }
provider_seeding.c:OSSL_FUNC_cleanup_user_nonce:
   60|    769|    {                                                  \
   61|    769|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    769|    }
drbg.c:OSSL_FUNC_rand_enable_locking:
   60|  1.73k|    {                                                  \
   61|  1.73k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.73k|    }
drbg.c:OSSL_FUNC_rand_lock:
   60|  1.73k|    {                                                  \
   61|  1.73k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.73k|    }
drbg.c:OSSL_FUNC_rand_unlock:
   60|  1.73k|    {                                                  \
   61|  1.73k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.73k|    }
drbg.c:OSSL_FUNC_rand_get_ctx_params:
   60|  1.73k|    {                                                  \
   61|  1.73k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.73k|    }
drbg.c:OSSL_FUNC_rand_get_seed:
   60|  1.73k|    {                                                  \
   61|  1.73k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.73k|    }
drbg.c:OSSL_FUNC_rand_clear_seed:
   60|  1.73k|    {                                                  \
   61|  1.73k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.73k|    }
evp_rand.c:OSSL_FUNC_rand_newctx:
   60|  3.44k|    {                                                  \
   61|  3.44k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.44k|    }
evp_rand.c:OSSL_FUNC_rand_freectx:
   60|  3.44k|    {                                                  \
   61|  3.44k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.44k|    }
evp_rand.c:OSSL_FUNC_rand_instantiate:
   60|  3.44k|    {                                                  \
   61|  3.44k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.44k|    }
evp_rand.c:OSSL_FUNC_rand_uninstantiate:
   60|  3.44k|    {                                                  \
   61|  3.44k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.44k|    }
evp_rand.c:OSSL_FUNC_rand_generate:
   60|  3.44k|    {                                                  \
   61|  3.44k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.44k|    }
evp_rand.c:OSSL_FUNC_rand_reseed:
   60|  3.44k|    {                                                  \
   61|  3.44k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.44k|    }
evp_rand.c:OSSL_FUNC_rand_nonce:
   60|    579|    {                                                  \
   61|    579|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    579|    }
evp_rand.c:OSSL_FUNC_rand_enable_locking:
   60|  3.44k|    {                                                  \
   61|  3.44k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.44k|    }
evp_rand.c:OSSL_FUNC_rand_lock:
   60|  3.44k|    {                                                  \
   61|  3.44k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.44k|    }
evp_rand.c:OSSL_FUNC_rand_unlock:
   60|  3.44k|    {                                                  \
   61|  3.44k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.44k|    }
evp_rand.c:OSSL_FUNC_rand_gettable_ctx_params:
   60|  3.44k|    {                                                  \
   61|  3.44k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.44k|    }
evp_rand.c:OSSL_FUNC_rand_settable_ctx_params:
   60|  2.31k|    {                                                  \
   61|  2.31k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.31k|    }
evp_rand.c:OSSL_FUNC_rand_get_ctx_params:
   60|  3.44k|    {                                                  \
   61|  3.44k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.44k|    }
evp_rand.c:OSSL_FUNC_rand_set_ctx_params:
   60|  2.31k|    {                                                  \
   61|  2.31k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.31k|    }
evp_rand.c:OSSL_FUNC_rand_verify_zeroization:
   60|  3.44k|    {                                                  \
   61|  3.44k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.44k|    }
evp_rand.c:OSSL_FUNC_rand_get_seed:
   60|  3.44k|    {                                                  \
   61|  3.44k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.44k|    }
evp_rand.c:OSSL_FUNC_rand_clear_seed:
   60|  2.86k|    {                                                  \
   61|  2.86k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.86k|    }

ssl_lib.c:ERR_GET_LIB:
  225|  2.28k|{
  226|  2.28k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  2.28k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  2.28k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 2.28k]
  |  |  ------------------
  ------------------
  227|      0|        return ERR_LIB_SYS;
  ------------------
  |  |   55|      0|#define ERR_LIB_SYS 2
  ------------------
  228|  2.28k|    return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  209|  2.28k|#define ERR_LIB_OFFSET 23L
  ------------------
                  return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  210|  2.28k|#define ERR_LIB_MASK 0xFF
  ------------------
  229|  2.28k|}
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: 48, False: 7.87k]
  |  |  ------------------
  ------------------
  227|     48|        return ERR_LIB_SYS;
  ------------------
  |  |   55|     48|#define ERR_LIB_SYS 2
  ------------------
  228|  7.87k|    return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  209|  7.87k|#define ERR_LIB_OFFSET 23L
  ------------------
                  return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  210|  7.87k|#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: 24, False: 1.23k]
  |  |  ------------------
  ------------------
  241|     24|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|     24|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  1.23k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  1.23k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  1.25k|}
pem_info.c:ERR_GET_REASON:
  239|  3.80k|{
  240|  3.80k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  3.80k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  3.80k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 3.80k]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  3.80k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  3.80k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  3.80k|}
pem_lib.c:ERR_GET_REASON:
  239|  3.37k|{
  240|  3.37k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  3.37k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  3.37k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 3.37k]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  3.37k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  3.37k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  3.37k|}
by_file.c:ERR_GET_REASON:
  239|  3.37k|{
  240|  3.37k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  3.37k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  3.37k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 3.37k]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  3.37k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  3.37k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  3.37k|}
a_d2i_fp.c:ERR_GET_REASON:
  239|   916k|{
  240|   916k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|   916k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|   916k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 916k]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|   916k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|   916k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|   916k|}
conf_def.c:ERR_GET_REASON:
  239|    769|{
  240|    769|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|    769|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|    769|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 769]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|    769|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|    769|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|    769|}

ssl_lib.c:lh_SSL_SESSION_new:
  334|  3.13k|    {                                                                                                                      \
  335|  3.13k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|  3.13k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|  3.13k|            lh_##type##_doall_thunk,                                                                                       \
  338|  3.13k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|  3.13k|    }                                                                                                                      \
ssl_lib.c:lh_SSL_SESSION_hfn_thunk:
  260|     27|    {                                                                                                                      \
  261|     27|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|     27|        return hfn_conv((const type *)data);                                                                               \
  263|     27|    }                                                                                                                      \
ssl_lib.c:lh_SSL_SESSION_free:
  271|  3.13k|    {                                                                                                                      \
  272|  3.13k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|  3.13k|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_retrieve:
  291|     27|    {                                                                                                                      \
  292|     27|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|     27|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_get_down_load:
  306|  3.13k|    {                                                                                                                      \
  307|  3.13k|        return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh);                                                              \
  308|  3.13k|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_set_down_load:
  311|  6.26k|    {                                                                                                                      \
  312|  6.26k|        OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl);                                                                 \
  313|  6.26k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_new:
  334|    769|    {                                                                                                                      \
  335|    769|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|    769|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|    769|            lh_##type##_doall_thunk,                                                                                       \
  338|    769|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|    769|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_hfn_thunk:
  260|   458k|    {                                                                                                                      \
  261|   458k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   458k|        return hfn_conv((const type *)data);                                                                               \
  263|   458k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_cfn_thunk:
  265|   458k|    {                                                                                                                      \
  266|   458k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   458k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   458k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_doall:
  328|  2.45k|    {                                                                                                                      \
  329|  2.45k|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|  2.45k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_free:
  271|    768|    {                                                                                                                      \
  272|    768|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|    768|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_flush:
  276|  1.68k|    {                                                                                                                      \
  277|  1.68k|        OPENSSL_LH_flush((OPENSSL_LHASH *)lh);                                                                             \
  278|  1.68k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_retrieve:
  291|   458k|    {                                                                                                                      \
  292|   458k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   458k|    }                                                                                                                      \
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.51k|    {                                                                                                          \
  178|  4.51k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                \
  179|  4.51k|        return cfn_conv((const type *)da, (const type *)db);                                                   \
  180|  4.51k|    }                                                                                                          \
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|   827k|    {                                                                                                                      \
  261|   827k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   827k|        return hfn_conv((const type *)data);                                                                               \
  263|   827k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_cfn_thunk:
  265|   716k|    {                                                                                                                      \
  266|   716k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   716k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   716k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_retrieve:
  291|   826k|    {                                                                                                                      \
  292|   826k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   826k|    }                                                                                                                      \
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.34k|    {                                                                                       \
  372|  1.34k|        OPENSSL_LH_doall_arg_thunk((OPENSSL_LHASH *)lh,                                     \
  373|  1.34k|            lh_##type##_doall_##argtype##_thunk,                                            \
  374|  1.34k|            (OPENSSL_LH_DOALL_FUNCARG)fn,                                                   \
  375|  1.34k|            (void *)arg);                                                                   \
  376|  1.34k|    }                                                                                       \
o_names.c:lh_OBJ_NAME_doall_OBJ_DOALL_thunk:
  363|   326k|    {                                                                                       \
  364|   326k|        void (*fn_conv)(cbargtype *, argtype *) = (void (*)(cbargtype *, argtype *))fn;     \
  365|   326k|        fn_conv((cbargtype *)node, (argtype *)arg);                                         \
  366|   326k|    }                                                                                       \
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|   385k|    {                                                                                                                      \
  261|   385k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   385k|        return hfn_conv((const type *)data);                                                                               \
  263|   385k|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_retrieve:
  291|   385k|    {                                                                                                                      \
  292|   385k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   385k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_doall:
  328|    768|    {                                                                                                                      \
  329|    768|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|    768|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_free:
  271|    768|    {                                                                                                                      \
  272|    768|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|    768|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_new:
  334|    769|    {                                                                                                                      \
  335|    769|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|    769|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|    769|            lh_##type##_doall_thunk,                                                                                       \
  338|    769|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|    769|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_hfn_thunk:
  260|   186k|    {                                                                                                                      \
  261|   186k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   186k|        return hfn_conv((const type *)data);                                                                               \
  263|   186k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_cfn_thunk:
  265|   182k|    {                                                                                                                      \
  266|   182k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   182k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   182k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_doall_thunk:
  316|  1.21k|    {                                                                                                                      \
  317|  1.21k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  1.21k|        doall_conv((type *)node);                                                                                          \
  319|  1.21k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_retrieve:
  291|   185k|    {                                                                                                                      \
  292|   185k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   185k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_insert:
  281|  1.23k|    {                                                                                                                      \
  282|  1.23k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  1.23k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_error:
  296|  1.23k|    {                                                                                                                      \
  297|  1.23k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  1.23k|    }                                                                                                                      \
property.c:lh_QUERY_new:
  334|   183k|    {                                                                                                                      \
  335|   183k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|   183k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|   183k|            lh_##type##_doall_thunk,                                                                                       \
  338|   183k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|   183k|    }                                                                                                                      \
property.c:lh_QUERY_hfn_thunk:
  260|   732k|    {                                                                                                                      \
  261|   732k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   732k|        return hfn_conv((const type *)data);                                                                               \
  263|   732k|    }                                                                                                                      \
property.c:lh_QUERY_cfn_thunk:
  265|   664k|    {                                                                                                                      \
  266|   664k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   664k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   664k|    }                                                                                                                      \
property.c:lh_QUERY_doall_thunk:
  316|  32.5k|    {                                                                                                                      \
  317|  32.5k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  32.5k|        doall_conv((type *)node);                                                                                          \
  319|  32.5k|    }                                                                                                                      \
property.c:lh_QUERY_doall:
  328|   184k|    {                                                                                                                      \
  329|   184k|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|   184k|    }                                                                                                                      \
property.c:lh_QUERY_free:
  271|   183k|    {                                                                                                                      \
  272|   183k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|   183k|    }                                                                                                                      \
property.c:lh_QUERY_num_items:
  301|  1.13k|    {                                                                                                                      \
  302|  1.13k|        return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh);                                                                  \
  303|  1.13k|    }                                                                                                                      \
property.c:lh_QUERY_flush:
  276|  1.13k|    {                                                                                                                      \
  277|  1.13k|        OPENSSL_LH_flush((OPENSSL_LHASH *)lh);                                                                             \
  278|  1.13k|    }                                                                                                                      \
property.c:lh_QUERY_retrieve:
  291|   700k|    {                                                                                                                      \
  292|   700k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   700k|    }                                                                                                                      \
property.c:lh_QUERY_insert:
  281|  32.6k|    {                                                                                                                      \
  282|  32.6k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  32.6k|    }                                                                                                                      \
property.c:lh_QUERY_error:
  296|  32.6k|    {                                                                                                                      \
  297|  32.6k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  32.6k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_doall:
  328|  1.53k|    {                                                                                                                      \
  329|  1.53k|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|  1.53k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_free:
  271|  1.53k|    {                                                                                                                      \
  272|  1.53k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|  1.53k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_new:
  334|  1.53k|    {                                                                                                                      \
  335|  1.53k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|  1.53k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|  1.53k|            lh_##type##_doall_thunk,                                                                                       \
  338|  1.53k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|  1.53k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_hfn_thunk:
  260|   128k|    {                                                                                                                      \
  261|   128k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   128k|        return hfn_conv((const type *)data);                                                                               \
  263|   128k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_cfn_thunk:
  265|  33.8k|    {                                                                                                                      \
  266|  33.8k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|  33.8k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|  33.8k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_doall_thunk:
  316|  7.95k|    {                                                                                                                      \
  317|  7.95k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  7.95k|        doall_conv((type *)node);                                                                                          \
  319|  7.95k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_retrieve:
  291|   120k|    {                                                                                                                      \
  292|   120k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   120k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_insert:
  281|  7.98k|    {                                                                                                                      \
  282|  7.98k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  7.98k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_error:
  296|  7.98k|    {                                                                                                                      \
  297|  7.98k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  7.98k|    }                                                                                                                      \

OBJ_bsearch_ssl_cipher_id:
  142|    122|    {                                                                  \
  143|    122|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),    \
  144|    122|            nm##_cmp_BSEARCH_CMP_FN);                                  \
  145|    122|    }                                                                  \
ssl_lib.c:ssl_cipher_id_cmp_BSEARCH_CMP_FN:
  136|    504|    {                                                                  \
  137|    504|        type1 const *a = a_;                                           \
  138|    504|        type2 const *b = b_;                                           \
  139|    504|        return nm##_cmp(a, b);                                         \
  140|    504|    }                                                                  \
obj_dat.c:OBJ_bsearch_ln:
  128|   118k|    {                                                                      \
  129|   118k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   118k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   118k|    }                                                                      \
obj_dat.c:ln_cmp_BSEARCH_CMP_FN:
  122|  1.17M|    {                                                                      \
  123|  1.17M|        type1 const *a = a_;                                               \
  124|  1.17M|        type2 const *b = b_;                                               \
  125|  1.17M|        return nm##_cmp(a, b);                                             \
  126|  1.17M|    }                                                                      \
obj_dat.c:OBJ_bsearch_sn:
  128|   154k|    {                                                                      \
  129|   154k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   154k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   154k|    }                                                                      \
obj_dat.c:sn_cmp_BSEARCH_CMP_FN:
  122|  1.61M|    {                                                                      \
  123|  1.61M|        type1 const *a = a_;                                               \
  124|  1.61M|        type2 const *b = b_;                                               \
  125|  1.61M|        return nm##_cmp(a, b);                                             \
  126|  1.61M|    }                                                                      \
obj_dat.c:OBJ_bsearch_obj:
  128|  7.76M|    {                                                                      \
  129|  7.76M|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  7.76M|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  7.76M|    }                                                                      \
obj_dat.c:obj_cmp_BSEARCH_CMP_FN:
  122|  75.3M|    {                                                                      \
  123|  75.3M|        type1 const *a = a_;                                               \
  124|  75.3M|        type2 const *b = b_;                                               \
  125|  75.3M|        return nm##_cmp(a, b);                                             \
  126|  75.3M|    }                                                                      \
obj_xref.c:OBJ_bsearch_sig:
  128|   811k|    {                                                                      \
  129|   811k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   811k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   811k|    }                                                                      \
obj_xref.c:sig_cmp_BSEARCH_CMP_FN:
  122|  4.06M|    {                                                                      \
  123|  4.06M|        type1 const *a = a_;                                               \
  124|  4.06M|        type2 const *b = b_;                                               \
  125|  4.06M|        return nm##_cmp(a, b);                                             \
  126|  4.06M|    }                                                                      \
v3_lib.c:OBJ_bsearch_ext:
  128|  1.31M|    {                                                                      \
  129|  1.31M|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  1.31M|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  1.31M|    }                                                                      \
v3_lib.c:ext_cmp_BSEARCH_CMP_FN:
  122|  6.63M|    {                                                                      \
  123|  6.63M|        type1 const *a = a_;                                               \
  124|  6.63M|        type2 const *b = b_;                                               \
  125|  6.63M|        return nm##_cmp(a, b);                                             \
  126|  6.63M|    }                                                                      \
v3_purp.c:OBJ_bsearch_nid:
  128|   789k|    {                                                                      \
  129|   789k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   789k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   789k|    }                                                                      \
v3_purp.c:nid_cmp_BSEARCH_CMP_FN:
  122|  1.97M|    {                                                                      \
  123|  1.97M|        type1 const *a = a_;                                               \
  124|  1.97M|        type2 const *b = b_;                                               \
  125|  1.97M|        return nm##_cmp(a, b);                                             \
  126|  1.97M|    }                                                                      \
ameth_lib.c:OBJ_bsearch_ameth:
  128|  1.19M|    {                                                                      \
  129|  1.19M|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  1.19M|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  1.19M|    }                                                                      \
ameth_lib.c:ameth_cmp_BSEARCH_CMP_FN:
  122|  3.43M|    {                                                                      \
  123|  3.43M|        type1 const *a = a_;                                               \
  124|  3.43M|        type2 const *b = b_;                                               \
  125|  3.43M|        return nm##_cmp(a, b);                                             \
  126|  3.43M|    }                                                                      \

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

s3_lib.c:ossl_check_X509_NAME_sk_type:
   63|  11.6k|    {                                                                                                                    \
   64|  11.6k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  11.6k|    }                                                                                                                    \
s3_lib.c:ossl_check_X509_NAME_freefunc_type:
   75|  11.6k|    {                                                                                                                    \
   76|  11.6k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  11.6k|    }
ssl_ciph.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|   339k|    {                                                                                                                    \
   60|   339k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   339k|    }                                                                                                                    \
ssl_ciph.c:ossl_check_SSL_CIPHER_sk_type:
   63|   226k|    {                                                                                                                    \
   64|   226k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   226k|    }                                                                                                                    \
ssl_ciph.c:ossl_check_SSL_CIPHER_type:
   55|   208k|    {                                                                                                                    \
   56|   208k|        return ptr;                                                                                                      \
   57|   208k|    }                                                                                                                    \
ssl_ciph.c:ossl_check_SSL_CIPHER_compfunc_type:
   67|  3.64k|    {                                                                                                                    \
   68|  3.64k|        return (OPENSSL_sk_compfunc)cmp;                                                                                 \
   69|  3.64k|    }                                                                                                                    \
ssl_lib.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|   863k|    {                                                                                                                    \
   60|   863k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   863k|    }                                                                                                                    \
ssl_lib.c:sk_danetls_record_pop_free:
  170|  2.32k|    {                                                                                                                      \
  171|  2.32k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  2.32k|                                                                                                                           \
  173|  2.32k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  2.32k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  2.32k|                                                                                                                           \
  176|  2.32k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  2.32k|    }                                                                                                                      \
ssl_lib.c:ossl_check_SSL_CIPHER_sk_type:
   63|   220k|    {                                                                                                                    \
   64|   220k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   220k|    }                                                                                                                    \
ssl_lib.c:ossl_check_X509_EXTENSION_sk_type:
   63|  2.32k|    {                                                                                                                    \
   64|  2.32k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  2.32k|    }                                                                                                                    \
ssl_lib.c:ossl_check_X509_EXTENSION_freefunc_type:
   75|  2.32k|    {                                                                                                                    \
   76|  2.32k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  2.32k|    }
ssl_lib.c:ossl_check_OCSP_RESPID_sk_type:
   63|  2.32k|    {                                                                                                                    \
   64|  2.32k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  2.32k|    }                                                                                                                    \
ssl_lib.c:ossl_check_OCSP_RESPID_freefunc_type:
   75|  2.32k|    {                                                                                                                    \
   76|  2.32k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  2.32k|    }
ssl_lib.c:sk_OCSP_RESPONSE_pop_free:
  170|  2.32k|    {                                                                                                                      \
  171|  2.32k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  2.32k|                                                                                                                           \
  173|  2.32k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  2.32k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  2.32k|                                                                                                                           \
  176|  2.32k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  2.32k|    }                                                                                                                      \
ssl_lib.c:ossl_check_X509_NAME_sk_type:
   63|  10.9k|    {                                                                                                                    \
   64|  10.9k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  10.9k|    }                                                                                                                    \
ssl_lib.c:ossl_check_X509_NAME_freefunc_type:
   75|  10.9k|    {                                                                                                                    \
   76|  10.9k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  10.9k|    }
ssl_lib.c:ossl_check_SRTP_PROTECTION_PROFILE_sk_type:
   63|  5.45k|    {                                                                                                                    \
   64|  5.45k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  5.45k|    }                                                                                                                    \
ssl_lib.c:ossl_check_SSL_CIPHER_type:
   55|   201k|    {                                                                                                                    \
   56|   201k|        return ptr;                                                                                                      \
   57|   201k|    }                                                                                                                    \
ssl_sess.c:sk_SSL_SESSION_new_null:
  115|  3.13k|    {                                                                                                                      \
  116|  3.13k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  3.13k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  3.13k|                                                                                                                           \
  119|  3.13k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  3.13k|                                                                                                                           \
  121|  3.13k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  3.13k|    }                                                                                                                      \
ssl_sess.c:sk_SSL_SESSION_pop_free:
  170|  3.13k|    {                                                                                                                      \
  171|  3.13k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  3.13k|                                                                                                                           \
  173|  3.13k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  3.13k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  3.13k|                                                                                                                           \
  176|  3.13k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  3.13k|    }                                                                                                                      \
extensions.c:sk_OCSP_RESPONSE_pop_free:
  170|     71|    {                                                                                                                      \
  171|     71|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|     71|                                                                                                                           \
  173|     71|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|     71|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|     71|                                                                                                                           \
  176|     71|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|     71|    }                                                                                                                      \
extensions.c:ossl_check_const_X509_NAME_sk_type:
   59|  2.17k|    {                                                                                                                    \
   60|  2.17k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  2.17k|    }                                                                                                                    \
extensions_clnt.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|  21.7k|    {                                                                                                                    \
   60|  21.7k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  21.7k|    }                                                                                                                    \
extensions_clnt.c:ossl_check_SSL_CIPHER_sk_type:
   63|  6.76k|    {                                                                                                                    \
   64|  6.76k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  6.76k|    }                                                                                                                    \
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|      3|    {                                                                                                                    \
   64|      3|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|      3|    }                                                                                                                    \
statem_clnt.c:ossl_check_SSL_CIPHER_type:
   55|      3|    {                                                                                                                    \
   56|      3|        return ptr;                                                                                                      \
   57|      3|    }                                                                                                                    \
tasn_dec.c:ossl_check_ASN1_VALUE_sk_type:
   63|  8.15M|    {                                                                                                                    \
   64|  8.15M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  8.15M|    }                                                                                                                    \
tasn_dec.c:ossl_check_ASN1_VALUE_type:
   55|  8.15M|    {                                                                                                                    \
   56|  8.15M|        return ptr;                                                                                                      \
   57|  8.15M|    }                                                                                                                    \
tasn_enc.c:sk_const_ASN1_VALUE_num:
   98|  22.7M|    {                                                                                                                      \
   99|  22.7M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  22.7M|    }                                                                                                                      \
tasn_enc.c:sk_const_ASN1_VALUE_value:
  102|  9.74M|    {                                                                                                                      \
  103|  9.74M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  9.74M|    }                                                                                                                      \
tasn_fre.c:ossl_check_const_ASN1_VALUE_sk_type:
   59|  5.91M|    {                                                                                                                    \
   60|  5.91M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  5.91M|    }                                                                                                                    \
tasn_fre.c:ossl_check_ASN1_VALUE_sk_type:
   63|  2.59M|    {                                                                                                                    \
   64|  2.59M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  2.59M|    }                                                                                                                    \
ct_log.c:ossl_check_CTLOG_sk_type:
   63|  3.13k|    {                                                                                                                    \
   64|  3.13k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  3.13k|    }                                                                                                                    \
ct_log.c:ossl_check_CTLOG_freefunc_type:
   75|  3.13k|    {                                                                                                                    \
   76|  3.13k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  3.13k|    }
ct_sct.c:ossl_check_SCT_sk_type:
   63|  2.32k|    {                                                                                                                    \
   64|  2.32k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  2.32k|    }                                                                                                                    \
ct_sct.c:ossl_check_SCT_freefunc_type:
   75|  2.32k|    {                                                                                                                    \
   76|  2.32k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  2.32k|    }
dso_lib.c:ossl_check_void_sk_type:
   63|     87|    {                                                                                                                    \
   64|     87|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|     87|    }                                                                                                                    \
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|   916k|    {                                                                                                                      \
   99|   916k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   916k|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_set_cmp_func:
  220|      4|    {                                                                                                                      \
  221|      4|        return (sk_##t1##_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare);             \
  222|      4|    }
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_value:
  102|  3.51M|    {                                                                                                                      \
  103|  3.51M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  3.51M|    }                                                                                                                      \
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|   458k|    {                                                                                                                      \
  171|   458k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   458k|                                                                                                                           \
  173|   458k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   458k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   458k|                                                                                                                           \
  176|   458k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   458k|    }                                                                                                                      \
decoder_meth.c:sk_OSSL_DECODER_INSTANCE_freefunc_thunk:
   85|  2.60M|    {                                                                                                                      \
   86|  2.60M|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  2.60M|        freefunc((t3 *)ptr);                                                                                               \
   88|  2.60M|    }                                                                                                                      \
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|   606k|    {                                                                                                                      \
   86|   606k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|   606k|        freefunc((t3 *)ptr);                                                                                               \
   88|   606k|    }                                                                                                                      \
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|   458k|    {                                                                                                                      \
   99|   458k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   458k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_value:
  102|   458k|    {                                                                                                                      \
  103|   458k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   458k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_pop_free:
  170|   458k|    {                                                                                                                      \
  171|   458k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   458k|                                                                                                                           \
  173|   458k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   458k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   458k|                                                                                                                           \
  176|   458k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   458k|    }                                                                                                                      \
decoder_pkey.c:sk_OSSL_DECODER_INSTANCE_deep_copy:
  214|   458k|    {                                                                                                                      \
  215|   458k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  216|   458k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  217|   458k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  218|   458k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_deep_copy:
  214|   458k|    {                                                                                                                      \
  215|   458k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  216|   458k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  217|   458k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  218|   458k|    }                                                                                                                      \
keymgmt_lib.c:sk_OP_CACHE_ELEM_pop_free:
  170|   927k|    {                                                                                                                      \
  171|   927k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   927k|                                                                                                                           \
  173|   927k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   927k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   927k|                                                                                                                           \
  176|   927k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   927k|    }                                                                                                                      \
p_lib.c:ossl_check_X509_ATTRIBUTE_sk_type:
   63|   927k|    {                                                                                                                    \
   64|   927k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   927k|    }                                                                                                                    \
p_lib.c:ossl_check_X509_ATTRIBUTE_freefunc_type:
   75|   927k|    {                                                                                                                    \
   76|   927k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   927k|    }
core_namemap.c:sk_NAMES_value:
  102|   830k|    {                                                                                                                      \
  103|   830k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   830k|    }                                                                                                                      \
core_namemap.c:ossl_check_const_OPENSSL_STRING_sk_type:
   59|  5.19M|    {                                                                                                                    \
   60|  5.19M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  5.19M|    }                                                                                                                    \
core_namemap.c:ossl_check_OPENSSL_STRING_sk_type:
   63|  1.17M|    {                                                                                                                    \
   64|  1.17M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  1.17M|    }                                                                                                                    \
core_namemap.c:sk_OPENSSL_STRING_freefunc_thunk:
   42|   401k|    {                                                                                                                    \
   43|   401k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|   401k|        freefunc((t3 *)ptr);                                                                                             \
   45|   401k|    }                                                                                                                    \
core_namemap.c:ossl_check_OPENSSL_STRING_type:
   55|   402k|    {                                                                                                                    \
   56|   402k|        return ptr;                                                                                                      \
   57|   402k|    }                                                                                                                    \
core_namemap.c:sk_NAMES_push:
  154|   174k|    {                                                                                                                      \
  155|   174k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|   174k|    }                                                                                                                      \
core_namemap.c:sk_NAMES_num:
   98|   174k|    {                                                                                                                      \
   99|   174k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   174k|    }                                                                                                                      \
core_namemap.c:ossl_check_OPENSSL_STRING_freefunc_type:
   75|   173k|    {                                                                                                                    \
   76|   173k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   173k|    }
core_namemap.c:sk_NAMES_new_null:
  115|    769|    {                                                                                                                      \
  116|    769|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|    769|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|    769|                                                                                                                           \
  119|    769|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|    769|                                                                                                                           \
  121|    769|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|    769|    }                                                                                                                      \
core_namemap.c:sk_NAMES_freefunc_thunk:
   85|   173k|    {                                                                                                                      \
   86|   173k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|   173k|        freefunc((t3 *)ptr);                                                                                               \
   88|   173k|    }                                                                                                                      \
core_namemap.c:sk_NAMES_pop_free:
  170|    768|    {                                                                                                                      \
  171|    768|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|    768|                                                                                                                           \
  173|    768|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|    768|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|    768|                                                                                                                           \
  176|    768|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|    768|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_pop_free:
  170|  13.8k|    {                                                                                                                      \
  171|  13.8k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  13.8k|                                                                                                                           \
  173|  13.8k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  13.8k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  13.8k|                                                                                                                           \
  176|  13.8k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  13.8k|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_num:
   98|  10.1M|    {                                                                                                                      \
   99|  10.1M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  10.1M|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_new_null:
  115|      1|    {                                                                                                                      \
  116|      1|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      1|                                                                                                                           \
  119|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      1|                                                                                                                           \
  121|      1|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      1|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_push:
  154|      2|    {                                                                                                                      \
  155|      2|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|      2|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_set:
  183|      1|    {                                                                                                                      \
  184|      1|        return (t2 *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr);                                          \
  185|      1|    }                                                                                                                      \
ex_data.c:ossl_check_const_void_sk_type:
   59|  2.32k|    {                                                                                                                    \
   60|  2.32k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  2.32k|    }                                                                                                                    \
ex_data.c:ossl_check_void_sk_type:
   63|  5.10M|    {                                                                                                                    \
   64|  5.10M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  5.10M|    }                                                                                                                    \
ex_data.c:ossl_check_void_type:
   55|  4.64k|    {                                                                                                                    \
   56|  4.64k|        return ptr;                                                                                                      \
   57|  4.64k|    }                                                                                                                    \
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.39k|    {                                                                                                                      \
   99|  3.39k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  3.39k|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_value:
  102|  1.69k|    {                                                                                                                      \
  103|  1.69k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  1.69k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_new_null:
  115|  4.00k|    {                                                                                                                      \
  116|  4.00k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  4.00k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  4.00k|                                                                                                                           \
  119|  4.00k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  4.00k|                                                                                                                           \
  121|  4.00k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  4.00k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_pop:
  162|  4.00k|    {                                                                                                                      \
  163|  4.00k|        return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk);                                                                  \
  164|  4.00k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_free:
  137|  4.00k|    {                                                                                                                      \
  138|  4.00k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|  4.00k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_push:
  154|  4.00k|    {                                                                                                                      \
  155|  4.00k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  4.00k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_num:
   98|  16.0k|    {                                                                                                                      \
   99|  16.0k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  16.0k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_value:
  102|  4.00k|    {                                                                                                                      \
  103|  4.00k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  4.00k|    }                                                                                                                      \
provider_conf.c:sk_OSSL_PROVIDER_pop_free:
  170|    768|    {                                                                                                                      \
  171|    768|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|    768|                                                                                                                           \
  173|    768|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|    768|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|    768|                                                                                                                           \
  176|    768|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|    768|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_pop_free:
  170|  1.69k|    {                                                                                                                      \
  171|  1.69k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  1.69k|                                                                                                                           \
  173|  1.69k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  1.69k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  1.69k|                                                                                                                           \
  176|  1.69k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  1.69k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_pop_free:
  170|    768|    {                                                                                                                      \
  171|    768|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|    768|                                                                                                                           \
  173|    768|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|    768|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|    768|                                                                                                                           \
  176|    768|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|    768|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_freefunc_thunk:
   85|  1.61k|    {                                                                                                                      \
   86|  1.61k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  1.61k|        freefunc((t3 *)ptr);                                                                                               \
   88|  1.61k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_pop_free:
  170|    768|    {                                                                                                                      \
  171|    768|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|    768|                                                                                                                           \
  173|    768|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|    768|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|    768|                                                                                                                           \
  176|    768|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|    768|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_new:
  106|    769|    {                                                                                                                      \
  107|    769|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|    769|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|    769|                                                                                                                           \
  110|    769|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|    769|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|    769|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|    769|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_cmpfunc_thunk:
   90|  8.04k|    {                                                                                                                      \
   91|  8.04k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp);   \
   92|  8.04k|        const t3 *const *at = (const t3 *const *)a;                                                                        \
   93|  8.04k|        const t3 *const *bt = (const t3 *const *)b;                                                                        \
   94|  8.04k|                                                                                                                           \
   95|  8.04k|        return realcmp(at, bt);                                                                                            \
   96|  8.04k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_new_null:
  115|    769|    {                                                                                                                      \
  116|    769|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|    769|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|    769|                                                                                                                           \
  119|    769|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|    769|                                                                                                                           \
  121|    769|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|    769|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_is_sorted:
  204|  4.47k|    {                                                                                                                      \
  205|  4.47k|        return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk);                                                            \
  206|  4.47k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_sort:
  200|    595|    {                                                                                                                      \
  201|    595|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  202|    595|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_find:
  187|  4.71k|    {                                                                                                                      \
  188|  4.71k|        return OPENSSL_sk_find((const OPENSSL_STACK *)sk, (const void *)ptr);                                              \
  189|  4.71k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_value:
  102|   466k|    {                                                                                                                      \
  103|   466k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   466k|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_deep_copy:
  214|  1.69k|    {                                                                                                                      \
  215|  1.69k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  216|  1.69k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  217|  1.69k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  218|  1.69k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_push:
  154|  1.61k|    {                                                                                                                      \
  155|  1.61k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  1.61k|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_num:
   98|  5.64k|    {                                                                                                                      \
   99|  5.64k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  5.64k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_dup:
  208|  93.6k|    {                                                                                                                      \
  209|  93.6k|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);                                                  \
  210|  93.6k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_num:
   98|  93.6k|    {                                                                                                                      \
   99|  93.6k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  93.6k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_free:
  137|  93.6k|    {                                                                                                                      \
  138|  93.6k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|  93.6k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_num:
   98|  2.45k|    {                                                                                                                      \
   99|  2.45k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  2.45k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_find:
  187|  3.03k|    {                                                                                                                      \
  188|  3.03k|        return OPENSSL_sk_find((const OPENSSL_STACK *)sk, (const void *)ptr);                                              \
  189|  3.03k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_value:
  102|  3.03k|    {                                                                                                                      \
  103|  3.03k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  3.03k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_new:
  106|      2|    {                                                                                                                      \
  107|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|      2|                                                                                                                           \
  110|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|      2|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|      2|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_cmpfunc_thunk:
   90|  3.03k|    {                                                                                                                      \
   91|  3.03k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp);   \
   92|  3.03k|        const t3 *const *at = (const t3 *const *)a;                                                                        \
   93|  3.03k|        const t3 *const *bt = (const t3 *const *)b;                                                                        \
   94|  3.03k|                                                                                                                           \
   95|  3.03k|        return realcmp(at, bt);                                                                                            \
   96|  3.03k|    }                                                                                                                      \
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|   458k|    {                                                                                                                    \
   43|   458k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|   458k|        freefunc((t3 *)ptr);                                                                                             \
   45|   458k|    }                                                                                                                    \
pem_info.c:ossl_check_X509_INFO_sk_type:
   63|   458k|    {                                                                                                                    \
   64|   458k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   458k|    }                                                                                                                    \
pem_info.c:ossl_check_X509_INFO_type:
   55|   458k|    {                                                                                                                    \
   56|   458k|        return ptr;                                                                                                      \
   57|   458k|    }                                                                                                                    \
property.c:sk_IMPLEMENTATION_new_null:
  115|   183k|    {                                                                                                                      \
  116|   183k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|   183k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|   183k|                                                                                                                           \
  119|   183k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|   183k|                                                                                                                           \
  121|   183k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|   183k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_freefunc_thunk:
   85|   183k|    {                                                                                                                      \
   86|   183k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|   183k|        freefunc((t3 *)ptr);                                                                                               \
   88|   183k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_num:
   98|   640k|    {                                                                                                                      \
   99|   640k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   640k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_value:
  102|   266k|    {                                                                                                                      \
  103|   266k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   266k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_push:
  154|   184k|    {                                                                                                                      \
  155|   184k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|   184k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_pop_free:
  170|   183k|    {                                                                                                                      \
  171|   183k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   183k|                                                                                                                           \
  173|   183k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   183k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   183k|                                                                                                                           \
  176|   183k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   183k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_delete:
  145|    546|    {                                                                                                                      \
  146|    546|        return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i);                                                            \
  147|    546|    }                                                                                                                      \
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|  39.7k|    {                                                                                                                      \
  107|  39.7k|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|  39.7k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|  39.7k|                                                                                                                           \
  110|  39.7k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|  39.7k|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|  39.7k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|  39.7k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_freefunc_thunk:
   85|  95.8k|    {                                                                                                                      \
   86|  95.8k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  95.8k|        freefunc((t3 *)ptr);                                                                                               \
   88|  95.8k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_cmpfunc_thunk:
   90|  43.3k|    {                                                                                                                      \
   91|  43.3k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp);   \
   92|  43.3k|        const t3 *const *at = (const t3 *const *)a;                                                                        \
   93|  43.3k|        const t3 *const *bt = (const t3 *const *)b;                                                                        \
   94|  43.3k|                                                                                                                           \
   95|  43.3k|        return realcmp(at, bt);                                                                                            \
   96|  43.3k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_push:
  154|  95.8k|    {                                                                                                                      \
  155|  95.8k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  95.8k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_num:
   98|  17.7k|    {                                                                                                                      \
   99|  17.7k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  17.7k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_sort:
  200|  17.7k|    {                                                                                                                      \
  201|  17.7k|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  202|  17.7k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_value:
  102|  28.0k|    {                                                                                                                      \
  103|  28.0k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  28.0k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_pop_free:
  170|  39.7k|    {                                                                                                                      \
  171|  39.7k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  39.7k|                                                                                                                           \
  173|  39.7k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  39.7k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  39.7k|                                                                                                                           \
  176|  39.7k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  39.7k|    }                                                                                                                      \
property_string.c:ossl_check_OPENSSL_CSTRING_sk_type:
   63|  9.51k|    {                                                                                                                    \
   64|  9.51k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  9.51k|    }                                                                                                                    \
property_string.c:ossl_check_OPENSSL_CSTRING_type:
   55|  7.98k|    {                                                                                                                    \
   56|  7.98k|        return ptr;                                                                                                      \
   57|  7.98k|    }                                                                                                                    \
property_string.c:ossl_check_const_OPENSSL_CSTRING_sk_type:
   59|  2.18k|    {                                                                                                                    \
   60|  2.18k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  2.18k|    }                                                                                                                    \
rsa_backend.c:sk_BIGNUM_const_new_null:
  115|   931k|    {                                                                                                                      \
  116|   931k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|   931k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|   931k|                                                                                                                           \
  119|   931k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|   931k|                                                                                                                           \
  121|   931k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|   931k|    }                                                                                                                      \
rsa_backend.c:sk_BIGNUM_const_free:
  137|   931k|    {                                                                                                                      \
  138|   931k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|   931k|    }                                                                                                                      \
rsa_lib.c:sk_RSA_PRIME_INFO_pop_free:
  170|   310k|    {                                                                                                                      \
  171|   310k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   310k|                                                                                                                           \
  173|   310k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   310k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   310k|                                                                                                                           \
  176|   310k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   310k|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_new_null:
  115|   931k|    {                                                                                                                      \
  116|   931k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|   931k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|   931k|                                                                                                                           \
  119|   931k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|   931k|                                                                                                                           \
  121|   931k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|   931k|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_num:
   98|   931k|    {                                                                                                                      \
   99|   931k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   931k|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_free:
  137|   931k|    {                                                                                                                      \
  138|   931k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|   931k|    }                                                                                                                      \
rsa_ossl.c:sk_RSA_PRIME_INFO_num:
   98|   310k|    {                                                                                                                      \
   99|   310k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   310k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_pop_free:
  170|  2.13k|    {                                                                                                                      \
  171|  2.13k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  2.13k|                                                                                                                           \
  173|  2.13k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  2.13k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  2.13k|                                                                                                                           \
  176|  2.13k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  2.13k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_freefunc_thunk:
   85|  5.22k|    {                                                                                                                      \
   86|  5.22k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  5.22k|        freefunc((t3 *)ptr);                                                                                               \
   88|  5.22k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_HASH_pop_free:
  170|  5.22k|    {                                                                                                                      \
  171|  5.22k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  5.22k|                                                                                                                           \
  173|  5.22k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  5.22k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  5.22k|                                                                                                                           \
  176|  5.22k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  5.22k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_num:
   98|   484k|    {                                                                                                                      \
   99|   484k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   484k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_value:
  102|   462k|    {                                                                                                                      \
  103|   462k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   462k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_new_null:
  115|  2.13k|    {                                                                                                                      \
  116|  2.13k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  2.13k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  2.13k|                                                                                                                           \
  119|  2.13k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  2.13k|                                                                                                                           \
  121|  2.13k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  2.13k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_HASH_new:
  106|  5.22k|    {                                                                                                                      \
  107|  5.22k|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|  5.22k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|  5.22k|                                                                                                                           \
  110|  5.22k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|  5.22k|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|  5.22k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|  5.22k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_push:
  154|  5.22k|    {                                                                                                                      \
  155|  5.22k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  5.22k|    }                                                                                                                      \
by_file.c:ossl_check_const_X509_INFO_sk_type:
   59|   920k|    {                                                                                                                    \
   60|   920k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   920k|    }                                                                                                                    \
by_file.c:ossl_check_X509_INFO_sk_type:
   63|  3.80k|    {                                                                                                                    \
   64|  3.80k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  3.80k|    }                                                                                                                    \
by_file.c:ossl_check_X509_INFO_freefunc_type:
   75|  3.80k|    {                                                                                                                    \
   76|  3.80k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  3.80k|    }
t_x509.c:ossl_check_X509_sk_type:
   63|  80.5k|    {                                                                                                                    \
   64|  80.5k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  80.5k|    }                                                                                                                    \
t_x509.c:ossl_check_X509_freefunc_type:
   75|  80.5k|    {                                                                                                                    \
   76|  80.5k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  80.5k|    }
v3_lib.c:ossl_check_const_X509_EXTENSION_sk_type:
   59|  37.4M|    {                                                                                                                    \
   60|  37.4M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  37.4M|    }                                                                                                                    \
v3_purp.c:ossl_check_const_DIST_POINT_sk_type:
   59|   485k|    {                                                                                                                    \
   60|   485k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   485k|    }                                                                                                                    \
v3_purp.c:ossl_check_GENERAL_NAME_sk_type:
   63|   399k|    {                                                                                                                    \
   64|   399k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   399k|    }                                                                                                                    \
v3_purp.c:ossl_check_GENERAL_NAME_freefunc_type:
   75|   399k|    {                                                                                                                    \
   76|   399k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   399k|    }
v3_purp.c:ossl_check_DIST_POINT_sk_type:
   63|   399k|    {                                                                                                                    \
   64|   399k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   399k|    }                                                                                                                    \
v3_purp.c:ossl_check_DIST_POINT_freefunc_type:
   75|   399k|    {                                                                                                                    \
   76|   399k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   399k|    }
v3_purp.c:ossl_check_IPAddressFamily_sk_type:
   63|   399k|    {                                                                                                                    \
   64|   399k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   399k|    }                                                                                                                    \
v3_purp.c:ossl_check_IPAddressFamily_freefunc_type:
   75|   399k|    {                                                                                                                    \
   76|   399k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   399k|    }
x509_lu.c:ossl_check_X509_OBJECT_compfunc_type:
   67|   261k|    {                                                                                                                    \
   68|   261k|        return (OPENSSL_sk_compfunc)cmp;                                                                                 \
   69|   261k|    }                                                                                                                    \
x509_lu.c:sk_X509_OBJECT_cmpfunc_thunk:
   47|   199k|    {                                                                                                                    \
   48|   199k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp); \
   49|   199k|        const t3 *const *at = (const t3 *const *)a;                                                                      \
   50|   199k|        const t3 *const *bt = (const t3 *const *)b;                                                                      \
   51|   199k|                                                                                                                         \
   52|   199k|        return realcmp(at, bt);                                                                                          \
   53|   199k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_OBJECT_sk_type:
   63|   719k|    {                                                                                                                    \
   64|   719k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   719k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_LOOKUP_sk_type:
   63|  7.56k|    {                                                                                                                    \
   64|  7.56k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  7.56k|    }                                                                                                                    \
x509_lu.c:ossl_check_const_X509_LOOKUP_sk_type:
   59|  37.6k|    {                                                                                                                    \
   60|  37.6k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  37.6k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_OBJECT_freefunc_type:
   75|   261k|    {                                                                                                                    \
   76|   261k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   261k|    }
x509_lu.c:ossl_check_X509_LOOKUP_type:
   55|  4.43k|    {                                                                                                                    \
   56|  4.43k|        return ptr;                                                                                                      \
   57|  4.43k|    }                                                                                                                    \
x509_lu.c:ossl_check_const_X509_OBJECT_sk_type:
   59|   399k|    {                                                                                                                    \
   60|   399k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   399k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_OBJECT_type:
   55|   458k|    {                                                                                                                    \
   56|   458k|        return ptr;                                                                                                      \
   57|   458k|    }                                                                                                                    \
x509_v3.c:ossl_check_const_X509_EXTENSION_sk_type:
   59|  4.48M|    {                                                                                                                    \
   60|  4.48M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  4.48M|    }                                                                                                                    \
x509_vpm.c:ossl_check_ASN1_OBJECT_sk_type:
   63|  8.48k|    {                                                                                                                    \
   64|  8.48k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  8.48k|    }                                                                                                                    \
x509_vpm.c:ossl_check_ASN1_OBJECT_freefunc_type:
   75|  8.48k|    {                                                                                                                    \
   76|  8.48k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  8.48k|    }
x509_vpm.c:sk_X509_BUFFER_pop_free:
  170|  33.9k|    {                                                                                                                      \
  171|  33.9k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  33.9k|                                                                                                                           \
  173|  33.9k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  33.9k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  33.9k|                                                                                                                           \
  176|  33.9k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  33.9k|    }                                                                                                                      \
x_name.c:sk_X509_NAME_ENTRY_freefunc_thunk:
   42|  6.49M|    {                                                                                                                    \
   43|  6.49M|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|  6.49M|        freefunc((t3 *)ptr);                                                                                             \
   45|  6.49M|    }                                                                                                                    \
x_name.c:ossl_check_X509_NAME_ENTRY_sk_type:
   63|  18.0M|    {                                                                                                                    \
   64|  18.0M|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  18.0M|    }                                                                                                                    \
x_name.c:ossl_check_X509_NAME_ENTRY_freefunc_type:
   75|  5.08M|    {                                                                                                                    \
   76|  5.08M|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  5.08M|    }
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_num:
   98|  4.16M|    {                                                                                                                      \
   99|  4.16M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  4.16M|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_value:
  102|  3.24M|    {                                                                                                                      \
  103|  3.24M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  3.24M|    }                                                                                                                      \
x_name.c:ossl_check_const_X509_NAME_ENTRY_sk_type:
   59|  18.0M|    {                                                                                                                    \
   60|  18.0M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  18.0M|    }                                                                                                                    \
x_name.c:ossl_check_X509_NAME_ENTRY_type:
   55|  9.74M|    {                                                                                                                    \
   56|  9.74M|        return ptr;                                                                                                      \
   57|  9.74M|    }                                                                                                                    \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_new_null:
  115|   920k|    {                                                                                                                      \
  116|   920k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|   920k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|   920k|                                                                                                                           \
  119|   920k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|   920k|                                                                                                                           \
  121|   920k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|   920k|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_freefunc_thunk:
   85|  6.49M|    {                                                                                                                      \
   86|  6.49M|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  6.49M|        freefunc((t3 *)ptr);                                                                                               \
   88|  6.49M|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_push:
  154|  3.24M|    {                                                                                                                      \
  155|  3.24M|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  3.24M|    }                                                                                                                      \
x_name.c:ossl_check_const_ASN1_VALUE_sk_type:
   59|  14.8M|    {                                                                                                                    \
   60|  14.8M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  14.8M|    }                                                                                                                    \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_pop_free:
  170|  1.84M|    {                                                                                                                      \
  171|  1.84M|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  1.84M|                                                                                                                           \
  173|  1.84M|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  1.84M|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  1.84M|                                                                                                                           \
  176|  1.84M|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  1.84M|    }                                                                                                                      \
x_x509.c:ossl_check_IPAddressFamily_sk_type:
   63|   916k|    {                                                                                                                    \
   64|   916k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   916k|    }                                                                                                                    \
x_x509.c:ossl_check_IPAddressFamily_freefunc_type:
   75|   916k|    {                                                                                                                    \
   76|   916k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   916k|    }
dso_dlfcn.c:ossl_check_const_void_sk_type:
   59|     87|    {                                                                                                                    \
   60|     87|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|     87|    }                                                                                                                    \
comp_methods.c:ossl_check_SSL_COMP_compfunc_type:
   67|    769|    {                                                                                                                    \
   68|    769|        return (OPENSSL_sk_compfunc)cmp;                                                                                 \
   69|    769|    }                                                                                                                    \
comp_methods.c:ossl_check_SSL_COMP_sk_type:
   63|    768|    {                                                                                                                    \
   64|    768|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|    768|    }                                                                                                                    \
comp_methods.c:ossl_check_SSL_COMP_freefunc_type:
   75|    768|    {                                                                                                                    \
   76|    768|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|    768|    }

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

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

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

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

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

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

ossl_prov_cache_exported_algorithms:
  221|    769|{
  222|    769|    int i, j;
  223|       |
  224|    769|    if (out[0].algorithm_names == NULL) {
  ------------------
  |  Branch (224:9): [True: 1, False: 768]
  ------------------
  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|    769|}

ossl_default_provider_init:
  797|    769|{
  798|    769|    OSSL_FUNC_core_get_libctx_fn *c_get_libctx = NULL;
  799|    769|    BIO_METHOD *corebiometh;
  800|       |
  801|    769|    if (!ossl_prov_bio_from_dispatch(in)
  ------------------
  |  Branch (801:9): [True: 0, False: 769]
  ------------------
  802|    769|        || !ossl_prov_seeding_from_dispatch(in))
  ------------------
  |  Branch (802:12): [True: 0, False: 769]
  ------------------
  803|      0|        return 0;
  804|  41.5k|    for (; in->function_id != 0; in++) {
  ------------------
  |  Branch (804:12): [True: 40.7k, False: 769]
  ------------------
  805|  40.7k|        switch (in->function_id) {
  806|    769|        case OSSL_FUNC_CORE_GETTABLE_PARAMS:
  ------------------
  |  |   72|    769|#define OSSL_FUNC_CORE_GETTABLE_PARAMS 1
  ------------------
  |  Branch (806:9): [True: 769, False: 39.9k]
  ------------------
  807|    769|            c_gettable_params = OSSL_FUNC_core_gettable_params(in);
  808|    769|            break;
  809|    769|        case OSSL_FUNC_CORE_GET_PARAMS:
  ------------------
  |  |   75|    769|#define OSSL_FUNC_CORE_GET_PARAMS 2
  ------------------
  |  Branch (809:9): [True: 769, False: 39.9k]
  ------------------
  810|    769|            c_get_params = OSSL_FUNC_core_get_params(in);
  811|    769|            break;
  812|    769|        case OSSL_FUNC_CORE_GET_LIBCTX:
  ------------------
  |  |   79|    769|#define OSSL_FUNC_CORE_GET_LIBCTX 4
  ------------------
  |  Branch (812:9): [True: 769, False: 39.9k]
  ------------------
  813|    769|            c_get_libctx = OSSL_FUNC_core_get_libctx(in);
  814|    769|            break;
  815|  38.4k|        default:
  ------------------
  |  Branch (815:9): [True: 38.4k, False: 2.30k]
  ------------------
  816|       |            /* Just ignore anything we don't understand */
  817|  38.4k|            break;
  818|  40.7k|        }
  819|  40.7k|    }
  820|       |
  821|    769|    if (c_get_libctx == NULL)
  ------------------
  |  Branch (821:9): [True: 0, False: 769]
  ------------------
  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|    769|    if ((*provctx = ossl_prov_ctx_new()) == NULL
  ------------------
  |  Branch (832:9): [True: 0, False: 769]
  ------------------
  833|    769|        || (corebiometh = ossl_bio_prov_init_bio_method()) == NULL) {
  ------------------
  |  Branch (833:12): [True: 0, False: 769]
  ------------------
  834|      0|        ossl_prov_ctx_free(*provctx);
  835|      0|        *provctx = NULL;
  836|      0|        return 0;
  837|      0|    }
  838|    769|    ossl_prov_ctx_set0_libctx(*provctx,
  839|    769|        (OSSL_LIB_CTX *)c_get_libctx(handle));
  840|    769|    ossl_prov_ctx_set0_handle(*provctx, handle);
  841|    769|    ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
  842|    769|    ossl_prov_ctx_set0_core_get_params(*provctx, c_get_params);
  843|       |
  844|    769|    *out = deflt_dispatch_table;
  845|    769|    ossl_prov_cache_exported_algorithms(deflt_ciphers, exported_ciphers);
  846|       |
  847|    769|    return 1;
  848|    769|}
defltprov.c:deflt_teardown:
  775|    768|{
  776|    768|    BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));
  777|    768|    ossl_prov_ctx_free(provctx);
  778|    768|}
defltprov.c:deflt_query:
  739|  88.5k|{
  740|  88.5k|    *no_cache = 0;
  741|  88.5k|    switch (operation_id) {
  ------------------
  |  Branch (741:13): [True: 88.5k, False: 0]
  ------------------
  742|  29.4k|    case OSSL_OP_DIGEST:
  ------------------
  |  |  283|  29.4k|#define OSSL_OP_DIGEST 1
  ------------------
  |  Branch (742:5): [True: 29.4k, False: 59.1k]
  ------------------
  743|  29.4k|        return deflt_digests;
  744|  38.9k|    case OSSL_OP_CIPHER:
  ------------------
  |  |  284|  38.9k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
  |  Branch (744:5): [True: 38.9k, False: 49.5k]
  ------------------
  745|  38.9k|        return exported_ciphers;
  746|      0|    case OSSL_OP_MAC:
  ------------------
  |  |  285|      0|#define OSSL_OP_MAC 3
  ------------------
  |  Branch (746:5): [True: 0, False: 88.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: 88.5k]
  ------------------
  749|      0|        return deflt_kdfs;
  750|  1.15k|    case OSSL_OP_RAND:
  ------------------
  |  |  287|  1.15k|#define OSSL_OP_RAND 5
  ------------------
  |  Branch (750:5): [True: 1.15k, False: 87.3k]
  ------------------
  751|  1.15k|        return deflt_rands;
  752|  16.2k|    case OSSL_OP_KEYMGMT:
  ------------------
  |  |  288|  16.2k|#define OSSL_OP_KEYMGMT 10
  ------------------
  |  Branch (752:5): [True: 16.2k, False: 72.2k]
  ------------------
  753|  16.2k|        return deflt_keymgmt;
  754|  1.34k|    case OSSL_OP_KEYEXCH:
  ------------------
  |  |  289|  1.34k|#define OSSL_OP_KEYEXCH 11
  ------------------
  |  Branch (754:5): [True: 1.34k, False: 87.1k]
  ------------------
  755|  1.34k|        return deflt_keyexch;
  756|  1.34k|    case OSSL_OP_SIGNATURE:
  ------------------
  |  |  290|  1.34k|#define OSSL_OP_SIGNATURE 12
  ------------------
  |  Branch (756:5): [True: 1.34k, False: 87.1k]
  ------------------
  757|  1.34k|        return deflt_signature;
  758|      0|    case OSSL_OP_ASYM_CIPHER:
  ------------------
  |  |  291|      0|#define OSSL_OP_ASYM_CIPHER 13
  ------------------
  |  Branch (758:5): [True: 0, False: 88.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: 88.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: 88.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: 88.5k]
  ------------------
  765|      4|        return deflt_decoder;
  766|      0|    case OSSL_OP_STORE:
  ------------------
  |  |  297|      0|#define OSSL_OP_STORE 22
  ------------------
  |  Branch (766:5): [True: 0, False: 88.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: 88.5k]
  ------------------
  769|      0|        return deflt_skeymgmt;
  770|  88.5k|    }
  771|      0|    return NULL;
  772|  88.5k|}

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

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

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|    674|    {                                                                                                      \
  279|    674|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  221|    674|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  280|    674|            flags, kbits, blkbits, ivbits);                                                                \
  281|    674|    }                                                                                                      \
cipher_aes_gcm_siv.c:ossl_aes_gcm_siv_gettable_ctx_params:
  208|  2.02k|{
  209|  2.02k|    return ossl_aes_gcm_siv_get_ctx_params_list;
  210|  2.02k|}
cipher_aes_gcm_siv.c:ossl_aes_192_gcm_siv_get_params:
  278|    674|    {                                                                                                      \
  279|    674|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  221|    674|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  280|    674|            flags, kbits, blkbits, ivbits);                                                                \
  281|    674|    }                                                                                                      \
cipher_aes_gcm_siv.c:ossl_aes_256_gcm_siv_get_params:
  278|    674|    {                                                                                                      \
  279|    674|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  221|    674|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  280|    674|            flags, kbits, blkbits, ivbits);                                                                \
  281|    674|    }                                                                                                      \

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

cipher_aes_hw.c:cipher_hw_aesni_initkey:
   20|  77.7k|{
   21|  77.7k|    int ret;
   22|  77.7k|    PROV_AES_CTX *adat = (PROV_AES_CTX *)dat;
   23|  77.7k|    AES_KEY *ks = &adat->ks.ks;
   24|       |
   25|  77.7k|    dat->ks = ks;
   26|       |
   27|  77.7k|    if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  210|   155k|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
                  if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  211|  34.5k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (27:10): [True: 43.2k, False: 34.5k]
  |  Branch (27:44): [True: 0, False: 34.5k]
  ------------------
   28|  43.2k|        && !dat->enc) {
  ------------------
  |  Branch (28:12): [True: 0, False: 43.2k]
  ------------------
   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|  77.7k|    } else {
   34|  77.7k|        ret = aesni_set_encrypt_key(key, (int)(keylen * 8), ks);
   35|  77.7k|        dat->block = (block128_f) aesni_encrypt;
   36|  77.7k|        if (dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  211|  77.7k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (36:13): [True: 0, False: 77.7k]
  ------------------
   37|      0|            dat->stream.cbc = (cbc128_f) aesni_cbc_encrypt;
   38|  77.7k|        else if (dat->mode == EVP_CIPH_CTR_MODE)
  ------------------
  |  |  214|  77.7k|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  |  Branch (38:18): [True: 34.5k, False: 43.2k]
  ------------------
   39|  34.5k|            dat->stream.ctr = (ctr128_f) aesni_ctr32_encrypt_blocks;
   40|  43.2k|        else
   41|  43.2k|            dat->stream.cbc = NULL;
   42|  77.7k|    }
   43|       |
   44|  77.7k|    if (ret < 0) {
  ------------------
  |  Branch (44:9): [True: 0, False: 77.7k]
  ------------------
   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|  77.7k|    return 1;
   50|  77.7k|}
cipher_aes_hw.c:cipher_hw_aesni_ecb:
   64|  73.9k|{
   65|  73.9k|    if (len < ctx->blocksize)
  ------------------
  |  Branch (65:9): [True: 0, False: 73.9k]
  ------------------
   66|      0|        return 1;
   67|       |
   68|  73.9k|    aesni_ecb_encrypt(in, out, len, ctx->ks, ctx->enc);
   69|       |
   70|  73.9k|    return 1;
   71|  73.9k|}

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

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

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

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

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

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

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

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

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

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

ossl_tdes_get_params:
  184|  9.77k|{
  185|       |#ifdef FIPS_MODULE
  186|       |    const int decrypt_only = 1;
  187|       |#else
  188|  9.77k|    const int decrypt_only = 0;
  189|  9.77k|#endif
  190|  9.77k|    OSSL_PARAM *p;
  191|       |
  192|  9.77k|    p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_DECRYPT_ONLY);
  ------------------
  |  |  190|  9.77k|# define OSSL_CIPHER_PARAM_DECRYPT_ONLY "decrypt-only"
  ------------------
  193|  9.77k|    if (p != NULL && !OSSL_PARAM_set_int(p, decrypt_only)) {
  ------------------
  |  Branch (193:9): [True: 3.03k, False: 6.74k]
  |  Branch (193:22): [True: 0, False: 3.03k]
  ------------------
  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|  9.77k|    return ossl_cipher_generic_get_params(params, md, flags,
  199|  9.77k|        kbits, blkbits, ivbits);
  200|  9.77k|}

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

ossl_cipher_generic_get_params:
   43|   136k|{
   44|   136k|    struct ossl_cipher_generic_get_params_st p;
   45|       |
   46|   136k|    if (!ossl_cipher_generic_get_params_decoder(params, &p))
  ------------------
  |  Branch (46:9): [True: 0, False: 136k]
  ------------------
   47|      0|        return 0;
   48|       |
   49|   136k|    if (p.mode != NULL && !OSSL_PARAM_set_uint(p.mode, md)) {
  ------------------
  |  Branch (49:9): [True: 87.6k, False: 48.5k]
  |  Branch (49:27): [True: 0, False: 87.6k]
  ------------------
   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|   136k|    if (p.aead != NULL
  ------------------
  |  Branch (53:9): [True: 87.6k, False: 48.5k]
  ------------------
   54|  87.6k|        && !OSSL_PARAM_set_int(p.aead, (flags & PROV_CIPHER_FLAG_AEAD) != 0)) {
  ------------------
  |  |   39|  87.6k|#define PROV_CIPHER_FLAG_AEAD 0x0001
  ------------------
  |  Branch (54:12): [True: 0, False: 87.6k]
  ------------------
   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|   136k|    if (p.custiv != NULL
  ------------------
  |  Branch (58:9): [True: 87.6k, False: 48.5k]
  ------------------
   59|  87.6k|        && !OSSL_PARAM_set_int(p.custiv, (flags & PROV_CIPHER_FLAG_CUSTOM_IV) != 0)) {
  ------------------
  |  |   40|  87.6k|#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
  ------------------
  |  Branch (59:12): [True: 0, False: 87.6k]
  ------------------
   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|   136k|    if (p.cts != NULL
  ------------------
  |  Branch (63:9): [True: 87.6k, False: 48.5k]
  ------------------
   64|  87.6k|        && !OSSL_PARAM_set_int(p.cts, (flags & PROV_CIPHER_FLAG_CTS) != 0)) {
  ------------------
  |  |   41|  87.6k|#define PROV_CIPHER_FLAG_CTS 0x0004
  ------------------
  |  Branch (64:12): [True: 0, False: 87.6k]
  ------------------
   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|   136k|    if (p.mb != NULL
  ------------------
  |  Branch (68:9): [True: 87.6k, False: 48.5k]
  ------------------
   69|  87.6k|        && !OSSL_PARAM_set_int(p.mb, (flags & PROV_CIPHER_FLAG_TLS1_MULTIBLOCK) != 0)) {
  ------------------
  |  |   42|  87.6k|#define PROV_CIPHER_FLAG_TLS1_MULTIBLOCK 0x0008
  ------------------
  |  Branch (69:12): [True: 0, False: 87.6k]
  ------------------
   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|   136k|    if (p.rand != NULL
  ------------------
  |  Branch (73:9): [True: 87.6k, False: 48.5k]
  ------------------
   74|  87.6k|        && !OSSL_PARAM_set_int(p.rand, (flags & PROV_CIPHER_FLAG_RAND_KEY) != 0)) {
  ------------------
  |  |   43|  87.6k|#define PROV_CIPHER_FLAG_RAND_KEY 0x0010
  ------------------
  |  Branch (74:12): [True: 0, False: 87.6k]
  ------------------
   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|   136k|    if (p.etm != NULL
  ------------------
  |  Branch (78:9): [True: 87.6k, False: 48.5k]
  ------------------
   79|  87.6k|        && !OSSL_PARAM_set_int(p.etm, (flags & EVP_CIPH_FLAG_ENC_THEN_MAC) != 0)) {
  ------------------
  |  |  267|  87.6k|#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000
  ------------------
  |  Branch (79:12): [True: 0, False: 87.6k]
  ------------------
   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|   136k|    if (p.keylen != NULL && !OSSL_PARAM_set_size_t(p.keylen, kbits / 8)) {
  ------------------
  |  Branch (83:9): [True: 87.6k, False: 48.5k]
  |  Branch (83:29): [True: 0, False: 87.6k]
  ------------------
   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|   136k|    if (p.bsize != NULL && !OSSL_PARAM_set_size_t(p.bsize, blkbits / 8)) {
  ------------------
  |  Branch (87:9): [True: 87.6k, False: 48.5k]
  |  Branch (87:28): [True: 0, False: 87.6k]
  ------------------
   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|   136k|    if (p.ivlen != NULL && !OSSL_PARAM_set_size_t(p.ivlen, ivbits / 8)) {
  ------------------
  |  Branch (91:9): [True: 87.6k, False: 48.5k]
  |  Branch (91:28): [True: 0, False: 87.6k]
  ------------------
   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|   136k|    return 1;
   96|   136k|}
ossl_cipher_generic_gettable_ctx_params:
   99|  55.9k|{
  100|  55.9k|    return cipher_generic_get_ctx_params_list;
  101|  55.9k|}
ossl_cipher_generic_reset_ctx:
  143|  5.20k|{
  144|  5.20k|    if (ctx != NULL && ctx->alloced) {
  ------------------
  |  Branch (144:9): [True: 5.20k, False: 0]
  |  Branch (144:24): [True: 0, False: 5.20k]
  ------------------
  145|      0|        OPENSSL_free(ctx->tlsmac);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  146|      0|        ctx->alloced = 0;
  147|       |        ctx->tlsmac = NULL;
  148|      0|    }
  149|  5.20k|}
ossl_cipher_generic_einit:
  194|   110k|{
  195|   110k|    return cipher_generic_init_internal((PROV_CIPHER_CTX *)vctx, key, keylen,
  196|   110k|        iv, ivlen, params, 1);
  197|   110k|}
ossl_cipher_generic_block_update:
  235|  73.9k|{
  236|  73.9k|    size_t outlint = 0;
  237|  73.9k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  238|  73.9k|    size_t blksz = ctx->blocksize;
  239|  73.9k|    size_t nextblocks;
  240|       |
  241|  73.9k|    if (!ctx->key_set) {
  ------------------
  |  Branch (241:9): [True: 0, False: 73.9k]
  ------------------
  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|  73.9k|    if (ctx->tlsversion > 0) {
  ------------------
  |  Branch (246:9): [True: 0, False: 73.9k]
  ------------------
  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|  73.9k|    if (ctx->bufsz != 0)
  ------------------
  |  Branch (321:9): [True: 0, False: 73.9k]
  ------------------
  322|      0|        nextblocks = ossl_cipher_fillblock(ctx->buf, &ctx->bufsz, blksz,
  323|      0|            &in, &inl);
  324|  73.9k|    else
  325|  73.9k|        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|  73.9k|    if (ctx->bufsz == blksz && (ctx->enc || inl > 0 || !ctx->pad)) {
  ------------------
  |  Branch (332:9): [True: 0, False: 73.9k]
  |  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|  73.9k|    if (nextblocks > 0) {
  ------------------
  |  Branch (345:9): [True: 73.9k, False: 0]
  ------------------
  346|  73.9k|        if (!ctx->enc && ctx->pad && nextblocks == inl) {
  ------------------
  |  Branch (346:13): [True: 0, False: 73.9k]
  |  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|  73.9k|        outlint += nextblocks;
  354|  73.9k|        if (outsize < outlint) {
  ------------------
  |  Branch (354:13): [True: 0, False: 73.9k]
  ------------------
  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|  73.9k|    }
  359|  73.9k|    if (nextblocks > 0) {
  ------------------
  |  Branch (359:9): [True: 73.9k, False: 0]
  ------------------
  360|  73.9k|        if (!ctx->hw->cipher(ctx, out, in, nextblocks)) {
  ------------------
  |  Branch (360:13): [True: 0, False: 73.9k]
  ------------------
  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|  73.9k|        in += nextblocks;
  365|  73.9k|        inl -= nextblocks;
  366|  73.9k|    }
  367|  73.9k|    if (inl != 0
  ------------------
  |  Branch (367:9): [True: 0, False: 73.9k]
  ------------------
  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|  73.9k|    *outl = outlint;
  374|  73.9k|    return inl == 0;
  375|  73.9k|}
ossl_cipher_generic_stream_update:
  454|  29.3k|{
  455|  29.3k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  456|       |
  457|  29.3k|    if (!ctx->key_set) {
  ------------------
  |  Branch (457:9): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    if (inl == 0) {
  ------------------
  |  Branch (462:9): [True: 0, False: 29.3k]
  ------------------
  463|      0|        *outl = 0;
  464|      0|        return 1;
  465|      0|    }
  466|       |
  467|  29.3k|    if (outsize < inl) {
  ------------------
  |  Branch (467:9): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    if (!ctx->hw->cipher(ctx, out, in, inl)) {
  ------------------
  |  Branch (472:9): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    *outl = inl;
  478|  29.3k|    if (!ctx->enc && ctx->tlsversion > 0) {
  ------------------
  |  Branch (478:9): [True: 0, False: 29.3k]
  |  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|  29.3k|    return 1;
  512|  29.3k|}
ossl_cipher_common_get_ctx_params:
  559|  6.94k|{
  560|  6.94k|    if (p->ivlen != NULL && !OSSL_PARAM_set_size_t(p->ivlen, ctx->ivlen)) {
  ------------------
  |  Branch (560:9): [True: 1.73k, False: 5.21k]
  |  Branch (560:29): [True: 0, False: 1.73k]
  ------------------
  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.94k|    if (p->pad != NULL && !OSSL_PARAM_set_uint(p->pad, ctx->pad)) {
  ------------------
  |  Branch (565:9): [True: 0, False: 6.94k]
  |  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.94k|    if (p->iv != NULL
  ------------------
  |  Branch (570:9): [True: 0, False: 6.94k]
  ------------------
  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.94k|    if (p->updiv != NULL
  ------------------
  |  Branch (576:9): [True: 0, False: 6.94k]
  ------------------
  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.94k|    if (p->num != NULL && !OSSL_PARAM_set_uint(p->num, ctx->num)) {
  ------------------
  |  Branch (582:9): [True: 0, False: 6.94k]
  |  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.94k|    if (p->keylen != NULL && !OSSL_PARAM_set_size_t(p->keylen, ctx->keylen)) {
  ------------------
  |  Branch (587:9): [True: 5.21k, False: 1.73k]
  |  Branch (587:30): [True: 0, False: 5.21k]
  ------------------
  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.94k|    if (p->tlsmac != NULL
  ------------------
  |  Branch (592:9): [True: 0, False: 6.94k]
  ------------------
  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.94k|    return 1;
  598|  6.94k|}
ossl_cipher_generic_get_ctx_params:
  601|  6.94k|{
  602|  6.94k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  603|  6.94k|    struct ossl_cipher_get_ctx_param_list_st p;
  604|       |
  605|  6.94k|    if (ctx == NULL || !cipher_generic_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (605:9): [True: 0, False: 6.94k]
  |  Branch (605:24): [True: 0, False: 6.94k]
  ------------------
  606|      0|        return 0;
  607|  6.94k|    return ossl_cipher_common_get_ctx_params(ctx, &p);
  608|  6.94k|}
ossl_cipher_generic_set_ctx_params:
  663|   110k|{
  664|   110k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  665|   110k|    struct ossl_cipher_set_ctx_param_list_st p;
  666|       |
  667|   110k|    if (ossl_param_is_empty(params))
  ------------------
  |  Branch (667:9): [True: 110k, False: 0]
  ------------------
  668|   110k|        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|  29.3k|{
  678|  29.3k|    if (ivlen != ctx->ivlen
  ------------------
  |  Branch (678:9): [True: 0, False: 29.3k]
  ------------------
  679|  29.3k|        || ivlen > sizeof(ctx->iv)) {
  ------------------
  |  Branch (679:12): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    ctx->iv_set = 1;
  684|  29.3k|    memcpy(ctx->iv, iv, ivlen);
  685|  29.3k|    memcpy(ctx->oiv, iv, ivlen);
  686|  29.3k|    return 1;
  687|  29.3k|}
ossl_cipher_generic_initkey:
  693|  5.21k|{
  694|  5.21k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  695|       |
  696|  5.21k|    if ((flags & PROV_CIPHER_FLAG_INVERSE_CIPHER) != 0)
  ------------------
  |  |   46|  5.21k|#define PROV_CIPHER_FLAG_INVERSE_CIPHER 0x0200
  ------------------
  |  Branch (696:9): [True: 0, False: 5.21k]
  ------------------
  697|      0|        ctx->inverse_cipher = 1;
  698|  5.21k|    if ((flags & PROV_CIPHER_FLAG_VARIABLE_LENGTH) != 0)
  ------------------
  |  |   45|  5.21k|#define PROV_CIPHER_FLAG_VARIABLE_LENGTH 0x0100
  ------------------
  |  Branch (698:9): [True: 0, False: 5.21k]
  ------------------
  699|      0|        ctx->variable_keylength = 1;
  700|       |
  701|  5.21k|    ctx->pad = 1;
  702|  5.21k|    ctx->keylen = ((kbits) / 8);
  703|  5.21k|    ctx->ivlen = ((ivbits) / 8);
  704|  5.21k|    ctx->hw = hw;
  705|  5.21k|    ctx->mode = mode;
  706|  5.21k|    ctx->blocksize = blkbits / 8;
  707|  5.21k|    if (provctx != NULL)
  ------------------
  |  Branch (707:9): [True: 5.21k, False: 0]
  ------------------
  708|  5.21k|        ctx->libctx = PROV_LIBCTX_OF(provctx); /* used for rand */
  ------------------
  |  |   31|  5.21k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  709|  5.21k|}
ciphercommon.c:cipher_generic_init_internal:
  155|   110k|{
  156|   110k|    ctx->num = 0;
  157|   110k|    ctx->bufsz = 0;
  158|   110k|    ctx->updated = 0;
  159|   110k|    ctx->enc = enc ? 1 : 0;
  ------------------
  |  Branch (159:16): [True: 110k, False: 0]
  ------------------
  160|       |
  161|   110k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (161:9): [True: 0, False: 110k]
  ------------------
  162|      0|        return 0;
  163|       |
  164|   110k|    if (iv != NULL && ctx->mode != EVP_CIPH_ECB_MODE) {
  ------------------
  |  |  210|  29.3k|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  |  Branch (164:9): [True: 29.3k, False: 81.2k]
  |  Branch (164:23): [True: 29.3k, False: 0]
  ------------------
  165|  29.3k|        if (!ossl_cipher_generic_initiv(ctx, iv, ivlen))
  ------------------
  |  Branch (165:13): [True: 0, False: 29.3k]
  ------------------
  166|      0|            return 0;
  167|  29.3k|    }
  168|   110k|    if (iv == NULL && ctx->iv_set
  ------------------
  |  Branch (168:9): [True: 81.2k, False: 29.3k]
  |  Branch (168:23): [True: 31.0k, False: 50.1k]
  ------------------
  169|  31.0k|        && (ctx->mode == EVP_CIPH_CBC_MODE
  ------------------
  |  |  211|  62.1k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (169:13): [True: 0, False: 31.0k]
  ------------------
  170|  31.0k|            || ctx->mode == EVP_CIPH_CFB_MODE
  ------------------
  |  |  212|  62.1k|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  |  Branch (170:16): [True: 0, False: 31.0k]
  ------------------
  171|  31.0k|            || ctx->mode == EVP_CIPH_OFB_MODE))
  ------------------
  |  |  213|  31.0k|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  |  Branch (171:16): [True: 0, False: 31.0k]
  ------------------
  172|       |        /* reset IV for these modes to keep compatibility with 1.1.1 */
  173|      0|        memcpy(ctx->iv, ctx->oiv, ctx->ivlen);
  174|       |
  175|   110k|    if (key != NULL) {
  ------------------
  |  Branch (175:9): [True: 77.7k, False: 32.8k]
  ------------------
  176|  77.7k|        if (ctx->variable_keylength == 0) {
  ------------------
  |  Branch (176:13): [True: 77.7k, False: 0]
  ------------------
  177|  77.7k|            if (keylen != ctx->keylen) {
  ------------------
  |  Branch (177:17): [True: 0, False: 77.7k]
  ------------------
  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|  77.7k|        } else {
  182|      0|            ctx->keylen = keylen;
  183|      0|        }
  184|  77.7k|        if (!ctx->hw->init(ctx, key, ctx->keylen))
  ------------------
  |  Branch (184:13): [True: 0, False: 77.7k]
  ------------------
  185|      0|            return 0;
  186|  77.7k|        ctx->key_set = 1;
  187|  77.7k|    }
  188|   110k|    return ossl_cipher_generic_set_ctx_params(ctx, params);
  189|   110k|}

ciphercommon.c:ossl_cipher_generic_get_params_decoder:
   47|   136k|{
   48|   136k|    const char *s;
   49|       |
   50|   136k|    memset(r, 0, sizeof(*r));
   51|   136k|    if (p != NULL)
  ------------------
  |  Branch (51:9): [True: 136k, False: 0]
  ------------------
   52|  1.06M|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (52:16): [True: 924k, False: 136k]
  ------------------
   53|   924k|            switch(s[0]) {
   54|  48.5k|            default:
  ------------------
  |  Branch (54:13): [True: 48.5k, False: 876k]
  ------------------
   55|  48.5k|                break;
   56|  87.6k|            case 'a':
  ------------------
  |  Branch (56:13): [True: 87.6k, False: 837k]
  ------------------
   57|  87.6k|                if (ossl_likely(strcmp("ead", s + 1) == 0)) {
  ------------------
  |  |   22|  87.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 87.6k, False: 0]
  |  |  ------------------
  ------------------
   58|       |                    /* OSSL_CIPHER_PARAM_AEAD */
   59|  87.6k|                    if (ossl_unlikely(r->aead != NULL)) {
  ------------------
  |  |   23|  87.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 87.6k]
  |  |  ------------------
  ------------------
   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|  87.6k|                    r->aead = (OSSL_PARAM *)p;
   65|  87.6k|                }
   66|  87.6k|                break;
   67|  87.6k|            case 'b':
  ------------------
  |  Branch (67:13): [True: 87.6k, False: 837k]
  ------------------
   68|  87.6k|                if (ossl_likely(strcmp("locksize", s + 1) == 0)) {
  ------------------
  |  |   22|  87.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 87.6k, False: 0]
  |  |  ------------------
  ------------------
   69|       |                    /* OSSL_CIPHER_PARAM_BLOCK_SIZE */
   70|  87.6k|                    if (ossl_unlikely(r->bsize != NULL)) {
  ------------------
  |  |   23|  87.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 87.6k]
  |  |  ------------------
  ------------------
   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|  87.6k|                    r->bsize = (OSSL_PARAM *)p;
   76|  87.6k|                }
   77|  87.6k|                break;
   78|   175k|            case 'c':
  ------------------
  |  Branch (78:13): [True: 175k, False: 749k]
  ------------------
   79|   175k|                switch(s[1]) {
   80|      0|                default:
  ------------------
  |  Branch (80:17): [True: 0, False: 175k]
  ------------------
   81|      0|                    break;
   82|  87.6k|                case 't':
  ------------------
  |  Branch (82:17): [True: 87.6k, False: 87.6k]
  ------------------
   83|  87.6k|                    if (ossl_likely(strcmp("s", s + 2) == 0)) {
  ------------------
  |  |   22|  87.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 87.6k, False: 0]
  |  |  ------------------
  ------------------
   84|       |                        /* OSSL_CIPHER_PARAM_CTS */
   85|  87.6k|                        if (ossl_unlikely(r->cts != NULL)) {
  ------------------
  |  |   23|  87.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 87.6k]
  |  |  ------------------
  ------------------
   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|  87.6k|                        r->cts = (OSSL_PARAM *)p;
   91|  87.6k|                    }
   92|  87.6k|                    break;
   93|  87.6k|                case 'u':
  ------------------
  |  Branch (93:17): [True: 87.6k, False: 87.6k]
  ------------------
   94|  87.6k|                    if (ossl_likely(strcmp("stom-iv", s + 2) == 0)) {
  ------------------
  |  |   22|  87.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 87.6k, False: 0]
  |  |  ------------------
  ------------------
   95|       |                        /* OSSL_CIPHER_PARAM_CUSTOM_IV */
   96|  87.6k|                        if (ossl_unlikely(r->custiv != NULL)) {
  ------------------
  |  |   23|  87.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 87.6k]
  |  |  ------------------
  ------------------
   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|  87.6k|                        r->custiv = (OSSL_PARAM *)p;
  102|  87.6k|                    }
  103|   175k|                }
  104|   175k|                break;
  105|   175k|            case 'e':
  ------------------
  |  Branch (105:13): [True: 87.6k, False: 837k]
  ------------------
  106|  87.6k|                if (ossl_likely(strcmp("ncrypt-then-mac", s + 1) == 0)) {
  ------------------
  |  |   22|  87.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 87.6k, False: 0]
  |  |  ------------------
  ------------------
  107|       |                    /* OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC */
  108|  87.6k|                    if (ossl_unlikely(r->etm != NULL)) {
  ------------------
  |  |   23|  87.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 87.6k]
  |  |  ------------------
  ------------------
  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|  87.6k|                    r->etm = (OSSL_PARAM *)p;
  114|  87.6k|                }
  115|  87.6k|                break;
  116|  87.6k|            case 'h':
  ------------------
  |  Branch (116:13): [True: 87.6k, False: 837k]
  ------------------
  117|  87.6k|                if (ossl_likely(strcmp("as-randkey", s + 1) == 0)) {
  ------------------
  |  |   22|  87.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 87.6k, False: 0]
  |  |  ------------------
  ------------------
  118|       |                    /* OSSL_CIPHER_PARAM_HAS_RAND_KEY */
  119|  87.6k|                    if (ossl_unlikely(r->rand != NULL)) {
  ------------------
  |  |   23|  87.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 87.6k]
  |  |  ------------------
  ------------------
  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|  87.6k|                    r->rand = (OSSL_PARAM *)p;
  125|  87.6k|                }
  126|  87.6k|                break;
  127|  87.6k|            case 'i':
  ------------------
  |  Branch (127:13): [True: 87.6k, False: 837k]
  ------------------
  128|  87.6k|                if (ossl_likely(strcmp("vlen", s + 1) == 0)) {
  ------------------
  |  |   22|  87.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 87.6k, False: 0]
  |  |  ------------------
  ------------------
  129|       |                    /* OSSL_CIPHER_PARAM_IVLEN */
  130|  87.6k|                    if (ossl_unlikely(r->ivlen != NULL)) {
  ------------------
  |  |   23|  87.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 87.6k]
  |  |  ------------------
  ------------------
  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|  87.6k|                    r->ivlen = (OSSL_PARAM *)p;
  136|  87.6k|                }
  137|  87.6k|                break;
  138|  87.6k|            case 'k':
  ------------------
  |  Branch (138:13): [True: 87.6k, False: 837k]
  ------------------
  139|  87.6k|                if (ossl_likely(strcmp("eylen", s + 1) == 0)) {
  ------------------
  |  |   22|  87.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 87.6k, False: 0]
  |  |  ------------------
  ------------------
  140|       |                    /* OSSL_CIPHER_PARAM_KEYLEN */
  141|  87.6k|                    if (ossl_unlikely(r->keylen != NULL)) {
  ------------------
  |  |   23|  87.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 87.6k]
  |  |  ------------------
  ------------------
  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|  87.6k|                    r->keylen = (OSSL_PARAM *)p;
  147|  87.6k|                }
  148|  87.6k|                break;
  149|  87.6k|            case 'm':
  ------------------
  |  Branch (149:13): [True: 87.6k, False: 837k]
  ------------------
  150|  87.6k|                if (ossl_likely(strcmp("ode", s + 1) == 0)) {
  ------------------
  |  |   22|  87.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 87.6k, False: 0]
  |  |  ------------------
  ------------------
  151|       |                    /* OSSL_CIPHER_PARAM_MODE */
  152|  87.6k|                    if (ossl_unlikely(r->mode != NULL)) {
  ------------------
  |  |   23|  87.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 87.6k]
  |  |  ------------------
  ------------------
  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|  87.6k|                    r->mode = (OSSL_PARAM *)p;
  158|  87.6k|                }
  159|  87.6k|                break;
  160|  87.6k|            case 't':
  ------------------
  |  Branch (160:13): [True: 87.6k, False: 837k]
  ------------------
  161|  87.6k|                if (ossl_likely(strcmp("ls-multi", s + 1) == 0)) {
  ------------------
  |  |   22|  87.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 87.6k, False: 0]
  |  |  ------------------
  ------------------
  162|       |                    /* OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK */
  163|  87.6k|                    if (ossl_unlikely(r->mb != NULL)) {
  ------------------
  |  |   23|  87.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 87.6k]
  |  |  ------------------
  ------------------
  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|  87.6k|                    r->mb = (OSSL_PARAM *)p;
  169|  87.6k|                }
  170|   924k|            }
  171|   136k|    return 1;
  172|   136k|}
ciphercommon.c:cipher_generic_get_ctx_params_decoder:
  205|  6.94k|{
  206|  6.94k|    const char *s;
  207|       |
  208|  6.94k|    memset(r, 0, sizeof(*r));
  209|  6.94k|    if (p != NULL)
  ------------------
  |  Branch (209:9): [True: 6.94k, False: 0]
  ------------------
  210|  13.8k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (210:16): [True: 6.94k, False: 6.94k]
  ------------------
  211|  6.94k|            switch(s[0]) {
  212|      0|            default:
  ------------------
  |  Branch (212:13): [True: 0, False: 6.94k]
  ------------------
  213|      0|                break;
  214|  1.73k|            case 'i':
  ------------------
  |  Branch (214:13): [True: 1.73k, False: 5.21k]
  ------------------
  215|  1.73k|                switch(s[1]) {
  216|      0|                default:
  ------------------
  |  Branch (216:17): [True: 0, False: 1.73k]
  ------------------
  217|      0|                    break;
  218|  1.73k|                case 'v':
  ------------------
  |  Branch (218:17): [True: 1.73k, False: 0]
  ------------------
  219|  1.73k|                    switch(s[2]) {
  220|      0|                    default:
  ------------------
  |  Branch (220:21): [True: 0, False: 1.73k]
  ------------------
  221|      0|                        break;
  222|  1.73k|                    case 'l':
  ------------------
  |  Branch (222:21): [True: 1.73k, False: 0]
  ------------------
  223|  1.73k|                        if (ossl_likely(strcmp("en", s + 3) == 0)) {
  ------------------
  |  |   22|  1.73k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.73k, False: 0]
  |  |  ------------------
  ------------------
  224|       |                            /* OSSL_CIPHER_PARAM_IVLEN */
  225|  1.73k|                            if (ossl_unlikely(r->ivlen != NULL)) {
  ------------------
  |  |   23|  1.73k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.73k]
  |  |  ------------------
  ------------------
  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.73k|                            r->ivlen = (OSSL_PARAM *)p;
  231|  1.73k|                        }
  232|  1.73k|                        break;
  233|  1.73k|                    case '\0':
  ------------------
  |  Branch (233:21): [True: 0, False: 1.73k]
  ------------------
  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.73k|                    }
  241|  1.73k|                }
  242|  1.73k|                break;
  243|  5.21k|            case 'k':
  ------------------
  |  Branch (243:13): [True: 5.21k, False: 1.73k]
  ------------------
  244|  5.21k|                if (ossl_likely(strcmp("eylen", s + 1) == 0)) {
  ------------------
  |  |   22|  5.21k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 5.21k, False: 0]
  |  |  ------------------
  ------------------
  245|       |                    /* OSSL_CIPHER_PARAM_KEYLEN */
  246|  5.21k|                    if (ossl_unlikely(r->keylen != NULL)) {
  ------------------
  |  |   23|  5.21k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 5.21k]
  |  |  ------------------
  ------------------
  247|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  248|      0|                                       "param %s is repeated", s);
  249|      0|                        return 0;
  250|      0|                    }
  251|  5.21k|                    r->keylen = (OSSL_PARAM *)p;
  252|  5.21k|                }
  253|  5.21k|                break;
  254|  5.21k|            case 'n':
  ------------------
  |  Branch (254:13): [True: 0, False: 6.94k]
  ------------------
  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.94k]
  ------------------
  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.94k]
  ------------------
  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.94k]
  ------------------
  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.94k|            }
  298|  6.94k|    return 1;
  299|  6.94k|}

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

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

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

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

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

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

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

sha2_prov.c:sha1_set_ctx_params:
   39|   399k|{
   40|   399k|    struct sha1_set_ctx_params_st p;
   41|   399k|    SHA_CTX *ctx = (SHA_CTX *)vctx;
   42|       |
   43|   399k|    if (ossl_unlikely(ctx == NULL || !sha1_set_ctx_params_decoder(params, &p)))
  ------------------
  |  |   23|   799k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 399k]
  |  |  |  Branch (23:46): [True: 0, False: 399k]
  |  |  |  Branch (23:46): [True: 0, False: 399k]
  |  |  ------------------
  ------------------
   44|      0|        return 0;
   45|       |
   46|   399k|    if (p.ssl3_ms != NULL)
  ------------------
  |  Branch (46:9): [True: 0, False: 399k]
  ------------------
   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|   399k|    return 1;
   51|   399k|}

sha2_prov.c:sha1_set_ctx_params_decoder:
   29|   399k|{
   30|   399k|    const char *s;
   31|       |
   32|   399k|    memset(r, 0, sizeof(*r));
   33|   399k|    if (p != NULL)
  ------------------
  |  Branch (33:9): [True: 0, False: 399k]
  ------------------
   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|   399k|    return 1;
   45|   399k|}

sha3_prov.c:keccak_update:
  115|  37.6k|{
  116|  37.6k|    return ossl_sha3_absorb((KECCAK1600_CTX *)vctx, inp, len);
  117|  37.6k|}
sha3_prov.c:keccak_final:
  121|  15.0k|{
  122|  15.0k|    int ret = 1;
  123|  15.0k|    KECCAK1600_CTX *ctx = vctx;
  124|       |
  125|  15.0k|    if (ossl_unlikely(!ossl_prov_is_running()))
  ------------------
  |  |   23|  15.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 15.0k]
  |  |  ------------------
  ------------------
  126|      0|        return 0;
  127|  15.0k|    if (ossl_unlikely(ctx->md_size == SIZE_MAX)) {
  ------------------
  |  |   23|  15.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 15.0k]
  |  |  ------------------
  ------------------
  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|  15.0k|    ret = ossl_sha3_final(ctx, out, ctx->md_size);
  132|  15.0k|    *outl = ctx->md_size;
  133|  15.0k|    return ret;
  134|  15.0k|}
sha3_prov.c:keccak_freectx:
  503|  7.52k|{
  504|  7.52k|    KECCAK1600_CTX *ctx = (KECCAK1600_CTX *)vctx;
  505|       |
  506|  7.52k|    OPENSSL_clear_free(ctx, sizeof(*ctx));
  ------------------
  |  |  130|  7.52k|    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|  7.52k|}
sha3_prov.c:keccak_init:
  100|  31.9k|{
  101|  31.9k|    if (ossl_unlikely(!ossl_prov_is_running()))
  ------------------
  |  |   23|  31.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 31.9k]
  |  |  ------------------
  ------------------
  102|      0|        return 0;
  103|       |    /* The newctx() handles most of the ctx fixed setup. */
  104|  31.9k|    ossl_sha3_reset((KECCAK1600_CTX *)vctx);
  105|  31.9k|    return 1;
  106|  31.9k|}
sha3_prov.c:shake_squeeze:
  138|  50.8k|{
  139|  50.8k|    int ret = 1;
  140|  50.8k|    KECCAK1600_CTX *ctx = vctx;
  141|       |
  142|  50.8k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (142:9): [True: 0, False: 50.8k]
  ------------------
  143|      0|        return 0;
  144|  50.8k|    if (ctx->meth.squeeze == NULL)
  ------------------
  |  Branch (144:9): [True: 0, False: 50.8k]
  ------------------
  145|      0|        return 0;
  146|  50.8k|    if (outlen > 0)
  ------------------
  |  Branch (146:9): [True: 50.8k, False: 0]
  ------------------
  147|  50.8k|        ret = ossl_sha3_squeeze(ctx, out, outlen);
  148|  50.8k|    if (outl != NULL)
  ------------------
  |  Branch (148:9): [True: 50.8k, False: 0]
  ------------------
  149|  50.8k|        *outl = outlen;
  150|  50.8k|    return ret;
  151|  50.8k|}
sha3_prov.c:keccak_init_params:
  109|  28.2k|{
  110|  28.2k|    return keccak_init(vctx, NULL)
  ------------------
  |  Branch (110:12): [True: 28.2k, False: 0]
  ------------------
  111|  28.2k|        && shake_set_ctx_params(vctx, params);
  ------------------
  |  Branch (111:12): [True: 28.2k, False: 0]
  ------------------
  112|  28.2k|}
sha3_prov.c:shake_set_ctx_params:
  692|  39.4k|{
  693|  39.4k|    struct shake_set_ctx_params_st p;
  694|  39.4k|    KECCAK1600_CTX *ctx = (KECCAK1600_CTX *)vctx;
  695|       |
  696|  39.4k|    if (ossl_unlikely(ctx == NULL || !shake_set_ctx_params_decoder(params, &p)))
  ------------------
  |  |   23|  78.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 39.4k]
  |  |  |  Branch (23:46): [True: 0, False: 39.4k]
  |  |  |  Branch (23:46): [True: 0, False: 39.4k]
  |  |  ------------------
  ------------------
  697|      0|        return 0;
  698|       |
  699|  39.4k|    if (ossl_unlikely(p.xoflen != NULL
  ------------------
  |  |   23|  50.7k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 39.4k]
  |  |  |  Branch (23:46): [True: 11.2k, False: 28.2k]
  |  |  |  Branch (23:46): [True: 0, False: 11.2k]
  |  |  ------------------
  ------------------
  700|  39.4k|            && !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|  39.4k|    return 1;
  705|  39.4k|}

sha3_prov.c:shake_set_ctx_params_decoder:
   85|  39.4k|{
   86|  39.4k|    const char *s;
   87|       |
   88|  39.4k|    memset(r, 0, sizeof(*r));
   89|  39.4k|    if (p != NULL)
  ------------------
  |  Branch (89:9): [True: 11.2k, False: 28.2k]
  ------------------
   90|  22.5k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (90:16): [True: 11.2k, False: 11.2k]
  ------------------
   91|  11.2k|            switch(s[0]) {
   92|      0|            default:
  ------------------
  |  Branch (92:13): [True: 0, False: 11.2k]
  ------------------
   93|      0|                break;
   94|      0|            case 's':
  ------------------
  |  Branch (94:13): [True: 0, False: 11.2k]
  ------------------
   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|  11.2k|            case 'x':
  ------------------
  |  Branch (105:13): [True: 11.2k, False: 0]
  ------------------
  106|  11.2k|                if (ossl_likely(strcmp("oflen", s + 1) == 0)) {
  ------------------
  |  |   22|  11.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 11.2k, False: 0]
  |  |  ------------------
  ------------------
  107|       |                    /* OSSL_DIGEST_PARAM_XOFLEN */
  108|  11.2k|                    if (ossl_unlikely(r->xoflen != NULL)) {
  ------------------
  |  |   23|  11.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.2k]
  |  |  ------------------
  ------------------
  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|  11.2k|                    r->xoflen = (OSSL_PARAM *)p;
  114|  11.2k|                }
  115|  11.2k|            }
  116|  39.4k|    return 1;
  117|  39.4k|}

decode_der2key.c:der2key_newctx:
  164|  1.22M|{
  165|  1.22M|    struct der2key_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|  1.22M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  166|       |
  167|  1.22M|    if (ctx != NULL) {
  ------------------
  |  Branch (167:9): [True: 1.22M, False: 0]
  ------------------
  168|  1.22M|        ctx->provctx = provctx;
  169|  1.22M|        ctx->desc = desc;
  170|  1.22M|    }
  171|  1.22M|    return ctx;
  172|  1.22M|}
decode_der2key.c:der2key_freectx:
  197|  1.22M|{
  198|  1.22M|    struct der2key_ctx_st *ctx = vctx;
  199|       |
  200|  1.22M|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  1.22M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  201|  1.22M|}
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|   458k|{
  241|   458k|    struct der2key_ctx_st *ctx = vctx;
  242|   458k|    unsigned char *der = NULL;
  243|   458k|    const unsigned char *derp;
  244|   458k|    long der_len = 0;
  245|   458k|    void *key = NULL;
  246|   458k|    int ok = 0;
  247|       |
  248|   458k|    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|   458k|    if (selection == 0)
  ------------------
  |  Branch (257:9): [True: 0, False: 458k]
  ------------------
  258|      0|        selection = ctx->desc->selection_mask;
  259|   458k|    if ((selection & ctx->desc->selection_mask) == 0) {
  ------------------
  |  Branch (259:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    ok = ossl_read_der(ctx->provctx, cin, &der, &der_len);
  265|   458k|    if (!ok)
  ------------------
  |  Branch (265:9): [True: 0, False: 458k]
  ------------------
  266|      0|        goto next;
  267|       |
  268|   458k|    ok = 0; /* Assume that we fail */
  269|       |
  270|   458k|    ERR_set_mark();
  271|   458k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
  ------------------
  |  |  646|   458k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (271:9): [True: 0, False: 458k]
  ------------------
  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|   458k|    if (key == NULL && (selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
  ------------------
  |  |  647|   458k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (287:9): [True: 458k, False: 0]
  |  Branch (287:24): [True: 458k, False: 0]
  ------------------
  288|   458k|        derp = der;
  289|   458k|        if (ctx->desc->d2i_PUBKEY != NULL)
  ------------------
  |  Branch (289:13): [True: 458k, False: 0]
  ------------------
  290|   458k|            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|   458k|        if (key == NULL && ctx->selection != 0) {
  ------------------
  |  Branch (293:13): [True: 0, False: 458k]
  |  Branch (293:28): [True: 0, False: 0]
  ------------------
  294|      0|            ERR_clear_last_mark();
  295|      0|            goto next;
  296|      0|        }
  297|   458k|    }
  298|   458k|    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: 458k]
  |  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|   458k|    if (key == NULL)
  ------------------
  |  Branch (307:9): [True: 0, False: 458k]
  ------------------
  308|      0|        ERR_clear_last_mark();
  309|   458k|    else
  310|   458k|        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|   458k|    if (key != NULL
  ------------------
  |  Branch (319:9): [True: 458k, False: 0]
  ------------------
  320|   458k|        && ctx->desc->check_key != NULL
  ------------------
  |  Branch (320:12): [True: 458k, False: 0]
  ------------------
  321|   458k|        && !ctx->desc->check_key(key, ctx)) {
  ------------------
  |  Branch (321:12): [True: 0, False: 458k]
  ------------------
  322|      0|        ctx->desc->free_key(key);
  323|      0|        key = NULL;
  324|      0|    }
  325|       |
  326|   458k|    if (key != NULL && ctx->desc->adjust_key != NULL)
  ------------------
  |  Branch (326:9): [True: 458k, False: 0]
  |  Branch (326:24): [True: 458k, False: 0]
  ------------------
  327|   458k|        ctx->desc->adjust_key(key, ctx);
  328|       |
  329|   458k|next:
  330|       |    /*
  331|       |     * Indicated that we successfully decoded something, or not at all.
  332|       |     * Ending up "empty handed" is not an error.
  333|       |     */
  334|   458k|    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|   458k|    OPENSSL_free(der);
  ------------------
  |  |  132|   458k|    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|   458k|    der = NULL;
  343|       |
  344|   458k|    if (key != NULL) {
  ------------------
  |  Branch (344:9): [True: 458k, False: 0]
  ------------------
  345|   458k|        OSSL_PARAM params[4];
  346|   458k|        int object_type = OSSL_OBJECT_PKEY;
  ------------------
  |  |   29|   458k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  347|       |
  348|   458k|        params[0] = OSSL_PARAM_construct_int(OSSL_OBJECT_PARAM_TYPE, &object_type);
  ------------------
  |  |  370|   458k|# define OSSL_OBJECT_PARAM_TYPE "type"
  ------------------
  349|       |
  350|   458k|#ifndef OPENSSL_NO_SM2
  351|   458k|        if (strcmp(ctx->desc->keytype_name, "EC") == 0
  ------------------
  |  Branch (351:13): [True: 147k, False: 310k]
  ------------------
  352|   147k|            && (EC_KEY_get_flags(key) & EC_FLAG_SM2_RANGE) != 0)
  ------------------
  |  |  962|   147k|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  |  Branch (352:16): [True: 0, False: 147k]
  ------------------
  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|   458k|        else
  356|   458k|#endif
  357|   458k|            params[1] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  366|   458k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  358|   458k|                (char *)ctx->desc->keytype_name,
  359|   458k|                0);
  360|       |        /* The address of the key becomes the octet string */
  361|   458k|        params[2] = OSSL_PARAM_construct_octet_string(OSSL_OBJECT_PARAM_REFERENCE,
  ------------------
  |  |  369|   458k|# define OSSL_OBJECT_PARAM_REFERENCE "reference"
  ------------------
  362|   458k|            &key, sizeof(key));
  363|   458k|        params[3] = OSSL_PARAM_construct_end();
  364|       |
  365|   458k|        ok = data_cb(params, data_cbarg);
  366|   458k|    }
  367|       |
  368|   458k|end:
  369|   458k|    ctx->desc->free_key(key);
  370|   458k|    OPENSSL_free(der);
  ------------------
  |  |  132|   458k|    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|   458k|    return ok;
  373|   458k|}
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|   147k|{
  484|       |    /* We're trying to be clever by comparing two truths */
  485|   147k|    int ret = 0;
  486|   147k|    int sm2 = (EC_KEY_get_flags(key) & EC_FLAG_SM2_RANGE) != 0;
  ------------------
  |  |  962|   147k|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  487|       |
  488|   147k|    if (sm2)
  ------------------
  |  Branch (488:9): [True: 0, False: 147k]
  ------------------
  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|   147k|    else
  492|   147k|        ret = ctx->desc->evp_type != EVP_PKEY_SM2;
  ------------------
  |  |   74|   147k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|   147k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  493|       |
  494|   147k|    return ret;
  495|   147k|}
decode_der2key.c:ec_adjust:
  498|   147k|{
  499|   147k|    ossl_ec_key_set0_libctx(key, PROV_LIBCTX_OF(ctx->provctx));
  ------------------
  |  |   31|   147k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  500|   147k|}
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|   147k|    {                                                                                                                 \
 1211|   147k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|   147k|    }                                                                                                                 \
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|   147k|    {                                                                                                                 \
 1211|   147k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|   147k|    }                                                                                                                 \
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|   310k|{
  910|   310k|    int valid;
  911|       |
  912|   310k|    switch (RSA_test_flags(key, RSA_FLAG_TYPE_MASK)) {
  ------------------
  |  |  117|   310k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
  913|   310k|    case RSA_FLAG_TYPE_RSA:
  ------------------
  |  |  118|   310k|#define RSA_FLAG_TYPE_RSA 0x0000
  ------------------
  |  Branch (913:5): [True: 310k, False: 0]
  ------------------
  914|   310k|        valid = (ctx->desc->evp_type == EVP_PKEY_RSA);
  ------------------
  |  |   63|   310k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   310k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  915|   310k|        break;
  916|      0|    case RSA_FLAG_TYPE_RSASSAPSS:
  ------------------
  |  |  119|      0|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (916:5): [True: 0, False: 310k]
  ------------------
  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: 310k]
  ------------------
  920|       |        /* Currently unsupported RSA key type */
  921|      0|        valid = 0;
  922|   310k|    }
  923|       |
  924|   310k|    valid = (valid && ossl_rsa_check_factors(key));
  ------------------
  |  Branch (924:14): [True: 310k, False: 0]
  |  Branch (924:23): [True: 310k, False: 0]
  ------------------
  925|       |
  926|   310k|    return valid;
  927|   310k|}
decode_der2key.c:rsa_adjust:
  930|   310k|{
  931|   310k|    ossl_rsa_set0_libctx(key, PROV_LIBCTX_OF(ctx->provctx));
  ------------------
  |  |   31|   310k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  932|   310k|}
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|   310k|    {                                                                                                                 \
 1211|   310k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|   310k|    }                                                                                                                 \
decode_der2key.c:rsa_d2i_PUBKEY:
  904|   310k|{
  905|       |    return d2i_RSA_PUBKEY(NULL, der, der_len);
  906|   310k|}
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|   310k|    {                                                                                                                 \
 1211|   310k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|   310k|    }                                                                                                                 \
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|   310k|    {                                                                                                                 \
 1211|   310k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|   310k|    }                                                                                                                 \
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|   458k|{
   47|   458k|    struct epki2pki_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|   458k|    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|   458k|    if (ctx != NULL)
  ------------------
  |  Branch (49:9): [True: 458k, False: 0]
  ------------------
   50|   458k|        ctx->provctx = provctx;
   51|   458k|    return ctx;
   52|   458k|}
decode_epki2pki.c:epki2pki_freectx:
   55|   458k|{
   56|   458k|    struct epki2pki_ctx_st *ctx = vctx;
   57|       |
   58|   458k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   458k|    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|   458k|}
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|   458k|{
   65|   458k|    struct pem2der_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|   458k|    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|   458k|    if (ctx != NULL)
  ------------------
  |  Branch (67:9): [True: 458k, False: 0]
  ------------------
   68|   458k|        ctx->provctx = provctx;
   69|   458k|    return ctx;
   70|   458k|}
decode_pem2der.c:pem2der_freectx:
   73|   458k|{
   74|   458k|    struct pem2der_ctx_st *ctx = vctx;
   75|       |
   76|   458k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   458k|    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|   458k|}
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|   458k|{
  104|   458k|    const unsigned char *derp = der;
  105|   458k|    X509_PUBKEY *xpub = NULL;
  106|   458k|    X509_ALGOR *algor = NULL;
  107|   458k|    const ASN1_OBJECT *oid = NULL;
  108|   458k|    char dataname[OSSL_MAX_NAME_SIZE];
  109|   458k|    OSSL_PARAM params[6], *p = params;
  110|   458k|    int objtype = OSSL_OBJECT_PKEY;
  ------------------
  |  |   29|   458k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  111|   458k|    int ok = 0;
  112|       |
  113|   458k|    xpub = ossl_d2i_X509_PUBKEY_INTERNAL(&derp, len, libctx, propq);
  114|       |
  115|   458k|    if (xpub == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 458k]
  ------------------
  116|       |        /* We return "empty handed".  This is not an error. */
  117|      0|        ok = 1;
  118|      0|        goto end;
  119|      0|    }
  120|       |
  121|   458k|    if (!X509_PUBKEY_get0_param(NULL, NULL, NULL, &algor, xpub))
  ------------------
  |  Branch (121:9): [True: 0, False: 458k]
  ------------------
  122|      0|        goto end;
  123|   458k|    X509_ALGOR_get0(&oid, NULL, NULL, algor);
  124|       |
  125|   458k|#ifndef OPENSSL_NO_EC
  126|       |    /* SM2 abuses the EC oid, so this could actually be SM2 */
  127|   458k|    if (OBJ_obj2nid(oid) == NID_X9_62_id_ecPublicKey
  ------------------
  |  |  178|   916k|#define NID_X9_62_id_ecPublicKey                408
  ------------------
  |  Branch (127:9): [True: 147k, False: 310k]
  ------------------
  128|   147k|        && ossl_x509_algor_is_sm2(algor))
  ------------------
  |  Branch (128:12): [True: 0, False: 147k]
  ------------------
  129|      0|        strcpy(dataname, "SM2");
  130|   458k|    else
  131|   458k|#endif
  132|   458k|        if (OBJ_obj2txt(dataname, sizeof(dataname), oid, 0) <= 0)
  ------------------
  |  Branch (132:13): [True: 0, False: 458k]
  ------------------
  133|      0|        goto end;
  134|       |
  135|   458k|    ossl_X509_PUBKEY_INTERNAL_free(xpub);
  136|   458k|    xpub = NULL;
  137|       |
  138|   458k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  366|   458k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  139|   458k|        dataname, 0);
  140|       |
  141|   458k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_INPUT_TYPE,
  ------------------
  |  |  368|   458k|# define OSSL_OBJECT_PARAM_INPUT_TYPE "input-type"
  ------------------
  142|   458k|        "DER", 0);
  143|       |
  144|   458k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  365|   458k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  145|   458k|        "SubjectPublicKeyInfo",
  146|   458k|        0);
  147|   458k|    *p++ = OSSL_PARAM_construct_octet_string(OSSL_OBJECT_PARAM_DATA, der, len);
  ------------------
  |  |  364|   458k|# define OSSL_OBJECT_PARAM_DATA "data"
  ------------------
  148|   458k|    *p++ = OSSL_PARAM_construct_int(OSSL_OBJECT_PARAM_TYPE, &objtype);
  ------------------
  |  |  370|   458k|# define OSSL_OBJECT_PARAM_TYPE "type"
  ------------------
  149|       |
  150|   458k|    *p = OSSL_PARAM_construct_end();
  151|       |
  152|   458k|    ok = data_cb(params, data_cbarg);
  153|       |
  154|   458k|end:
  155|   458k|    ossl_X509_PUBKEY_INTERNAL_free(xpub);
  156|   458k|    return ok;
  157|   458k|}
decode_spki2typespki.c:spki2typespki_newctx:
   43|   458k|{
   44|   458k|    struct spki2typespki_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|   458k|    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|   458k|    if (ctx != NULL)
  ------------------
  |  Branch (46:9): [True: 458k, False: 0]
  ------------------
   47|   458k|        ctx->provctx = provctx;
   48|   458k|    return ctx;
   49|   458k|}
decode_spki2typespki.c:spki2typespki_freectx:
   52|   458k|{
   53|   458k|    struct spki2typespki_ctx_st *ctx = vctx;
   54|       |
   55|   458k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   458k|    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|   458k|}
decode_spki2typespki.c:spki2typespki_decode:
   83|   458k|{
   84|   458k|    struct spki2typespki_ctx_st *ctx = vctx;
   85|   458k|    unsigned char *der;
   86|   458k|    long len;
   87|   458k|    int ok = 0;
   88|       |
   89|   458k|    if (!ossl_read_der(ctx->provctx, cin, &der, &len))
  ------------------
  |  Branch (89:9): [True: 0, False: 458k]
  ------------------
   90|      0|        return 1;
   91|       |
   92|   458k|    ok = ossl_spki2typespki_der_decode(der, len, selection, data_cb, data_cbarg,
   93|   458k|        pw_cb, pw_cbarg,
   94|   458k|        PROV_LIBCTX_OF(ctx->provctx), ctx->propq);
  ------------------
  |  |   31|   458k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
   95|   458k|    OPENSSL_free(der);
  ------------------
  |  |  132|   458k|    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|   458k|    return ok;
   97|   458k|}
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|   916k|{
   89|   916k|    BUF_MEM *mem = NULL;
   90|   916k|    BIO *in = ossl_bio_new_from_core_bio(provctx, cin);
   91|   916k|    int ok;
   92|       |
   93|   916k|    if (in == NULL)
  ------------------
  |  Branch (93:9): [True: 0, False: 916k]
  ------------------
   94|      0|        return 0;
   95|   916k|    ok = (asn1_d2i_read_bio(in, &mem) >= 0);
   96|   916k|    if (ok) {
  ------------------
  |  Branch (96:9): [True: 916k, False: 0]
  ------------------
   97|   916k|        *data = (unsigned char *)mem->data;
   98|   916k|        *len = (long)mem->length;
   99|   916k|        OPENSSL_free(mem);
  ------------------
  |  |  132|   916k|    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|   916k|    }
  101|   916k|    BIO_free(in);
  102|   916k|    return ok;
  103|   916k|}

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

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

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

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

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

ec_kmgmt.c:ec_gen_init:
  989|    243|{
  990|    243|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(provctx);
  ------------------
  |  |   31|    243|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  991|    243|    struct ec_gen_ctx *gctx = NULL;
  992|       |
  993|    243|    if (!ossl_prov_is_running() || (selection & (EC_POSSIBLE_SELECTIONS)) == 0)
  ------------------
  |  |   81|    243|    (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  656|    243|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  646|    243|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  |  |  ------------------
  |  |  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  647|    243|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  653|    243|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  ------------------
  |  |  |  |  |  |  648|    243|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  ------------------
  |  |  |  |  654|    243|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  649|    243|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (993:9): [True: 0, False: 243]
  |  Branch (993:36): [True: 0, False: 243]
  ------------------
  994|      0|        return NULL;
  995|       |
  996|    243|    if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) {
  ------------------
  |  |  109|    243|    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: 243, False: 0]
  ------------------
  997|    243|        gctx->libctx = libctx;
  998|    243|        gctx->selection = selection;
  999|    243|        gctx->ecdh_mode = 0;
 1000|    243|        OSSL_FIPS_IND_INIT(gctx)
 1001|    243|        if (!ec_gen_set_params(gctx, params)) {
  ------------------
  |  Branch (1001:13): [True: 0, False: 243]
  ------------------
 1002|      0|            ec_gen_cleanup(gctx);
 1003|       |            gctx = NULL;
 1004|      0|        }
 1005|    243|    }
 1006|    243|    return gctx;
 1007|    243|}
ec_kmgmt.c:ec_gen_set_params:
 1094|    486|{
 1095|    486|    int ret = 0;
 1096|    486|    struct ec_gen_ctx *gctx = genctx;
 1097|    486|    const OSSL_PARAM *p;
 1098|       |
 1099|    486|    if (!OSSL_FIPS_IND_SET_CTX_PARAM(gctx, OSSL_FIPS_IND_SETTABLE0, params,
  ------------------
  |  |  157|    486|#define OSSL_FIPS_IND_SET_CTX_PARAM(ctx, id, params, name) 1
  ------------------
  |  Branch (1099:9): [Folded, False: 486]
  ------------------
 1100|    486|            OSSL_PKEY_PARAM_FIPS_KEY_CHECK))
 1101|      0|        goto err;
 1102|       |
 1103|    486|    COPY_INT_PARAM(params, OSSL_PKEY_PARAM_USE_COFACTOR_ECDH, gctx->ecdh_mode);
  ------------------
  |  | 1057|    486|    p = OSSL_PARAM_locate_const(params, key);      \
  |  | 1058|    486|    if (p != NULL && !OSSL_PARAM_get_int(p, &val)) \
  |  |  ------------------
  |  |  |  Branch (1058:9): [True: 0, False: 486]
  |  |  |  Branch (1058:22): [True: 0, False: 0]
  |  |  ------------------
  |  | 1059|    486|        goto err;
  ------------------
 1104|       |
 1105|    486|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_GROUP_NAME, gctx->group_name);
  ------------------
  |  | 1062|    486|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1063|    486|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1063:9): [True: 243, False: 243]
  |  |  ------------------
  |  | 1064|    243|        if (p->data_type != OSSL_PARAM_UTF8_STRING) \
  |  |  ------------------
  |  |  |  |  117|    243|#define OSSL_PARAM_UTF8_STRING 4
  |  |  ------------------
  |  |  |  Branch (1064:13): [True: 0, False: 243]
  |  |  ------------------
  |  | 1065|    243|            goto err;                               \
  |  | 1066|    243|        OPENSSL_free(val);                          \
  |  |  ------------------
  |  |  |  |  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__
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1067|    243|        val = OPENSSL_strdup(p->data);              \
  |  |  ------------------
  |  |  |  |  136|    243|    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|    243|        if (val == NULL)                            \
  |  |  ------------------
  |  |  |  Branch (1068:13): [True: 0, False: 243]
  |  |  ------------------
  |  | 1069|    243|            goto err;                               \
  |  | 1070|    243|    }
  ------------------
 1106|    486|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_EC_FIELD_TYPE, gctx->field_type);
  ------------------
  |  | 1062|    486|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1063|    486|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1063:9): [True: 0, False: 486]
  |  |  ------------------
  |  | 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|    486|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_EC_ENCODING, gctx->encoding);
  ------------------
  |  | 1062|    486|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1063|    486|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1063:9): [True: 0, False: 486]
  |  |  ------------------
  |  | 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|    486|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT, gctx->pt_format);
  ------------------
  |  | 1062|    486|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1063|    486|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1063:9): [True: 0, False: 486]
  |  |  ------------------
  |  | 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|    486|    COPY_UTF8_PARAM(params, OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE, gctx->group_check);
  ------------------
  |  | 1062|    486|    p = OSSL_PARAM_locate_const(params, key);       \
  |  | 1063|    486|    if (p != NULL) {                                \
  |  |  ------------------
  |  |  |  Branch (1063:9): [True: 0, False: 486]
  |  |  ------------------
  |  | 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|    486|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_P, gctx->p);
  ------------------
  |  | 1085|    486|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1086|    486|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1086:9): [True: 0, False: 486]
  |  |  ------------------
  |  | 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|    486|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_A, gctx->a);
  ------------------
  |  | 1085|    486|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1086|    486|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1086:9): [True: 0, False: 486]
  |  |  ------------------
  |  | 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|    486|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_B, gctx->b);
  ------------------
  |  | 1085|    486|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1086|    486|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1086:9): [True: 0, False: 486]
  |  |  ------------------
  |  | 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|    486|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_ORDER, gctx->order);
  ------------------
  |  | 1085|    486|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1086|    486|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1086:9): [True: 0, False: 486]
  |  |  ------------------
  |  | 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|    486|    COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_COFACTOR, gctx->cofactor);
  ------------------
  |  | 1085|    486|    p = OSSL_PARAM_locate_const(params, key);         \
  |  | 1086|    486|    if (p != NULL) {                                  \
  |  |  ------------------
  |  |  |  Branch (1086:9): [True: 0, False: 486]
  |  |  ------------------
  |  | 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|    486|    COPY_OCTET_PARAM(params, OSSL_PKEY_PARAM_EC_SEED, gctx->seed, gctx->seed_len);
  ------------------
  |  | 1073|    486|    p = OSSL_PARAM_locate_const(params, key);        \
  |  | 1074|    486|    if (p != NULL) {                                 \
  |  |  ------------------
  |  |  |  Branch (1074:9): [True: 0, False: 486]
  |  |  ------------------
  |  | 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|    486|    COPY_OCTET_PARAM(params, OSSL_PKEY_PARAM_EC_GENERATOR, gctx->gen,
  ------------------
  |  | 1073|    486|    p = OSSL_PARAM_locate_const(params, key);        \
  |  | 1074|    486|    if (p != NULL) {                                 \
  |  |  ------------------
  |  |  |  Branch (1074:9): [True: 0, False: 486]
  |  |  ------------------
  |  | 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|    486|        gctx->gen_len);
 1120|       |
 1121|    486|    COPY_OCTET_PARAM(params, OSSL_PKEY_PARAM_DHKEM_IKM, gctx->dhkem_ikm,
  ------------------
  |  | 1073|    486|    p = OSSL_PARAM_locate_const(params, key);        \
  |  | 1074|    486|    if (p != NULL) {                                 \
  |  |  ------------------
  |  |  |  Branch (1074:9): [True: 0, False: 486]
  |  |  ------------------
  |  | 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|    486|        gctx->dhkem_ikmlen);
 1123|       |
 1124|    486|    ret = 1;
 1125|    486|err:
 1126|    486|    return ret;
 1127|    486|}
ec_kmgmt.c:ec_gen:
 1265|     83|{
 1266|     83|    struct ec_gen_ctx *gctx = genctx;
 1267|     83|    EC_KEY *ec = NULL;
 1268|     83|    int ret = 0;
 1269|       |
 1270|     83|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (1270:9): [True: 0, False: 83]
  ------------------
 1271|     83|        || gctx == NULL
  ------------------
  |  Branch (1271:12): [True: 0, False: 83]
  ------------------
 1272|     83|        || (ec = EC_KEY_new_ex(gctx->libctx, NULL)) == NULL)
  ------------------
  |  Branch (1272:12): [True: 0, False: 83]
  ------------------
 1273|      0|        return NULL;
 1274|       |
 1275|     83|    if (gctx->gen_group == NULL) {
  ------------------
  |  Branch (1275:9): [True: 83, False: 0]
  ------------------
 1276|     83|        if (!ec_gen_set_group_from_params(gctx))
  ------------------
  |  Branch (1276:13): [True: 0, False: 83]
  ------------------
 1277|      0|            goto err;
 1278|     83|    } 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|     83|    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|     83|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
  ------------------
  |  |  656|     83|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|     83|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|     83|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (1305:9): [True: 83, False: 0]
  ------------------
 1306|     83|#ifndef FIPS_MODULE
 1307|     83|        if (gctx->dhkem_ikm != NULL && gctx->dhkem_ikmlen != 0)
  ------------------
  |  Branch (1307:13): [True: 0, False: 83]
  |  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|     83|        else
 1310|     83|#endif
 1311|     83|            ret = ret && EC_KEY_generate_key(ec);
  ------------------
  |  Branch (1311:19): [True: 83, False: 0]
  |  Branch (1311:26): [True: 83, False: 0]
  ------------------
 1312|     83|    }
 1313|       |
 1314|     83|    if (gctx->ecdh_mode != -1)
  ------------------
  |  Branch (1314:9): [True: 83, False: 0]
  ------------------
 1315|     83|        ret = ret && ossl_ec_set_ecdh_cofactor_mode(ec, gctx->ecdh_mode);
  ------------------
  |  Branch (1315:15): [True: 83, False: 0]
  |  Branch (1315:22): [True: 83, False: 0]
  ------------------
 1316|       |
 1317|     83|    if (gctx->group_check != NULL)
  ------------------
  |  Branch (1317:9): [True: 0, False: 83]
  ------------------
 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|     83|    if (ret)
  ------------------
  |  Branch (1334:9): [True: 83, False: 0]
  ------------------
 1335|     83|        return ec;
 1336|      0|err:
 1337|       |    /* Something went wrong, throw the key away */
 1338|      0|    EC_KEY_free(ec);
 1339|       |    return NULL;
 1340|     83|}
ec_kmgmt.c:ec_gen_set_group_from_params:
 1130|    243|{
 1131|    243|    int ret = 0;
 1132|    243|    OSSL_PARAM_BLD *bld;
 1133|    243|    OSSL_PARAM *params = NULL;
 1134|    243|    EC_GROUP *group = NULL;
 1135|       |
 1136|    243|    bld = OSSL_PARAM_BLD_new();
 1137|    243|    if (bld == NULL)
  ------------------
  |  Branch (1137:9): [True: 0, False: 243]
  ------------------
 1138|      0|        return 0;
 1139|       |
 1140|    243|    if (gctx->encoding != NULL
  ------------------
  |  Branch (1140:9): [True: 0, False: 243]
  ------------------
 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|    243|    if (gctx->pt_format != NULL
  ------------------
  |  Branch (1145:9): [True: 0, False: 243]
  ------------------
 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|    243|    if (gctx->group_name != NULL) {
  ------------------
  |  Branch (1151:9): [True: 243, False: 0]
  ------------------
 1152|    243|        if (!OSSL_PARAM_BLD_push_utf8_string(bld, OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  428|    243|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
  |  Branch (1152:13): [True: 0, False: 243]
  ------------------
 1153|    243|                gctx->group_name, 0))
 1154|      0|            goto err;
 1155|       |        /* Ignore any other parameters if there is a group name */
 1156|    243|        goto build;
 1157|    243|    } 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|    243|build:
 1189|    243|    params = OSSL_PARAM_BLD_to_param(bld);
 1190|    243|    if (params == NULL)
  ------------------
  |  Branch (1190:9): [True: 0, False: 243]
  ------------------
 1191|      0|        goto err;
 1192|    243|    group = EC_GROUP_new_from_params(params, gctx->libctx, NULL);
 1193|    243|    if (group == NULL)
  ------------------
  |  Branch (1193:9): [True: 0, False: 243]
  ------------------
 1194|      0|        goto err;
 1195|       |
 1196|    243|    EC_GROUP_free(gctx->gen_group);
 1197|    243|    gctx->gen_group = group;
 1198|       |
 1199|    243|    ret = 1;
 1200|    243|err:
 1201|    243|    OSSL_PARAM_free(params);
 1202|    243|    OSSL_PARAM_BLD_free(bld);
 1203|    243|    return ret;
 1204|    243|}
ec_kmgmt.c:ec_gen_assign_group:
 1253|    243|{
 1254|    243|    if (group == NULL) {
  ------------------
  |  Branch (1254:9): [True: 0, False: 243]
  ------------------
 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|    243|    return EC_KEY_set_group(ec, group) > 0;
 1259|    243|}
ec_kmgmt.c:ec_gen_cleanup:
 1395|    243|{
 1396|    243|    struct ec_gen_ctx *gctx = genctx;
 1397|       |
 1398|    243|    if (gctx == NULL)
  ------------------
  |  Branch (1398:9): [True: 0, False: 243]
  ------------------
 1399|      0|        return;
 1400|       |
 1401|    243|    OPENSSL_clear_free(gctx->dhkem_ikm, gctx->dhkem_ikmlen);
  ------------------
  |  |  130|    243|    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|    243|    EC_GROUP_free(gctx->gen_group);
 1403|    243|    BN_free(gctx->p);
 1404|    243|    BN_free(gctx->a);
 1405|    243|    BN_free(gctx->b);
 1406|    243|    BN_free(gctx->order);
 1407|    243|    BN_free(gctx->cofactor);
 1408|    243|    OPENSSL_free(gctx->group_name);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
 1409|    243|    OPENSSL_free(gctx->field_type);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
 1410|    243|    OPENSSL_free(gctx->pt_format);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
 1411|    243|    OPENSSL_free(gctx->encoding);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
 1412|    243|    OPENSSL_free(gctx->seed);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
 1413|    243|    OPENSSL_free(gctx->gen);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
 1414|    243|    OPENSSL_free(gctx);
  ------------------
  |  |  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__
  |  |  ------------------
  ------------------
 1415|    243|}
ec_kmgmt.c:ec_load:
 1437|   147k|{
 1438|   147k|    return common_load(reference, reference_sz, 0);
 1439|   147k|}
ec_kmgmt.c:common_load:
 1419|   147k|{
 1420|   147k|    EC_KEY *ec = NULL;
 1421|       |
 1422|   147k|    if (ossl_prov_is_running() && reference_sz == sizeof(ec)) {
  ------------------
  |  Branch (1422:9): [True: 147k, False: 0]
  |  Branch (1422:35): [True: 147k, False: 0]
  ------------------
 1423|       |        /* The contents of the reference is the address to our object */
 1424|   147k|        ec = *(EC_KEY **)reference;
 1425|       |
 1426|   147k|        if (!common_check_sm2(ec, sm2_wanted))
  ------------------
  |  Branch (1426:13): [True: 0, False: 147k]
  ------------------
 1427|      0|            return NULL;
 1428|       |
 1429|       |        /* We grabbed, so we detach it */
 1430|   147k|        *(EC_KEY **)reference = NULL;
 1431|   147k|        return ec;
 1432|   147k|    }
 1433|      0|    return NULL;
 1434|   147k|}
ec_kmgmt.c:common_check_sm2:
  415|   147k|{
  416|   147k|    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|   147k|    if ((ecg = EC_KEY_get0_group(ec)) == NULL
  ------------------
  |  Branch (422:9): [True: 0, False: 147k]
  ------------------
  423|   147k|        || (sm2_wanted ^ (EC_GROUP_get_curve_name(ecg) == NID_sm2)))
  ------------------
  |  | 1259|   147k|#define NID_sm2         1172
  ------------------
  |  Branch (423:12): [True: 0, False: 147k]
  ------------------
  424|      0|        return 0;
  425|   147k|    return 1;
  426|   147k|}
ec_kmgmt.c:ec_freedata:
  339|   147k|{
  340|   147k|    EC_KEY_free(keydata);
  341|   147k|}
ec_kmgmt.c:ec_get_params:
  765|   147k|{
  766|   147k|    return common_get_params(key, params, 0);
  767|   147k|}
ec_kmgmt.c:common_get_params:
  663|   148k|{
  664|   148k|    int ret = 0;
  665|   148k|    EC_KEY *eck = key;
  666|   148k|    const EC_GROUP *ecg = NULL;
  667|   148k|    OSSL_PARAM *p;
  668|   148k|    unsigned char *pub_key = NULL, *genbuf = NULL;
  669|   148k|    OSSL_LIB_CTX *libctx;
  670|   148k|    const char *propq;
  671|   148k|    BN_CTX *bnctx = NULL;
  672|       |
  673|   148k|    ecg = EC_KEY_get0_group(eck);
  674|   148k|    if (ecg == NULL) {
  ------------------
  |  Branch (674:9): [True: 0, False: 148k]
  ------------------
  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|   148k|    libctx = ossl_ec_key_get_libctx(eck);
  680|   148k|    propq = ossl_ec_key_get0_propq(eck);
  681|       |
  682|   148k|    bnctx = BN_CTX_new_ex(libctx);
  683|   148k|    if (bnctx == NULL)
  ------------------
  |  Branch (683:9): [True: 0, False: 148k]
  ------------------
  684|      0|        return 0;
  685|   148k|    BN_CTX_start(bnctx);
  686|       |
  687|   148k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_MAX_SIZE)) != NULL
  ------------------
  |  |  432|   148k|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  |  Branch (687:9): [True: 147k, False: 486]
  ------------------
  688|   147k|        && !OSSL_PARAM_set_int(p, ECDSA_size(eck)))
  ------------------
  |  Branch (688:12): [True: 0, False: 147k]
  ------------------
  689|      0|        goto err;
  690|   148k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_BITS)) != NULL
  ------------------
  |  |  374|   148k|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  |  Branch (690:9): [True: 147k, False: 486]
  ------------------
  691|   147k|        && !OSSL_PARAM_set_int(p, EC_GROUP_order_bits(ecg)))
  ------------------
  |  Branch (691:12): [True: 0, False: 147k]
  ------------------
  692|      0|        goto err;
  693|   148k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_FIELD_DEGREE)) != NULL
  ------------------
  |  |  396|   148k|# define OSSL_PKEY_PARAM_EC_FIELD_DEGREE "field-degree"
  ------------------
  |  Branch (693:9): [True: 0, False: 148k]
  ------------------
  694|      0|        && !OSSL_PARAM_set_int(p, EC_GROUP_get_degree(ecg)))
  ------------------
  |  Branch (694:12): [True: 0, False: 0]
  ------------------
  695|      0|        goto err;
  696|   148k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_BITS)) != NULL
  ------------------
  |  |  506|   148k|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  |  Branch (696:9): [True: 147k, False: 486]
  ------------------
  697|   147k|        && !OSSL_PARAM_set_int(p, EC_GROUP_security_bits(ecg)))
  ------------------
  |  Branch (697:12): [True: 0, False: 147k]
  ------------------
  698|      0|        goto err;
  699|   148k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_CATEGORY)) != NULL)
  ------------------
  |  |  507|   148k|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  131|   148k|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  |  Branch (699:9): [True: 147k, False: 486]
  ------------------
  700|   147k|        if (!OSSL_PARAM_set_int(p, 0))
  ------------------
  |  Branch (700:13): [True: 0, False: 147k]
  ------------------
  701|      0|            goto err;
  702|       |
  703|   148k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (703:9): [True: 0, False: 148k]
  ------------------
  704|   148k|             OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS))
  ------------------
  |  |  394|   148k|# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
  ------------------
  705|   148k|        != 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|   148k|    if (!sm2) {
  ------------------
  |  Branch (713:9): [True: 147k, False: 480]
  ------------------
  714|   147k|        if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  378|   147k|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (714:13): [True: 0, False: 147k]
  ------------------
  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|   147k|    } else {
  718|    480|        if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  378|    480|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (718:13): [True: 0, False: 480]
  ------------------
  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|    480|    }
  722|       |
  723|       |    /* SM2 doesn't support this PARAM */
  724|   148k|    if (!sm2) {
  ------------------
  |  Branch (724:9): [True: 147k, False: 480]
  ------------------
  725|   147k|        p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_USE_COFACTOR_ECDH);
  ------------------
  |  |  509|   147k|# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
  |  |  ------------------
  |  |  |  |  510|   147k|# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
  |  |  ------------------
  ------------------
  726|   147k|        if (p != NULL) {
  ------------------
  |  Branch (726:13): [True: 0, False: 147k]
  ------------------
  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|   147k|    }
  735|   148k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (735:9): [True: 486, False: 147k]
  ------------------
  736|   148k|             OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY))
  ------------------
  |  |  407|   148k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
  737|   148k|        != NULL) {
  738|    486|        const EC_POINT *ecp = EC_KEY_get0_public_key(key);
  739|       |
  740|    486|        if (ecp == NULL) {
  ------------------
  |  Branch (740:13): [True: 0, False: 486]
  ------------------
  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|    486|        p->return_size = EC_POINT_point2oct(ecg, ecp,
  745|    486|            POINT_CONVERSION_UNCOMPRESSED,
  746|    486|            p->data, p->data_size, bnctx);
  747|    486|        if (p->return_size == 0)
  ------------------
  |  Branch (747:13): [True: 0, False: 486]
  ------------------
  748|      0|            goto err;
  749|    486|    }
  750|       |
  751|   148k|    ret = ec_get_ecm_params(ecg, params)
  ------------------
  |  Branch (751:11): [True: 148k, False: 0]
  ------------------
  752|   148k|        && ossl_ec_group_todata(ecg, NULL, params, libctx, propq, bnctx,
  ------------------
  |  Branch (752:12): [True: 148k, False: 0]
  ------------------
  753|   148k|            &genbuf)
  754|   148k|        && key_to_params(eck, NULL, params, 1, &pub_key)
  ------------------
  |  Branch (754:12): [True: 148k, False: 0]
  ------------------
  755|   148k|        && otherparams_to_params(eck, NULL, params);
  ------------------
  |  Branch (755:12): [True: 148k, False: 0]
  ------------------
  756|   148k|err:
  757|   148k|    OPENSSL_free(genbuf);
  ------------------
  |  |  132|   148k|    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|   148k|    OPENSSL_free(pub_key);
  ------------------
  |  |  132|   148k|    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|   148k|    BN_CTX_end(bnctx);
  760|   148k|    BN_CTX_free(bnctx);
  761|   148k|    return ret;
  762|   148k|}
ec_kmgmt.c:ec_get_ecm_params:
  612|   148k|{
  613|       |#ifdef OPENSSL_NO_EC2M
  614|       |    return 1;
  615|       |#else
  616|   148k|    int ret = 0, m;
  617|   148k|    unsigned int k1 = 0, k2 = 0, k3 = 0;
  618|   148k|    int basis_nid;
  619|   148k|    const char *basis_name = NULL;
  620|   148k|    int fid = EC_GROUP_get_field_type(group);
  621|       |
  622|   148k|    if (fid != NID_X9_62_characteristic_two_field)
  ------------------
  |  |  156|   148k|#define NID_X9_62_characteristic_two_field              407
  ------------------
  |  Branch (622:9): [True: 148k, False: 0]
  ------------------
  623|   148k|        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|   148k|{
  125|   148k|    BIGNUM *x = NULL, *y = NULL;
  126|   148k|    const BIGNUM *priv_key = NULL;
  127|   148k|    const EC_POINT *pub_point = NULL;
  128|   148k|    const EC_GROUP *ecg = NULL;
  129|   148k|    size_t pub_key_len = 0;
  130|   148k|    int ret = 0;
  131|   148k|    BN_CTX *bnctx = NULL;
  132|       |
  133|   148k|    if (eckey == NULL
  ------------------
  |  Branch (133:9): [True: 0, False: 148k]
  ------------------
  134|   148k|        || (ecg = EC_KEY_get0_group(eckey)) == NULL)
  ------------------
  |  Branch (134:12): [True: 0, False: 148k]
  ------------------
  135|      0|        return 0;
  136|       |
  137|   148k|    priv_key = EC_KEY_get0_private_key(eckey);
  138|   148k|    pub_point = EC_KEY_get0_public_key(eckey);
  139|       |
  140|   148k|    if (pub_point != NULL) {
  ------------------
  |  Branch (140:9): [True: 148k, False: 0]
  ------------------
  141|   148k|        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|   148k|        bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(eckey));
  147|   148k|        if (bnctx == NULL)
  ------------------
  |  Branch (147:13): [True: 0, False: 148k]
  ------------------
  148|      0|            goto err;
  149|       |
  150|       |        /* If we are doing a get then check first before decoding the point */
  151|   148k|        if (tmpl == NULL) {
  ------------------
  |  Branch (151:13): [True: 148k, False: 0]
  ------------------
  152|   148k|            p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_PUB_KEY);
  ------------------
  |  |  450|   148k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  153|   148k|            px = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_PUB_X);
  ------------------
  |  |  404|   148k|# define OSSL_PKEY_PARAM_EC_PUB_X "qx"
  ------------------
  154|   148k|            py = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_PUB_Y);
  ------------------
  |  |  405|   148k|# define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
  ------------------
  155|   148k|        }
  156|       |
  157|   148k|        if (p != NULL || tmpl != NULL) {
  ------------------
  |  Branch (157:13): [True: 0, False: 148k]
  |  Branch (157:26): [True: 0, False: 148k]
  ------------------
  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|   148k|        if (px != NULL || py != NULL) {
  ------------------
  |  Branch (170:13): [True: 0, False: 148k]
  |  Branch (170:27): [True: 0, False: 148k]
  ------------------
  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|   148k|    }
  194|       |
  195|   148k|    if (priv_key != NULL && include_private) {
  ------------------
  |  Branch (195:9): [True: 729, False: 147k]
  |  Branch (195:29): [True: 729, False: 0]
  ------------------
  196|    729|        size_t sz;
  197|    729|        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|    729|        ecbits = EC_GROUP_order_bits(ecg);
  233|    729|        if (ecbits <= 0)
  ------------------
  |  Branch (233:13): [True: 0, False: 729]
  ------------------
  234|      0|            goto err;
  235|    729|        sz = (ecbits + 7) / 8;
  236|       |
  237|    729|        if (!ossl_param_build_set_bn_pad(tmpl, params,
  ------------------
  |  Branch (237:13): [True: 0, False: 729]
  ------------------
  238|    729|                OSSL_PKEY_PARAM_PRIV_KEY,
  ------------------
  |  |  448|    729|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  239|    729|                priv_key, sz))
  240|      0|            goto err;
  241|    729|    }
  242|   148k|    ret = 1;
  243|   148k|err:
  244|   148k|    BN_CTX_free(bnctx);
  245|   148k|    return ret;
  246|   148k|}
ec_kmgmt.c:otherparams_to_params:
  250|   148k|{
  251|   148k|    int ecdh_cofactor_mode = 0, group_check = 0;
  252|   148k|    const char *name = NULL;
  253|   148k|    point_conversion_form_t format;
  254|       |
  255|   148k|    if (ec == NULL)
  ------------------
  |  Branch (255:9): [True: 0, False: 148k]
  ------------------
  256|      0|        return 0;
  257|       |
  258|   148k|    format = EC_KEY_get_conv_form(ec);
  259|   148k|    name = ossl_ec_pt_format_id2name((int)format);
  260|   148k|    if (name != NULL
  ------------------
  |  Branch (260:9): [True: 148k, False: 0]
  ------------------
  261|   148k|        && !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (261:12): [True: 0, False: 148k]
  ------------------
  262|   148k|            OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT,
  ------------------
  |  |  403|   148k|# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
  ------------------
  263|   148k|            name))
  264|      0|        return 0;
  265|       |
  266|   148k|    group_check = EC_KEY_get_flags(ec) & EC_FLAG_CHECK_NAMED_GROUP_MASK;
  ------------------
  |  |  967|   148k|    (EC_FLAG_CHECK_NAMED_GROUP | EC_FLAG_CHECK_NAMED_GROUP_NIST)
  |  |  ------------------
  |  |  |  |  964|   148k|#define EC_FLAG_CHECK_NAMED_GROUP 0x2000
  |  |  ------------------
  |  |                   (EC_FLAG_CHECK_NAMED_GROUP | EC_FLAG_CHECK_NAMED_GROUP_NIST)
  |  |  ------------------
  |  |  |  |  965|   148k|#define EC_FLAG_CHECK_NAMED_GROUP_NIST 0x4000
  |  |  ------------------
  ------------------
  267|   148k|    name = ossl_ec_check_group_type_id2name(group_check);
  268|   148k|    if (name != NULL
  ------------------
  |  Branch (268:9): [True: 148k, False: 0]
  ------------------
  269|   148k|        && !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (269:12): [True: 0, False: 148k]
  ------------------
  270|   148k|            OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE,
  ------------------
  |  |  399|   148k|# define OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE "group-check"
  ------------------
  271|   148k|            name))
  272|      0|        return 0;
  273|       |
  274|   148k|    if ((EC_KEY_get_enc_flags(ec) & EC_PKEY_NO_PUBKEY) != 0
  ------------------
  |  |  959|   148k|#define EC_PKEY_NO_PUBKEY 0x002
  ------------------
  |  Branch (274:9): [True: 0, False: 148k]
  ------------------
  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|   148k|    ecdh_cofactor_mode = (EC_KEY_get_flags(ec) & EC_FLAG_COFACTOR_ECDH) ? 1 : 0;
  ------------------
  |  |  963|   148k|#define EC_FLAG_COFACTOR_ECDH 0x1000
  ------------------
  |  Branch (279:26): [True: 0, False: 148k]
  ------------------
  280|   148k|    return ossl_param_build_set_int(tmpl, params,
  281|   148k|        OSSL_PKEY_PARAM_USE_COFACTOR_ECDH,
  ------------------
  |  |  509|   148k|# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
  |  |  ------------------
  |  |  |  |  510|   148k|# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
  |  |  ------------------
  ------------------
  282|   148k|        ecdh_cofactor_mode);
  283|   148k|}
ec_kmgmt.c:sm2_gen_init:
 1013|    160|{
 1014|    160|    struct ec_gen_ctx *gctx = ec_gen_init(provctx, selection, params);
 1015|       |
 1016|    160|    if (gctx != NULL) {
  ------------------
  |  Branch (1016:9): [True: 160, False: 0]
  ------------------
 1017|    160|        if (gctx->group_name != NULL)
  ------------------
  |  Branch (1017:13): [True: 0, False: 160]
  ------------------
 1018|      0|            return gctx;
 1019|    160|        if ((gctx->group_name = OPENSSL_strdup("sm2")) != NULL)
  ------------------
  |  |  136|    160|    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: 160, False: 0]
  ------------------
 1020|    160|            return gctx;
 1021|      0|        ec_gen_cleanup(gctx);
 1022|      0|    }
 1023|      0|    return NULL;
 1024|    160|}
ec_kmgmt.c:sm2_gen:
 1348|    160|{
 1349|    160|    struct ec_gen_ctx *gctx = genctx;
 1350|    160|    EC_KEY *ec = NULL;
 1351|    160|    int ret = 1;
 1352|       |
 1353|    160|    if (gctx == NULL
  ------------------
  |  Branch (1353:9): [True: 0, False: 160]
  ------------------
 1354|    160|        || (ec = EC_KEY_new_ex(gctx->libctx, NULL)) == NULL)
  ------------------
  |  Branch (1354:12): [True: 0, False: 160]
  ------------------
 1355|      0|        return NULL;
 1356|       |
 1357|    160|    if (gctx->gen_group == NULL) {
  ------------------
  |  Branch (1357:9): [True: 160, False: 0]
  ------------------
 1358|    160|        if (!ec_gen_set_group_from_params(gctx))
  ------------------
  |  Branch (1358:13): [True: 0, False: 160]
  ------------------
 1359|      0|            goto err;
 1360|    160|    } 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|    160|    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|    160|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0)
  ------------------
  |  |  656|    160|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|    160|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|    160|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (1381:9): [True: 160, False: 0]
  ------------------
 1382|    160|        ret = ret && EC_KEY_generate_key(ec);
  ------------------
  |  Branch (1382:15): [True: 160, False: 0]
  |  Branch (1382:22): [True: 160, False: 0]
  ------------------
 1383|       |
 1384|    160|    if (ret)
  ------------------
  |  Branch (1384:9): [True: 160, False: 0]
  ------------------
 1385|    160|        return ec;
 1386|      0|err:
 1387|       |    /* Something went wrong, throw the key away */
 1388|      0|    EC_KEY_free(ec);
 1389|       |    return NULL;
 1390|    160|}
ec_kmgmt.c:sm2_get_params:
  854|    480|{
  855|    480|    return common_get_params(key, params, 1);
  856|    480|}

ecx_kmgmt.c:ecx_free_key:
  998|  3.78k|{
  999|  3.78k|    ossl_ecx_key_free((ECX_KEY *)keydata);
 1000|  3.78k|}
ecx_kmgmt.c:x25519_get_params:
  367|  7.51k|{
  368|  7.51k|    return ecx_get_params(key, params, X25519_BITS, X25519_SECURITY_BITS,
  ------------------
  |  |   33|  7.51k|#define X25519_BITS 253
  ------------------
                  return ecx_get_params(key, params, X25519_BITS, X25519_SECURITY_BITS,
  ------------------
  |  |   34|  7.51k|#define X25519_SECURITY_BITS 128
  ------------------
  369|  7.51k|        X25519_KEYLEN);
  ------------------
  |  |   26|  7.51k|#define X25519_KEYLEN 32
  ------------------
  370|  7.51k|}
ecx_kmgmt.c:ecx_get_params:
  330|  7.60k|{
  331|  7.60k|    ECX_KEY *ecx = key;
  332|  7.60k|    struct ecx_ed_common_get_params_st p;
  333|       |
  334|  7.60k|    if (key == NULL || !ecx_get_params_decoder(params, &p))
  ------------------
  |  Branch (334:9): [True: 0, False: 7.60k]
  |  Branch (334:24): [True: 0, False: 7.60k]
  ------------------
  335|      0|        return 0;
  336|       |
  337|  7.60k|    if (p.encpub != NULL
  ------------------
  |  Branch (337:9): [True: 3.81k, False: 3.78k]
  ------------------
  338|  3.81k|        && !OSSL_PARAM_set_octet_string(p.encpub, ecx->pubkey, ecx->keylen))
  ------------------
  |  Branch (338:12): [True: 0, False: 3.81k]
  ------------------
  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|  7.60k|    return ecx_ed_common_get_params(key, &p, bits, secbits, size);
  351|  7.60k|}
ecx_kmgmt.c:ecx_ed_common_get_params:
  313|  7.60k|{
  314|  7.60k|    ECX_KEY *ecx = key;
  315|       |
  316|  7.60k|    if (p->bits != NULL && !OSSL_PARAM_set_int(p->bits, bits))
  ------------------
  |  Branch (316:9): [True: 3.78k, False: 3.81k]
  |  Branch (316:28): [True: 0, False: 3.78k]
  ------------------
  317|      0|        return 0;
  318|  7.60k|    if (p->secbits != NULL && !OSSL_PARAM_set_int(p->secbits, secbits))
  ------------------
  |  Branch (318:9): [True: 3.78k, False: 3.81k]
  |  Branch (318:31): [True: 0, False: 3.78k]
  ------------------
  319|      0|        return 0;
  320|  7.60k|    if (p->size != NULL && !OSSL_PARAM_set_int(p->size, size))
  ------------------
  |  Branch (320:9): [True: 3.78k, False: 3.81k]
  |  Branch (320:28): [True: 0, False: 3.78k]
  ------------------
  321|      0|        return 0;
  322|  7.60k|    if (p->seccat != NULL && !OSSL_PARAM_set_int(p->seccat, 0))
  ------------------
  |  Branch (322:9): [True: 3.78k, False: 3.81k]
  |  Branch (322:30): [True: 0, False: 3.78k]
  ------------------
  323|      0|        return 0;
  324|  7.60k|    return key_to_params(ecx, NULL, p->pub, p->priv, 1);
  325|  7.60k|}
ecx_kmgmt.c:key_to_params:
  247|  9.48k|{
  248|  9.48k|    if (key == NULL)
  ------------------
  |  Branch (248:9): [True: 0, False: 9.48k]
  ------------------
  249|      0|        return 0;
  250|       |
  251|  9.48k|    if (!ossl_param_build_set_octet_string(tmpl, pub,
  ------------------
  |  Branch (251:9): [True: 0, False: 9.48k]
  ------------------
  252|  9.48k|            OSSL_PKEY_PARAM_PUB_KEY,
  ------------------
  |  |  450|  9.48k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  253|  9.48k|            key->pubkey, key->keylen))
  254|      0|        return 0;
  255|       |
  256|  9.48k|    if (include_private
  ------------------
  |  Branch (256:9): [True: 7.60k, False: 1.88k]
  ------------------
  257|  7.60k|        && key->privkey != NULL
  ------------------
  |  Branch (257:12): [True: 7.60k, False: 0]
  ------------------
  258|  7.60k|        && !ossl_param_build_set_octet_string(tmpl, priv,
  ------------------
  |  Branch (258:12): [True: 0, False: 7.60k]
  ------------------
  259|  7.60k|            OSSL_PKEY_PARAM_PRIV_KEY,
  ------------------
  |  |  448|  7.60k|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  260|  7.60k|            key->privkey, key->keylen))
  261|      0|        return 0;
  262|       |
  263|  9.48k|    return 1;
  264|  9.48k|}
ecx_kmgmt.c:ecx_export:
  268|  1.88k|{
  269|  1.88k|    ECX_KEY *key = keydata;
  270|  1.88k|    OSSL_PARAM_BLD *tmpl;
  271|  1.88k|    OSSL_PARAM *params = NULL;
  272|  1.88k|    int ret = 0;
  273|       |
  274|  1.88k|    if (!ossl_prov_is_running() || key == NULL)
  ------------------
  |  Branch (274:9): [True: 0, False: 1.88k]
  |  Branch (274:36): [True: 0, False: 1.88k]
  ------------------
  275|      0|        return 0;
  276|       |
  277|  1.88k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  1.88k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  1.88k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  1.88k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (277:9): [True: 0, False: 1.88k]
  ------------------
  278|      0|        return 0;
  279|       |
  280|  1.88k|    tmpl = OSSL_PARAM_BLD_new();
  281|  1.88k|    if (tmpl == NULL)
  ------------------
  |  Branch (281:9): [True: 0, False: 1.88k]
  ------------------
  282|      0|        return 0;
  283|       |
  284|  1.88k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
  ------------------
  |  |  656|  1.88k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  1.88k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  1.88k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (284:9): [True: 1.88k, False: 0]
  ------------------
  285|  1.88k|        int include_private = ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0);
  ------------------
  |  |  646|  1.88k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  286|       |
  287|  1.88k|        if (!key_to_params(key, tmpl, NULL, NULL, include_private))
  ------------------
  |  Branch (287:13): [True: 0, False: 1.88k]
  ------------------
  288|      0|            goto err;
  289|  1.88k|    }
  290|       |
  291|  1.88k|    params = OSSL_PARAM_BLD_to_param(tmpl);
  292|  1.88k|    if (params == NULL)
  ------------------
  |  Branch (292:9): [True: 0, False: 1.88k]
  ------------------
  293|      0|        goto err;
  294|       |
  295|  1.88k|    ret = param_cb(params, cbarg);
  296|  1.88k|    OSSL_PARAM_clear_free(params);
  297|  1.88k|err:
  298|  1.88k|    OSSL_PARAM_BLD_free(tmpl);
  299|  1.88k|    return ret;
  300|  1.88k|}
ecx_kmgmt.c:x25519_gen_init:
  528|  3.75k|{
  529|  3.75k|    return ecx_gen_init(provctx, selection, params, ECX_KEY_TYPE_X25519, "X25519");
  530|  3.75k|}
ecx_kmgmt.c:ecx_gen_init:
  497|  3.78k|{
  498|  3.78k|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(provctx);
  ------------------
  |  |   31|  3.78k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  499|  3.78k|    struct ecx_gen_ctx *gctx = NULL;
  500|       |
  501|  3.78k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (501:9): [True: 0, False: 3.78k]
  ------------------
  502|      0|        return NULL;
  503|       |
  504|  3.78k|    if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) {
  ------------------
  |  |  109|  3.78k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (504:9): [True: 3.78k, False: 0]
  ------------------
  505|  3.78k|        gctx->libctx = libctx;
  506|  3.78k|        gctx->type = type;
  507|  3.78k|        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|  3.78k|    } else {
  517|      0|        return NULL;
  518|      0|    }
  519|  3.78k|    if (!ecx_gen_set_params(gctx, params)) {
  ------------------
  |  Branch (519:9): [True: 0, False: 3.78k]
  ------------------
  520|      0|        ecx_gen_cleanup(gctx);
  521|       |        gctx = NULL;
  522|      0|    }
  523|  3.78k|    return gctx;
  524|  3.78k|}
ecx_kmgmt.c:ecx_gen_set_params:
  551|  7.57k|{
  552|  7.57k|    struct ecx_gen_ctx *gctx = genctx;
  553|  7.57k|    struct ecx_gen_set_params_st p;
  554|       |
  555|  7.57k|    if (gctx == NULL || !ecx_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (555:9): [True: 0, False: 7.57k]
  |  Branch (555:25): [True: 0, False: 7.57k]
  ------------------
  556|      0|        return 0;
  557|       |
  558|  7.57k|    if (p.group != NULL) {
  ------------------
  |  Branch (558:9): [True: 1.90k, False: 5.66k]
  ------------------
  559|  1.90k|        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.90k|        switch (gctx->type) {
  567|  1.87k|        case ECX_KEY_TYPE_X25519:
  ------------------
  |  Branch (567:9): [True: 1.87k, False: 30]
  ------------------
  568|  1.87k|            groupname = "x25519";
  569|  1.87k|            break;
  570|     30|        case ECX_KEY_TYPE_X448:
  ------------------
  |  Branch (570:9): [True: 30, False: 1.87k]
  ------------------
  571|     30|            groupname = "x448";
  572|     30|            break;
  573|      0|        default:
  ------------------
  |  Branch (573:9): [True: 0, False: 1.90k]
  ------------------
  574|       |            /* We only support this for key exchange at the moment */
  575|      0|            break;
  576|  1.90k|        }
  577|  1.90k|        if (p.group->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|  3.81k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (577:13): [True: 0, False: 1.90k]
  ------------------
  578|  1.90k|            || groupname == NULL
  ------------------
  |  Branch (578:16): [True: 0, False: 1.90k]
  ------------------
  579|  1.90k|            || OPENSSL_strcasecmp(p.group->data, groupname) != 0) {
  ------------------
  |  Branch (579:16): [True: 0, False: 1.90k]
  ------------------
  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.90k|    }
  584|       |
  585|  7.57k|    if (p.kdfpropq != NULL) {
  ------------------
  |  Branch (585:9): [True: 0, False: 7.57k]
  ------------------
  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|  7.57k|    if (p.ikm != NULL) {
  ------------------
  |  Branch (594:9): [True: 0, False: 7.57k]
  ------------------
  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|  7.57k|    return 1;
  605|  7.57k|}
ecx_kmgmt.c:x25519_gen:
  748|  3.75k|{
  749|  3.75k|    struct ecx_gen_ctx *gctx = genctx;
  750|       |
  751|  3.75k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (751:9): [True: 0, False: 3.75k]
  ------------------
  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|  3.75k|    return ecx_gen(gctx);
  759|  3.75k|}
ecx_kmgmt.c:ecx_gen:
  682|  3.78k|{
  683|  3.78k|    ECX_KEY *key;
  684|  3.78k|    unsigned char *privkey;
  685|       |
  686|  3.78k|    if (gctx == NULL)
  ------------------
  |  Branch (686:9): [True: 0, False: 3.78k]
  ------------------
  687|      0|        return NULL;
  688|  3.78k|    if ((key = ossl_ecx_key_new(gctx->libctx, gctx->type, 0,
  ------------------
  |  Branch (688:9): [True: 0, False: 3.78k]
  ------------------
  689|  3.78k|             gctx->propq))
  690|  3.78k|        == 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|  3.78k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  3.78k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  3.78k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  3.78k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (696:9): [True: 0, False: 3.78k]
  ------------------
  697|      0|        return key;
  698|       |
  699|  3.78k|    if ((privkey = ossl_ecx_key_allocate_privkey(key)) == NULL) {
  ------------------
  |  Branch (699:9): [True: 0, False: 3.78k]
  ------------------
  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|  3.78k|#ifndef FIPS_MODULE
  704|  3.78k|    if (gctx->dhkem_ikm != NULL && gctx->dhkem_ikmlen != 0) {
  ------------------
  |  Branch (704:9): [True: 0, False: 3.78k]
  |  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|  3.78k|#endif
  712|  3.78k|    {
  713|  3.78k|        if (RAND_priv_bytes_ex(gctx->libctx, privkey, key->keylen, 0) <= 0)
  ------------------
  |  Branch (713:13): [True: 0, False: 3.78k]
  ------------------
  714|      0|            goto err;
  715|  3.78k|    }
  716|       |
  717|  3.78k|    switch (gctx->type) {
  ------------------
  |  Branch (717:13): [True: 3.78k, False: 0]
  ------------------
  718|  3.75k|    case ECX_KEY_TYPE_X25519:
  ------------------
  |  Branch (718:5): [True: 3.75k, False: 30]
  ------------------
  719|  3.75k|        privkey[0] &= 248;
  720|  3.75k|        privkey[X25519_KEYLEN - 1] &= 127;
  ------------------
  |  |   26|  3.75k|#define X25519_KEYLEN 32
  ------------------
  721|  3.75k|        privkey[X25519_KEYLEN - 1] |= 64;
  ------------------
  |  |   26|  3.75k|#define X25519_KEYLEN 32
  ------------------
  722|  3.75k|        ossl_x25519_public_from_private(key->pubkey, privkey);
  723|  3.75k|        break;
  724|     30|    case ECX_KEY_TYPE_X448:
  ------------------
  |  Branch (724:5): [True: 30, False: 3.75k]
  ------------------
  725|     30|        privkey[0] &= 252;
  726|     30|        privkey[X448_KEYLEN - 1] |= 128;
  ------------------
  |  |   27|     30|#define X448_KEYLEN 56
  ------------------
  727|     30|        ossl_x448_public_from_private(key->pubkey, privkey);
  728|     30|        break;
  729|      0|    case ECX_KEY_TYPE_ED25519:
  ------------------
  |  Branch (729:5): [True: 0, False: 3.78k]
  ------------------
  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: 3.78k]
  ------------------
  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|  3.78k|    }
  740|  3.78k|    key->haspubkey = 1;
  741|  3.78k|    return key;
  742|      0|err:
  743|      0|    ossl_ecx_key_free(key);
  744|       |    return NULL;
  745|  3.78k|}
ecx_kmgmt.c:ecx_gen_cleanup:
  843|  3.78k|{
  844|  3.78k|    struct ecx_gen_ctx *gctx = genctx;
  845|       |
  846|  3.78k|    if (gctx == NULL)
  ------------------
  |  Branch (846:9): [True: 0, False: 3.78k]
  ------------------
  847|      0|        return;
  848|       |
  849|  3.78k|    OPENSSL_clear_free(gctx->dhkem_ikm, gctx->dhkem_ikmlen);
  ------------------
  |  |  130|  3.78k|    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|  3.78k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|  3.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__
  |  |  ------------------
  ------------------
  851|  3.78k|    OPENSSL_free(gctx);
  ------------------
  |  |  132|  3.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__
  |  |  ------------------
  ------------------
  852|  3.78k|}
ecx_kmgmt.c:x448_get_params:
  373|     90|{
  374|     90|    return ecx_get_params(key, params, X448_BITS, X448_SECURITY_BITS,
  ------------------
  |  |   36|     90|#define X448_BITS 448
  ------------------
                  return ecx_get_params(key, params, X448_BITS, X448_SECURITY_BITS,
  ------------------
  |  |   37|     90|#define X448_SECURITY_BITS 224
  ------------------
  375|     90|        X448_KEYLEN);
  ------------------
  |  |   27|     90|#define X448_KEYLEN 56
  ------------------
  376|     90|}
ecx_kmgmt.c:x448_gen_init:
  534|     30|{
  535|     30|    return ecx_gen_init(provctx, selection, params, ECX_KEY_TYPE_X448, "X448");
  536|     30|}
ecx_kmgmt.c:x448_gen:
  762|     30|{
  763|     30|    struct ecx_gen_ctx *gctx = genctx;
  764|       |
  765|     30|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (765:9): [True: 0, False: 30]
  ------------------
  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|     30|    return ecx_gen(gctx);
  773|     30|}

ecx_kmgmt.c:ecx_get_params_decoder:
  107|  7.60k|{
  108|  7.60k|    const char *s;
  109|       |
  110|  7.60k|    memset(r, 0, sizeof(*r));
  111|  7.60k|    if (p != NULL)
  ------------------
  |  Branch (111:9): [True: 7.60k, False: 0]
  ------------------
  112|  26.5k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (112:16): [True: 18.9k, False: 7.60k]
  ------------------
  113|  18.9k|            switch(s[0]) {
  114|      0|            default:
  ------------------
  |  Branch (114:13): [True: 0, False: 18.9k]
  ------------------
  115|      0|                break;
  116|  3.78k|            case 'b':
  ------------------
  |  Branch (116:13): [True: 3.78k, False: 15.1k]
  ------------------
  117|  3.78k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  3.78k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.78k, False: 0]
  |  |  ------------------
  ------------------
  118|       |                    /* OSSL_PKEY_PARAM_BITS */
  119|  3.78k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  3.78k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.78k]
  |  |  ------------------
  ------------------
  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|  3.78k|                    r->bits = (OSSL_PARAM *)p;
  125|  3.78k|                }
  126|  3.78k|                break;
  127|  3.81k|            case 'e':
  ------------------
  |  Branch (127:13): [True: 3.81k, False: 15.1k]
  ------------------
  128|  3.81k|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|  3.81k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.81k, False: 0]
  |  |  ------------------
  ------------------
  129|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  130|  3.81k|                    if (ossl_unlikely(r->encpub != NULL)) {
  ------------------
  |  |   23|  3.81k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.81k]
  |  |  ------------------
  ------------------
  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|  3.81k|                    r->encpub = (OSSL_PARAM *)p;
  136|  3.81k|                }
  137|  3.81k|                break;
  138|  3.81k|            case 'f':
  ------------------
  |  Branch (138:13): [True: 0, False: 18.9k]
  ------------------
  139|       |# if defined(FIPS_MODULE)
  140|       |                if (ossl_likely(strcmp("ips-indicator", s + 1) == 0)) {
  141|       |                    /* OSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR */
  142|       |                    if (ossl_unlikely(r->ind != NULL)) {
  143|       |                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  144|       |                                       "param %s is repeated", s);
  145|       |                        return 0;
  146|       |                    }
  147|       |                    r->ind = (OSSL_PARAM *)p;
  148|       |                }
  149|       |# endif
  150|      0|                break;
  151|  3.78k|            case 'm':
  ------------------
  |  Branch (151:13): [True: 3.78k, False: 15.1k]
  ------------------
  152|  3.78k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  3.78k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.78k, False: 0]
  |  |  ------------------
  ------------------
  153|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  154|  3.78k|                    if (ossl_unlikely(r->size != NULL)) {
  ------------------
  |  |   23|  3.78k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.78k]
  |  |  ------------------
  ------------------
  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|  3.78k|                    r->size = (OSSL_PARAM *)p;
  160|  3.78k|                }
  161|  3.78k|                break;
  162|  3.78k|            case 'p':
  ------------------
  |  Branch (162:13): [True: 0, False: 18.9k]
  ------------------
  163|      0|                switch(s[1]) {
  164|      0|                default:
  ------------------
  |  Branch (164:17): [True: 0, False: 0]
  ------------------
  165|      0|                    break;
  166|      0|                case 'r':
  ------------------
  |  Branch (166:17): [True: 0, False: 0]
  ------------------
  167|      0|                    if (ossl_likely(strcmp("iv", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  168|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
  169|      0|                        if (ossl_unlikely(r->priv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  170|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  171|      0|                                           "param %s is repeated", s);
  172|      0|                            return 0;
  173|      0|                        }
  174|      0|                        r->priv = (OSSL_PARAM *)p;
  175|      0|                    }
  176|      0|                    break;
  177|      0|                case 'u':
  ------------------
  |  Branch (177:17): [True: 0, False: 0]
  ------------------
  178|      0|                    if (ossl_likely(strcmp("b", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  179|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
  180|      0|                        if (ossl_unlikely(r->pub != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  181|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  182|      0|                                           "param %s is repeated", s);
  183|      0|                            return 0;
  184|      0|                        }
  185|      0|                        r->pub = (OSSL_PARAM *)p;
  186|      0|                    }
  187|      0|                }
  188|      0|                break;
  189|  7.57k|            case 's':
  ------------------
  |  Branch (189:13): [True: 7.57k, False: 11.3k]
  ------------------
  190|  7.57k|                switch(s[1]) {
  191|      0|                default:
  ------------------
  |  Branch (191:17): [True: 0, False: 7.57k]
  ------------------
  192|      0|                    break;
  193|  7.57k|                case 'e':
  ------------------
  |  Branch (193:17): [True: 7.57k, False: 0]
  ------------------
  194|  7.57k|                    switch(s[2]) {
  195|      0|                    default:
  ------------------
  |  Branch (195:21): [True: 0, False: 7.57k]
  ------------------
  196|      0|                        break;
  197|  7.57k|                    case 'c':
  ------------------
  |  Branch (197:21): [True: 7.57k, False: 0]
  ------------------
  198|  7.57k|                        switch(s[3]) {
  199|      0|                        default:
  ------------------
  |  Branch (199:25): [True: 0, False: 7.57k]
  ------------------
  200|      0|                            break;
  201|  7.57k|                        case 'u':
  ------------------
  |  Branch (201:25): [True: 7.57k, False: 0]
  ------------------
  202|  7.57k|                            switch(s[4]) {
  203|      0|                            default:
  ------------------
  |  Branch (203:29): [True: 0, False: 7.57k]
  ------------------
  204|      0|                                break;
  205|  7.57k|                            case 'r':
  ------------------
  |  Branch (205:29): [True: 7.57k, False: 0]
  ------------------
  206|  7.57k|                                switch(s[5]) {
  207|      0|                                default:
  ------------------
  |  Branch (207:33): [True: 0, False: 7.57k]
  ------------------
  208|      0|                                    break;
  209|  7.57k|                                case 'i':
  ------------------
  |  Branch (209:33): [True: 7.57k, False: 0]
  ------------------
  210|  7.57k|                                    switch(s[6]) {
  211|      0|                                    default:
  ------------------
  |  Branch (211:37): [True: 0, False: 7.57k]
  ------------------
  212|      0|                                        break;
  213|  7.57k|                                    case 't':
  ------------------
  |  Branch (213:37): [True: 7.57k, False: 0]
  ------------------
  214|  7.57k|                                        switch(s[7]) {
  215|      0|                                        default:
  ------------------
  |  Branch (215:41): [True: 0, False: 7.57k]
  ------------------
  216|      0|                                            break;
  217|  7.57k|                                        case 'y':
  ------------------
  |  Branch (217:41): [True: 7.57k, False: 0]
  ------------------
  218|  7.57k|                                            switch(s[8]) {
  219|      0|                                            default:
  ------------------
  |  Branch (219:45): [True: 0, False: 7.57k]
  ------------------
  220|      0|                                                break;
  221|  7.57k|                                            case '-':
  ------------------
  |  Branch (221:45): [True: 7.57k, False: 0]
  ------------------
  222|  7.57k|                                                switch(s[9]) {
  223|      0|                                                default:
  ------------------
  |  Branch (223:49): [True: 0, False: 7.57k]
  ------------------
  224|      0|                                                    break;
  225|  3.78k|                                                case 'b':
  ------------------
  |  Branch (225:49): [True: 3.78k, False: 3.78k]
  ------------------
  226|  3.78k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  3.78k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.78k, False: 0]
  |  |  ------------------
  ------------------
  227|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  228|  3.78k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  3.78k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.78k]
  |  |  ------------------
  ------------------
  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|  3.78k|                                                        r->secbits = (OSSL_PARAM *)p;
  234|  3.78k|                                                    }
  235|  3.78k|                                                    break;
  236|  3.78k|                                                case 'c':
  ------------------
  |  Branch (236:49): [True: 3.78k, False: 3.78k]
  ------------------
  237|  3.78k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  3.78k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.78k, False: 0]
  |  |  ------------------
  ------------------
  238|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  239|  3.78k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  3.78k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.78k]
  |  |  ------------------
  ------------------
  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|  3.78k|                                                        r->seccat = (OSSL_PARAM *)p;
  245|  3.78k|                                                    }
  246|  7.57k|                                                }
  247|  7.57k|                                            }
  248|  7.57k|                                        }
  249|  7.57k|                                    }
  250|  7.57k|                                }
  251|  7.57k|                            }
  252|  7.57k|                        }
  253|  7.57k|                    }
  254|  7.57k|                }
  255|  18.9k|            }
  256|  7.60k|    return 1;
  257|  7.60k|}
ecx_kmgmt.c:ecx_gen_set_params_decoder:
  517|  7.57k|{
  518|  7.57k|    const char *s;
  519|       |
  520|  7.57k|    memset(r, 0, sizeof(*r));
  521|  7.57k|    if (p != NULL)
  ------------------
  |  Branch (521:9): [True: 3.78k, False: 3.78k]
  ------------------
  522|  5.69k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (522:16): [True: 1.90k, False: 3.78k]
  ------------------
  523|  1.90k|            switch(s[0]) {
  524|      0|            default:
  ------------------
  |  Branch (524:13): [True: 0, False: 1.90k]
  ------------------
  525|      0|                break;
  526|      0|            case 'd':
  ------------------
  |  Branch (526:13): [True: 0, False: 1.90k]
  ------------------
  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.90k|            case 'g':
  ------------------
  |  Branch (537:13): [True: 1.90k, False: 0]
  ------------------
  538|  1.90k|                if (ossl_likely(strcmp("roup", s + 1) == 0)) {
  ------------------
  |  |   22|  1.90k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.90k, False: 0]
  |  |  ------------------
  ------------------
  539|       |                    /* OSSL_PKEY_PARAM_GROUP_NAME */
  540|  1.90k|                    if (ossl_unlikely(r->group != NULL)) {
  ------------------
  |  |   23|  1.90k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.90k]
  |  |  ------------------
  ------------------
  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.90k|                    r->group = (OSSL_PARAM *)p;
  546|  1.90k|                }
  547|  1.90k|                break;
  548|  1.90k|            case 'p':
  ------------------
  |  Branch (548:13): [True: 0, False: 1.90k]
  ------------------
  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.90k|            }
  559|  7.57k|    return 1;
  560|  7.57k|}

ossl_prov_ml_kem_new:
  162|  1.88k|{
  163|  1.88k|    ML_KEM_KEY *key;
  164|       |
  165|  1.88k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (165:9): [True: 0, False: 1.88k]
  ------------------
  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.88k|    if ((key = ossl_ml_kem_key_new(PROV_LIBCTX_OF(ctx), propq, evp_type)) != NULL) {
  ------------------
  |  |   31|  1.88k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  |  Branch (180:9): [True: 1.88k, False: 0]
  ------------------
  181|  1.88k|        const char *pct_type = ossl_prov_ctx_get_param(
  182|  1.88k|            ctx, OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE, "random");
  ------------------
  |  |  440|  1.88k|# define OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE "ml-kem.import_pct_type"
  ------------------
  183|       |
  184|  1.88k|        if (ossl_prov_ctx_get_bool_param(
  ------------------
  |  Branch (184:13): [True: 1.88k, False: 0]
  ------------------
  185|  1.88k|                ctx, OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED, 1))
  ------------------
  |  |  444|  1.88k|# define OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED "ml-kem.retain_seed"
  ------------------
  186|  1.88k|            key->prov_flags |= ML_KEM_KEY_RETAIN_SEED;
  ------------------
  |  |  126|  1.88k|#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.88k|        if (ossl_prov_ctx_get_bool_param(
  ------------------
  |  Branch (189:13): [True: 1.88k, False: 0]
  ------------------
  190|  1.88k|                ctx, OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED, 1))
  ------------------
  |  |  443|  1.88k|# define OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED "ml-kem.prefer_seed"
  ------------------
  191|  1.88k|            key->prov_flags |= ML_KEM_KEY_PREFER_SEED;
  ------------------
  |  |  125|  1.88k|#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.88k|        if (OPENSSL_strcasecmp(pct_type, "random") == 0)
  ------------------
  |  Branch (194:13): [True: 1.88k, False: 0]
  ------------------
  195|  1.88k|            key->prov_flags |= ML_KEM_KEY_RANDOM_PCT;
  ------------------
  |  |  123|  1.88k|#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.88k|    }
  201|  1.88k|    return key;
  202|  1.88k|}
ml_kem_kmgmt.c:ml_kem_free_key:
  817|  1.88k|{
  818|  1.88k|    ossl_ml_kem_key_free((ML_KEM_KEY *)keydata);
  819|  1.88k|}
ml_kem_kmgmt.c:ml_kem_get_params:
  569|  1.88k|{
  570|  1.88k|    ML_KEM_KEY *key = vkey;
  571|  1.88k|    const ML_KEM_VINFO *v;
  572|  1.88k|    struct ml_kem_get_params_st p;
  573|       |
  574|  1.88k|    if (key == NULL || !ml_kem_get_params_decoder(params, &p))
  ------------------
  |  Branch (574:9): [True: 0, False: 1.88k]
  |  Branch (574:24): [True: 0, False: 1.88k]
  ------------------
  575|      0|        return 0;
  576|       |
  577|  1.88k|    v = ossl_ml_kem_key_vinfo(key);
  ------------------
  |  |  206|  1.88k|#define ossl_ml_kem_key_vinfo(key) ((key)->vinfo)
  ------------------
  578|       |
  579|  1.88k|    if (p.bits != NULL && !OSSL_PARAM_set_size_t(p.bits, v->bits))
  ------------------
  |  Branch (579:9): [True: 1.88k, False: 0]
  |  Branch (579:27): [True: 0, False: 1.88k]
  ------------------
  580|      0|        return 0;
  581|       |
  582|  1.88k|    if (p.secbits != NULL && !OSSL_PARAM_set_size_t(p.secbits, v->secbits))
  ------------------
  |  Branch (582:9): [True: 1.88k, False: 0]
  |  Branch (582:30): [True: 0, False: 1.88k]
  ------------------
  583|      0|        return 0;
  584|       |
  585|  1.88k|    if (p.maxsize != NULL && !OSSL_PARAM_set_size_t(p.maxsize, v->ctext_bytes))
  ------------------
  |  Branch (585:9): [True: 1.88k, False: 0]
  |  Branch (585:30): [True: 0, False: 1.88k]
  ------------------
  586|      0|        return 0;
  587|       |
  588|  1.88k|    if (p.seccat != NULL && !OSSL_PARAM_set_int(p.seccat, v->security_category))
  ------------------
  |  Branch (588:9): [True: 1.88k, False: 0]
  |  Branch (588:29): [True: 0, False: 1.88k]
  ------------------
  589|      0|        return 0;
  590|       |
  591|  1.88k|    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.88k]
  ------------------
  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.88k|    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.88k]
  ------------------
  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.88k|    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.88k]
  ------------------
  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.88k|    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.88k]
  ------------------
  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.88k|#ifndef OPENSSL_NO_CMS
  620|  1.88k|    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.88k]
  |  Branch (620:30): [True: 0, False: 0]
  ------------------
  621|      0|        return 0;
  622|       |
  623|  1.88k|    if (p.kemri_kdf_alg != NULL) {
  ------------------
  |  Branch (623:9): [True: 0, False: 1.88k]
  ------------------
  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.88k|#endif
  646|       |
  647|  1.88k|    return 1;
  648|  1.88k|}
ml_kem_kmgmt.c:ml_kem_gen_init:
  722|  1.88k|{
  723|  1.88k|    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.88k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (729:9): [True: 0, False: 1.88k]
  ------------------
  730|  1.88k|        || (selection & minimal_selection) == 0
  ------------------
  |  Branch (730:12): [True: 0, False: 1.88k]
  ------------------
  731|  1.88k|        || (gctx = OPENSSL_zalloc(sizeof(*gctx))) == NULL)
  ------------------
  |  |  109|  1.88k|    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.88k]
  ------------------
  732|      0|        return NULL;
  733|       |
  734|  1.88k|    gctx->selection = selection;
  735|  1.88k|    gctx->evp_type = evp_type;
  736|  1.88k|    gctx->provctx = provctx;
  737|  1.88k|    if (ml_kem_gen_set_params(gctx, params))
  ------------------
  |  Branch (737:9): [True: 1.88k, False: 0]
  ------------------
  738|  1.88k|        return gctx;
  739|       |
  740|      0|    ml_kem_gen_cleanup(gctx);
  741|       |    return NULL;
  742|  1.88k|}
ml_kem_kmgmt.c:ml_kem_gen_set_params:
  688|  3.76k|{
  689|  3.76k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  690|  3.76k|    struct ml_kem_gen_set_params_st p;
  691|       |
  692|  3.76k|    if (gctx == NULL || !ml_kem_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (692:9): [True: 0, False: 3.76k]
  |  Branch (692:25): [True: 0, False: 3.76k]
  ------------------
  693|      0|        return 0;
  694|       |
  695|  3.76k|    if (p.propq != NULL) {
  ------------------
  |  Branch (695:9): [True: 0, False: 3.76k]
  ------------------
  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|  3.76k|    if (p.seed != NULL) {
  ------------------
  |  Branch (703:9): [True: 0, False: 3.76k]
  ------------------
  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|  3.76k|    return 1;
  718|  3.76k|}
ml_kem_kmgmt.c:ml_kem_gen:
  751|  1.88k|{
  752|  1.88k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  753|  1.88k|    ML_KEM_KEY *key;
  754|  1.88k|    uint8_t *nopub = NULL;
  755|  1.88k|    uint8_t *seed;
  756|  1.88k|    int genok = 0;
  757|       |
  758|  1.88k|    if (gctx == NULL
  ------------------
  |  Branch (758:9): [True: 0, False: 1.88k]
  ------------------
  759|  1.88k|        || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  656|  1.88k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  1.88k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  1.88k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
                      || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  647|  1.88k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (759:12): [True: 0, False: 1.88k]
  ------------------
  760|      0|        return NULL;
  761|  1.88k|    seed = gctx->seed;
  762|  1.88k|    key = ossl_prov_ml_kem_new(gctx->provctx, gctx->propq, gctx->evp_type);
  763|  1.88k|    if (key == NULL)
  ------------------
  |  Branch (763:9): [True: 0, False: 1.88k]
  ------------------
  764|      0|        return NULL;
  765|       |
  766|  1.88k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  1.88k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  1.88k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  1.88k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (766:9): [True: 0, False: 1.88k]
  ------------------
  767|      0|        return key;
  768|       |
  769|  1.88k|    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.88k]
  |  Branch (769:25): [True: 0, False: 0]
  ------------------
  770|      0|        return NULL;
  771|  1.88k|    genok = ossl_ml_kem_genkey(nopub, 0, key);
  772|       |
  773|       |    /* Erase the single-use seed */
  774|  1.88k|    if (seed != NULL)
  ------------------
  |  Branch (774:9): [True: 0, False: 1.88k]
  ------------------
  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.88k|    gctx->seed = NULL;
  777|       |
  778|  1.88k|    if (genok) {
  ------------------
  |  Branch (778:9): [True: 1.88k, 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.88k|        return key;
  787|  1.88k|    }
  788|       |
  789|      0|    ossl_ml_kem_key_free(key);
  790|       |    return NULL;
  791|  1.88k|}
ml_kem_kmgmt.c:ml_kem_gen_cleanup:
  794|  1.88k|{
  795|  1.88k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  796|       |
  797|  1.88k|    if (gctx == NULL)
  ------------------
  |  Branch (797:9): [True: 0, False: 1.88k]
  ------------------
  798|      0|        return;
  799|       |
  800|  1.88k|    if (gctx->seed != NULL)
  ------------------
  |  Branch (800:9): [True: 0, False: 1.88k]
  ------------------
  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.88k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|  1.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__
  |  |  ------------------
  ------------------
  803|  1.88k|    OPENSSL_free(gctx);
  ------------------
  |  |  132|  1.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__
  |  |  ------------------
  ------------------
  804|  1.88k|}
ml_kem_kmgmt.c:ml_kem_export:
  251|  1.88k|{
  252|  1.88k|    ML_KEM_KEY *key = vkey;
  253|  1.88k|    OSSL_PARAM_BLD *tmpl = NULL;
  254|  1.88k|    OSSL_PARAM *params = NULL;
  255|  1.88k|    const ML_KEM_VINFO *v;
  256|  1.88k|    uint8_t *pubenc = NULL, *prvenc = NULL, *seedenc = NULL;
  257|  1.88k|    size_t prvlen = 0, seedlen = 0;
  258|  1.88k|    int ret = 0;
  259|       |
  260|  1.88k|    if (!ossl_prov_is_running() || key == NULL)
  ------------------
  |  Branch (260:9): [True: 0, False: 1.88k]
  |  Branch (260:36): [True: 0, False: 1.88k]
  ------------------
  261|      0|        return 0;
  262|       |
  263|  1.88k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  1.88k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  1.88k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  1.88k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (263:9): [True: 0, False: 1.88k]
  ------------------
  264|      0|        return 0;
  265|       |
  266|  1.88k|    v = ossl_ml_kem_key_vinfo(key);
  ------------------
  |  |  206|  1.88k|#define ossl_ml_kem_key_vinfo(key) ((key)->vinfo)
  ------------------
  267|  1.88k|    if (!ossl_ml_kem_have_pubkey(key)) {
  ------------------
  |  |  207|  1.88k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (267:9): [True: 0, False: 1.88k]
  ------------------
  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.88k|    } else if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
  ------------------
  |  |  647|  1.88k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (274:16): [True: 1.88k, False: 0]
  ------------------
  275|  1.88k|        pubenc = OPENSSL_malloc(v->pubkey_bytes);
  ------------------
  |  |  107|  1.88k|    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.88k|        if (pubenc == NULL
  ------------------
  |  Branch (276:13): [True: 0, False: 1.88k]
  ------------------
  277|  1.88k|            || !ossl_ml_kem_encode_public_key(pubenc, v->pubkey_bytes, key))
  ------------------
  |  Branch (277:16): [True: 0, False: 1.88k]
  ------------------
  278|      0|            goto err;
  279|  1.88k|    }
  280|       |
  281|  1.88k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
  ------------------
  |  |  646|  1.88k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (281:9): [True: 0, False: 1.88k]
  ------------------
  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.88k|    tmpl = OSSL_PARAM_BLD_new();
  307|  1.88k|    if (tmpl == NULL)
  ------------------
  |  Branch (307:9): [True: 0, False: 1.88k]
  ------------------
  308|      0|        goto err;
  309|       |
  310|       |    /* The (d, z) seed, when available and private keys are requested. */
  311|  1.88k|    if (seedenc != NULL
  ------------------
  |  Branch (311:9): [True: 0, False: 1.88k]
  ------------------
  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.88k|    if (prvenc != NULL
  ------------------
  |  Branch (317:9): [True: 0, False: 1.88k]
  ------------------
  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.88k|    if (pubenc != NULL
  ------------------
  |  Branch (323:9): [True: 1.88k, False: 0]
  ------------------
  324|  1.88k|        && !ossl_param_build_set_octet_string(
  ------------------
  |  Branch (324:12): [True: 0, False: 1.88k]
  ------------------
  325|  1.88k|            tmpl, params, OSSL_PKEY_PARAM_PUB_KEY, pubenc, v->pubkey_bytes))
  ------------------
  |  |  450|  1.88k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  326|      0|        goto err;
  327|       |
  328|  1.88k|    params = OSSL_PARAM_BLD_to_param(tmpl);
  329|  1.88k|    if (params == NULL)
  ------------------
  |  Branch (329:9): [True: 0, False: 1.88k]
  ------------------
  330|      0|        goto err;
  331|       |
  332|  1.88k|    ret = param_cb(params, cbarg);
  333|  1.88k|    OSSL_PARAM_clear_free(params);
  334|       |
  335|  1.88k|err:
  336|  1.88k|    OSSL_PARAM_BLD_free(tmpl);
  337|  1.88k|    OPENSSL_secure_clear_free(seedenc, seedlen);
  ------------------
  |  |  150|  1.88k|    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.88k|    OPENSSL_secure_clear_free(prvenc, prvlen);
  ------------------
  |  |  150|  1.88k|    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.88k|    OPENSSL_free(pubenc);
  ------------------
  |  |  132|  1.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__
  |  |  ------------------
  ------------------
  340|  1.88k|    return ret;
  341|  1.88k|}
ml_kem_kmgmt.c:ml_kem_768_gen_init:
  837|  1.88k|    {                                                                                     \
  838|  1.88k|        return ml_kem_gen_init(provctx, selection, params,                                \
  839|  1.88k|            EVP_PKEY_ML_KEM_##bits);                                                      \
  ------------------
  |  |  103|  1.88k|#define EVP_PKEY_ML_KEM_768 NID_ML_KEM_768
  |  |  ------------------
  |  |  |  | 6645|  1.88k|#define NID_ML_KEM_768          1455
  |  |  ------------------
  ------------------
  840|  1.88k|    }                                                                                     \

ml_kem_kmgmt.c:ml_kem_get_params_decoder:
  120|  1.88k|{
  121|  1.88k|    const char *s;
  122|       |
  123|  1.88k|    memset(r, 0, sizeof(*r));
  124|  1.88k|    if (p != NULL)
  ------------------
  |  Branch (124:9): [True: 1.88k, False: 0]
  ------------------
  125|  9.40k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (125:16): [True: 7.52k, False: 1.88k]
  ------------------
  126|  7.52k|            switch(s[0]) {
  127|      0|            default:
  ------------------
  |  Branch (127:13): [True: 0, False: 7.52k]
  ------------------
  128|      0|                break;
  129|  1.88k|            case 'b':
  ------------------
  |  Branch (129:13): [True: 1.88k, False: 5.64k]
  ------------------
  130|  1.88k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  1.88k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.88k, False: 0]
  |  |  ------------------
  ------------------
  131|       |                    /* OSSL_PKEY_PARAM_BITS */
  132|  1.88k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  1.88k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.88k]
  |  |  ------------------
  ------------------
  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.88k|                    r->bits = (OSSL_PARAM *)p;
  138|  1.88k|                }
  139|  1.88k|                break;
  140|  1.88k|            case 'e':
  ------------------
  |  Branch (140:13): [True: 0, False: 7.52k]
  ------------------
  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: 7.52k]
  ------------------
  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.88k|            case 'm':
  ------------------
  |  Branch (162:13): [True: 1.88k, False: 5.64k]
  ------------------
  163|  1.88k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  1.88k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.88k, False: 0]
  |  |  ------------------
  ------------------
  164|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  165|  1.88k|                    if (ossl_unlikely(r->maxsize != NULL)) {
  ------------------
  |  |   23|  1.88k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.88k]
  |  |  ------------------
  ------------------
  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.88k|                    r->maxsize = (OSSL_PARAM *)p;
  171|  1.88k|                }
  172|  1.88k|                break;
  173|  1.88k|            case 'p':
  ------------------
  |  Branch (173:13): [True: 0, False: 7.52k]
  ------------------
  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: 7.52k]
  ------------------
  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|  3.76k|            case 's':
  ------------------
  |  Branch (211:13): [True: 3.76k, False: 3.76k]
  ------------------
  212|  3.76k|                switch(s[1]) {
  213|      0|                default:
  ------------------
  |  Branch (213:17): [True: 0, False: 3.76k]
  ------------------
  214|      0|                    break;
  215|  3.76k|                case 'e':
  ------------------
  |  Branch (215:17): [True: 3.76k, False: 0]
  ------------------
  216|  3.76k|                    switch(s[2]) {
  217|      0|                    default:
  ------------------
  |  Branch (217:21): [True: 0, False: 3.76k]
  ------------------
  218|      0|                        break;
  219|  3.76k|                    case 'c':
  ------------------
  |  Branch (219:21): [True: 3.76k, False: 0]
  ------------------
  220|  3.76k|                        switch(s[3]) {
  221|      0|                        default:
  ------------------
  |  Branch (221:25): [True: 0, False: 3.76k]
  ------------------
  222|      0|                            break;
  223|  3.76k|                        case 'u':
  ------------------
  |  Branch (223:25): [True: 3.76k, False: 0]
  ------------------
  224|  3.76k|                            switch(s[4]) {
  225|      0|                            default:
  ------------------
  |  Branch (225:29): [True: 0, False: 3.76k]
  ------------------
  226|      0|                                break;
  227|  3.76k|                            case 'r':
  ------------------
  |  Branch (227:29): [True: 3.76k, False: 0]
  ------------------
  228|  3.76k|                                switch(s[5]) {
  229|      0|                                default:
  ------------------
  |  Branch (229:33): [True: 0, False: 3.76k]
  ------------------
  230|      0|                                    break;
  231|  3.76k|                                case 'i':
  ------------------
  |  Branch (231:33): [True: 3.76k, False: 0]
  ------------------
  232|  3.76k|                                    switch(s[6]) {
  233|      0|                                    default:
  ------------------
  |  Branch (233:37): [True: 0, False: 3.76k]
  ------------------
  234|      0|                                        break;
  235|  3.76k|                                    case 't':
  ------------------
  |  Branch (235:37): [True: 3.76k, False: 0]
  ------------------
  236|  3.76k|                                        switch(s[7]) {
  237|      0|                                        default:
  ------------------
  |  Branch (237:41): [True: 0, False: 3.76k]
  ------------------
  238|      0|                                            break;
  239|  3.76k|                                        case 'y':
  ------------------
  |  Branch (239:41): [True: 3.76k, False: 0]
  ------------------
  240|  3.76k|                                            switch(s[8]) {
  241|      0|                                            default:
  ------------------
  |  Branch (241:45): [True: 0, False: 3.76k]
  ------------------
  242|      0|                                                break;
  243|  3.76k|                                            case '-':
  ------------------
  |  Branch (243:45): [True: 3.76k, False: 0]
  ------------------
  244|  3.76k|                                                switch(s[9]) {
  245|      0|                                                default:
  ------------------
  |  Branch (245:49): [True: 0, False: 3.76k]
  ------------------
  246|      0|                                                    break;
  247|  1.88k|                                                case 'b':
  ------------------
  |  Branch (247:49): [True: 1.88k, False: 1.88k]
  ------------------
  248|  1.88k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  1.88k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.88k, False: 0]
  |  |  ------------------
  ------------------
  249|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  250|  1.88k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  1.88k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.88k]
  |  |  ------------------
  ------------------
  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.88k|                                                        r->secbits = (OSSL_PARAM *)p;
  256|  1.88k|                                                    }
  257|  1.88k|                                                    break;
  258|  1.88k|                                                case 'c':
  ------------------
  |  Branch (258:49): [True: 1.88k, False: 1.88k]
  ------------------
  259|  1.88k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  1.88k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.88k, False: 0]
  |  |  ------------------
  ------------------
  260|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  261|  1.88k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  1.88k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.88k]
  |  |  ------------------
  ------------------
  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.88k|                                                        r->seccat = (OSSL_PARAM *)p;
  267|  1.88k|                                                    }
  268|  3.76k|                                                }
  269|  3.76k|                                            }
  270|  3.76k|                                        }
  271|  3.76k|                                    }
  272|  3.76k|                                }
  273|  3.76k|                            }
  274|  3.76k|                        }
  275|  3.76k|                        break;
  276|  3.76k|                    case 'e':
  ------------------
  |  Branch (276:21): [True: 0, False: 3.76k]
  ------------------
  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|  3.76k|                    }
  287|  3.76k|                }
  288|  7.52k|            }
  289|  1.88k|    return 1;
  290|  1.88k|}
ml_kem_kmgmt.c:ml_kem_gen_set_params_decoder:
  350|  3.76k|{
  351|  3.76k|    const char *s;
  352|       |
  353|  3.76k|    memset(r, 0, sizeof(*r));
  354|  3.76k|    if (p != NULL)
  ------------------
  |  Branch (354:9): [True: 1.88k, False: 1.88k]
  ------------------
  355|  1.88k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (355:16): [True: 0, False: 1.88k]
  ------------------
  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|  3.76k|    return 1;
  382|  3.76k|}

mlx_kmgmt.c:mlx_kem_key_new:
   86|  1.88k|{
   87|  1.88k|    MLX_KEY *key = NULL;
   88|  1.88k|    unsigned int ml_kem_variant;
   89|       |
   90|  1.88k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (90:9): [True: 0, False: 1.88k]
  ------------------
   91|  1.88k|        || v >= OSSL_NELEM(hybrid_vtable)
  ------------------
  |  |   14|  3.76k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (91:12): [True: 0, False: 1.88k]
  ------------------
   92|  1.88k|        || (key = OPENSSL_malloc(sizeof(*key))) == NULL)
  ------------------
  |  |  107|  1.88k|    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.88k]
  ------------------
   93|      0|        goto err;
   94|       |
   95|  1.88k|    ml_kem_variant = hybrid_vtable[v].ml_kem_variant;
   96|  1.88k|    key->libctx = libctx;
   97|  1.88k|    key->minfo = ossl_ml_kem_get_vinfo(ml_kem_variant);
   98|  1.88k|    key->xinfo = &hybrid_vtable[v];
   99|  1.88k|    key->xkey = key->mkey = NULL;
  100|  1.88k|    key->state = MLX_HAVE_NOKEYS;
  ------------------
  |  |   39|  1.88k|#define MLX_HAVE_NOKEYS 0
  ------------------
  101|  1.88k|    key->propq = propq;
  102|  1.88k|    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.88k|}
mlx_kmgmt.c:mlx_kem_key_free:
   72|  1.88k|{
   73|  1.88k|    MLX_KEY *key = vkey;
   74|       |
   75|  1.88k|    if (key == NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 1.88k]
  ------------------
   76|      0|        return;
   77|  1.88k|    OPENSSL_free(key->propq);
  ------------------
  |  |  132|  1.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__
  |  |  ------------------
  ------------------
   78|  1.88k|    EVP_PKEY_free(key->mkey);
   79|  1.88k|    EVP_PKEY_free(key->xkey);
   80|  1.88k|    OPENSSL_free(key);
  ------------------
  |  |  132|  1.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__
  |  |  ------------------
  ------------------
   81|  1.88k|}
mlx_kmgmt.c:mlx_kem_get_params:
  486|  5.64k|{
  487|  5.64k|    MLX_KEY *key = vkey;
  488|  5.64k|    OSSL_PARAM *pub, *prv = NULL;
  489|  5.64k|    EXPORT_CB_ARG sub_arg;
  490|  5.64k|    int selection;
  491|  5.64k|    struct mlx_get_params_st p;
  492|       |
  493|  5.64k|    if (key == NULL || !mlx_get_params_decoder(params, &p))
  ------------------
  |  Branch (493:9): [True: 0, False: 5.64k]
  |  Branch (493:24): [True: 0, False: 5.64k]
  ------------------
  494|      0|        return 0;
  495|       |
  496|       |    /* The reported "bit" count is those of the ML-KEM key */
  497|  5.64k|    if (p.bits != NULL)
  ------------------
  |  Branch (497:9): [True: 1.88k, False: 3.76k]
  ------------------
  498|  1.88k|        if (!OSSL_PARAM_set_int(p.bits, key->minfo->bits))
  ------------------
  |  Branch (498:13): [True: 0, False: 1.88k]
  ------------------
  499|      0|            return 0;
  500|       |
  501|       |    /* The reported security bits are those of the ML-KEM key */
  502|  5.64k|    if (p.secbits != NULL)
  ------------------
  |  Branch (502:9): [True: 1.88k, False: 3.76k]
  ------------------
  503|  1.88k|        if (!OSSL_PARAM_set_int(p.secbits, key->minfo->secbits))
  ------------------
  |  Branch (503:13): [True: 0, False: 1.88k]
  ------------------
  504|      0|            return 0;
  505|       |
  506|       |    /* The reported security category are those of the ML-KEM key */
  507|  5.64k|    if (p.seccat != NULL)
  ------------------
  |  Branch (507:9): [True: 1.88k, False: 3.76k]
  ------------------
  508|  1.88k|        if (!OSSL_PARAM_set_int(p.seccat, key->minfo->security_category))
  ------------------
  |  Branch (508:13): [True: 0, False: 1.88k]
  ------------------
  509|      0|            return 0;
  510|       |
  511|       |    /* The ciphertext sizes are additive */
  512|  5.64k|    if (p.maxsize != NULL)
  ------------------
  |  Branch (512:9): [True: 1.88k, False: 3.76k]
  ------------------
  513|  1.88k|        if (!OSSL_PARAM_set_size_t(p.maxsize, key->minfo->ctext_bytes + key->xinfo->pubkey_bytes))
  ------------------
  |  Branch (513:13): [True: 0, False: 1.88k]
  ------------------
  514|      0|            return 0;
  515|       |
  516|  5.64k|    if (!mlx_kem_have_pubkey(key))
  ------------------
  |  |   44|  5.64k|#define mlx_kem_have_pubkey(key) ((key)->state > 0)
  ------------------
  |  Branch (516:9): [True: 0, False: 5.64k]
  ------------------
  517|      0|        return 1;
  518|       |
  519|  5.64k|    memset(&sub_arg, 0, sizeof(sub_arg));
  520|  5.64k|    if ((pub = p.pub) != NULL) {
  ------------------
  |  Branch (520:9): [True: 3.76k, False: 1.88k]
  ------------------
  521|  3.76k|        size_t publen = key->minfo->pubkey_bytes + key->xinfo->pubkey_bytes;
  522|       |
  523|  3.76k|        if (pub->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|  3.76k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (523:13): [True: 0, False: 3.76k]
  ------------------
  524|      0|            return 0;
  525|  3.76k|        pub->return_size = publen;
  526|  3.76k|        if (pub->data == NULL) {
  ------------------
  |  Branch (526:13): [True: 1.88k, False: 1.88k]
  ------------------
  527|  1.88k|            pub = NULL;
  528|  1.88k|        } else if (pub->data_size < publen) {
  ------------------
  |  Branch (528:20): [True: 0, False: 1.88k]
  ------------------
  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.88k|        } else {
  535|  1.88k|            sub_arg.pubenc = pub->data;
  536|  1.88k|        }
  537|  3.76k|    }
  538|  5.64k|    if (mlx_kem_have_prvkey(key)) {
  ------------------
  |  |   45|  5.64k|#define mlx_kem_have_prvkey(key) ((key)->state > 1)
  |  |  ------------------
  |  |  |  Branch (45:34): [True: 5.64k, False: 0]
  |  |  ------------------
  ------------------
  539|  5.64k|        if ((prv = p.priv) != NULL) {
  ------------------
  |  Branch (539:13): [True: 0, False: 5.64k]
  ------------------
  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|  5.64k|    }
  558|  5.64k|    if (pub == NULL && prv == NULL)
  ------------------
  |  Branch (558:9): [True: 3.76k, False: 1.88k]
  |  Branch (558:24): [True: 3.76k, False: 0]
  ------------------
  559|  3.76k|        return 1;
  560|       |
  561|  1.88k|    selection = prv == NULL ? 0 : OSSL_KEYMGMT_SELECT_PRIVATE_KEY;
  ------------------
  |  |  646|  1.88k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (561:17): [True: 1.88k, False: 0]
  ------------------
  562|  1.88k|    selection |= pub == NULL ? 0 : OSSL_KEYMGMT_SELECT_PUBLIC_KEY;
  ------------------
  |  |  647|  3.76k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (562:18): [True: 0, False: 1.88k]
  ------------------
  563|  1.88k|    if (key->xinfo->group_name != NULL)
  ------------------
  |  Branch (563:9): [True: 0, False: 1.88k]
  ------------------
  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.88k|    if (!export_sub(&sub_arg, selection, key))
  ------------------
  |  Branch (567:9): [True: 0, False: 1.88k]
  ------------------
  568|      0|        return 0;
  569|       |
  570|  1.88k|    if ((pub != NULL && sub_arg.pubcount != 2)
  ------------------
  |  Branch (570:10): [True: 1.88k, False: 0]
  |  Branch (570:25): [True: 0, False: 1.88k]
  ------------------
  571|  1.88k|        || (prv != NULL && sub_arg.prvcount != 2))
  ------------------
  |  Branch (571:13): [True: 0, False: 1.88k]
  |  Branch (571:28): [True: 0, False: 0]
  ------------------
  572|      0|        return 0;
  573|       |
  574|  1.88k|    return 1;
  575|  1.88k|}
mlx_kmgmt.c:export_sub:
  215|  1.88k|{
  216|  1.88k|    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.88k|    sub_arg->pubcount = 0;
  223|  1.88k|    sub_arg->prvcount = 0;
  224|       |
  225|  5.64k|    for (slot = 0; slot < 2; ++slot) {
  ------------------
  |  Branch (225:20): [True: 3.76k, False: 1.88k]
  ------------------
  226|  3.76k|        int ml_kem_slot = key->xinfo->ml_kem_slot;
  227|  3.76k|        EVP_PKEY *pkey;
  228|       |
  229|       |        /* Export the parts of each component into its storage slot */
  230|  3.76k|        if (slot == ml_kem_slot) {
  ------------------
  |  Branch (230:13): [True: 1.88k, False: 1.88k]
  ------------------
  231|  1.88k|            pkey = key->mkey;
  232|  1.88k|            sub_arg->algorithm_name = key->minfo->algorithm_name;
  233|  1.88k|            sub_arg->puboff = slot * key->xinfo->pubkey_bytes;
  234|  1.88k|            sub_arg->prvoff = slot * key->xinfo->prvkey_bytes;
  235|  1.88k|            sub_arg->publen = key->minfo->pubkey_bytes;
  236|  1.88k|            sub_arg->prvlen = key->minfo->prvkey_bytes;
  237|  1.88k|        } else {
  238|  1.88k|            pkey = key->xkey;
  239|  1.88k|            sub_arg->algorithm_name = key->xinfo->algorithm_name;
  240|  1.88k|            sub_arg->puboff = (1 - ml_kem_slot) * key->minfo->pubkey_bytes;
  241|  1.88k|            sub_arg->prvoff = (1 - ml_kem_slot) * key->minfo->prvkey_bytes;
  242|  1.88k|            sub_arg->publen = key->xinfo->pubkey_bytes;
  243|  1.88k|            sub_arg->prvlen = key->xinfo->prvkey_bytes;
  244|  1.88k|        }
  245|  3.76k|        if (!EVP_PKEY_export(pkey, selection, export_sub_cb, (void *)sub_arg))
  ------------------
  |  Branch (245:13): [True: 0, False: 3.76k]
  ------------------
  246|      0|            return 0;
  247|  3.76k|    }
  248|  1.88k|    return 1;
  249|  1.88k|}
mlx_kmgmt.c:export_sub_cb:
  169|  3.76k|{
  170|  3.76k|    EXPORT_CB_ARG *sub_arg = varg;
  171|  3.76k|    struct ml_kem_import_export_st p;
  172|  3.76k|    size_t len;
  173|       |
  174|  3.76k|    if (!ml_kem_import_export_decoder(params, &p))
  ------------------
  |  Branch (174:9): [True: 0, False: 3.76k]
  ------------------
  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|  3.76k|    if (sub_arg->pubenc != NULL && p.pubkey != NULL) {
  ------------------
  |  Branch (182:9): [True: 3.76k, False: 0]
  |  Branch (182:36): [True: 3.76k, False: 0]
  ------------------
  183|  3.76k|        void *pub = sub_arg->pubenc + sub_arg->puboff;
  184|       |
  185|  3.76k|        if (OSSL_PARAM_get_octet_string(p.pubkey, &pub, sub_arg->publen, &len) != 1)
  ------------------
  |  Branch (185:13): [True: 0, False: 3.76k]
  ------------------
  186|      0|            return 0;
  187|  3.76k|        if (len != sub_arg->publen) {
  ------------------
  |  Branch (187:13): [True: 0, False: 3.76k]
  ------------------
  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|  3.76k|        ++sub_arg->pubcount;
  195|  3.76k|    }
  196|  3.76k|    if (sub_arg->prvenc != NULL && p.privkey != NULL) {
  ------------------
  |  Branch (196:9): [True: 0, False: 3.76k]
  |  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|  3.76k|    return 1;
  211|  3.76k|}
mlx_kmgmt.c:mlx_kem_gen_init:
  641|  1.88k|{
  642|  1.88k|    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.88k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (648:9): [True: 0, False: 1.88k]
  ------------------
  649|  1.88k|        || (selection & minimal_selection) == 0
  ------------------
  |  Branch (649:12): [True: 0, False: 1.88k]
  ------------------
  650|  1.88k|        || (gctx = OPENSSL_zalloc(sizeof(*gctx))) == NULL)
  ------------------
  |  |  109|  1.88k|    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.88k]
  ------------------
  651|      0|        return NULL;
  652|       |
  653|  1.88k|    gctx->evp_type = evp_type;
  654|  1.88k|    gctx->libctx = libctx;
  655|  1.88k|    gctx->selection = selection;
  656|  1.88k|    if (mlx_kem_gen_set_params(gctx, params))
  ------------------
  |  Branch (656:9): [True: 1.88k, False: 0]
  ------------------
  657|  1.88k|        return gctx;
  658|       |
  659|      0|    mlx_kem_gen_cleanup(gctx);
  660|       |    return NULL;
  661|  1.88k|}
mlx_kmgmt.c:mlx_kem_gen_set_params:
  622|  3.76k|{
  623|  3.76k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  624|  3.76k|    struct mlx_gen_set_params_st p;
  625|       |
  626|  3.76k|    if (gctx == NULL || !mlx_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (626:9): [True: 0, False: 3.76k]
  |  Branch (626:25): [True: 0, False: 3.76k]
  ------------------
  627|      0|        return 0;
  628|       |
  629|  3.76k|    if (p.propq != NULL) {
  ------------------
  |  Branch (629:9): [True: 0, False: 3.76k]
  ------------------
  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|  3.76k|    return 1;
  637|  3.76k|}
mlx_kmgmt.c:mlx_kem_gen:
  670|  1.88k|{
  671|  1.88k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  672|  1.88k|    MLX_KEY *key;
  673|  1.88k|    char *propq;
  674|       |
  675|  1.88k|    if (gctx == NULL
  ------------------
  |  Branch (675:9): [True: 0, False: 1.88k]
  ------------------
  676|  1.88k|        || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  656|  1.88k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  1.88k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  1.88k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
                      || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  647|  1.88k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (676:12): [True: 0, False: 1.88k]
  ------------------
  677|      0|        return NULL;
  678|       |
  679|       |    /* Lose ownership of propq */
  680|  1.88k|    propq = gctx->propq;
  681|  1.88k|    gctx->propq = NULL;
  682|  1.88k|    if ((key = mlx_kem_key_new(gctx->evp_type, gctx->libctx, propq)) == NULL)
  ------------------
  |  Branch (682:9): [True: 0, False: 1.88k]
  ------------------
  683|      0|        return NULL;
  684|       |
  685|  1.88k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  1.88k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  1.88k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  1.88k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (685:9): [True: 0, False: 1.88k]
  ------------------
  686|      0|        return key;
  687|       |
  688|       |    /* For now, using the same "propq" for all components */
  689|  1.88k|    key->mkey = EVP_PKEY_Q_keygen(key->libctx, key->propq,
  690|  1.88k|        key->minfo->algorithm_name);
  691|  1.88k|    key->xkey = EVP_PKEY_Q_keygen(key->libctx, key->propq,
  692|  1.88k|        key->xinfo->algorithm_name,
  693|  1.88k|        key->xinfo->group_name);
  694|  1.88k|    if (key->mkey != NULL && key->xkey != NULL) {
  ------------------
  |  Branch (694:9): [True: 1.88k, False: 0]
  |  Branch (694:30): [True: 1.88k, False: 0]
  ------------------
  695|  1.88k|        key->state = MLX_HAVE_PRVKEY;
  ------------------
  |  |   41|  1.88k|#define MLX_HAVE_PRVKEY 2
  ------------------
  696|  1.88k|        return key;
  697|  1.88k|    }
  698|       |
  699|      0|    mlx_kem_key_free(key);
  700|       |    return NULL;
  701|  1.88k|}
mlx_kmgmt.c:mlx_kem_gen_cleanup:
  704|  1.88k|{
  705|  1.88k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  706|       |
  707|  1.88k|    if (gctx == NULL)
  ------------------
  |  Branch (707:9): [True: 0, False: 1.88k]
  ------------------
  708|      0|        return;
  709|  1.88k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|  1.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__
  |  |  ------------------
  ------------------
  710|  1.88k|    OPENSSL_free(gctx);
  ------------------
  |  |  132|  1.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__
  |  |  ------------------
  ------------------
  711|  1.88k|}

mlx_kmgmt.c:mlx_get_params_decoder:
   99|  5.64k|{
  100|  5.64k|    const char *s;
  101|       |
  102|  5.64k|    memset(r, 0, sizeof(*r));
  103|  5.64k|    if (p != NULL)
  ------------------
  |  Branch (103:9): [True: 5.64k, False: 0]
  ------------------
  104|  16.9k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (104:16): [True: 11.2k, False: 5.64k]
  ------------------
  105|  11.2k|            switch(s[0]) {
  106|      0|            default:
  ------------------
  |  Branch (106:13): [True: 0, False: 11.2k]
  ------------------
  107|      0|                break;
  108|  1.88k|            case 'b':
  ------------------
  |  Branch (108:13): [True: 1.88k, False: 9.40k]
  ------------------
  109|  1.88k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  1.88k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.88k, False: 0]
  |  |  ------------------
  ------------------
  110|       |                    /* OSSL_PKEY_PARAM_BITS */
  111|  1.88k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  1.88k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.88k]
  |  |  ------------------
  ------------------
  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.88k|                    r->bits = (OSSL_PARAM *)p;
  117|  1.88k|                }
  118|  1.88k|                break;
  119|  3.76k|            case 'e':
  ------------------
  |  Branch (119:13): [True: 3.76k, False: 7.52k]
  ------------------
  120|  3.76k|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|  3.76k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.76k, False: 0]
  |  |  ------------------
  ------------------
  121|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  122|  3.76k|                    if (ossl_unlikely(r->pub != NULL)) {
  ------------------
  |  |   23|  3.76k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.76k]
  |  |  ------------------
  ------------------
  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|  3.76k|                    r->pub = (OSSL_PARAM *)p;
  128|  3.76k|                }
  129|  3.76k|                break;
  130|  3.76k|            case 'm':
  ------------------
  |  Branch (130:13): [True: 1.88k, False: 9.40k]
  ------------------
  131|  1.88k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  1.88k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.88k, False: 0]
  |  |  ------------------
  ------------------
  132|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  133|  1.88k|                    if (ossl_unlikely(r->maxsize != NULL)) {
  ------------------
  |  |   23|  1.88k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.88k]
  |  |  ------------------
  ------------------
  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.88k|                    r->maxsize = (OSSL_PARAM *)p;
  139|  1.88k|                }
  140|  1.88k|                break;
  141|  1.88k|            case 'p':
  ------------------
  |  Branch (141:13): [True: 0, False: 11.2k]
  ------------------
  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|  3.76k|            case 's':
  ------------------
  |  Branch (152:13): [True: 3.76k, False: 7.52k]
  ------------------
  153|  3.76k|                switch(s[1]) {
  154|      0|                default:
  ------------------
  |  Branch (154:17): [True: 0, False: 3.76k]
  ------------------
  155|      0|                    break;
  156|  3.76k|                case 'e':
  ------------------
  |  Branch (156:17): [True: 3.76k, False: 0]
  ------------------
  157|  3.76k|                    switch(s[2]) {
  158|      0|                    default:
  ------------------
  |  Branch (158:21): [True: 0, False: 3.76k]
  ------------------
  159|      0|                        break;
  160|  3.76k|                    case 'c':
  ------------------
  |  Branch (160:21): [True: 3.76k, False: 0]
  ------------------
  161|  3.76k|                        switch(s[3]) {
  162|      0|                        default:
  ------------------
  |  Branch (162:25): [True: 0, False: 3.76k]
  ------------------
  163|      0|                            break;
  164|  3.76k|                        case 'u':
  ------------------
  |  Branch (164:25): [True: 3.76k, False: 0]
  ------------------
  165|  3.76k|                            switch(s[4]) {
  166|      0|                            default:
  ------------------
  |  Branch (166:29): [True: 0, False: 3.76k]
  ------------------
  167|      0|                                break;
  168|  3.76k|                            case 'r':
  ------------------
  |  Branch (168:29): [True: 3.76k, False: 0]
  ------------------
  169|  3.76k|                                switch(s[5]) {
  170|      0|                                default:
  ------------------
  |  Branch (170:33): [True: 0, False: 3.76k]
  ------------------
  171|      0|                                    break;
  172|  3.76k|                                case 'i':
  ------------------
  |  Branch (172:33): [True: 3.76k, False: 0]
  ------------------
  173|  3.76k|                                    switch(s[6]) {
  174|      0|                                    default:
  ------------------
  |  Branch (174:37): [True: 0, False: 3.76k]
  ------------------
  175|      0|                                        break;
  176|  3.76k|                                    case 't':
  ------------------
  |  Branch (176:37): [True: 3.76k, False: 0]
  ------------------
  177|  3.76k|                                        switch(s[7]) {
  178|      0|                                        default:
  ------------------
  |  Branch (178:41): [True: 0, False: 3.76k]
  ------------------
  179|      0|                                            break;
  180|  3.76k|                                        case 'y':
  ------------------
  |  Branch (180:41): [True: 3.76k, False: 0]
  ------------------
  181|  3.76k|                                            switch(s[8]) {
  182|      0|                                            default:
  ------------------
  |  Branch (182:45): [True: 0, False: 3.76k]
  ------------------
  183|      0|                                                break;
  184|  3.76k|                                            case '-':
  ------------------
  |  Branch (184:45): [True: 3.76k, False: 0]
  ------------------
  185|  3.76k|                                                switch(s[9]) {
  186|      0|                                                default:
  ------------------
  |  Branch (186:49): [True: 0, False: 3.76k]
  ------------------
  187|      0|                                                    break;
  188|  1.88k|                                                case 'b':
  ------------------
  |  Branch (188:49): [True: 1.88k, False: 1.88k]
  ------------------
  189|  1.88k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  1.88k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.88k, False: 0]
  |  |  ------------------
  ------------------
  190|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  191|  1.88k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  1.88k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.88k]
  |  |  ------------------
  ------------------
  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.88k|                                                        r->secbits = (OSSL_PARAM *)p;
  197|  1.88k|                                                    }
  198|  1.88k|                                                    break;
  199|  1.88k|                                                case 'c':
  ------------------
  |  Branch (199:49): [True: 1.88k, False: 1.88k]
  ------------------
  200|  1.88k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  1.88k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.88k, False: 0]
  |  |  ------------------
  ------------------
  201|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  202|  1.88k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  1.88k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.88k]
  |  |  ------------------
  ------------------
  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.88k|                                                        r->seccat = (OSSL_PARAM *)p;
  208|  1.88k|                                                    }
  209|  3.76k|                                                }
  210|  3.76k|                                            }
  211|  3.76k|                                        }
  212|  3.76k|                                    }
  213|  3.76k|                                }
  214|  3.76k|                            }
  215|  3.76k|                        }
  216|  3.76k|                    }
  217|  3.76k|                }
  218|  11.2k|            }
  219|  5.64k|    return 1;
  220|  5.64k|}
mlx_kmgmt.c:ml_kem_import_export_decoder:
   31|  3.76k|{
   32|  3.76k|    const char *s;
   33|       |
   34|  3.76k|    memset(r, 0, sizeof(*r));
   35|  3.76k|    if (p != NULL)
  ------------------
  |  Branch (35:9): [True: 3.76k, False: 0]
  ------------------
   36|  7.52k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (36:16): [True: 3.76k, False: 3.76k]
  ------------------
   37|  3.76k|            switch(s[0]) {
   38|      0|            default:
  ------------------
  |  Branch (38:13): [True: 0, False: 3.76k]
  ------------------
   39|      0|                break;
   40|  3.76k|            case 'p':
  ------------------
  |  Branch (40:13): [True: 3.76k, False: 0]
  ------------------
   41|  3.76k|                switch(s[1]) {
   42|      0|                default:
  ------------------
  |  Branch (42:17): [True: 0, False: 3.76k]
  ------------------
   43|      0|                    break;
   44|      0|                case 'r':
  ------------------
  |  Branch (44:17): [True: 0, False: 3.76k]
  ------------------
   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|  3.76k|                case 'u':
  ------------------
  |  Branch (55:17): [True: 3.76k, False: 0]
  ------------------
   56|  3.76k|                    if (ossl_likely(strcmp("b", s + 2) == 0)) {
  ------------------
  |  |   22|  3.76k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.76k, False: 0]
  |  |  ------------------
  ------------------
   57|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
   58|  3.76k|                        if (ossl_unlikely(r->pubkey != NULL)) {
  ------------------
  |  |   23|  3.76k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.76k]
  |  |  ------------------
  ------------------
   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|  3.76k|                        r->pubkey = (OSSL_PARAM *)p;
   64|  3.76k|                    }
   65|  3.76k|                }
   66|  3.76k|            }
   67|  3.76k|    return 1;
   68|  3.76k|}
mlx_kmgmt.c:mlx_gen_set_params_decoder:
  296|  3.76k|{
  297|  3.76k|    const char *s;
  298|       |
  299|  3.76k|    memset(r, 0, sizeof(*r));
  300|  3.76k|    if (p != NULL)
  ------------------
  |  Branch (300:9): [True: 1.88k, False: 1.88k]
  ------------------
  301|  3.76k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (301:16): [True: 1.88k, False: 1.88k]
  ------------------
  302|  1.88k|            if (ossl_likely(strcmp("properties", s + 0) == 0)) {
  ------------------
  |  |   22|  1.88k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 1.88k]
  |  |  ------------------
  ------------------
  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|  3.76k|    return 1;
  312|  3.76k|}

rsa_kmgmt.c:rsa_load:
  750|   310k|{
  751|   310k|    return common_load(reference, reference_sz, RSA_FLAG_TYPE_RSA);
  ------------------
  |  |  118|   310k|#define RSA_FLAG_TYPE_RSA 0x0000
  ------------------
  752|   310k|}
rsa_kmgmt.c:common_load:
  732|   310k|{
  733|   310k|    RSA *rsa = NULL;
  734|       |
  735|   310k|    if (ossl_prov_is_running() && reference_sz == sizeof(rsa)) {
  ------------------
  |  Branch (735:9): [True: 310k, False: 0]
  |  Branch (735:35): [True: 310k, False: 0]
  ------------------
  736|       |        /* The contents of the reference is the address to our object */
  737|   310k|        rsa = *(RSA **)reference;
  738|       |
  739|   310k|        if (RSA_test_flags(rsa, RSA_FLAG_TYPE_MASK) != expected_rsa_type)
  ------------------
  |  |  117|   310k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
  |  Branch (739:13): [True: 0, False: 310k]
  ------------------
  740|      0|            return NULL;
  741|       |
  742|       |        /* We grabbed, so we detach it */
  743|   310k|        *(RSA **)reference = NULL;
  744|   310k|        return rsa;
  745|   310k|    }
  746|      0|    return NULL;
  747|   310k|}
rsa_kmgmt.c:rsa_freedata:
  168|   310k|{
  169|   310k|    RSA_free(keydata);
  170|   310k|}
rsa_kmgmt.c:rsa_get_params:
  382|   310k|{
  383|   310k|    RSA *rsa = key;
  384|   310k|    const RSA_PSS_PARAMS_30 *pss_params = ossl_rsa_get0_pss_params_30(rsa);
  385|   310k|    int rsa_type = RSA_test_flags(rsa, RSA_FLAG_TYPE_MASK);
  ------------------
  |  |  117|   310k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
  386|   310k|    OSSL_PARAM *p;
  387|   310k|    int empty = RSA_get0_n(rsa) == NULL;
  388|       |
  389|   310k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_BITS)) != NULL
  ------------------
  |  |  374|   310k|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  |  Branch (389:9): [True: 310k, False: 0]
  ------------------
  390|   310k|        && (empty || !OSSL_PARAM_set_int(p, RSA_bits(rsa))))
  ------------------
  |  Branch (390:13): [True: 0, False: 310k]
  |  Branch (390:22): [True: 0, False: 310k]
  ------------------
  391|      0|        return 0;
  392|   310k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_BITS)) != NULL
  ------------------
  |  |  506|   310k|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  |  Branch (392:9): [True: 310k, False: 0]
  ------------------
  393|   310k|        && (empty || !OSSL_PARAM_set_int(p, RSA_security_bits(rsa))))
  ------------------
  |  Branch (393:13): [True: 0, False: 310k]
  |  Branch (393:22): [True: 0, False: 310k]
  ------------------
  394|      0|        return 0;
  395|   310k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_MAX_SIZE)) != NULL
  ------------------
  |  |  432|   310k|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  |  Branch (395:9): [True: 310k, False: 0]
  ------------------
  396|   310k|        && (empty || !OSSL_PARAM_set_int(p, RSA_size(rsa))))
  ------------------
  |  Branch (396:13): [True: 0, False: 310k]
  |  Branch (396:22): [True: 0, False: 310k]
  ------------------
  397|      0|        return 0;
  398|   310k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_CATEGORY)) != NULL)
  ------------------
  |  |  507|   310k|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  131|   310k|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  |  Branch (398:9): [True: 310k, False: 0]
  ------------------
  399|   310k|        if (!OSSL_PARAM_set_int(p, 0))
  ------------------
  |  Branch (399:13): [True: 0, False: 310k]
  ------------------
  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|   310k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  378|   310k|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (406:9): [True: 0, False: 310k]
  ------------------
  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|   310k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (417:9): [True: 0, False: 310k]
  ------------------
  418|   310k|             OSSL_PKEY_PARAM_MANDATORY_DIGEST))
  ------------------
  |  |  430|   310k|# define OSSL_PKEY_PARAM_MANDATORY_DIGEST "mandatory-digest"
  ------------------
  419|   310k|            != NULL
  420|      0|        && rsa_type == RSA_FLAG_TYPE_RSASSAPSS
  ------------------
  |  |  119|   310k|#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|   310k|    return (rsa_type != RSA_FLAG_TYPE_RSASSAPSS
  ------------------
  |  |  119|   621k|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (427:13): [True: 310k, False: 0]
  ------------------
  428|      0|               || ossl_rsa_pss_params_30_todata(pss_params, NULL, params))
  ------------------
  |  Branch (428:19): [True: 0, False: 0]
  ------------------
  429|   310k|        && ossl_rsa_todata(rsa, NULL, params, 1);
  ------------------
  |  Branch (429:12): [True: 310k, False: 0]
  ------------------
  430|   310k|}

ossl_drbg_lock:
   54|  72.0k|{
   55|  72.0k|    return 1;
   56|  72.0k|}
ossl_drbg_unlock:
   60|  72.0k|{
   61|  72.0k|}
ossl_drbg_get_seed:
  148|  2.31k|{
  149|  2.31k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  150|  2.31k|    size_t bytes_needed;
  151|  2.31k|    unsigned char *buffer;
  152|       |
  153|       |    /* Figure out how many bytes we need */
  154|  2.31k|    bytes_needed = entropy >= 0 ? (entropy + 7) / 8 : 0;
  ------------------
  |  Branch (154:20): [True: 2.31k, False: 0]
  ------------------
  155|  2.31k|    if (bytes_needed < min_len)
  ------------------
  |  Branch (155:9): [True: 0, False: 2.31k]
  ------------------
  156|      0|        bytes_needed = min_len;
  157|  2.31k|    if (bytes_needed > max_len)
  ------------------
  |  Branch (157:9): [True: 0, False: 2.31k]
  ------------------
  158|      0|        bytes_needed = max_len;
  159|       |
  160|       |    /* Allocate storage */
  161|  2.31k|    buffer = OPENSSL_secure_malloc(bytes_needed);
  ------------------
  |  |  140|  2.31k|    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.31k|    if (buffer == NULL)
  ------------------
  |  Branch (162:9): [True: 0, False: 2.31k]
  ------------------
  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.31k|    if (!ossl_prov_drbg_generate(drbg, buffer, bytes_needed,
  ------------------
  |  Branch (174:9): [True: 0, False: 2.31k]
  ------------------
  175|  2.31k|            drbg->strength, prediction_resistance,
  176|  2.31k|            (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.31k|    *pout = buffer;
  182|  2.31k|    return bytes_needed;
  183|  2.31k|}
ossl_drbg_clear_seed:
  188|  2.31k|{
  189|  2.31k|    OPENSSL_secure_clear_free(out, outlen);
  ------------------
  |  |  150|  2.31k|    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.31k|}
ossl_prov_drbg_nonce_ctx_new:
  272|    769|{
  273|    769|    PROV_DRBG_NONCE_GLOBAL *dngbl = OPENSSL_zalloc(sizeof(*dngbl));
  ------------------
  |  |  109|    769|    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|    769|    if (dngbl == NULL)
  ------------------
  |  Branch (275:9): [True: 0, False: 769]
  ------------------
  276|      0|        return NULL;
  277|       |
  278|    769|    dngbl->rand_nonce_lock = CRYPTO_THREAD_lock_new();
  279|    769|    if (dngbl->rand_nonce_lock == NULL) {
  ------------------
  |  Branch (279:9): [True: 0, False: 769]
  ------------------
  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|    769|    return dngbl;
  285|    769|}
ossl_prov_drbg_nonce_ctx_free:
  288|    768|{
  289|    768|    PROV_DRBG_NONCE_GLOBAL *dngbl = vdngbl;
  290|       |
  291|    768|    if (dngbl == NULL)
  ------------------
  |  Branch (291:9): [True: 0, False: 768]
  ------------------
  292|      0|        return;
  293|       |
  294|    768|    CRYPTO_THREAD_lock_free(dngbl->rand_nonce_lock);
  295|       |
  296|    768|    OPENSSL_free(dngbl);
  ------------------
  |  |  132|    768|    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|    768|}
ossl_prov_drbg_instantiate:
  352|  1.73k|{
  353|  1.73k|    unsigned char *nonce = NULL, *entropy = NULL;
  354|  1.73k|    size_t noncelen = 0, entropylen = 0;
  355|  1.73k|    unsigned int min_entropy;
  356|  1.73k|    size_t min_entropylen, max_entropylen;
  357|       |
  358|  1.73k|    if (strength > drbg->strength) {
  ------------------
  |  Branch (358:9): [True: 0, False: 1.73k]
  ------------------
  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.73k|    min_entropy = drbg->strength;
  363|  1.73k|    min_entropylen = drbg->min_entropylen;
  364|  1.73k|    max_entropylen = drbg->max_entropylen;
  365|       |
  366|  1.73k|    if (pers == NULL) {
  ------------------
  |  Branch (366:9): [True: 1.73k, False: 0]
  ------------------
  367|  1.73k|        pers = (const unsigned char *)ossl_pers_string;
  368|  1.73k|        perslen = sizeof(ossl_pers_string);
  369|  1.73k|    }
  370|  1.73k|    if (perslen > drbg->max_perslen) {
  ------------------
  |  Branch (370:9): [True: 0, False: 1.73k]
  ------------------
  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.73k|    if (drbg->state != EVP_RAND_STATE_UNINITIALISED) {
  ------------------
  |  | 1249|  1.73k|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
  |  Branch (375:9): [True: 0, False: 1.73k]
  ------------------
  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.73k|    drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|  1.73k|#define EVP_RAND_STATE_ERROR 2
  ------------------
  384|       |
  385|  1.73k|    if (drbg->min_noncelen > 0) {
  ------------------
  |  Branch (385:9): [True: 1.73k, False: 0]
  ------------------
  386|  1.73k|        if (drbg->parent_nonce != NULL) {
  ------------------
  |  Branch (386:13): [True: 0, False: 1.73k]
  ------------------
  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.73k|        } else if (drbg->parent != NULL) {
  ------------------
  |  Branch (404:20): [True: 1.73k, False: 0]
  ------------------
  405|  1.73k|#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.73k|            min_entropy += drbg->strength / 2;
  414|  1.73k|            min_entropylen += drbg->min_noncelen;
  415|  1.73k|            max_entropylen += drbg->max_noncelen;
  416|  1.73k|        }
  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.73k|#endif
  428|  1.73k|    }
  429|       |
  430|  1.73k|    drbg->reseed_next_counter = tsan_load(&drbg->reseed_counter);
  ------------------
  |  |   61|  1.73k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  431|  1.73k|    if (drbg->reseed_next_counter) {
  ------------------
  |  Branch (431:9): [True: 1.73k, False: 0]
  ------------------
  432|  1.73k|        drbg->reseed_next_counter++;
  433|  1.73k|        if (!drbg->reseed_next_counter)
  ------------------
  |  Branch (433:13): [True: 0, False: 1.73k]
  ------------------
  434|      0|            drbg->reseed_next_counter = 1;
  435|  1.73k|    }
  436|       |
  437|  1.73k|    entropylen = get_entropy(drbg, &entropy, min_entropy,
  438|  1.73k|        min_entropylen, max_entropylen,
  439|  1.73k|        prediction_resistance);
  440|  1.73k|    if (entropylen < min_entropylen
  ------------------
  |  Branch (440:9): [True: 0, False: 1.73k]
  ------------------
  441|  1.73k|        || entropylen > max_entropylen) {
  ------------------
  |  Branch (441:12): [True: 0, False: 1.73k]
  ------------------
  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.73k|    if (!drbg->instantiate(drbg, entropy, entropylen, nonce, noncelen,
  ------------------
  |  Branch (446:9): [True: 0, False: 1.73k]
  ------------------
  447|  1.73k|            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.73k|    cleanup_entropy(drbg, entropy, entropylen);
  453|       |
  454|  1.73k|    drbg->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1250|  1.73k|#define EVP_RAND_STATE_READY 1
  ------------------
  455|  1.73k|    drbg->generate_counter = 1;
  456|  1.73k|    drbg->reseed_time = time(NULL);
  457|  1.73k|    tsan_store(&drbg->reseed_counter, drbg->reseed_next_counter);
  ------------------
  |  |   62|  1.73k|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  458|       |
  459|  1.73k|end:
  460|  1.73k|    if (nonce != NULL)
  ------------------
  |  Branch (460:9): [True: 0, False: 1.73k]
  ------------------
  461|      0|        ossl_prov_cleanup_nonce(drbg->provctx, nonce, noncelen);
  462|  1.73k|    if (drbg->state == EVP_RAND_STATE_READY)
  ------------------
  |  | 1250|  1.73k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (462:9): [True: 1.73k, False: 0]
  ------------------
  463|  1.73k|        return 1;
  464|      0|    return 0;
  465|  1.73k|}
ossl_prov_drbg_generate:
  625|  29.3k|{
  626|  29.3k|    int fork_id;
  627|  29.3k|    int reseed_required = 0;
  628|  29.3k|    int ret = 0;
  629|  29.3k|    time_t reseed_time_interval = drbg->reseed_time_interval;
  630|  29.3k|    time_t now = 0;
  631|       |
  632|  29.3k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (632:9): [True: 0, False: 29.3k]
  ------------------
  633|      0|        return 0;
  634|       |
  635|  29.3k|    fork_id = openssl_get_fork_id();
  636|       |
  637|  29.3k|    if (reseed_time_interval > 0)
  ------------------
  |  Branch (637:9): [True: 29.3k, False: 0]
  ------------------
  638|  29.3k|        now = time(NULL);
  639|       |
  640|  29.3k|    if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock))
  ------------------
  |  Branch (640:9): [True: 2.31k, False: 27.0k]
  |  Branch (640:31): [True: 0, False: 2.31k]
  ------------------
  641|      0|        return 0;
  642|       |
  643|  29.3k|    if (drbg->state != EVP_RAND_STATE_READY) {
  ------------------
  |  | 1250|  29.3k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (643:9): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    if (strength > drbg->strength) {
  ------------------
  |  Branch (656:9): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    if (outlen > drbg->max_request) {
  ------------------
  |  Branch (661:9): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    if (adinlen > drbg->max_adinlen) {
  ------------------
  |  Branch (665:9): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    if (drbg->fork_id != fork_id) {
  ------------------
  |  Branch (670:9): [True: 0, False: 29.3k]
  ------------------
  671|      0|        drbg->fork_id = fork_id;
  672|      0|        reseed_required = 1;
  673|      0|    }
  674|       |
  675|  29.3k|    if (drbg->reseed_interval > 0) {
  ------------------
  |  Branch (675:9): [True: 29.3k, False: 0]
  ------------------
  676|  29.3k|        if (drbg->generate_counter >= drbg->reseed_interval)
  ------------------
  |  Branch (676:13): [True: 0, False: 29.3k]
  ------------------
  677|      0|            reseed_required = 1;
  678|  29.3k|    }
  679|  29.3k|    if (reseed_time_interval > 0) {
  ------------------
  |  Branch (679:9): [True: 29.3k, False: 0]
  ------------------
  680|  29.3k|        if (now < drbg->reseed_time
  ------------------
  |  Branch (680:13): [True: 0, False: 29.3k]
  ------------------
  681|  29.3k|            || now - drbg->reseed_time >= reseed_time_interval)
  ------------------
  |  Branch (681:16): [True: 0, False: 29.3k]
  ------------------
  682|      0|            reseed_required = 1;
  683|  29.3k|    }
  684|  29.3k|    if (drbg->parent != NULL
  ------------------
  |  Branch (684:9): [True: 29.3k, False: 0]
  ------------------
  685|  29.3k|        && get_parent_reseed_count(drbg) != drbg->parent_reseed_counter)
  ------------------
  |  Branch (685:12): [True: 1.15k, False: 28.1k]
  ------------------
  686|  1.15k|        reseed_required = 1;
  687|       |
  688|  29.3k|    if (reseed_required || prediction_resistance) {
  ------------------
  |  Branch (688:9): [True: 1.15k, False: 28.1k]
  |  Branch (688:28): [True: 0, False: 28.1k]
  ------------------
  689|  1.15k|        if (!ossl_prov_drbg_reseed_unlocked(drbg, prediction_resistance, NULL,
  ------------------
  |  Branch (689:13): [True: 0, False: 1.15k]
  ------------------
  690|  1.15k|                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.15k|        adin = NULL;
  695|  1.15k|        adinlen = 0;
  696|  1.15k|    }
  697|       |
  698|  29.3k|    if (!drbg->generate(drbg, out, outlen, adin, adinlen)) {
  ------------------
  |  Branch (698:9): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    drbg->generate_counter++;
  705|       |
  706|  29.3k|    ret = 1;
  707|  29.3k|err:
  708|  29.3k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (708:9): [True: 2.31k, False: 27.0k]
  ------------------
  709|  2.31k|        CRYPTO_THREAD_unlock(drbg->lock);
  710|       |
  711|  29.3k|    return ret;
  712|  29.3k|}
ossl_drbg_enable_locking:
  759|    579|{
  760|    579|    PROV_DRBG *drbg = vctx;
  761|       |
  762|    579|    if (drbg != NULL && drbg->lock == NULL) {
  ------------------
  |  Branch (762:9): [True: 579, False: 0]
  |  Branch (762:25): [True: 579, False: 0]
  ------------------
  763|    579|        if (drbg->parent_enable_locking != NULL)
  ------------------
  |  Branch (763:13): [True: 579, False: 0]
  ------------------
  764|    579|            if (!drbg->parent_enable_locking(drbg->parent)) {
  ------------------
  |  Branch (764:17): [True: 0, False: 579]
  ------------------
  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|    579|        drbg->lock = CRYPTO_THREAD_lock_new();
  769|    579|        if (drbg->lock == NULL) {
  ------------------
  |  Branch (769:13): [True: 0, False: 579]
  ------------------
  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|    579|    }
  774|    579|    return 1;
  775|    579|}
ossl_rand_drbg_new:
  797|  1.73k|{
  798|  1.73k|    PROV_DRBG *drbg;
  799|  1.73k|    unsigned int p_str;
  800|  1.73k|    const OSSL_DISPATCH *pfunc;
  801|       |
  802|  1.73k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (802:9): [True: 0, False: 1.73k]
  ------------------
  803|      0|        return NULL;
  804|       |
  805|  1.73k|    drbg = OPENSSL_zalloc(sizeof(*drbg));
  ------------------
  |  |  109|  1.73k|    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.73k|    if (drbg == NULL)
  ------------------
  |  Branch (806:9): [True: 0, False: 1.73k]
  ------------------
  807|      0|        return NULL;
  808|       |
  809|  1.73k|    drbg->provctx = provctx;
  810|  1.73k|    drbg->instantiate = instantiate;
  811|  1.73k|    drbg->uninstantiate = uninstantiate;
  812|  1.73k|    drbg->reseed = reseed;
  813|  1.73k|    drbg->generate = generate;
  814|  1.73k|    drbg->fork_id = openssl_get_fork_id();
  815|       |
  816|       |    /* Extract parent's functions */
  817|  1.73k|    drbg->parent = parent;
  818|  1.73k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_ENABLE_LOCKING)) != NULL)
  ------------------
  |  |  548|  1.73k|#define OSSL_FUNC_RAND_ENABLE_LOCKING 8
  ------------------
  |  Branch (818:9): [True: 1.73k, False: 0]
  ------------------
  819|  1.73k|        drbg->parent_enable_locking = OSSL_FUNC_rand_enable_locking(pfunc);
  820|  1.73k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_LOCK)) != NULL)
  ------------------
  |  |  549|  1.73k|#define OSSL_FUNC_RAND_LOCK 9
  ------------------
  |  Branch (820:9): [True: 1.73k, False: 0]
  ------------------
  821|  1.73k|        drbg->parent_lock = OSSL_FUNC_rand_lock(pfunc);
  822|  1.73k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_UNLOCK)) != NULL)
  ------------------
  |  |  550|  1.73k|#define OSSL_FUNC_RAND_UNLOCK 10
  ------------------
  |  Branch (822:9): [True: 1.73k, False: 0]
  ------------------
  823|  1.73k|        drbg->parent_unlock = OSSL_FUNC_rand_unlock(pfunc);
  824|  1.73k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GET_CTX_PARAMS)) != NULL)
  ------------------
  |  |  555|  1.73k|#define OSSL_FUNC_RAND_GET_CTX_PARAMS 15
  ------------------
  |  Branch (824:9): [True: 1.73k, False: 0]
  ------------------
  825|  1.73k|        drbg->parent_get_ctx_params = OSSL_FUNC_rand_get_ctx_params(pfunc);
  826|  1.73k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_NONCE)) != NULL)
  ------------------
  |  |  547|  1.73k|#define OSSL_FUNC_RAND_NONCE 7
  ------------------
  |  Branch (826:9): [True: 0, False: 1.73k]
  ------------------
  827|      0|        drbg->parent_nonce = OSSL_FUNC_rand_nonce(pfunc);
  828|  1.73k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GET_SEED)) != NULL)
  ------------------
  |  |  558|  1.73k|#define OSSL_FUNC_RAND_GET_SEED 18
  ------------------
  |  Branch (828:9): [True: 1.73k, False: 0]
  ------------------
  829|  1.73k|        drbg->parent_get_seed = OSSL_FUNC_rand_get_seed(pfunc);
  830|  1.73k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_CLEAR_SEED)) != NULL)
  ------------------
  |  |  559|  1.73k|#define OSSL_FUNC_RAND_CLEAR_SEED 19
  ------------------
  |  Branch (830:9): [True: 1.73k, False: 0]
  ------------------
  831|  1.73k|        drbg->parent_clear_seed = OSSL_FUNC_rand_clear_seed(pfunc);
  832|       |
  833|       |    /* Set some default maximums up */
  834|  1.73k|    drbg->max_entropylen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.73k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  835|  1.73k|    drbg->max_noncelen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.73k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  836|  1.73k|    drbg->max_perslen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.73k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  837|  1.73k|    drbg->max_adinlen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.73k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  838|  1.73k|    drbg->generate_counter = 1;
  839|  1.73k|    drbg->reseed_counter = 1;
  840|  1.73k|    drbg->reseed_interval = RESEED_INTERVAL;
  ------------------
  |  |   31|  1.73k|#define RESEED_INTERVAL (1 << 8)
  ------------------
  841|  1.73k|    drbg->reseed_time_interval = TIME_INTERVAL;
  ------------------
  |  |   32|  1.73k|#define TIME_INTERVAL (60 * 60) /* 1 hour */
  ------------------
  842|       |
  843|  1.73k|    if (!dnew(drbg))
  ------------------
  |  Branch (843:9): [True: 0, False: 1.73k]
  ------------------
  844|      0|        goto err;
  845|       |
  846|  1.73k|    if (parent != NULL) {
  ------------------
  |  Branch (846:9): [True: 1.73k, False: 0]
  ------------------
  847|  1.73k|        if (!get_parent_strength(drbg, &p_str))
  ------------------
  |  Branch (847:13): [True: 0, False: 1.73k]
  ------------------
  848|      0|            goto err;
  849|  1.73k|        if (drbg->strength > p_str) {
  ------------------
  |  Branch (849:13): [True: 0, False: 1.73k]
  ------------------
  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.73k|    }
  858|       |#ifdef TSAN_REQUIRES_LOCKING
  859|       |    if (!ossl_drbg_enable_locking(drbg))
  860|       |        goto err;
  861|       |#endif
  862|  1.73k|    return drbg;
  863|       |
  864|      0|err:
  865|      0|    dfree(drbg);
  866|       |    return NULL;
  867|  1.73k|}
ossl_rand_drbg_free:
  870|  1.73k|{
  871|  1.73k|    if (drbg == NULL)
  ------------------
  |  Branch (871:9): [True: 0, False: 1.73k]
  ------------------
  872|      0|        return;
  873|       |
  874|  1.73k|    CRYPTO_THREAD_lock_free(drbg->lock);
  875|  1.73k|    OPENSSL_free(drbg);
  ------------------
  |  |  132|  1.73k|    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.73k|}
ossl_drbg_get_ctx_params:
  884|  10.4k|{
  885|  10.4k|    if (p->state != NULL && !OSSL_PARAM_set_int(p->state, drbg->state))
  ------------------
  |  Branch (885:9): [True: 7.01k, False: 3.47k]
  |  Branch (885:29): [True: 0, False: 7.01k]
  ------------------
  886|      0|        return 0;
  887|       |
  888|  10.4k|    if (p->str != NULL && !OSSL_PARAM_set_int(p->str, drbg->strength))
  ------------------
  |  Branch (888:9): [True: 3.47k, False: 7.01k]
  |  Branch (888:27): [True: 0, False: 3.47k]
  ------------------
  889|      0|        return 0;
  890|       |
  891|  10.4k|    if (p->minentlen != NULL
  ------------------
  |  Branch (891:9): [True: 0, False: 10.4k]
  ------------------
  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|  10.4k|    if (p->maxentlen != NULL
  ------------------
  |  Branch (895:9): [True: 0, False: 10.4k]
  ------------------
  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|  10.4k|    if (p->minnonlen != NULL
  ------------------
  |  Branch (899:9): [True: 0, False: 10.4k]
  ------------------
  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|  10.4k|    if (p->maxnonlen != NULL
  ------------------
  |  Branch (903:9): [True: 0, False: 10.4k]
  ------------------
  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|  10.4k|    if (p->maxperlen != NULL
  ------------------
  |  Branch (907:9): [True: 0, False: 10.4k]
  ------------------
  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|  10.4k|    if (p->maxadlen != NULL
  ------------------
  |  Branch (911:9): [True: 0, False: 10.4k]
  ------------------
  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|  10.4k|    if (p->reseed_req != NULL
  ------------------
  |  Branch (915:9): [True: 0, False: 10.4k]
  ------------------
  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|  10.4k|    if (p->reseed_time != NULL
  ------------------
  |  Branch (919:9): [True: 0, False: 10.4k]
  ------------------
  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|  10.4k|    if (p->reseed_int != NULL
  ------------------
  |  Branch (923:9): [True: 0, False: 10.4k]
  ------------------
  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|  10.4k|    if (!OSSL_FIPS_IND_GET_CTX_FROM_PARAM(drbg, p->ind))
  ------------------
  |  |  161|  10.4k|#define OSSL_FIPS_IND_GET_CTX_FROM_PARAM(ctx, params) 1
  ------------------
  |  Branch (927:9): [Folded, False: 10.4k]
  ------------------
  928|      0|        return 0;
  929|       |
  930|  10.4k|    return 1;
  931|  10.4k|}
ossl_drbg_get_ctx_params_no_lock:
  940|  65.6k|{
  941|  65.6k|    size_t cnt = 0;
  942|       |
  943|       |    /* This value never changes once set */
  944|  65.6k|    if (p->maxreq != NULL) {
  ------------------
  |  Branch (944:9): [True: 27.0k, False: 38.6k]
  ------------------
  945|  27.0k|        if (!OSSL_PARAM_set_size_t(p->maxreq, drbg->max_request))
  ------------------
  |  Branch (945:13): [True: 0, False: 27.0k]
  ------------------
  946|      0|            return 0;
  947|  27.0k|        cnt++;
  948|  27.0k|    }
  949|       |
  950|       |    /*
  951|       |     * Can be changed by multiple threads, but we tolerate inaccuracies in this
  952|       |     * value.
  953|       |     */
  954|  65.6k|    if (p->reseed_cnt != NULL) {
  ------------------
  |  Branch (954:9): [True: 28.1k, False: 37.5k]
  ------------------
  955|  28.1k|        if (!OSSL_PARAM_set_uint(p->reseed_cnt, tsan_load(&drbg->reseed_counter)))
  ------------------
  |  |   61|  28.1k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  |  Branch (955:13): [True: 0, False: 28.1k]
  ------------------
  956|      0|            return 0;
  957|  28.1k|        cnt++;
  958|  28.1k|    }
  959|       |
  960|  65.6k|    if (params[cnt].key == NULL)
  ------------------
  |  Branch (960:9): [True: 55.1k, False: 10.4k]
  ------------------
  961|  55.1k|        *complete = 1;
  962|  10.4k|    else
  963|  10.4k|        *complete = 0;
  964|       |
  965|  65.6k|    return 1;
  966|  65.6k|}
ossl_drbg_set_ctx_params:
  970|  1.73k|{
  971|  1.73k|    if (p->reseed_req != NULL
  ------------------
  |  Branch (971:9): [True: 1.73k, False: 0]
  ------------------
  972|  1.73k|        && !OSSL_PARAM_get_uint(p->reseed_req, &drbg->reseed_interval))
  ------------------
  |  Branch (972:12): [True: 0, False: 1.73k]
  ------------------
  973|      0|        return 0;
  974|       |
  975|  1.73k|    if (p->reseed_time != NULL
  ------------------
  |  Branch (975:9): [True: 1.73k, False: 0]
  ------------------
  976|  1.73k|        && !OSSL_PARAM_get_time_t(p->reseed_time, &drbg->reseed_time_interval))
  ------------------
  |  Branch (976:12): [True: 0, False: 1.73k]
  ------------------
  977|      0|        return 0;
  978|       |
  979|  1.73k|    return 1;
  980|  1.73k|}
drbg.c:get_entropy:
  195|  2.89k|{
  196|  2.89k|    size_t bytes;
  197|  2.89k|    unsigned int p_str;
  198|       |
  199|  2.89k|    if (drbg->parent == NULL)
  ------------------
  |  Branch (199:9): [True: 0, False: 2.89k]
  ------------------
  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.89k|    if (drbg->parent_get_seed == NULL) {
  ------------------
  |  Branch (207:9): [True: 0, False: 2.89k]
  ------------------
  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.89k|    if (!get_parent_strength(drbg, &p_str))
  ------------------
  |  Branch (211:9): [True: 0, False: 2.89k]
  ------------------
  212|      0|        return 0;
  213|  2.89k|    if (drbg->strength > p_str) {
  ------------------
  |  Branch (213:9): [True: 0, False: 2.89k]
  ------------------
  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.89k|    if (!ossl_drbg_lock_parent(drbg))
  ------------------
  |  Branch (227:9): [True: 0, False: 2.89k]
  ------------------
  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.89k|    bytes = drbg->parent_get_seed(drbg->parent, pout,
  239|  2.89k|        entropy > 0 ? entropy : (int)drbg->strength,
  ------------------
  |  Branch (239:9): [True: 2.89k, False: 0]
  ------------------
  240|  2.89k|        min_len, max_len, prediction_resistance,
  241|  2.89k|        (unsigned char *)&drbg, sizeof(drbg));
  242|  2.89k|    ossl_drbg_unlock_parent(drbg);
  243|  2.89k|    return bytes;
  244|  2.89k|}
drbg.c:ossl_drbg_lock_parent:
   64|  40.9k|{
   65|  40.9k|    void *parent = drbg->parent;
   66|       |
   67|  40.9k|    if (parent != NULL
  ------------------
  |  Branch (67:9): [True: 40.9k, False: 0]
  ------------------
   68|  40.9k|        && drbg->parent_lock != NULL
  ------------------
  |  Branch (68:12): [True: 40.9k, False: 0]
  ------------------
   69|  40.9k|        && !drbg->parent_lock(parent)) {
  ------------------
  |  Branch (69:12): [True: 0, False: 40.9k]
  ------------------
   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|  40.9k|    return 1;
   74|  40.9k|}
drbg.c:ossl_drbg_unlock_parent:
   77|  40.9k|{
   78|  40.9k|    void *parent = drbg->parent;
   79|       |
   80|  40.9k|    if (parent != NULL && drbg->parent_unlock != NULL)
  ------------------
  |  Branch (80:9): [True: 40.9k, False: 0]
  |  Branch (80:27): [True: 40.9k, False: 0]
  ------------------
   81|  40.9k|        drbg->parent_unlock(parent);
   82|  40.9k|}
drbg.c:cleanup_entropy:
  247|  2.89k|{
  248|  2.89k|    if (drbg->parent == NULL) {
  ------------------
  |  Branch (248:9): [True: 0, False: 2.89k]
  ------------------
  249|      0|        ossl_prov_cleanup_entropy(drbg->provctx, out, outlen);
  250|  2.89k|    } else if (drbg->parent_clear_seed != NULL) {
  ------------------
  |  Branch (250:16): [True: 2.89k, False: 0]
  ------------------
  251|  2.89k|        if (!ossl_drbg_lock_parent(drbg))
  ------------------
  |  Branch (251:13): [True: 0, False: 2.89k]
  ------------------
  252|      0|            return;
  253|  2.89k|        drbg->parent_clear_seed(drbg->parent, out, outlen);
  254|  2.89k|        ossl_drbg_unlock_parent(drbg);
  255|  2.89k|    }
  256|  2.89k|}
drbg.c:ossl_prov_drbg_reseed_unlocked:
  486|  1.15k|{
  487|  1.15k|    unsigned char *entropy = NULL;
  488|  1.15k|    size_t entropylen = 0;
  489|       |
  490|  1.15k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (490:9): [True: 0, False: 1.15k]
  ------------------
  491|      0|        return 0;
  492|       |
  493|  1.15k|    if (drbg->state != EVP_RAND_STATE_READY) {
  ------------------
  |  | 1250|  1.15k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (493:9): [True: 0, False: 1.15k]
  ------------------
  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.15k|    if (ent != NULL) {
  ------------------
  |  Branch (507:9): [True: 0, False: 1.15k]
  ------------------
  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.15k|    if (adin == NULL) {
  ------------------
  |  Branch (520:9): [True: 1.15k, False: 0]
  ------------------
  521|  1.15k|        adinlen = 0;
  522|  1.15k|    } 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.15k|    drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|  1.15k|#define EVP_RAND_STATE_ERROR 2
  ------------------
  528|       |
  529|  1.15k|    drbg->reseed_next_counter = tsan_load(&drbg->reseed_counter);
  ------------------
  |  |   61|  1.15k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  530|  1.15k|    if (drbg->reseed_next_counter) {
  ------------------
  |  Branch (530:9): [True: 1.15k, False: 0]
  ------------------
  531|  1.15k|        drbg->reseed_next_counter++;
  532|  1.15k|        if (!drbg->reseed_next_counter)
  ------------------
  |  Branch (532:13): [True: 0, False: 1.15k]
  ------------------
  533|      0|            drbg->reseed_next_counter = 1;
  534|  1.15k|    }
  535|       |
  536|  1.15k|    if (ent != NULL) {
  ------------------
  |  Branch (536:9): [True: 0, False: 1.15k]
  ------------------
  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.15k|    entropylen = get_entropy(drbg, &entropy, drbg->strength,
  562|  1.15k|        drbg->min_entropylen, drbg->max_entropylen,
  563|  1.15k|        prediction_resistance);
  564|  1.15k|    if (entropylen < drbg->min_entropylen
  ------------------
  |  Branch (564:9): [True: 0, False: 1.15k]
  ------------------
  565|  1.15k|        || entropylen > drbg->max_entropylen) {
  ------------------
  |  Branch (565:12): [True: 0, False: 1.15k]
  ------------------
  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.15k|    if (!drbg->reseed(drbg, entropy, entropylen, adin, adinlen))
  ------------------
  |  Branch (570:9): [True: 0, False: 1.15k]
  ------------------
  571|      0|        goto end;
  572|       |
  573|  1.15k|    drbg->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1250|  1.15k|#define EVP_RAND_STATE_READY 1
  ------------------
  574|  1.15k|    drbg->generate_counter = 1;
  575|  1.15k|    drbg->reseed_time = time(NULL);
  576|  1.15k|    tsan_store(&drbg->reseed_counter, drbg->reseed_next_counter);
  ------------------
  |  |   62|  1.15k|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  577|  1.15k|    if (drbg->parent != NULL)
  ------------------
  |  Branch (577:9): [True: 1.15k, False: 0]
  ------------------
  578|  1.15k|        drbg->parent_reseed_counter = get_parent_reseed_count(drbg);
  579|       |
  580|  1.15k|end:
  581|  1.15k|    cleanup_entropy(drbg, entropy, entropylen);
  582|  1.15k|    if (drbg->state == EVP_RAND_STATE_READY)
  ------------------
  |  | 1250|  1.15k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (582:9): [True: 1.15k, False: 0]
  ------------------
  583|  1.15k|        return 1;
  584|      0|    return 0;
  585|  1.15k|}
drbg.c:get_parent_reseed_count:
  110|  30.4k|{
  111|  30.4k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  30.4k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  30.4k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  112|  30.4k|    void *parent = drbg->parent;
  113|  30.4k|    unsigned int r = 0;
  114|       |
  115|  30.4k|    *params = OSSL_PARAM_construct_uint(OSSL_DRBG_PARAM_RESEED_COUNTER, &r);
  ------------------
  |  |  254|  30.4k|# define OSSL_DRBG_PARAM_RESEED_COUNTER "reseed_counter"
  ------------------
  116|  30.4k|    if (!ossl_drbg_lock_parent(drbg)) {
  ------------------
  |  Branch (116:9): [True: 0, False: 30.4k]
  ------------------
  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|  30.4k|    if (!drbg->parent_get_ctx_params(parent, params))
  ------------------
  |  Branch (120:9): [True: 0, False: 30.4k]
  ------------------
  121|      0|        r = 0;
  122|  30.4k|    ossl_drbg_unlock_parent(drbg);
  123|  30.4k|    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|  30.4k|}
drbg.c:find_call:
  748|  12.1k|{
  749|  12.1k|    if (dispatch != NULL)
  ------------------
  |  Branch (749:9): [True: 12.1k, False: 0]
  ------------------
  750|   143k|        while (dispatch->function_id != 0) {
  ------------------
  |  Branch (750:16): [True: 141k, False: 1.73k]
  ------------------
  751|   141k|            if (dispatch->function_id == function)
  ------------------
  |  Branch (751:17): [True: 10.4k, False: 130k]
  ------------------
  752|  10.4k|                return dispatch;
  753|   130k|            dispatch++;
  754|   130k|        }
  755|  1.73k|    return NULL;
  756|  12.1k|}
drbg.c:get_parent_strength:
   85|  4.63k|{
   86|  4.63k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.63k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.63k|    { NULL, 0, NULL, 0, 0 }
  ------------------
   87|  4.63k|    void *parent = drbg->parent;
   88|  4.63k|    int res;
   89|       |
   90|  4.63k|    if (drbg->parent_get_ctx_params == NULL) {
  ------------------
  |  Branch (90:9): [True: 0, False: 4.63k]
  ------------------
   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.63k|    *params = OSSL_PARAM_construct_uint(OSSL_RAND_PARAM_STRENGTH, str);
  ------------------
  |  |  553|  4.63k|# define OSSL_RAND_PARAM_STRENGTH "strength"
  ------------------
   96|  4.63k|    if (!ossl_drbg_lock_parent(drbg)) {
  ------------------
  |  Branch (96:9): [True: 0, False: 4.63k]
  ------------------
   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.63k|    res = drbg->parent_get_ctx_params(parent, params);
  101|  4.63k|    ossl_drbg_unlock_parent(drbg);
  102|  4.63k|    if (!res) {
  ------------------
  |  Branch (102:9): [True: 0, False: 4.63k]
  ------------------
  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.63k|    return 1;
  107|  4.63k|}

drbg_ctr.c:drbg_ctr_new_wrapper:
  649|  1.73k|{
  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.73k|    return ossl_rand_drbg_new(provctx, parent, parent_dispatch,
  657|  1.73k|        &drbg_ctr_new, &drbg_ctr_free,
  658|  1.73k|        &drbg_ctr_instantiate, &drbg_ctr_uninstantiate,
  659|  1.73k|        &drbg_ctr_reseed, &drbg_ctr_generate);
  660|  1.73k|}
drbg_ctr.c:drbg_ctr_new:
  634|  1.73k|{
  635|  1.73k|    PROV_DRBG_CTR *ctr;
  636|       |
  637|  1.73k|    ctr = OPENSSL_secure_zalloc(sizeof(*ctr));
  ------------------
  |  |  142|  1.73k|    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.73k|    if (ctr == NULL)
  ------------------
  |  Branch (638:9): [True: 0, False: 1.73k]
  ------------------
  639|      0|        return 0;
  640|       |
  641|  1.73k|    ctr->use_df = 1;
  642|  1.73k|    drbg->data = ctr;
  643|  1.73k|    OSSL_FIPS_IND_INIT(drbg)
  644|  1.73k|    return drbg_ctr_init_lengths(drbg);
  645|  1.73k|}
drbg_ctr.c:drbg_ctr_init_lengths:
  540|  3.47k|{
  541|  3.47k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  542|  3.47k|    int res = 1;
  543|       |
  544|       |    /* Maximum number of bits per request = 2^19  = 2^16 bytes */
  545|  3.47k|    drbg->max_request = 1 << 16;
  546|  3.47k|    if (ctr->use_df) {
  ------------------
  |  Branch (546:9): [True: 3.47k, False: 0]
  ------------------
  547|  3.47k|        drbg->min_entropylen = 0;
  548|  3.47k|        drbg->max_entropylen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.47k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  549|  3.47k|        drbg->min_noncelen = 0;
  550|  3.47k|        drbg->max_noncelen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.47k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  551|  3.47k|        drbg->max_perslen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.47k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  552|  3.47k|        drbg->max_adinlen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.47k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  553|       |
  554|  3.47k|        if (ctr->keylen > 0) {
  ------------------
  |  Branch (554:13): [True: 1.73k, False: 1.73k]
  ------------------
  555|  1.73k|            drbg->min_entropylen = ctr->keylen;
  556|  1.73k|            drbg->min_noncelen = drbg->min_entropylen / 2;
  557|  1.73k|        }
  558|  3.47k|    } 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.47k|    return res;
  570|  3.47k|}
drbg_ctr.c:drbg_ctr_instantiate:
  323|  1.73k|{
  324|  1.73k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  325|       |
  326|  1.73k|    if (entropy == NULL)
  ------------------
  |  Branch (326:9): [True: 0, False: 1.73k]
  ------------------
  327|      0|        return 0;
  328|       |
  329|  1.73k|    memset(ctr->K, 0, sizeof(ctr->K));
  330|  1.73k|    memset(ctr->V, 0, sizeof(ctr->V));
  331|  1.73k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->K, NULL, -1))
  ------------------
  |  Branch (331:9): [True: 0, False: 1.73k]
  ------------------
  332|      0|        return 0;
  333|       |
  334|  1.73k|    inc_128(ctr);
  335|  1.73k|    if (!ctr_update(drbg, entropy, entropylen, pers, perslen, nonce, noncelen))
  ------------------
  |  Branch (335:9): [True: 0, False: 1.73k]
  ------------------
  336|      0|        return 0;
  337|  1.73k|    return 1;
  338|  1.73k|}
drbg_ctr.c:inc_128:
   72|   103k|{
   73|   103k|    unsigned char *p = &ctr->V[0];
   74|   103k|    u32 n = 16, c = 1;
   75|       |
   76|  1.65M|    do {
   77|  1.65M|        --n;
   78|  1.65M|        c += p[n];
   79|  1.65M|        p[n] = (u8)c;
   80|  1.65M|        c >>= 8;
   81|  1.65M|    } while (n);
  ------------------
  |  Branch (81:14): [True: 1.55M, False: 103k]
  ------------------
   82|   103k|}
drbg_ctr.c:ctr_update:
  277|  34.5k|{
  278|  34.5k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  279|  34.5k|    int outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|  34.5k|#define AES_BLOCK_SIZE 16
  ------------------
  280|  34.5k|    unsigned char V_tmp[48], out[48];
  281|  34.5k|    unsigned char len;
  282|       |
  283|       |    /* correct key is already set up. */
  284|  34.5k|    memcpy(V_tmp, ctr->V, 16);
  285|  34.5k|    inc_128(ctr);
  286|  34.5k|    memcpy(V_tmp + 16, ctr->V, 16);
  287|  34.5k|    if (ctr->keylen == 16) {
  ------------------
  |  Branch (287:9): [True: 0, False: 34.5k]
  ------------------
  288|      0|        len = 32;
  289|  34.5k|    } else {
  290|  34.5k|        inc_128(ctr);
  291|  34.5k|        memcpy(V_tmp + 32, ctr->V, 16);
  292|  34.5k|        len = 48;
  293|  34.5k|    }
  294|  34.5k|    if (!EVP_CipherUpdate(ctr->ctx_ecb, out, &outlen, V_tmp, len)
  ------------------
  |  Branch (294:9): [True: 0, False: 34.5k]
  ------------------
  295|  34.5k|        || outlen != len)
  ------------------
  |  Branch (295:12): [True: 0, False: 34.5k]
  ------------------
  296|      0|        return 0;
  297|  34.5k|    memcpy(ctr->K, out, ctr->keylen);
  298|  34.5k|    memcpy(ctr->V, out + ctr->keylen, 16);
  299|       |
  300|  34.5k|    if (ctr->use_df) {
  ------------------
  |  Branch (300:9): [True: 34.5k, False: 0]
  ------------------
  301|       |        /* If no input reuse existing derived value */
  302|  34.5k|        if (in1 != NULL || nonce != NULL || in2 != NULL)
  ------------------
  |  Branch (302:13): [True: 5.21k, False: 29.3k]
  |  Branch (302:28): [True: 0, False: 29.3k]
  |  Branch (302:45): [True: 0, False: 29.3k]
  ------------------
  303|  5.21k|            if (!ctr_df(ctr, in1, in1len, nonce, noncelen, in2, in2len))
  ------------------
  |  Branch (303:17): [True: 0, False: 5.21k]
  ------------------
  304|      0|                return 0;
  305|       |        /* If this a reuse input in1len != 0 */
  306|  34.5k|        if (in1len)
  ------------------
  |  Branch (306:13): [True: 7.52k, False: 27.0k]
  ------------------
  307|  7.52k|            ctr_XOR(ctr, ctr->KX, drbg->seedlen);
  308|  34.5k|    } else {
  309|      0|        ctr_XOR(ctr, in1, in1len);
  310|      0|        ctr_XOR(ctr, in2, in2len);
  311|      0|    }
  312|       |
  313|  34.5k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->K, NULL, -1)
  ------------------
  |  Branch (313:9): [True: 0, False: 34.5k]
  ------------------
  314|  34.5k|        || !EVP_CipherInit_ex(ctr->ctx_ctr, NULL, NULL, ctr->K, NULL, -1))
  ------------------
  |  Branch (314:12): [True: 0, False: 34.5k]
  ------------------
  315|      0|        return 0;
  316|  34.5k|    return 1;
  317|  34.5k|}
drbg_ctr.c:ctr_df:
  214|  5.21k|{
  215|  5.21k|    static unsigned char c80 = 0x80;
  216|  5.21k|    size_t inlen;
  217|  5.21k|    unsigned char *p = ctr->bltmp;
  218|  5.21k|    int outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|  5.21k|#define AES_BLOCK_SIZE 16
  ------------------
  219|       |
  220|  5.21k|    if (!ctr_BCC_init(ctr))
  ------------------
  |  Branch (220:9): [True: 0, False: 5.21k]
  ------------------
  221|      0|        return 0;
  222|  5.21k|    if (in1 == NULL)
  ------------------
  |  Branch (222:9): [True: 0, False: 5.21k]
  ------------------
  223|      0|        in1len = 0;
  224|  5.21k|    if (in2 == NULL)
  ------------------
  |  Branch (224:9): [True: 5.21k, False: 0]
  ------------------
  225|  5.21k|        in2len = 0;
  226|  5.21k|    if (in3 == NULL)
  ------------------
  |  Branch (226:9): [True: 3.47k, False: 1.73k]
  ------------------
  227|  3.47k|        in3len = 0;
  228|  5.21k|    inlen = in1len + in2len + in3len;
  229|       |    /* Initialise L||N in temporary block */
  230|  5.21k|    *p++ = (inlen >> 24) & 0xff;
  231|  5.21k|    *p++ = (inlen >> 16) & 0xff;
  232|  5.21k|    *p++ = (inlen >> 8) & 0xff;
  233|  5.21k|    *p++ = inlen & 0xff;
  234|       |
  235|       |    /* NB keylen is at most 32 bytes */
  236|  5.21k|    *p++ = 0;
  237|  5.21k|    *p++ = 0;
  238|  5.21k|    *p++ = 0;
  239|  5.21k|    *p = (unsigned char)((ctr->keylen + 16) & 0xff);
  240|  5.21k|    ctr->bltmp_pos = 8;
  241|  5.21k|    if (!ctr_BCC_update(ctr, in1, in1len)
  ------------------
  |  Branch (241:9): [True: 0, False: 5.21k]
  ------------------
  242|  5.21k|        || !ctr_BCC_update(ctr, in2, in2len)
  ------------------
  |  Branch (242:12): [True: 0, False: 5.21k]
  ------------------
  243|  5.21k|        || !ctr_BCC_update(ctr, in3, in3len)
  ------------------
  |  Branch (243:12): [True: 0, False: 5.21k]
  ------------------
  244|  5.21k|        || !ctr_BCC_update(ctr, &c80, 1)
  ------------------
  |  Branch (244:12): [True: 0, False: 5.21k]
  ------------------
  245|  5.21k|        || !ctr_BCC_final(ctr))
  ------------------
  |  Branch (245:12): [True: 0, False: 5.21k]
  ------------------
  246|      0|        return 0;
  247|       |    /* Set up key K */
  248|  5.21k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->KX, NULL, -1))
  ------------------
  |  Branch (248:9): [True: 0, False: 5.21k]
  ------------------
  249|      0|        return 0;
  250|       |    /* X follows key K */
  251|  5.21k|    if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX, &outlen, ctr->KX + ctr->keylen,
  ------------------
  |  Branch (251:9): [True: 0, False: 5.21k]
  ------------------
  252|  5.21k|            AES_BLOCK_SIZE)
  ------------------
  |  |   26|  5.21k|#define AES_BLOCK_SIZE 16
  ------------------
  253|  5.21k|        || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|  5.21k|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (253:12): [True: 0, False: 5.21k]
  ------------------
  254|      0|        return 0;
  255|  5.21k|    if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX + 16, &outlen, ctr->KX,
  ------------------
  |  Branch (255:9): [True: 0, False: 5.21k]
  ------------------
  256|  5.21k|            AES_BLOCK_SIZE)
  ------------------
  |  |   26|  5.21k|#define AES_BLOCK_SIZE 16
  ------------------
  257|  5.21k|        || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|  5.21k|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (257:12): [True: 0, False: 5.21k]
  ------------------
  258|      0|        return 0;
  259|  5.21k|    if (ctr->keylen != 16)
  ------------------
  |  Branch (259:9): [True: 5.21k, False: 0]
  ------------------
  260|  5.21k|        if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX + 32, &outlen,
  ------------------
  |  Branch (260:13): [True: 0, False: 5.21k]
  ------------------
  261|  5.21k|                ctr->KX + 16, AES_BLOCK_SIZE)
  ------------------
  |  |   26|  5.21k|#define AES_BLOCK_SIZE 16
  ------------------
  262|  5.21k|            || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|  5.21k|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (262:16): [True: 0, False: 5.21k]
  ------------------
  263|      0|            return 0;
  264|  5.21k|    return 1;
  265|  5.21k|}
drbg_ctr.c:ctr_BCC_init:
  151|  5.21k|{
  152|  5.21k|    unsigned char bltmp[48] = { 0 };
  153|  5.21k|    unsigned char num_of_blk;
  154|       |
  155|  5.21k|    memset(ctr->KX, 0, 48);
  156|  5.21k|    num_of_blk = ctr->keylen == 16 ? 2 : 3;
  ------------------
  |  Branch (156:18): [True: 0, False: 5.21k]
  ------------------
  157|  5.21k|    bltmp[(AES_BLOCK_SIZE * 1) + 3] = 1;
  ------------------
  |  |   26|  5.21k|#define AES_BLOCK_SIZE 16
  ------------------
  158|  5.21k|    bltmp[(AES_BLOCK_SIZE * 2) + 3] = 2;
  ------------------
  |  |   26|  5.21k|#define AES_BLOCK_SIZE 16
  ------------------
  159|  5.21k|    return ctr_BCC_block(ctr, ctr->KX, bltmp, num_of_blk * AES_BLOCK_SIZE);
  ------------------
  |  |   26|  5.21k|#define AES_BLOCK_SIZE 16
  ------------------
  160|  5.21k|}
drbg_ctr.c:ctr_BCC_block:
  117|  23.7k|{
  118|  23.7k|    int i, outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|  23.7k|#define AES_BLOCK_SIZE 16
  ------------------
  119|       |
  120|  1.16M|    for (i = 0; i < len; i++)
  ------------------
  |  Branch (120:17): [True: 1.13M, False: 23.7k]
  ------------------
  121|  1.13M|        out[i] ^= in[i];
  122|       |
  123|  23.7k|    if (!EVP_CipherUpdate(ctr->ctx_df, out, &outlen, out, len)
  ------------------
  |  Branch (123:9): [True: 0, False: 23.7k]
  ------------------
  124|  23.7k|        || outlen != len)
  ------------------
  |  Branch (124:12): [True: 0, False: 23.7k]
  ------------------
  125|      0|        return 0;
  126|  23.7k|    return 1;
  127|  23.7k|}
drbg_ctr.c:ctr_BCC_update:
  167|  20.8k|{
  168|  20.8k|    if (in == NULL || inlen == 0)
  ------------------
  |  Branch (168:9): [True: 8.68k, False: 12.1k]
  |  Branch (168:23): [True: 0, False: 12.1k]
  ------------------
  169|  8.68k|        return 1;
  170|       |
  171|       |    /* If we have partial block handle it first */
  172|  12.1k|    if (ctr->bltmp_pos) {
  ------------------
  |  Branch (172:9): [True: 9.84k, False: 2.31k]
  ------------------
  173|  9.84k|        size_t left = 16 - ctr->bltmp_pos;
  174|       |
  175|       |        /* If we now have a complete block process it */
  176|  9.84k|        if (inlen >= left) {
  ------------------
  |  Branch (176:13): [True: 6.94k, False: 2.89k]
  ------------------
  177|  6.94k|            memcpy(ctr->bltmp + ctr->bltmp_pos, in, left);
  178|  6.94k|            if (!ctr_BCC_blocks(ctr, ctr->bltmp))
  ------------------
  |  Branch (178:17): [True: 0, False: 6.94k]
  ------------------
  179|      0|                return 0;
  180|  6.94k|            ctr->bltmp_pos = 0;
  181|  6.94k|            inlen -= left;
  182|  6.94k|            in += left;
  183|  6.94k|        }
  184|  9.84k|    }
  185|       |
  186|       |    /* Process zero or more complete blocks */
  187|  18.5k|    for (; inlen >= 16; in += 16, inlen -= 16) {
  ------------------
  |  Branch (187:12): [True: 6.36k, False: 12.1k]
  ------------------
  188|  6.36k|        if (!ctr_BCC_blocks(ctr, in))
  ------------------
  |  Branch (188:13): [True: 0, False: 6.36k]
  ------------------
  189|      0|            return 0;
  190|  6.36k|    }
  191|       |
  192|       |    /* Copy any remaining partial block to the temporary buffer */
  193|  12.1k|    if (inlen > 0) {
  ------------------
  |  Branch (193:9): [True: 9.84k, False: 2.31k]
  ------------------
  194|  9.84k|        memcpy(ctr->bltmp + ctr->bltmp_pos, in, inlen);
  195|  9.84k|        ctr->bltmp_pos += inlen;
  196|  9.84k|    }
  197|  12.1k|    return 1;
  198|  12.1k|}
drbg_ctr.c:ctr_BCC_blocks:
  133|  18.5k|{
  134|  18.5k|    unsigned char in_tmp[48];
  135|  18.5k|    unsigned char num_of_blk = 2;
  136|       |
  137|  18.5k|    memcpy(in_tmp, in, 16);
  138|  18.5k|    memcpy(in_tmp + 16, in, 16);
  139|  18.5k|    if (ctr->keylen != 16) {
  ------------------
  |  Branch (139:9): [True: 18.5k, False: 0]
  ------------------
  140|  18.5k|        memcpy(in_tmp + 32, in, 16);
  141|  18.5k|        num_of_blk = 3;
  142|  18.5k|    }
  143|  18.5k|    return ctr_BCC_block(ctr, ctr->KX, in_tmp, AES_BLOCK_SIZE * num_of_blk);
  ------------------
  |  |   26|  18.5k|#define AES_BLOCK_SIZE 16
  ------------------
  144|  18.5k|}
drbg_ctr.c:ctr_BCC_final:
  201|  5.21k|{
  202|  5.21k|    if (ctr->bltmp_pos) {
  ------------------
  |  Branch (202:9): [True: 5.21k, False: 0]
  ------------------
  203|  5.21k|        memset(ctr->bltmp + ctr->bltmp_pos, 0, 16 - ctr->bltmp_pos);
  204|  5.21k|        if (!ctr_BCC_blocks(ctr, ctr->bltmp))
  ------------------
  |  Branch (204:13): [True: 0, False: 5.21k]
  ------------------
  205|      0|            return 0;
  206|  5.21k|    }
  207|  5.21k|    return 1;
  208|  5.21k|}
drbg_ctr.c:ctr_XOR:
   85|  7.52k|{
   86|  7.52k|    size_t i, n;
   87|       |
   88|  7.52k|    if (in == NULL || inlen == 0)
  ------------------
  |  Branch (88:9): [True: 0, False: 7.52k]
  |  Branch (88:23): [True: 0, False: 7.52k]
  ------------------
   89|      0|        return;
   90|       |
   91|       |    /*
   92|       |     * Any zero padding will have no effect on the result as we
   93|       |     * are XORing. So just process however much input we have.
   94|       |     */
   95|  7.52k|    n = inlen < ctr->keylen ? inlen : ctr->keylen;
  ------------------
  |  Branch (95:9): [True: 0, False: 7.52k]
  ------------------
   96|  7.52k|    if (!ossl_assert(n <= sizeof(ctr->K)))
  ------------------
  |  |   52|  7.52k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.52k|    __FILE__, __LINE__)
  ------------------
  |  Branch (96:9): [True: 0, False: 7.52k]
  ------------------
   97|      0|        return;
   98|   248k|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (98:17): [True: 240k, False: 7.52k]
  ------------------
   99|   240k|        ctr->K[i] ^= in[i];
  100|  7.52k|    if (inlen <= ctr->keylen)
  ------------------
  |  Branch (100:9): [True: 0, False: 7.52k]
  ------------------
  101|      0|        return;
  102|       |
  103|  7.52k|    n = inlen - ctr->keylen;
  104|  7.52k|    if (n > 16) {
  ------------------
  |  Branch (104:9): [True: 0, False: 7.52k]
  ------------------
  105|       |        /* Should never happen */
  106|      0|        n = 16;
  107|      0|    }
  108|   127k|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (108:17): [True: 120k, False: 7.52k]
  ------------------
  109|   120k|        ctr->V[i] ^= in[i + ctr->keylen];
  110|  7.52k|}
drbg_ctr.c:drbg_ctr_reseed:
  370|  1.15k|{
  371|  1.15k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  372|       |
  373|  1.15k|    if (entropy == NULL)
  ------------------
  |  Branch (373:9): [True: 0, False: 1.15k]
  ------------------
  374|      0|        return 0;
  375|       |
  376|  1.15k|    inc_128(ctr);
  377|  1.15k|    if (!ctr_update(drbg, entropy, entropylen, adin, adinlen, NULL, 0))
  ------------------
  |  Branch (377:9): [True: 0, False: 1.15k]
  ------------------
  378|      0|        return 0;
  379|  1.15k|    return 1;
  380|  1.15k|}
drbg_ctr.c:drbg_ctr_generate:
  407|  29.3k|{
  408|  29.3k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  409|  29.3k|    unsigned int ctr32, blocks;
  410|  29.3k|    int outl, buflen;
  411|       |
  412|  29.3k|    if (adin != NULL && adinlen != 0) {
  ------------------
  |  Branch (412:9): [True: 2.31k, False: 27.0k]
  |  Branch (412:25): [True: 2.31k, False: 0]
  ------------------
  413|  2.31k|        inc_128(ctr);
  414|       |
  415|  2.31k|        if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (415:13): [True: 0, False: 2.31k]
  ------------------
  416|      0|            return 0;
  417|       |        /* This means we reuse derived value */
  418|  2.31k|        if (ctr->use_df) {
  ------------------
  |  Branch (418:13): [True: 2.31k, False: 0]
  ------------------
  419|  2.31k|            adin = NULL;
  420|  2.31k|            adinlen = 1;
  421|  2.31k|        }
  422|  27.0k|    } else {
  423|  27.0k|        adinlen = 0;
  424|  27.0k|    }
  425|       |
  426|  29.3k|    inc_128(ctr);
  427|       |
  428|  29.3k|    if (outlen == 0) {
  ------------------
  |  Branch (428:9): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    memset(out, 0, outlen);
  437|       |
  438|  29.3k|    do {
  439|  29.3k|        if (!EVP_CipherInit_ex(ctr->ctx_ctr,
  ------------------
  |  Branch (439:13): [True: 0, False: 29.3k]
  ------------------
  440|  29.3k|                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|  29.3k|        buflen = outlen > (1U << 30) ? (1 << 30) : (int)outlen;
  ------------------
  |  Branch (450:18): [True: 0, False: 29.3k]
  ------------------
  451|  29.3k|        blocks = (buflen + 15) / 16;
  452|       |
  453|  29.3k|        ctr32 = GETU32(ctr->V + 12) + blocks;
  ------------------
  |  |   98|  29.3k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
  454|  29.3k|        if (ctr32 < blocks) {
  ------------------
  |  Branch (454:13): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|        PUTU32(ctr->V + 12, ctr32);
  ------------------
  |  |   99|  29.3k|#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|  29.3k|        if (!EVP_CipherUpdate(ctr->ctx_ctr, out, &outl, out, buflen)
  ------------------
  |  Branch (465:13): [True: 0, False: 29.3k]
  ------------------
  466|  29.3k|            || outl != buflen)
  ------------------
  |  Branch (466:16): [True: 0, False: 29.3k]
  ------------------
  467|      0|            return 0;
  468|       |
  469|  29.3k|        out += buflen;
  470|  29.3k|        outlen -= buflen;
  471|  29.3k|    } while (outlen);
  ------------------
  |  Branch (471:14): [True: 0, False: 29.3k]
  ------------------
  472|       |
  473|  29.3k|    if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (473:9): [True: 0, False: 29.3k]
  ------------------
  474|      0|        return 0;
  475|  29.3k|    return 1;
  476|  29.3k|}
drbg_ctr.c:drbg_ctr_free:
  663|  1.73k|{
  664|  1.73k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  665|  1.73k|    PROV_DRBG_CTR *ctr;
  666|       |
  667|  1.73k|    if (drbg != NULL && (ctr = (PROV_DRBG_CTR *)drbg->data) != NULL) {
  ------------------
  |  Branch (667:9): [True: 1.73k, False: 0]
  |  Branch (667:25): [True: 1.73k, False: 0]
  ------------------
  668|  1.73k|        EVP_CIPHER_CTX_free(ctr->ctx_ecb);
  669|  1.73k|        EVP_CIPHER_CTX_free(ctr->ctx_ctr);
  670|  1.73k|        EVP_CIPHER_CTX_free(ctr->ctx_df);
  671|  1.73k|        EVP_CIPHER_free(ctr->cipher_ecb);
  672|  1.73k|        EVP_CIPHER_free(ctr->cipher_ctr);
  673|       |
  674|  1.73k|        OPENSSL_secure_clear_free(ctr, sizeof(*ctr));
  ------------------
  |  |  150|  1.73k|    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.73k|    }
  676|  1.73k|    ossl_rand_drbg_free(drbg);
  677|  1.73k|}
drbg_ctr.c:drbg_ctr_instantiate_wrapper:
  345|  1.73k|{
  346|  1.73k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  347|  1.73k|    struct drbg_set_ctx_params_st p;
  348|  1.73k|    int ret = 0;
  349|       |
  350|  1.73k|    if (drbg == NULL || !drbg_ctr_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (350:9): [True: 0, False: 1.73k]
  |  Branch (350:25): [True: 0, False: 1.73k]
  ------------------
  351|      0|        return 0;
  352|       |
  353|  1.73k|    if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock))
  ------------------
  |  Branch (353:9): [True: 0, False: 1.73k]
  |  Branch (353:31): [True: 0, False: 0]
  ------------------
  354|      0|        return 0;
  355|       |
  356|  1.73k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (356:9): [True: 0, False: 1.73k]
  ------------------
  357|  1.73k|        || !drbg_ctr_set_ctx_params_locked(drbg, &p))
  ------------------
  |  Branch (357:12): [True: 0, False: 1.73k]
  ------------------
  358|      0|        goto err;
  359|  1.73k|    ret = ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance,
  360|  1.73k|        pstr, pstr_len);
  361|  1.73k|err:
  362|  1.73k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (362:9): [True: 0, False: 1.73k]
  ------------------
  363|      0|        CRYPTO_THREAD_unlock(drbg->lock);
  364|  1.73k|    return ret;
  365|  1.73k|}
drbg_ctr.c:drbg_ctr_set_ctx_params_locked:
  726|  1.73k|{
  727|  1.73k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)ctx->data;
  728|  1.73k|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(ctx->provctx);
  ------------------
  |  |   31|  1.73k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  729|  1.73k|    OSSL_PROVIDER *prov = NULL;
  730|  1.73k|    char *ecb;
  731|  1.73k|    const char *propquery = NULL;
  732|  1.73k|    int i, cipher_init = 0;
  733|       |
  734|  1.73k|    if (p->df != NULL && OSSL_PARAM_get_int(p->df, &i)) {
  ------------------
  |  Branch (734:9): [True: 1.73k, False: 0]
  |  Branch (734:26): [True: 1.73k, False: 0]
  ------------------
  735|       |        /* FIPS errors out in the drbg_ctr_init() call later */
  736|  1.73k|        ctr->use_df = i != 0;
  737|  1.73k|        cipher_init = 1;
  738|  1.73k|    }
  739|       |
  740|  1.73k|    if (p->propq != NULL) {
  ------------------
  |  Branch (740:9): [True: 0, False: 1.73k]
  ------------------
  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.73k|    if (p->prov != NULL) {
  ------------------
  |  Branch (746:9): [True: 1.73k, False: 0]
  ------------------
  747|  1.73k|        if (p->prov->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|  1.73k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (747:13): [True: 0, False: 1.73k]
  ------------------
  748|      0|            return 0;
  749|  1.73k|        if ((prov = ossl_provider_find(libctx,
  ------------------
  |  Branch (749:13): [True: 0, False: 1.73k]
  ------------------
  750|  1.73k|                 (const char *)p->prov->data, 1))
  751|  1.73k|            == NULL)
  752|      0|            return 0;
  753|  1.73k|    }
  754|       |
  755|  1.73k|    if (p->cipher != NULL) {
  ------------------
  |  Branch (755:9): [True: 1.73k, False: 0]
  ------------------
  756|  1.73k|        const char *base = (const char *)p->cipher->data;
  757|  1.73k|        size_t ctr_str_len = sizeof("CTR") - 1;
  758|  1.73k|        size_t ecb_str_len = sizeof("ECB") - 1;
  759|       |
  760|  1.73k|        if (p->cipher->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|  3.47k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (760:13): [True: 0, False: 1.73k]
  ------------------
  761|  1.73k|            || p->cipher->data_size < ctr_str_len) {
  ------------------
  |  Branch (761:16): [True: 0, False: 1.73k]
  ------------------
  762|      0|            ossl_provider_free(prov);
  763|      0|            return 0;
  764|      0|        }
  765|  1.73k|        if (OPENSSL_strcasecmp("CTR", base + p->cipher->data_size - ctr_str_len) != 0) {
  ------------------
  |  Branch (765:13): [True: 0, False: 1.73k]
  ------------------
  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.73k|        if ((ecb = OPENSSL_strndup(base, p->cipher->data_size)) == NULL) {
  ------------------
  |  |  138|  1.73k|    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.73k]
  ------------------
  771|      0|            ossl_provider_free(prov);
  772|      0|            return 0;
  773|      0|        }
  774|  1.73k|        strcpy(ecb + p->cipher->data_size - ecb_str_len, "ECB");
  775|  1.73k|        EVP_CIPHER_free(ctr->cipher_ecb);
  776|  1.73k|        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.73k|        (void)ERR_set_mark();
  782|  1.73k|        ctr->cipher_ctr = evp_cipher_fetch_from_prov(prov, base, NULL);
  783|  1.73k|        if (ctr->cipher_ctr == NULL) {
  ------------------
  |  Branch (783:13): [True: 0, False: 1.73k]
  ------------------
  784|      0|            (void)ERR_pop_to_mark();
  785|      0|            ctr->cipher_ctr = EVP_CIPHER_fetch(libctx, base, propquery);
  786|  1.73k|        } else {
  787|  1.73k|            (void)ERR_clear_last_mark();
  788|  1.73k|        }
  789|  1.73k|        (void)ERR_set_mark();
  790|  1.73k|        ctr->cipher_ecb = evp_cipher_fetch_from_prov(prov, ecb, NULL);
  791|  1.73k|        if (ctr->cipher_ecb == NULL) {
  ------------------
  |  Branch (791:13): [True: 0, False: 1.73k]
  ------------------
  792|      0|            (void)ERR_pop_to_mark();
  793|      0|            ctr->cipher_ecb = EVP_CIPHER_fetch(libctx, ecb, propquery);
  794|  1.73k|        } else {
  795|  1.73k|            (void)ERR_clear_last_mark();
  796|  1.73k|        }
  797|  1.73k|        OPENSSL_free(ecb);
  ------------------
  |  |  132|  1.73k|    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.73k|        if (ctr->cipher_ctr == NULL || ctr->cipher_ecb == NULL) {
  ------------------
  |  Branch (798:13): [True: 0, False: 1.73k]
  |  Branch (798:40): [True: 0, False: 1.73k]
  ------------------
  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.73k|        cipher_init = 1;
  804|  1.73k|    }
  805|  1.73k|    ossl_provider_free(prov);
  806|       |
  807|  1.73k|    if (cipher_init && !drbg_ctr_init(ctx))
  ------------------
  |  Branch (807:9): [True: 1.73k, False: 0]
  |  Branch (807:24): [True: 0, False: 1.73k]
  ------------------
  808|      0|        return 0;
  809|       |
  810|  1.73k|    return ossl_drbg_set_ctx_params(ctx, p);
  811|  1.73k|}
drbg_ctr.c:drbg_ctr_init:
  573|  1.73k|{
  574|  1.73k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  575|  1.73k|    size_t keylen;
  576|       |
  577|  1.73k|    if (ctr->cipher_ctr == NULL) {
  ------------------
  |  Branch (577:9): [True: 0, False: 1.73k]
  ------------------
  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.73k|    ctr->keylen = keylen = EVP_CIPHER_get_key_length(ctr->cipher_ctr);
  582|  1.73k|    if (ctr->ctx_ecb == NULL)
  ------------------
  |  Branch (582:9): [True: 1.73k, False: 0]
  ------------------
  583|  1.73k|        ctr->ctx_ecb = EVP_CIPHER_CTX_new();
  584|  1.73k|    if (ctr->ctx_ctr == NULL)
  ------------------
  |  Branch (584:9): [True: 1.73k, False: 0]
  ------------------
  585|  1.73k|        ctr->ctx_ctr = EVP_CIPHER_CTX_new();
  586|  1.73k|    if (ctr->ctx_ecb == NULL || ctr->ctx_ctr == NULL) {
  ------------------
  |  Branch (586:9): [True: 0, False: 1.73k]
  |  Branch (586:33): [True: 0, False: 1.73k]
  ------------------
  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.73k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb,
  ------------------
  |  Branch (591:9): [True: 0, False: 1.73k]
  ------------------
  592|  1.73k|            ctr->cipher_ecb, NULL, NULL, NULL, 1)
  593|  1.73k|        || !EVP_CipherInit_ex(ctr->ctx_ctr,
  ------------------
  |  Branch (593:12): [True: 0, False: 1.73k]
  ------------------
  594|  1.73k|            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.73k|    drbg->strength = (unsigned int)(keylen * 8);
  600|  1.73k|    drbg->seedlen = keylen + 16;
  601|       |
  602|  1.73k|    if (ctr->use_df) {
  ------------------
  |  Branch (602:9): [True: 1.73k, False: 0]
  ------------------
  603|       |        /* df initialisation */
  604|  1.73k|        static const unsigned char df_key[32] = {
  605|  1.73k|            0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
  606|  1.73k|            0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
  607|  1.73k|            0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
  608|  1.73k|            0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
  609|  1.73k|        };
  610|       |
  611|  1.73k|        if (ctr->ctx_df == NULL)
  ------------------
  |  Branch (611:13): [True: 1.73k, False: 0]
  ------------------
  612|  1.73k|            ctr->ctx_df = EVP_CIPHER_CTX_new();
  613|  1.73k|        if (ctr->ctx_df == NULL) {
  ------------------
  |  Branch (613:13): [True: 0, False: 1.73k]
  ------------------
  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.73k|        if (!EVP_CipherInit_ex(ctr->ctx_df,
  ------------------
  |  Branch (618:13): [True: 0, False: 1.73k]
  ------------------
  619|  1.73k|                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.73k|    }
  624|  1.73k|    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.73k|}
drbg_ctr.c:drbg_ctr_generate_wrapper:
  481|  27.0k|{
  482|  27.0k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  483|       |
  484|  27.0k|    return ossl_prov_drbg_generate(drbg, out, outlen, strength,
  485|  27.0k|        prediction_resistance, adin, adin_len);
  486|  27.0k|}
drbg_ctr.c:drbg_ctr_settable_ctx_params:
  835|  1.73k|{
  836|  1.73k|    return drbg_ctr_set_ctx_params_list;
  837|  1.73k|}
drbg_ctr.c:drbg_ctr_get_ctx_params:
  680|  65.6k|{
  681|  65.6k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  682|  65.6k|    PROV_DRBG_CTR *ctr;
  683|  65.6k|    struct drbg_ctr_get_ctx_params_st p;
  684|  65.6k|    int ret = 0, complete = 0;
  685|       |
  686|  65.6k|    if (drbg == NULL || !drbg_ctr_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (686:9): [True: 0, False: 65.6k]
  |  Branch (686:25): [True: 0, False: 65.6k]
  ------------------
  687|      0|        return 0;
  688|       |
  689|  65.6k|    if (!ossl_drbg_get_ctx_params_no_lock(drbg, &p, params, &complete))
  ------------------
  |  Branch (689:9): [True: 0, False: 65.6k]
  ------------------
  690|      0|        return 0;
  691|       |
  692|  65.6k|    if (complete)
  ------------------
  |  Branch (692:9): [True: 55.1k, False: 10.4k]
  ------------------
  693|  55.1k|        return 1;
  694|       |
  695|  10.4k|    ctr = (PROV_DRBG_CTR *)drbg->data;
  696|       |
  697|  10.4k|    if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock))
  ------------------
  |  Branch (697:9): [True: 10.4k, False: 0]
  |  Branch (697:31): [True: 0, False: 10.4k]
  ------------------
  698|      0|        return 0;
  699|       |
  700|  10.4k|    if (p.df != NULL && !OSSL_PARAM_set_int(p.df, ctr->use_df))
  ------------------
  |  Branch (700:9): [True: 0, False: 10.4k]
  |  Branch (700:25): [True: 0, False: 0]
  ------------------
  701|      0|        goto err;
  702|       |
  703|  10.4k|    if (p.cipher != NULL) {
  ------------------
  |  Branch (703:9): [True: 0, False: 10.4k]
  ------------------
  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|  10.4k|    ret = ossl_drbg_get_ctx_params(drbg, &p);
  711|  10.4k|err:
  712|  10.4k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (712:9): [True: 10.4k, False: 0]
  ------------------
  713|  10.4k|        CRYPTO_THREAD_unlock(drbg->lock);
  714|       |
  715|  10.4k|    return ret;
  716|  10.4k|}

drbg_ctr.c:drbg_ctr_set_ctx_params_decoder:
  379|  1.73k|{
  380|  1.73k|    const char *s;
  381|       |
  382|  1.73k|    memset(r, 0, sizeof(*r));
  383|  1.73k|    if (p != NULL)
  ------------------
  |  Branch (383:9): [True: 1.73k, False: 0]
  ------------------
  384|  10.4k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (384:16): [True: 8.68k, False: 1.73k]
  ------------------
  385|  8.68k|            switch(s[0]) {
  386|      0|            default:
  ------------------
  |  Branch (386:13): [True: 0, False: 8.68k]
  ------------------
  387|      0|                break;
  388|  1.73k|            case 'c':
  ------------------
  |  Branch (388:13): [True: 1.73k, False: 6.94k]
  ------------------
  389|  1.73k|                if (ossl_likely(strcmp("ipher", s + 1) == 0)) {
  ------------------
  |  |   22|  1.73k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.73k, False: 0]
  |  |  ------------------
  ------------------
  390|       |                    /* OSSL_DRBG_PARAM_CIPHER */
  391|  1.73k|                    if (ossl_unlikely(r->cipher != NULL)) {
  ------------------
  |  |   23|  1.73k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.73k]
  |  |  ------------------
  ------------------
  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.73k|                    r->cipher = (OSSL_PARAM *)p;
  397|  1.73k|                }
  398|  1.73k|                break;
  399|  1.73k|            case 'p':
  ------------------
  |  Branch (399:13): [True: 1.73k, False: 6.94k]
  ------------------
  400|  1.73k|                switch(s[1]) {
  401|      0|                default:
  ------------------
  |  Branch (401:17): [True: 0, False: 1.73k]
  ------------------
  402|      0|                    break;
  403|  1.73k|                case 'r':
  ------------------
  |  Branch (403:17): [True: 1.73k, False: 0]
  ------------------
  404|  1.73k|                    switch(s[2]) {
  405|      0|                    default:
  ------------------
  |  Branch (405:21): [True: 0, False: 1.73k]
  ------------------
  406|      0|                        break;
  407|  1.73k|                    case 'o':
  ------------------
  |  Branch (407:21): [True: 1.73k, False: 0]
  ------------------
  408|  1.73k|                        switch(s[3]) {
  409|      0|                        default:
  ------------------
  |  Branch (409:25): [True: 0, False: 1.73k]
  ------------------
  410|      0|                            break;
  411|      0|                        case 'p':
  ------------------
  |  Branch (411:25): [True: 0, False: 1.73k]
  ------------------
  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.73k|                        case 'v':
  ------------------
  |  Branch (422:25): [True: 1.73k, False: 0]
  ------------------
  423|  1.73k|                            if (ossl_likely(strcmp("ider-name", s + 4) == 0)) {
  ------------------
  |  |   22|  1.73k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.73k, False: 0]
  |  |  ------------------
  ------------------
  424|       |                                /* OSSL_PROV_PARAM_CORE_PROV_NAME */
  425|  1.73k|                                if (ossl_unlikely(r->prov != NULL)) {
  ------------------
  |  |   23|  1.73k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.73k]
  |  |  ------------------
  ------------------
  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.73k|                                r->prov = (OSSL_PARAM *)p;
  431|  1.73k|                            }
  432|  1.73k|                        }
  433|  1.73k|                    }
  434|  1.73k|                }
  435|  1.73k|                break;
  436|  3.47k|            case 'r':
  ------------------
  |  Branch (436:13): [True: 3.47k, False: 5.21k]
  ------------------
  437|  3.47k|                switch(s[1]) {
  438|      0|                default:
  ------------------
  |  Branch (438:17): [True: 0, False: 3.47k]
  ------------------
  439|      0|                    break;
  440|  3.47k|                case 'e':
  ------------------
  |  Branch (440:17): [True: 3.47k, False: 0]
  ------------------
  441|  3.47k|                    switch(s[2]) {
  442|      0|                    default:
  ------------------
  |  Branch (442:21): [True: 0, False: 3.47k]
  ------------------
  443|      0|                        break;
  444|  3.47k|                    case 's':
  ------------------
  |  Branch (444:21): [True: 3.47k, False: 0]
  ------------------
  445|  3.47k|                        switch(s[3]) {
  446|      0|                        default:
  ------------------
  |  Branch (446:25): [True: 0, False: 3.47k]
  ------------------
  447|      0|                            break;
  448|  3.47k|                        case 'e':
  ------------------
  |  Branch (448:25): [True: 3.47k, False: 0]
  ------------------
  449|  3.47k|                            switch(s[4]) {
  450|      0|                            default:
  ------------------
  |  Branch (450:29): [True: 0, False: 3.47k]
  ------------------
  451|      0|                                break;
  452|  3.47k|                            case 'e':
  ------------------
  |  Branch (452:29): [True: 3.47k, False: 0]
  ------------------
  453|  3.47k|                                switch(s[5]) {
  454|      0|                                default:
  ------------------
  |  Branch (454:33): [True: 0, False: 3.47k]
  ------------------
  455|      0|                                    break;
  456|  3.47k|                                case 'd':
  ------------------
  |  Branch (456:33): [True: 3.47k, False: 0]
  ------------------
  457|  3.47k|                                    switch(s[6]) {
  458|      0|                                    default:
  ------------------
  |  Branch (458:37): [True: 0, False: 3.47k]
  ------------------
  459|      0|                                        break;
  460|  3.47k|                                    case '_':
  ------------------
  |  Branch (460:37): [True: 3.47k, False: 0]
  ------------------
  461|  3.47k|                                        switch(s[7]) {
  462|      0|                                        default:
  ------------------
  |  Branch (462:41): [True: 0, False: 3.47k]
  ------------------
  463|      0|                                            break;
  464|  1.73k|                                        case 'r':
  ------------------
  |  Branch (464:41): [True: 1.73k, False: 1.73k]
  ------------------
  465|  1.73k|                                            if (ossl_likely(strcmp("equests", s + 8) == 0)) {
  ------------------
  |  |   22|  1.73k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.73k, False: 0]
  |  |  ------------------
  ------------------
  466|       |                                                /* OSSL_DRBG_PARAM_RESEED_REQUESTS */
  467|  1.73k|                                                if (ossl_unlikely(r->reseed_req != NULL)) {
  ------------------
  |  |   23|  1.73k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.73k]
  |  |  ------------------
  ------------------
  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.73k|                                                r->reseed_req = (OSSL_PARAM *)p;
  473|  1.73k|                                            }
  474|  1.73k|                                            break;
  475|  1.73k|                                        case 't':
  ------------------
  |  Branch (475:41): [True: 1.73k, False: 1.73k]
  ------------------
  476|  1.73k|                                            if (ossl_likely(strcmp("ime_interval", s + 8) == 0)) {
  ------------------
  |  |   22|  1.73k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.73k, False: 0]
  |  |  ------------------
  ------------------
  477|       |                                                /* OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL */
  478|  1.73k|                                                if (ossl_unlikely(r->reseed_time != NULL)) {
  ------------------
  |  |   23|  1.73k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.73k]
  |  |  ------------------
  ------------------
  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.73k|                                                r->reseed_time = (OSSL_PARAM *)p;
  484|  1.73k|                                            }
  485|  3.47k|                                        }
  486|  3.47k|                                    }
  487|  3.47k|                                }
  488|  3.47k|                            }
  489|  3.47k|                        }
  490|  3.47k|                    }
  491|  3.47k|                }
  492|  3.47k|                break;
  493|  3.47k|            case 'u':
  ------------------
  |  Branch (493:13): [True: 1.73k, False: 6.94k]
  ------------------
  494|  1.73k|                if (ossl_likely(strcmp("se_derivation_function", s + 1) == 0)) {
  ------------------
  |  |   22|  1.73k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.73k, False: 0]
  |  |  ------------------
  ------------------
  495|       |                    /* OSSL_DRBG_PARAM_USE_DF */
  496|  1.73k|                    if (ossl_unlikely(r->df != NULL)) {
  ------------------
  |  |   23|  1.73k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.73k]
  |  |  ------------------
  ------------------
  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.73k|                    r->df = (OSSL_PARAM *)p;
  502|  1.73k|                }
  503|  8.68k|            }
  504|  1.73k|    return 1;
  505|  1.73k|}
drbg_ctr.c:drbg_ctr_get_ctx_params_decoder:
   63|  65.6k|{
   64|  65.6k|    const char *s;
   65|       |
   66|  65.6k|    memset(r, 0, sizeof(*r));
   67|  65.6k|    if (p != NULL)
  ------------------
  |  Branch (67:9): [True: 65.6k, False: 0]
  ------------------
   68|   131k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (68:16): [True: 65.6k, False: 65.6k]
  ------------------
   69|  65.6k|            switch(s[0]) {
   70|      0|            default:
  ------------------
  |  Branch (70:13): [True: 0, False: 65.6k]
  ------------------
   71|      0|                break;
   72|      0|            case 'c':
  ------------------
  |  Branch (72:13): [True: 0, False: 65.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: 65.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|  27.0k|            case 'm':
  ------------------
  |  Branch (96:13): [True: 27.0k, False: 38.6k]
  ------------------
   97|  27.0k|                switch(s[1]) {
   98|      0|                default:
  ------------------
  |  Branch (98:17): [True: 0, False: 27.0k]
  ------------------
   99|      0|                    break;
  100|  27.0k|                case 'a':
  ------------------
  |  Branch (100:17): [True: 27.0k, False: 0]
  ------------------
  101|  27.0k|                    switch(s[2]) {
  102|      0|                    default:
  ------------------
  |  Branch (102:21): [True: 0, False: 27.0k]
  ------------------
  103|      0|                        break;
  104|  27.0k|                    case 'x':
  ------------------
  |  Branch (104:21): [True: 27.0k, False: 0]
  ------------------
  105|  27.0k|                        switch(s[3]) {
  106|      0|                        default:
  ------------------
  |  Branch (106:25): [True: 0, False: 27.0k]
  ------------------
  107|      0|                            break;
  108|  27.0k|                        case '_':
  ------------------
  |  Branch (108:25): [True: 27.0k, False: 0]
  ------------------
  109|  27.0k|                            switch(s[4]) {
  110|      0|                            default:
  ------------------
  |  Branch (110:29): [True: 0, False: 27.0k]
  ------------------
  111|      0|                                break;
  112|      0|                            case 'a':
  ------------------
  |  Branch (112:29): [True: 0, False: 27.0k]
  ------------------
  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: 27.0k]
  ------------------
  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: 27.0k]
  ------------------
  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: 27.0k]
  ------------------
  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|  27.0k|                            case 'r':
  ------------------
  |  Branch (156:29): [True: 27.0k, False: 0]
  ------------------
  157|  27.0k|                                if (ossl_likely(strcmp("equest", s + 5) == 0)) {
  ------------------
  |  |   22|  27.0k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 27.0k, False: 0]
  |  |  ------------------
  ------------------
  158|       |                                    /* OSSL_RAND_PARAM_MAX_REQUEST */
  159|  27.0k|                                    if (ossl_unlikely(r->maxreq != NULL)) {
  ------------------
  |  |   23|  27.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 27.0k]
  |  |  ------------------
  ------------------
  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|  27.0k|                                    r->maxreq = (OSSL_PARAM *)p;
  165|  27.0k|                                }
  166|  27.0k|                            }
  167|  27.0k|                        }
  168|  27.0k|                    }
  169|  27.0k|                    break;
  170|  27.0k|                case 'i':
  ------------------
  |  Branch (170:17): [True: 0, False: 27.0k]
  ------------------
  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|  27.0k|                }
  207|  27.0k|                break;
  208|  28.1k|            case 'r':
  ------------------
  |  Branch (208:13): [True: 28.1k, False: 37.5k]
  ------------------
  209|  28.1k|                switch(s[1]) {
  210|      0|                default:
  ------------------
  |  Branch (210:17): [True: 0, False: 28.1k]
  ------------------
  211|      0|                    break;
  212|  28.1k|                case 'e':
  ------------------
  |  Branch (212:17): [True: 28.1k, False: 0]
  ------------------
  213|  28.1k|                    switch(s[2]) {
  214|      0|                    default:
  ------------------
  |  Branch (214:21): [True: 0, False: 28.1k]
  ------------------
  215|      0|                        break;
  216|  28.1k|                    case 's':
  ------------------
  |  Branch (216:21): [True: 28.1k, False: 0]
  ------------------
  217|  28.1k|                        switch(s[3]) {
  218|      0|                        default:
  ------------------
  |  Branch (218:25): [True: 0, False: 28.1k]
  ------------------
  219|      0|                            break;
  220|  28.1k|                        case 'e':
  ------------------
  |  Branch (220:25): [True: 28.1k, False: 0]
  ------------------
  221|  28.1k|                            switch(s[4]) {
  222|      0|                            default:
  ------------------
  |  Branch (222:29): [True: 0, False: 28.1k]
  ------------------
  223|      0|                                break;
  224|  28.1k|                            case 'e':
  ------------------
  |  Branch (224:29): [True: 28.1k, False: 0]
  ------------------
  225|  28.1k|                                switch(s[5]) {
  226|      0|                                default:
  ------------------
  |  Branch (226:33): [True: 0, False: 28.1k]
  ------------------
  227|      0|                                    break;
  228|  28.1k|                                case 'd':
  ------------------
  |  Branch (228:33): [True: 28.1k, False: 0]
  ------------------
  229|  28.1k|                                    switch(s[6]) {
  230|      0|                                    default:
  ------------------
  |  Branch (230:37): [True: 0, False: 28.1k]
  ------------------
  231|      0|                                        break;
  232|  28.1k|                                    case '_':
  ------------------
  |  Branch (232:37): [True: 28.1k, False: 0]
  ------------------
  233|  28.1k|                                        switch(s[7]) {
  234|      0|                                        default:
  ------------------
  |  Branch (234:41): [True: 0, False: 28.1k]
  ------------------
  235|      0|                                            break;
  236|  28.1k|                                        case 'c':
  ------------------
  |  Branch (236:41): [True: 28.1k, False: 0]
  ------------------
  237|  28.1k|                                            if (ossl_likely(strcmp("ounter", s + 8) == 0)) {
  ------------------
  |  |   22|  28.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 28.1k, False: 0]
  |  |  ------------------
  ------------------
  238|       |                                                /* OSSL_DRBG_PARAM_RESEED_COUNTER */
  239|  28.1k|                                                if (ossl_unlikely(r->reseed_cnt != NULL)) {
  ------------------
  |  |   23|  28.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
  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|  28.1k|                                                r->reseed_cnt = (OSSL_PARAM *)p;
  245|  28.1k|                                            }
  246|  28.1k|                                            break;
  247|  28.1k|                                        case 'r':
  ------------------
  |  Branch (247:41): [True: 0, False: 28.1k]
  ------------------
  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: 28.1k]
  ------------------
  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|  28.1k|                                        }
  297|  28.1k|                                    }
  298|  28.1k|                                }
  299|  28.1k|                            }
  300|  28.1k|                        }
  301|  28.1k|                    }
  302|  28.1k|                }
  303|  28.1k|                break;
  304|  28.1k|            case 's':
  ------------------
  |  Branch (304:13): [True: 10.4k, False: 55.1k]
  ------------------
  305|  10.4k|                switch(s[1]) {
  306|      0|                default:
  ------------------
  |  Branch (306:17): [True: 0, False: 10.4k]
  ------------------
  307|      0|                    break;
  308|  10.4k|                case 't':
  ------------------
  |  Branch (308:17): [True: 10.4k, False: 0]
  ------------------
  309|  10.4k|                    switch(s[2]) {
  310|      0|                    default:
  ------------------
  |  Branch (310:21): [True: 0, False: 10.4k]
  ------------------
  311|      0|                        break;
  312|  7.01k|                    case 'a':
  ------------------
  |  Branch (312:21): [True: 7.01k, False: 3.47k]
  ------------------
  313|  7.01k|                        if (ossl_likely(strcmp("te", s + 3) == 0)) {
  ------------------
  |  |   22|  7.01k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.01k, False: 0]
  |  |  ------------------
  ------------------
  314|       |                            /* OSSL_RAND_PARAM_STATE */
  315|  7.01k|                            if (ossl_unlikely(r->state != NULL)) {
  ------------------
  |  |   23|  7.01k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.01k]
  |  |  ------------------
  ------------------
  316|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  317|      0|                                               "param %s is repeated", s);
  318|      0|                                return 0;
  319|      0|                            }
  320|  7.01k|                            r->state = (OSSL_PARAM *)p;
  321|  7.01k|                        }
  322|  7.01k|                        break;
  323|  7.01k|                    case 'r':
  ------------------
  |  Branch (323:21): [True: 3.47k, False: 7.01k]
  ------------------
  324|  3.47k|                        if (ossl_likely(strcmp("ength", s + 3) == 0)) {
  ------------------
  |  |   22|  3.47k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.47k, False: 0]
  |  |  ------------------
  ------------------
  325|       |                            /* OSSL_RAND_PARAM_STRENGTH */
  326|  3.47k|                            if (ossl_unlikely(r->str != NULL)) {
  ------------------
  |  |   23|  3.47k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.47k]
  |  |  ------------------
  ------------------
  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.47k|                            r->str = (OSSL_PARAM *)p;
  332|  3.47k|                        }
  333|  10.4k|                    }
  334|  10.4k|                }
  335|  10.4k|                break;
  336|  10.4k|            case 'u':
  ------------------
  |  Branch (336:13): [True: 0, False: 65.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|  65.6k|            }
  347|  65.6k|    return 1;
  348|  65.6k|}

seed_src.c:seed_src_new:
   49|    579|{
   50|    579|    PROV_SEED_SRC *s;
   51|       |
   52|    579|    if (parent != NULL) {
  ------------------
  |  Branch (52:9): [True: 0, False: 579]
  ------------------
   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|    579|    s = OPENSSL_zalloc(sizeof(*s));
  ------------------
  |  |  109|    579|    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|    579|    if (s == NULL)
  ------------------
  |  Branch (58:9): [True: 0, False: 579]
  ------------------
   59|      0|        return NULL;
   60|       |
   61|    579|    s->provctx = provctx;
   62|    579|    s->state = EVP_RAND_STATE_UNINITIALISED;
  ------------------
  |  | 1249|    579|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
   63|    579|    return s;
   64|    579|}
seed_src.c:seed_src_free:
   67|    578|{
   68|    578|    OPENSSL_free(vseed);
  ------------------
  |  |  132|    578|    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|    578|}
seed_src.c:seed_src_instantiate:
   75|    579|{
   76|    579|    PROV_SEED_SRC *s = (PROV_SEED_SRC *)vseed;
   77|       |
   78|    579|    s->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1250|    579|#define EVP_RAND_STATE_READY 1
  ------------------
   79|    579|    return 1;
   80|    579|}
seed_src.c:seed_src_enable_locking:
  212|    579|{
  213|    579|    return 1;
  214|    579|}
seed_src.c:seed_src_lock:
  217|  5.21k|{
  218|  5.21k|    return 1;
  219|  5.21k|}
seed_src.c:seed_src_unlock:
  222|  5.21k|{
  223|  5.21k|}
seed_src.c:seed_src_get_ctx_params:
  147|  3.47k|{
  148|  3.47k|    PROV_SEED_SRC *s = (PROV_SEED_SRC *)vseed;
  149|  3.47k|    struct seed_src_get_ctx_params_st p;
  150|       |
  151|  3.47k|    if (s == NULL || !seed_src_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (151:9): [True: 0, False: 3.47k]
  |  Branch (151:22): [True: 0, False: 3.47k]
  ------------------
  152|      0|        return 0;
  153|       |
  154|  3.47k|    if (p.state != NULL && !OSSL_PARAM_set_int(p.state, s->state))
  ------------------
  |  Branch (154:9): [True: 0, False: 3.47k]
  |  Branch (154:28): [True: 0, False: 0]
  ------------------
  155|      0|        return 0;
  156|       |
  157|  3.47k|    if (p.str != NULL && !OSSL_PARAM_set_uint(p.str, 1024))
  ------------------
  |  Branch (157:9): [True: 1.15k, False: 2.31k]
  |  Branch (157:26): [True: 0, False: 1.15k]
  ------------------
  158|      0|        return 0;
  159|       |
  160|  3.47k|    if (p.maxreq != NULL && !OSSL_PARAM_set_size_t(p.maxreq, 128))
  ------------------
  |  Branch (160:9): [True: 0, False: 3.47k]
  |  Branch (160:29): [True: 0, False: 0]
  ------------------
  161|      0|        return 0;
  162|  3.47k|    return 1;
  163|  3.47k|}
seed_src.c:seed_get_seed:
  180|    579|{
  181|    579|    size_t ret = 0;
  182|    579|    size_t entropy_available = 0;
  183|    579|    RAND_POOL *pool;
  184|       |
  185|    579|    pool = ossl_rand_pool_new(entropy, 1, min_len, max_len);
  186|    579|    if (pool == NULL) {
  ------------------
  |  Branch (186:9): [True: 0, False: 579]
  ------------------
  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|    579|    entropy_available = ossl_pool_acquire_entropy(pool);
  193|       |
  194|    579|    if (entropy_available > 0
  ------------------
  |  Branch (194:9): [True: 579, False: 0]
  ------------------
  195|    579|        && ossl_rand_pool_adin_mix_in(pool, adin, adin_len)) {
  ------------------
  |  Branch (195:12): [True: 579, False: 0]
  ------------------
  196|    579|        ret = ossl_rand_pool_length(pool);
  197|    579|        *pout = ossl_rand_pool_detach(pool);
  198|    579|    } 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|    579|    ossl_rand_pool_free(pool);
  202|    579|    return ret;
  203|    579|}
seed_src.c:seed_clear_seed:
  207|    579|{
  208|    579|    OPENSSL_secure_clear_free(out, outlen);
  ------------------
  |  |  150|    579|    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|    579|}

seed_src.c:seed_src_get_ctx_params_decoder:
   33|  3.47k|{
   34|  3.47k|    const char *s;
   35|       |
   36|  3.47k|    memset(r, 0, sizeof(*r));
   37|  3.47k|    if (p != NULL)
  ------------------
  |  Branch (37:9): [True: 3.47k, False: 0]
  ------------------
   38|  6.94k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (38:16): [True: 3.47k, False: 3.47k]
  ------------------
   39|  3.47k|            switch(s[0]) {
   40|  2.31k|            default:
  ------------------
  |  Branch (40:13): [True: 2.31k, False: 1.15k]
  ------------------
   41|  2.31k|                break;
   42|  2.31k|            case 'm':
  ------------------
  |  Branch (42:13): [True: 0, False: 3.47k]
  ------------------
   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.15k|            case 's':
  ------------------
  |  Branch (53:13): [True: 1.15k, False: 2.31k]
  ------------------
   54|  1.15k|                switch(s[1]) {
   55|      0|                default:
  ------------------
  |  Branch (55:17): [True: 0, False: 1.15k]
  ------------------
   56|      0|                    break;
   57|  1.15k|                case 't':
  ------------------
  |  Branch (57:17): [True: 1.15k, False: 0]
  ------------------
   58|  1.15k|                    switch(s[2]) {
   59|      0|                    default:
  ------------------
  |  Branch (59:21): [True: 0, False: 1.15k]
  ------------------
   60|      0|                        break;
   61|      0|                    case 'a':
  ------------------
  |  Branch (61:21): [True: 0, False: 1.15k]
  ------------------
   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.15k|                    case 'r':
  ------------------
  |  Branch (72:21): [True: 1.15k, False: 0]
  ------------------
   73|  1.15k|                        if (ossl_likely(strcmp("ength", s + 3) == 0)) {
  ------------------
  |  |   22|  1.15k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.15k, False: 0]
  |  |  ------------------
  ------------------
   74|       |                            /* OSSL_RAND_PARAM_STRENGTH */
   75|  1.15k|                            if (ossl_unlikely(r->str != NULL)) {
  ------------------
  |  |   23|  1.15k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.15k]
  |  |  ------------------
  ------------------
   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.15k|                            r->str = (OSSL_PARAM *)p;
   81|  1.15k|                        }
   82|  1.15k|                    }
   83|  1.15k|                }
   84|  3.47k|            }
   85|  3.47k|    return 1;
   86|  3.47k|}

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|    579|{
  635|       |#if defined(OPENSSL_RAND_SEED_NONE)
  636|       |    return ossl_rand_pool_entropy_available(pool);
  637|       |#else
  638|    579|    size_t entropy_available = 0;
  639|       |
  640|    579|    (void)entropy_available; /* avoid compiler warning */
  641|       |
  642|    579|#if defined(OPENSSL_RAND_SEED_GETRANDOM)
  643|    579|    {
  644|    579|        size_t bytes_needed;
  645|    579|        unsigned char *buffer;
  646|    579|        ssize_t bytes;
  647|       |        /* Maximum allowed number of consecutive unsuccessful attempts */
  648|    579|        int attempts = 3;
  649|       |
  650|    579|        bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
  651|  1.15k|        while (bytes_needed != 0 && attempts-- > 0) {
  ------------------
  |  Branch (651:16): [True: 579, False: 579]
  |  Branch (651:37): [True: 579, False: 0]
  ------------------
  652|    579|            buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
  653|    579|            bytes = syscall_random(buffer, bytes_needed);
  654|    579|            if (bytes > 0) {
  ------------------
  |  Branch (654:17): [True: 579, False: 0]
  ------------------
  655|    579|                ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
  656|    579|                bytes_needed -= bytes;
  657|    579|                attempts = 3; /* reset counter after successful attempt */
  658|    579|            } 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|    579|        }
  662|    579|    }
  663|    579|    entropy_available = ossl_rand_pool_entropy_available(pool);
  664|    579|    if (entropy_available > 0)
  ------------------
  |  Branch (664:9): [True: 579, False: 0]
  ------------------
  665|    579|        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|    579|{
  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|    579|#if !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__FreeBSD__)
  357|    579|#if defined(__GNUC__) && __GNUC__ >= 2 && defined(__ELF__) && !defined(__hpux)
  358|    579|    extern int getentropy(void *buffer, size_t length) __attribute__((weak));
  359|       |
  360|    579|    if (getentropy != NULL) {
  ------------------
  |  Branch (360:9): [True: 579, False: 0]
  ------------------
  361|    579|        if (getentropy(buf, buflen) == 0)
  ------------------
  |  Branch (361:13): [True: 579, False: 0]
  ------------------
  362|    579|            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|    579|}

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

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

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

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

OSSL_ECHSTORE_free:
  670|  5.45k|{
  671|  5.45k|    if (es == NULL)
  ------------------
  |  Branch (671:9): [True: 5.45k, False: 0]
  ------------------
  672|  5.45k|        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|  5.45k|}

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

ossl_quic_tls_free:
  658|  2.32k|{
  659|  2.32k|    if (qtls == NULL)
  ------------------
  |  Branch (659:9): [True: 2.32k, False: 0]
  ------------------
  660|  2.32k|        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|  4.64k|{
  865|  4.64k|    if (qtls == NULL)
  ------------------
  |  Branch (865:9): [True: 4.64k, False: 0]
  ------------------
  866|  4.64k|        return;
  867|      0|    qtls->local_transport_params_consumed = 0;
  868|      0|}

ossl_tls_buffer_release:
   27|  13.9k|{
   28|  13.9k|    OPENSSL_free(b->buf);
  ------------------
  |  |  132|  13.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__
  |  |  ------------------
  ------------------
   29|       |    b->buf = NULL;
   30|  13.9k|}
ossl_rlayer_fatal:
   50|    221|{
   51|    221|    va_list args;
   52|       |
   53|    221|    va_start(args, fmt);
   54|    221|    ERR_vset_error(ERR_LIB_SSL, reason, fmt, args);
  ------------------
  |  |   70|    221|#define ERR_LIB_SSL 20
  ------------------
   55|    221|    va_end(args);
   56|       |
   57|    221|    rl->alert = al;
   58|    221|}
tls_setup_write_buffer:
  144|  4.30k|{
  145|  4.30k|    unsigned char *p;
  146|  4.30k|    size_t maxalign = 0, headerlen;
  147|  4.30k|    TLS_BUFFER *wb;
  148|  4.30k|    size_t currpipe;
  149|  4.30k|    size_t defltlen = 0;
  150|  4.30k|    size_t contenttypelen = 0;
  151|       |
  152|  4.30k|    if (firstlen == 0 || (numwpipes > 1 && nextlen == 0)) {
  ------------------
  |  Branch (152:9): [True: 4.30k, False: 0]
  |  Branch (152:27): [True: 0, False: 0]
  |  Branch (152:44): [True: 0, False: 0]
  ------------------
  153|  4.30k|        if (rl->isdtls)
  ------------------
  |  Branch (153:13): [True: 0, False: 4.30k]
  ------------------
  154|      0|            headerlen = DTLS1_RT_HEADER_LENGTH + 1;
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  155|  4.30k|        else
  156|  4.30k|            headerlen = SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  4.30k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  157|       |
  158|       |        /* TLSv1.3 adds an extra content type byte after payload data */
  159|  4.30k|        if (rl->version == TLS1_3_VERSION)
  ------------------
  |  |   27|  4.30k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (159:13): [True: 4, False: 4.29k]
  ------------------
  160|      4|            contenttypelen = 1;
  161|       |
  162|  4.30k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  163|  4.30k|        maxalign = SSL3_ALIGN_PAYLOAD - 1;
  ------------------
  |  |  152|  4.30k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  164|  4.30k|#endif
  165|       |
  166|  4.30k|        defltlen = maxalign + headerlen + rl->eivlen + rl->max_frag_len
  167|  4.30k|            + contenttypelen + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD;
  ------------------
  |  |  195|  4.30k|    (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  172|  4.30k|#define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16
  |  |  ------------------
  |  |                   (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  4.30k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  168|  4.30k|#ifndef OPENSSL_NO_COMP
  169|  4.30k|        if (tls_allow_compression(rl))
  ------------------
  |  Branch (169:13): [True: 0, False: 4.30k]
  ------------------
  170|      0|            defltlen += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
  171|  4.30k|#endif
  172|       |        /*
  173|       |         * We don't need to add eivlen here since empty fragments only occur
  174|       |         * when we don't have an explicit IV. The contenttype byte will also
  175|       |         * always be 0 in these protocol versions
  176|       |         */
  177|  4.30k|        if ((rl->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) == 0)
  ------------------
  |  |  378|  4.30k|#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS SSL_OP_BIT(11)
  |  |  ------------------
  |  |  |  |  351|  4.30k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (177:13): [True: 4.29k, False: 3]
  ------------------
  178|  4.29k|            defltlen += headerlen + maxalign + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD;
  ------------------
  |  |  195|  4.29k|    (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  172|  4.29k|#define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16
  |  |  ------------------
  |  |                   (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  4.29k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  179|  4.30k|    }
  180|       |
  181|  4.30k|    wb = rl->wbuf;
  182|  8.60k|    for (currpipe = 0; currpipe < numwpipes; currpipe++) {
  ------------------
  |  Branch (182:24): [True: 4.30k, False: 4.30k]
  ------------------
  183|  4.30k|        TLS_BUFFER *thiswb = &wb[currpipe];
  184|  4.30k|        size_t len = (currpipe == 0) ? firstlen : nextlen;
  ------------------
  |  Branch (184:22): [True: 4.30k, False: 0]
  ------------------
  185|       |
  186|  4.30k|        if (len == 0)
  ------------------
  |  Branch (186:13): [True: 4.30k, False: 0]
  ------------------
  187|  4.30k|            len = defltlen;
  188|       |
  189|  4.30k|        if (thiswb->len != len) {
  ------------------
  |  Branch (189:13): [True: 2.32k, False: 1.97k]
  ------------------
  190|  2.32k|            OPENSSL_free(thiswb->buf);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  191|  2.32k|            thiswb->buf = NULL; /* force reallocation */
  192|  2.32k|        }
  193|       |
  194|  4.30k|        p = thiswb->buf;
  195|  4.30k|        if (p == NULL) {
  ------------------
  |  Branch (195:13): [True: 2.32k, False: 1.97k]
  ------------------
  196|  2.32k|            p = OPENSSL_malloc(len);
  ------------------
  |  |  107|  2.32k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  197|  2.32k|            if (p == NULL) {
  ------------------
  |  Branch (197:17): [True: 0, False: 2.32k]
  ------------------
  198|      0|                if (rl->numwpipes < currpipe)
  ------------------
  |  Branch (198:21): [True: 0, False: 0]
  ------------------
  199|      0|                    rl->numwpipes = currpipe;
  200|       |                /*
  201|       |                 * We've got a malloc failure, and we're still initialising
  202|       |                 * buffers. We assume we're so doomed that we won't even be able
  203|       |                 * to send an alert.
  204|       |                 */
  205|      0|                RLAYERfatal(rl, SSL_AD_NO_ALERT, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  206|      0|                return 0;
  207|      0|            }
  208|  2.32k|        }
  209|  4.30k|        memset(thiswb, 0, sizeof(TLS_BUFFER));
  210|  4.30k|        thiswb->buf = p;
  211|  4.30k|        thiswb->len = len;
  212|  4.30k|    }
  213|       |
  214|       |    /* Free any previously allocated buffers that we are no longer using */
  215|  4.30k|    tls_release_write_buffer_int(rl, currpipe);
  216|       |
  217|  4.30k|    rl->numwpipes = numwpipes;
  218|       |
  219|  4.30k|    return 1;
  220|  4.30k|}
tls_setup_read_buffer:
  230|  2.22k|{
  231|  2.22k|    unsigned char *p;
  232|  2.22k|    size_t len, maxalign = 0, headerlen;
  233|  2.22k|    TLS_BUFFER *b;
  234|       |
  235|  2.22k|    b = &rl->rbuf;
  236|       |
  237|  2.22k|    if (rl->isdtls)
  ------------------
  |  Branch (237:9): [True: 0, False: 2.22k]
  ------------------
  238|      0|        headerlen = DTLS1_RT_HEADER_LENGTH;
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  239|  2.22k|    else
  240|  2.22k|        headerlen = SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  2.22k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  241|       |
  242|  2.22k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  243|  2.22k|    maxalign = SSL3_ALIGN_PAYLOAD - 1;
  ------------------
  |  |  152|  2.22k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  244|  2.22k|#endif
  245|       |
  246|  2.22k|    if (b->buf == NULL) {
  ------------------
  |  Branch (246:9): [True: 2.22k, False: 0]
  ------------------
  247|  2.22k|        len = rl->max_frag_len
  248|  2.22k|            + SSL3_RT_MAX_ENCRYPTED_OVERHEAD + headerlen + maxalign;
  ------------------
  |  |  186|  2.22k|#define SSL3_RT_MAX_ENCRYPTED_OVERHEAD (256 + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  2.22k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  249|  2.22k|#ifndef OPENSSL_NO_COMP
  250|  2.22k|        if (tls_allow_compression(rl))
  ------------------
  |  Branch (250:13): [True: 0, False: 2.22k]
  ------------------
  251|      0|            len += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
  252|  2.22k|#endif
  253|       |
  254|       |        /* Ensure our buffer is large enough to support all our pipelines */
  255|  2.22k|        if (rl->max_pipelines > 1)
  ------------------
  |  Branch (255:13): [True: 0, False: 2.22k]
  ------------------
  256|      0|            len *= rl->max_pipelines;
  257|       |
  258|  2.22k|        if (b->default_len > len)
  ------------------
  |  Branch (258:13): [True: 2.22k, False: 0]
  ------------------
  259|  2.22k|            len = b->default_len;
  260|       |
  261|  2.22k|        if ((p = OPENSSL_malloc(len)) == NULL) {
  ------------------
  |  |  107|  2.22k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (261:13): [True: 0, False: 2.22k]
  ------------------
  262|       |            /*
  263|       |             * We've got a malloc failure, and we're still initialising buffers.
  264|       |             * We assume we're so doomed that we won't even be able to send an
  265|       |             * alert.
  266|       |             */
  267|      0|            RLAYERfatal(rl, SSL_AD_NO_ALERT, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  268|      0|            return 0;
  269|      0|        }
  270|  2.22k|        b->buf = p;
  271|  2.22k|        b->len = len;
  272|  2.22k|    }
  273|       |
  274|  2.22k|    return 1;
  275|  2.22k|}
tls_default_read_n:
  296|  2.92k|{
  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.92k|    size_t len, left, align = 0;
  307|  2.92k|    unsigned char *pkt;
  308|  2.92k|    TLS_BUFFER *rb;
  309|       |
  310|  2.92k|    if (n == 0)
  ------------------
  |  Branch (310:9): [True: 0, False: 2.92k]
  ------------------
  311|      0|        return OSSL_RECORD_RETURN_NON_FATAL_ERR;
  ------------------
  |  |   47|      0|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
  312|       |
  313|  2.92k|    rb = &rl->rbuf;
  314|  2.92k|    left = rb->left;
  315|  2.92k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  316|  2.92k|    align = (size_t)rb->buf + SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  2.92k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  317|  2.92k|    align = SSL3_ALIGN_PAYLOAD - 1 - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|  2.92k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
                  align = SSL3_ALIGN_PAYLOAD - 1 - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|  2.92k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  318|  2.92k|#endif
  319|       |
  320|  2.92k|    if (!extend) {
  ------------------
  |  Branch (320:9): [True: 2.71k, False: 218]
  ------------------
  321|       |        /* start with empty packet ... */
  322|  2.71k|        if (left == 0)
  ------------------
  |  Branch (322:13): [True: 2.70k, False: 7]
  ------------------
  323|  2.70k|            rb->offset = align;
  324|       |
  325|  2.71k|        rl->packet = rb->buf + rb->offset;
  326|  2.71k|        rl->packet_length = 0;
  327|       |        /* ... now we can act as if 'extend' was set */
  328|  2.71k|    }
  329|       |
  330|  2.92k|    if (!ossl_assert(rl->packet != NULL)) {
  ------------------
  |  |   52|  2.92k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.92k|    __FILE__, __LINE__)
  ------------------
  |  Branch (330:9): [True: 0, False: 2.92k]
  ------------------
  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.92k|    len = rl->packet_length;
  337|  2.92k|    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.92k|    if (rl->packet != pkt && clearold == 1) {
  ------------------
  |  Branch (342:9): [True: 0, False: 2.92k]
  |  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.92k|    if (rl->isdtls) {
  ------------------
  |  Branch (353:9): [True: 0, False: 2.92k]
  ------------------
  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.92k|    if (left >= n) {
  ------------------
  |  Branch (366:9): [True: 0, False: 2.92k]
  ------------------
  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.92k|    if (n > rb->len - rb->offset) {
  ------------------
  |  Branch (376:9): [True: 0, False: 2.92k]
  ------------------
  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.92k|    if (!rl->read_ahead && !rl->isdtls) {
  ------------------
  |  Branch (383:9): [True: 2.92k, False: 0]
  |  Branch (383:28): [True: 2.92k, False: 0]
  ------------------
  384|       |        /* ignore max parameter */
  385|  2.92k|        max = n;
  386|  2.92k|    } 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.60k|    while (left < n) {
  ------------------
  |  Branch (393:12): [True: 2.96k, False: 644]
  ------------------
  394|  2.96k|        size_t bioread = 0;
  395|  2.96k|        int ret;
  396|  2.96k|        BIO *bio = rl->prev != NULL ? rl->prev : rl->bio;
  ------------------
  |  Branch (396:20): [True: 0, False: 2.96k]
  ------------------
  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.96k|        clear_sys_error();
  ------------------
  |  |   31|  2.96k|#define clear_sys_error() errno = 0
  ------------------
  405|  2.96k|        if (bio != NULL) {
  ------------------
  |  Branch (405:13): [True: 2.96k, False: 0]
  ------------------
  406|  2.96k|            ret = BIO_read(bio, pkt + len + left, (int)(max - left));
  407|  2.96k|            if (ret > 0) {
  ------------------
  |  Branch (407:17): [True: 678, False: 2.28k]
  ------------------
  408|    678|                bioread = ret;
  409|    678|                ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    678|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  410|  2.28k|            } else if (BIO_should_retry(bio)) {
  ------------------
  |  |  281|  2.28k|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|  2.28k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (281:29): [True: 437, False: 1.84k]
  |  |  ------------------
  ------------------
  411|    437|                if (rl->prev != NULL) {
  ------------------
  |  Branch (411:21): [True: 0, False: 437]
  ------------------
  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|    437|                ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|    437|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
  421|  1.84k|            } else if (BIO_eof(bio)) {
  ------------------
  |  Branch (421:24): [True: 1.82k, False: 23]
  ------------------
  422|  1.82k|                ret = OSSL_RECORD_RETURN_EOF;
  ------------------
  |  |   49|  1.82k|#define OSSL_RECORD_RETURN_EOF -3
  ------------------
  423|  1.82k|            } else {
  424|     23|                ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|     23|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  425|     23|            }
  426|  2.96k|        } 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.96k|        if (ret <= OSSL_RECORD_RETURN_RETRY) {
  ------------------
  |  |   46|  2.96k|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
  |  Branch (431:13): [True: 2.28k, False: 678]
  ------------------
  432|  2.28k|            rb->left = left;
  433|  2.28k|            if ((rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0 && !rl->isdtls)
  ------------------
  |  |  537|  2.28k|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (433:17): [True: 0, False: 2.28k]
  |  Branch (433:63): [True: 0, False: 0]
  ------------------
  434|      0|                if (len + left == 0)
  ------------------
  |  Branch (434:21): [True: 0, False: 0]
  ------------------
  435|      0|                    tls_release_read_buffer(rl);
  436|  2.28k|            return ret;
  437|  2.28k|        }
  438|    678|        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|    678|        if (rl->isdtls) {
  ------------------
  |  Branch (444:13): [True: 0, False: 678]
  ------------------
  445|      0|            if (n > left)
  ------------------
  |  Branch (445:17): [True: 0, False: 0]
  ------------------
  446|      0|                n = left; /* makes the while condition false */
  447|      0|        }
  448|    678|    }
  449|       |
  450|       |    /* done reading, now the book-keeping */
  451|    644|    rb->offset += n;
  452|    644|    rb->left = left - n;
  453|    644|    rl->packet_length += n;
  454|    644|    *readbytes = n;
  455|    644|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    644|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  456|  2.92k|}
tls_get_more_records:
  544|  2.71k|{
  545|  2.71k|    int enc_err, rret;
  546|  2.71k|    int i;
  547|  2.71k|    size_t more, n;
  548|  2.71k|    TLS_RL_RECORD *rr, *thisrr;
  549|  2.71k|    TLS_BUFFER *rbuf;
  550|  2.71k|    unsigned char *p;
  551|  2.71k|    unsigned char md[EVP_MAX_MD_SIZE];
  552|  2.71k|    unsigned int version;
  553|  2.71k|    size_t mac_size = 0;
  554|  2.71k|    int imac_size;
  555|  2.71k|    size_t num_recs = 0, max_recs, j;
  556|  2.71k|    PACKET pkt;
  557|  2.71k|    SSL_MAC_BUF *macbufs = NULL;
  558|  2.71k|    int ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|  2.71k|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  559|       |
  560|  2.71k|    rr = rl->rrec;
  561|  2.71k|    rbuf = &rl->rbuf;
  562|  2.71k|    if (rbuf->buf == NULL) {
  ------------------
  |  Branch (562:9): [True: 2.22k, False: 492]
  ------------------
  563|  2.22k|        if (!tls_setup_read_buffer(rl)) {
  ------------------
  |  Branch (563:13): [True: 0, False: 2.22k]
  ------------------
  564|       |            /* RLAYERfatal() already called */
  565|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  566|      0|        }
  567|  2.22k|    }
  568|       |
  569|  2.71k|    max_recs = rl->max_pipelines;
  570|       |
  571|  2.71k|    if (max_recs == 0)
  ------------------
  |  Branch (571:9): [True: 2.71k, False: 0]
  ------------------
  572|  2.71k|        max_recs = 1;
  573|       |
  574|  2.71k|    do {
  575|  2.71k|        thisrr = &rr[num_recs];
  576|       |
  577|       |        /* check if we have the header */
  578|  2.71k|        if ((rl->rstate != SSL_ST_READ_BODY) || (rl->packet_length < SSL3_RT_HEADER_LENGTH)) {
  ------------------
  |  | 1184|  2.71k|#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: 2.71k, False: 3]
  |  Branch (578:49): [True: 0, False: 3]
  ------------------
  579|  2.71k|            unsigned int type;
  580|       |
  581|  2.71k|            rret = rl->funcs->read_n(rl, SSL3_RT_HEADER_LENGTH,
  ------------------
  |  |  139|  2.71k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  582|  2.71k|                TLS_BUFFER_get_len(rbuf), 0,
  ------------------
  |  |  526|  2.71k|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
  583|  2.71k|                num_recs == 0 ? 1 : 0, &n);
  ------------------
  |  Branch (583:17): [True: 2.71k, False: 0]
  ------------------
  584|       |
  585|  2.71k|            if (rret < OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  2.71k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (585:17): [True: 2.26k, False: 450]
  ------------------
  586|  2.26k|                return rret; /* error or non-blocking */
  587|       |
  588|    450|            rl->rstate = SSL_ST_READ_BODY;
  ------------------
  |  | 1184|    450|#define SSL_ST_READ_BODY 0xF1
  ------------------
  589|       |
  590|    450|            p = rl->packet;
  591|    450|            if (!PACKET_buf_init(&pkt, p, rl->packet_length)) {
  ------------------
  |  Branch (591:17): [True: 0, False: 450]
  ------------------
  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|    450|            if (!PACKET_get_1(&pkt, &type)
  ------------------
  |  Branch (597:17): [True: 0, False: 450]
  ------------------
  598|    450|                || !PACKET_get_net_2(&pkt, &version)
  ------------------
  |  Branch (598:20): [True: 0, False: 450]
  ------------------
  599|    450|                || !PACKET_get_net_2_len(&pkt, &thisrr->length)) {
  ------------------
  |  Branch (599:20): [True: 0, False: 450]
  ------------------
  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|    450|            thisrr->type = type;
  606|    450|            thisrr->rec_version = version;
  607|       |
  608|    450|            if (rl->msg_callback != NULL)
  ------------------
  |  Branch (608:17): [True: 0, False: 450]
  ------------------
  609|      0|                rl->msg_callback(0, version, SSL3_RT_HEADER, p, 5, rl->cbarg);
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
  610|       |
  611|    450|            if (!rl->funcs->validate_record_header(rl, thisrr)) {
  ------------------
  |  Branch (611:17): [True: 221, False: 229]
  ------------------
  612|       |                /* RLAYERfatal already called */
  613|    221|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|    221|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  614|    221|            }
  615|       |
  616|    229|            if (thisrr->length > TLS_BUFFER_get_len(rbuf) - SSL3_RT_HEADER_LENGTH) {
  ------------------
  |  |  526|    229|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
                          if (thisrr->length > TLS_BUFFER_get_len(rbuf) - SSL3_RT_HEADER_LENGTH) {
  ------------------
  |  |  139|    229|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (616:17): [True: 0, False: 229]
  ------------------
  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|    229|        }
  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|    232|        if (thisrr->rec_version == SSL2_VERSION) {
  ------------------
  |  |   23|    232|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (629:13): [True: 0, False: 232]
  ------------------
  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|    232|        } else {
  633|    232|            more = thisrr->length;
  634|    232|        }
  635|       |
  636|    232|        if (more > 0) {
  ------------------
  |  Branch (636:13): [True: 218, False: 14]
  ------------------
  637|       |            /* now rl->packet_length == SSL3_RT_HEADER_LENGTH */
  638|       |
  639|    218|            rret = rl->funcs->read_n(rl, more, more, 1, 0, &n);
  640|    218|            if (rret < OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|    218|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (640:17): [True: 24, False: 194]
  ------------------
  641|     24|                return rret; /* error or non-blocking io */
  642|    218|        }
  643|       |
  644|       |        /* set state for later operations */
  645|    208|        rl->rstate = SSL_ST_READ_HEADER;
  ------------------
  |  | 1183|    208|#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|    208|        if (thisrr->rec_version == SSL2_VERSION)
  ------------------
  |  |   23|    208|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (652:13): [True: 0, False: 208]
  ------------------
  653|      0|            thisrr->input = &(rl->packet[SSL2_RT_HEADER_LENGTH]);
  ------------------
  |  |  529|      0|#define SSL2_RT_HEADER_LENGTH 2
  ------------------
  654|    208|        else
  655|    208|            thisrr->input = &(rl->packet[SSL3_RT_HEADER_LENGTH]);
  ------------------
  |  |  139|    208|#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|    208|        thisrr->data = thisrr->input;
  672|    208|        thisrr->orig_len = thisrr->length;
  673|       |
  674|    208|        num_recs++;
  675|       |
  676|       |        /* we have pulled in a full packet so zero things */
  677|    208|        rl->packet_length = 0;
  678|    208|        rl->is_first_record = 0;
  679|    208|    } while (num_recs < max_recs
  ------------------
  |  Branch (679:14): [True: 0, False: 208]
  ------------------
  680|      0|        && thisrr->type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|    208|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (680:12): [True: 0, False: 0]
  ------------------
  681|      0|        && RLAYER_USE_EXPLICIT_IV(rl)
  ------------------
  |  |  396|    208|#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|    208|    || (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|    208|    if (num_recs == 1
  ------------------
  |  Branch (688:9): [True: 208, False: 0]
  ------------------
  689|    208|        && thisrr->type == SSL3_RT_CHANGE_CIPHER_SPEC
  ------------------
  |  |  219|    416|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (689:12): [True: 11, False: 197]
  ------------------
  690|       |        /* The following can happen in tlsany_meth after HRR */
  691|     11|        && rl->version == TLS1_3_VERSION
  ------------------
  |  |   27|    219|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (691:12): [True: 0, False: 11]
  ------------------
  692|      0|        && rl->is_first_handshake) {
  ------------------
  |  Branch (692:12): [True: 0, False: 0]
  ------------------
  693|       |        /*
  694|       |         * CCS messages must be exactly 1 byte long, containing the value 0x01
  695|       |         */
  696|      0|        if (thisrr->length != 1 || thisrr->data[0] != 0x01) {
  ------------------
  |  Branch (696:13): [True: 0, False: 0]
  |  Branch (696:36): [True: 0, False: 0]
  ------------------
  697|      0|            RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  698|      0|                SSL_R_INVALID_CCS_MESSAGE);
  699|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  700|      0|        }
  701|       |        /*
  702|       |         * CCS messages are ignored in TLSv1.3. We treat it like an empty
  703|       |         * handshake record - but we still call the msg_callback
  704|       |         */
  705|      0|        if (rl->msg_callback != NULL)
  ------------------
  |  Branch (705:13): [True: 0, False: 0]
  ------------------
  706|      0|            rl->msg_callback(0, TLS1_3_VERSION, SSL3_RT_CHANGE_CIPHER_SPEC,
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
                          rl->msg_callback(0, TLS1_3_VERSION, SSL3_RT_CHANGE_CIPHER_SPEC,
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  707|      0|                thisrr->data, 1, rl->cbarg);
  708|      0|        thisrr->type = SSL3_RT_HANDSHAKE;
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  709|      0|        if (++(rl->empty_record_count) > MAX_EMPTY_RECORDS) {
  ------------------
  |  |  527|      0|#define MAX_EMPTY_RECORDS 32
  ------------------
  |  Branch (709:13): [True: 0, False: 0]
  ------------------
  710|      0|            RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  711|      0|                SSL_R_UNEXPECTED_CCS_MESSAGE);
  712|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  713|      0|        }
  714|      0|        rl->num_recs = 0;
  715|      0|        rl->curr_rec = 0;
  716|      0|        rl->num_released = 0;
  717|       |
  718|      0|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  719|      0|    }
  720|       |
  721|    208|    if (rl->md_ctx != NULL) {
  ------------------
  |  Branch (721:9): [True: 0, False: 208]
  ------------------
  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|    208|    if (rl->use_etm && rl->md_ctx != NULL) {
  ------------------
  |  Branch (738:9): [True: 0, False: 208]
  |  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|    208|    if (mac_size > 0) {
  ------------------
  |  Branch (764:9): [True: 0, False: 208]
  ------------------
  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|    208|    ERR_set_mark();
  773|    208|    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|    208|    if (enc_err == 0) {
  ------------------
  |  Branch (781:9): [True: 0, False: 208]
  ------------------
  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|    208|    } else {
  823|    208|        ERR_clear_last_mark();
  824|    208|    }
  825|    208|    OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|    208|    do {                           \
  |  |  220|    208|        BIO *trc_out = NULL;       \
  |  |  221|    208|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 208]
  |  |  ------------------
  ------------------
  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|    208|    OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|    208|    }                            \
  |  |  225|    208|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 208]
  |  |  ------------------
  ------------------
  831|       |
  832|       |    /* r->length is now the compressed data plus mac */
  833|    208|    if (rl->enc_ctx != NULL
  ------------------
  |  Branch (833:9): [True: 0, False: 208]
  ------------------
  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|    208|    if (enc_err == 0) {
  ------------------
  |  Branch (855:9): [True: 0, False: 208]
  ------------------
  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|    416|    for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (872:17): [True: 208, False: 208]
  ------------------
  873|    208|        thisrr = &rr[j];
  874|       |
  875|    208|        if (!rl->funcs->post_process_record(rl, thisrr)) {
  ------------------
  |  Branch (875:13): [True: 0, False: 208]
  ------------------
  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|    208|        if (rl->max_frag_len != SSL3_RT_MAX_PLAIN_LENGTH
  ------------------
  |  |  177|    416|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (890:13): [True: 0, False: 208]
  ------------------
  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|    208|        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|    208|        if (thisrr->length == 0) {
  ------------------
  |  Branch (906:13): [True: 14, False: 194]
  ------------------
  907|     14|            if (++(rl->empty_record_count) > MAX_EMPTY_RECORDS) {
  ------------------
  |  |  527|     14|#define MAX_EMPTY_RECORDS 32
  ------------------
  |  Branch (907:17): [True: 0, False: 14]
  ------------------
  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|    194|        } else {
  913|    194|            rl->empty_record_count = 0;
  914|    194|        }
  915|    208|    }
  916|       |
  917|    208|    if (rl->level == OSSL_RECORD_PROTECTION_LEVEL_EARLY) {
  ------------------
  |  | 2924|    208|#define OSSL_RECORD_PROTECTION_LEVEL_EARLY 1
  ------------------
  |  Branch (917:9): [True: 0, False: 208]
  ------------------
  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|    208|    rl->num_recs = num_recs;
  927|    208|    rl->curr_rec = 0;
  928|    208|    rl->num_released = 0;
  929|    208|    ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    208|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  930|    208|end:
  931|    208|    if (macbufs != NULL) {
  ------------------
  |  Branch (931:9): [True: 0, False: 208]
  ------------------
  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|    208|    return ret;
  939|    208|}
tls_default_post_process_record:
 1015|    208|{
 1016|    208|    if (rl->compctx != NULL) {
  ------------------
  |  Branch (1016:9): [True: 0, False: 208]
  ------------------
 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|    208|    if (rec->length > SSL3_RT_MAX_PLAIN_LENGTH) {
  ------------------
  |  |  177|    208|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (1029:9): [True: 0, False: 208]
  ------------------
 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|    208|    return 1;
 1035|    208|}
tls_read_record:
 1070|  2.71k|{
 1071|  2.71k|    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.92k|    while (rl->curr_rec >= rl->num_recs) {
  ------------------
  |  Branch (1079:12): [True: 2.71k, False: 208]
  ------------------
 1080|  2.71k|        int ret;
 1081|       |
 1082|  2.71k|        if (rl->num_released != rl->num_recs) {
  ------------------
  |  Branch (1082:13): [True: 0, False: 2.71k]
  ------------------
 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|  2.71k|        ret = rl->funcs->get_more_records(rl);
 1088|       |
 1089|  2.71k|        if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  2.71k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1089:13): [True: 2.50k, False: 208]
  ------------------
 1090|  2.50k|            return ret;
 1091|  2.71k|    }
 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|    208|    rec = &rl->rrec[rl->curr_rec++];
 1098|       |
 1099|    208|    *rechandle = rec;
 1100|    208|    *rversion = rec->rec_version;
 1101|    208|    *type = rec->type;
 1102|    208|    *data = rec->data + rec->off;
 1103|    208|    *datalen = rec->length;
 1104|    208|    if (rl->isdtls) {
  ------------------
  |  Branch (1104:9): [True: 0, False: 208]
  ------------------
 1105|      0|        *epoch = rec->epoch;
 1106|      0|        memcpy(seq_num, rec->seq_num, sizeof(rec->seq_num));
 1107|      0|    }
 1108|       |
 1109|    208|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    208|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1110|  2.71k|}
tls_release_record:
 1113|    426|{
 1114|    426|    TLS_RL_RECORD *rec = &rl->rrec[rl->num_released];
 1115|       |
 1116|    426|    if (!ossl_assert(rl->num_released < rl->curr_rec)
  ------------------
  |  |   52|    852|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    852|    __FILE__, __LINE__)
  ------------------
  |  Branch (1116:9): [True: 0, False: 426]
  ------------------
 1117|    426|        || !ossl_assert(rechandle == rec)) {
  ------------------
  |  |   52|    426|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    426|    __FILE__, __LINE__)
  ------------------
  |  Branch (1117:12): [True: 0, False: 426]
  ------------------
 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|    426|    if (rec->length < length) {
  ------------------
  |  Branch (1123:9): [True: 0, False: 426]
  ------------------
 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|    426|    if ((rl->options & SSL_OP_CLEANSE_PLAINTEXT) != 0)
  ------------------
  |  |  359|    426|#define SSL_OP_CLEANSE_PLAINTEXT SSL_OP_BIT(1)
  |  |  ------------------
  |  |  |  |  351|    426|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1129:9): [True: 0, False: 426]
  ------------------
 1130|      0|        OPENSSL_cleanse(rec->data + rec->off, length);
 1131|       |
 1132|    426|    rec->off += length;
 1133|    426|    rec->length -= length;
 1134|       |
 1135|    426|    if (rec->length > 0)
  ------------------
  |  Branch (1135:9): [True: 218, False: 208]
  ------------------
 1136|    218|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    218|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1137|       |
 1138|    208|    rl->num_released++;
 1139|       |
 1140|    208|    if (rl->curr_rec == rl->num_released
  ------------------
  |  Branch (1140:9): [True: 208, False: 0]
  ------------------
 1141|    208|        && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0
  ------------------
  |  |  537|    208|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1141:12): [True: 0, False: 208]
  ------------------
 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|    208|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    208|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1146|    426|}
tls_set_options:
 1149|  13.9k|{
 1150|  13.9k|    const OSSL_PARAM *p;
 1151|       |
 1152|  13.9k|    p = OSSL_PARAM_locate_const(options, OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS);
  ------------------
  |  |  340|  13.9k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS "options"
  ------------------
 1153|  13.9k|    if (p != NULL && !OSSL_PARAM_get_uint64(p, &rl->options)) {
  ------------------
  |  Branch (1153:9): [True: 13.9k, False: 0]
  |  Branch (1153:22): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    p = OSSL_PARAM_locate_const(options, OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE);
  ------------------
  |  |  339|  13.9k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
  ------------------
 1159|  13.9k|    if (p != NULL && !OSSL_PARAM_get_uint32(p, &rl->mode)) {
  ------------------
  |  Branch (1159:9): [True: 13.9k, False: 0]
  |  Branch (1159:22): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    if (rl->direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  13.9k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1164:9): [True: 6.96k, False: 6.96k]
  ------------------
 1165|  6.96k|        p = OSSL_PARAM_locate_const(options,
 1166|  6.96k|            OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN);
  ------------------
  |  |  345|  6.96k|# define OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN "read_buffer_len"
  ------------------
 1167|  6.96k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->rbuf.default_len)) {
  ------------------
  |  Branch (1167:13): [True: 6.96k, False: 0]
  |  Branch (1167:26): [True: 0, False: 6.96k]
  ------------------
 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|  6.96k|    } else {
 1172|  6.96k|        p = OSSL_PARAM_locate_const(options,
 1173|  6.96k|            OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING);
  ------------------
  |  |  335|  6.96k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING "block_padding"
  ------------------
 1174|  6.96k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->block_padding)) {
  ------------------
  |  Branch (1174:13): [True: 6.96k, False: 0]
  |  Branch (1174:26): [True: 0, False: 6.96k]
  ------------------
 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|  6.96k|        p = OSSL_PARAM_locate_const(options,
 1179|  6.96k|            OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING);
  ------------------
  |  |  336|  6.96k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING "hs_padding"
  ------------------
 1180|  6.96k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->hs_padding)) {
  ------------------
  |  Branch (1180:13): [True: 6.96k, False: 0]
  |  Branch (1180:26): [True: 0, False: 6.96k]
  ------------------
 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|  6.96k|    }
 1185|       |
 1186|  13.9k|    if (rl->level == OSSL_RECORD_PROTECTION_LEVEL_APPLICATION) {
  ------------------
  |  | 2926|  13.9k|#define OSSL_RECORD_PROTECTION_LEVEL_APPLICATION 3
  ------------------
  |  Branch (1186:9): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    return 1;
 1202|  13.9k|}
tls_int_new_record_layer:
 1212|  13.9k|{
 1213|  13.9k|    OSSL_RECORD_LAYER *rl = OPENSSL_zalloc(sizeof(*rl));
  ------------------
  |  |  109|  13.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__
  |  |  ------------------
  ------------------
 1214|  13.9k|    const OSSL_PARAM *p;
 1215|       |
 1216|  13.9k|    *retrl = NULL;
 1217|       |
 1218|  13.9k|    if (rl == NULL)
  ------------------
  |  Branch (1218:9): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    rl->max_frag_len = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  13.9k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 1226|       |
 1227|       |    /* Loop through all the settings since they must all be understood */
 1228|  13.9k|    if (settings != NULL) {
  ------------------
  |  Branch (1228:9): [True: 13.9k, False: 0]
  ------------------
 1229|  13.9k|        for (p = settings; p->key != NULL; p++) {
  ------------------
  |  Branch (1229:28): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    }
 1269|       |
 1270|  13.9k|    rl->libctx = libctx;
 1271|  13.9k|    rl->propq = propq;
 1272|       |
 1273|  13.9k|    rl->version = vers;
 1274|  13.9k|    rl->role = role;
 1275|  13.9k|    rl->direction = direction;
 1276|  13.9k|    rl->level = level;
 1277|  13.9k|    rl->taglen = taglen;
 1278|  13.9k|    rl->md = md;
 1279|       |
 1280|  13.9k|    rl->alert = SSL_AD_NO_ALERT;
  ------------------
  |  |   67|  13.9k|#define SSL_AD_NO_ALERT -1
  ------------------
 1281|  13.9k|    rl->rstate = SSL_ST_READ_HEADER;
  ------------------
  |  | 1183|  13.9k|#define SSL_ST_READ_HEADER 0xF0
  ------------------
 1282|       |
 1283|  13.9k|    if (level == OSSL_RECORD_PROTECTION_LEVEL_NONE)
  ------------------
  |  | 2923|  13.9k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (1283:9): [True: 13.9k, False: 0]
  ------------------
 1284|  13.9k|        rl->is_first_record = 1;
 1285|       |
 1286|  13.9k|    if (!tls_set1_bio(rl, transport))
  ------------------
  |  Branch (1286:9): [True: 0, False: 13.9k]
  ------------------
 1287|      0|        goto err;
 1288|       |
 1289|  13.9k|    if (prev != NULL && !BIO_up_ref(prev))
  ------------------
  |  Branch (1289:9): [True: 0, False: 13.9k]
  |  Branch (1289:25): [True: 0, False: 0]
  ------------------
 1290|      0|        goto err;
 1291|  13.9k|    rl->prev = prev;
 1292|       |
 1293|  13.9k|    if (next != NULL && !BIO_up_ref(next))
  ------------------
  |  Branch (1293:9): [True: 6.96k, False: 6.96k]
  |  Branch (1293:25): [True: 0, False: 6.96k]
  ------------------
 1294|      0|        goto err;
 1295|  13.9k|    rl->next = next;
 1296|       |
 1297|  13.9k|    rl->cbarg = cbarg;
 1298|  13.9k|    if (fns != NULL) {
  ------------------
  |  Branch (1298:9): [True: 13.9k, False: 0]
  ------------------
 1299|  41.7k|        for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (1299:16): [True: 27.8k, False: 13.9k]
  ------------------
 1300|  27.8k|            switch (fns->function_id) {
 1301|  13.9k|            case OSSL_FUNC_RLAYER_SKIP_EARLY_DATA:
  ------------------
  |  |  184|  13.9k|#define OSSL_FUNC_RLAYER_SKIP_EARLY_DATA 1
  ------------------
  |  Branch (1301:13): [True: 13.9k, False: 13.9k]
  ------------------
 1302|  13.9k|                rl->skip_early_data = OSSL_FUNC_rlayer_skip_early_data(fns);
 1303|  13.9k|                break;
 1304|      0|            case OSSL_FUNC_RLAYER_MSG_CALLBACK:
  ------------------
  |  |  186|      0|#define OSSL_FUNC_RLAYER_MSG_CALLBACK 2
  ------------------
  |  Branch (1304:13): [True: 0, False: 27.8k]
  ------------------
 1305|      0|                rl->msg_callback = OSSL_FUNC_rlayer_msg_callback(fns);
 1306|      0|                break;
 1307|  13.9k|            case OSSL_FUNC_RLAYER_SECURITY:
  ------------------
  |  |  188|  13.9k|#define OSSL_FUNC_RLAYER_SECURITY 3
  ------------------
  |  Branch (1307:13): [True: 13.9k, False: 13.9k]
  ------------------
 1308|  13.9k|                rl->security = OSSL_FUNC_rlayer_security(fns);
 1309|  13.9k|                break;
 1310|      0|            case OSSL_FUNC_RLAYER_PADDING:
  ------------------
  |  |  190|      0|#define OSSL_FUNC_RLAYER_PADDING 4
  ------------------
  |  Branch (1310:13): [True: 0, False: 27.8k]
  ------------------
 1311|      0|                rl->padding = OSSL_FUNC_rlayer_padding(fns);
 1312|      0|            default:
  ------------------
  |  Branch (1312:13): [True: 0, False: 27.8k]
  ------------------
 1313|       |                /* Just ignore anything we don't understand */
 1314|      0|                break;
 1315|  27.8k|            }
 1316|  27.8k|        }
 1317|  13.9k|    }
 1318|       |
 1319|  13.9k|    if (!tls_set_options(rl, options)) {
  ------------------
  |  Branch (1319:9): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    if ((rl->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) == 0
  ------------------
  |  |  378|  13.9k|#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS SSL_OP_BIT(11)
  |  |  ------------------
  |  |  |  |  351|  13.9k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1324:9): [True: 13.9k, False: 12]
  ------------------
 1325|  13.9k|        && rl->version <= TLS1_VERSION
  ------------------
  |  |   24|  27.8k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (1325:12): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    *retrl = rl;
 1336|  13.9k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  13.9k|#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|  13.9k|}
tls_free:
 1424|  13.9k|{
 1425|  13.9k|    TLS_BUFFER *rbuf;
 1426|  13.9k|    size_t left, written;
 1427|  13.9k|    int ret = 1;
 1428|       |
 1429|  13.9k|    if (rl == NULL)
  ------------------
  |  Branch (1429:9): [True: 0, False: 13.9k]
  ------------------
 1430|      0|        return 1;
 1431|       |
 1432|  13.9k|    rbuf = &rl->rbuf;
 1433|       |
 1434|  13.9k|    left = TLS_BUFFER_get_left(rbuf);
  ------------------
  |  |  527|  13.9k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
 1435|  13.9k|    if (left > 0) {
  ------------------
  |  Branch (1435:9): [True: 31, False: 13.8k]
  ------------------
 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|     31|        ret = BIO_write_ex(rl->next, rbuf->buf + rbuf->offset, left, &written);
 1441|     31|    }
 1442|  13.9k|    tls_int_free(rl);
 1443|       |
 1444|  13.9k|    return ret;
 1445|  13.9k|}
tls_processed_read_pending:
 1453|    208|{
 1454|    208|    return rl->curr_rec < rl->num_recs;
 1455|    208|}
tls_get_max_records_default:
 1473|  2.22k|{
 1474|       |    /*
 1475|       |     * If we have a pipeline capable cipher, and we have been configured to use
 1476|       |     * it, then return the preferred number of pipelines.
 1477|       |     */
 1478|  2.22k|    if (rl->max_pipelines > 0
  ------------------
  |  Branch (1478:9): [True: 0, False: 2.22k]
  ------------------
 1479|      0|        && rl->enc_ctx != NULL
  ------------------
  |  Branch (1479:12): [True: 0, False: 0]
  ------------------
 1480|      0|        && (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx))
  ------------------
  |  Branch (1480:12): [True: 0, False: 0]
  ------------------
 1481|      0|               & EVP_CIPH_FLAG_PIPELINE)
  ------------------
  |  |  259|      0|#define EVP_CIPH_FLAG_PIPELINE 0X800000
  ------------------
 1482|      0|            != 0
 1483|      0|        && RLAYER_USE_EXPLICIT_IV(rl)) {
  ------------------
  |  |  396|      0|#define RLAYER_USE_EXPLICIT_IV(rl) ((rl)->version == TLS1_1_VERSION \
  |  |  ------------------
  |  |  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  |  |  ------------------
  |  |  |  Branch (396:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  397|      0|    || (rl)->version == TLS1_2_VERSION                              \
  |  |  ------------------
  |  |  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  |  |  ------------------
  |  |  |  Branch (397:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  398|      0|    || (rl)->version == DTLS1_BAD_VER                               \
  |  |  ------------------
  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  ------------------
  |  |  |  Branch (398:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  399|      0|    || (rl)->version == DTLS1_VERSION                               \
  |  |  ------------------
  |  |  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  |  |  ------------------
  |  |  |  Branch (399:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  400|      0|    || (rl)->version == DTLS1_2_VERSION)
  |  |  ------------------
  |  |  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  |  |  ------------------
  |  |  |  Branch (400:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1484|      0|        size_t pipes;
 1485|       |
 1486|      0|        if (len == 0)
  ------------------
  |  Branch (1486:13): [True: 0, False: 0]
  ------------------
 1487|      0|            return 1;
 1488|      0|        pipes = ((len - 1) / *preffrag) + 1;
 1489|       |
 1490|      0|        return (pipes < rl->max_pipelines) ? pipes : rl->max_pipelines;
  ------------------
  |  Branch (1490:16): [True: 0, False: 0]
  ------------------
 1491|      0|    }
 1492|       |
 1493|  2.22k|    return 1;
 1494|  2.22k|}
tls_get_max_records:
 1498|  2.22k|{
 1499|  2.22k|    return rl->funcs->get_max_records(rl, type, len, maxfrag, preffrag);
 1500|  2.22k|}
tls_allocate_write_buffers_default:
 1506|  4.30k|{
 1507|  4.30k|    if (!tls_setup_write_buffer(rl, numtempl, 0, 0)) {
  ------------------
  |  Branch (1507:9): [True: 0, False: 4.30k]
  ------------------
 1508|       |        /* RLAYERfatal() already called */
 1509|      0|        return 0;
 1510|      0|    }
 1511|       |
 1512|  4.30k|    return 1;
 1513|  4.30k|}
tls_initialise_write_packets_default:
 1522|  4.30k|{
 1523|  4.30k|    WPACKET *thispkt;
 1524|  4.30k|    size_t j, align;
 1525|  4.30k|    TLS_BUFFER *wb;
 1526|       |
 1527|  8.60k|    for (j = 0; j < numtempl; j++) {
  ------------------
  |  Branch (1527:17): [True: 4.30k, False: 4.30k]
  ------------------
 1528|  4.30k|        thispkt = &pkt[j];
 1529|  4.30k|        wb = &bufs[j];
 1530|       |
 1531|  4.30k|        wb->type = templates[j].type;
 1532|       |
 1533|  4.30k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
 1534|  4.30k|        align = (size_t)TLS_BUFFER_get_buf(wb);
  ------------------
  |  |  524|  4.30k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
 1535|  4.30k|        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|  8.60k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (1535:18): [True: 0, False: 4.30k]
  ------------------
 1536|  4.30k|        align = SSL3_ALIGN_PAYLOAD - 1
  ------------------
  |  |  152|  4.30k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
 1537|  4.30k|            - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|  4.30k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
 1538|  4.30k|#endif
 1539|  4.30k|        TLS_BUFFER_set_offset(wb, align);
  ------------------
  |  |  531|  4.30k|#define TLS_BUFFER_set_offset(b, o) ((b)->offset = (o))
  ------------------
 1540|       |
 1541|  4.30k|        if (!WPACKET_init_static_len(thispkt, TLS_BUFFER_get_buf(wb),
  ------------------
  |  |  524|  4.30k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
  |  Branch (1541:13): [True: 0, False: 4.30k]
  ------------------
 1542|  4.30k|                TLS_BUFFER_get_len(wb), 0)) {
  ------------------
  |  |  526|  4.30k|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
 1543|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1544|      0|            return 0;
 1545|      0|        }
 1546|  4.30k|        (*wpinited)++;
 1547|  4.30k|        if (!WPACKET_allocate_bytes(thispkt, align, NULL)) {
  ------------------
  |  Branch (1547:13): [True: 0, False: 4.30k]
  ------------------
 1548|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1549|      0|            return 0;
 1550|      0|        }
 1551|  4.30k|    }
 1552|       |
 1553|  4.30k|    return 1;
 1554|  4.30k|}
tls_prepare_record_header_default:
 1561|  4.30k|{
 1562|  4.30k|    size_t maxcomplen;
 1563|       |
 1564|  4.30k|    *recdata = NULL;
 1565|       |
 1566|  4.30k|    maxcomplen = templ->buflen;
 1567|  4.30k|    if (rl->compctx != NULL)
  ------------------
  |  Branch (1567:9): [True: 0, False: 4.30k]
  ------------------
 1568|      0|        maxcomplen += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
 1569|       |
 1570|  4.30k|    if (!WPACKET_put_bytes_u8(thispkt, rectype)
  ------------------
  |  |  909|  8.60k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1570:9): [True: 0, False: 4.30k]
  ------------------
 1571|  4.30k|        || !WPACKET_put_bytes_u16(thispkt, templ->version)
  ------------------
  |  |  911|  8.60k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1571:12): [True: 0, False: 4.30k]
  ------------------
 1572|  4.30k|        || !WPACKET_start_sub_packet_u16(thispkt)
  ------------------
  |  |  812|  8.60k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1572:12): [True: 0, False: 4.30k]
  ------------------
 1573|  4.30k|        || (rl->eivlen > 0
  ------------------
  |  Branch (1573:13): [True: 0, False: 4.30k]
  ------------------
 1574|      0|            && !WPACKET_allocate_bytes(thispkt, rl->eivlen, NULL))
  ------------------
  |  Branch (1574:16): [True: 0, False: 0]
  ------------------
 1575|  4.30k|        || (maxcomplen > 0
  ------------------
  |  Branch (1575:13): [True: 4.30k, False: 0]
  ------------------
 1576|  4.30k|            && !WPACKET_reserve_bytes(thispkt, maxcomplen,
  ------------------
  |  Branch (1576:16): [True: 0, False: 4.30k]
  ------------------
 1577|  4.30k|                recdata))) {
 1578|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1579|      0|        return 0;
 1580|      0|    }
 1581|       |
 1582|  4.30k|    return 1;
 1583|  4.30k|}
tls_post_encryption_processing_default:
 1639|  4.30k|{
 1640|  4.30k|    size_t origlen, len;
 1641|  4.30k|    size_t headerlen = rl->isdtls ? DTLS1_RT_HEADER_LENGTH
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  |  Branch (1641:24): [True: 0, False: 4.30k]
  ------------------
 1642|  4.30k|                                  : SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  8.60k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
 1643|       |
 1644|       |    /* Allocate bytes for the encryption overhead */
 1645|  4.30k|    if (!WPACKET_get_length(thispkt, &origlen)
  ------------------
  |  Branch (1645:9): [True: 0, False: 4.30k]
  ------------------
 1646|       |        /* Check we allowed enough room for the encryption growth */
 1647|  4.30k|        || !ossl_assert(origlen + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD
  ------------------
  |  |   52|  8.60k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  8.60k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1647:12): [True: 0, False: 4.30k]
  ------------------
 1648|  4.30k|                - mac_size
 1649|  4.30k|            >= thiswr->length)
 1650|       |        /* Encryption should never shrink the data! */
 1651|  4.30k|        || origlen > thiswr->length
  ------------------
  |  Branch (1651:12): [True: 0, False: 4.30k]
  ------------------
 1652|  4.30k|        || (thiswr->length > origlen
  ------------------
  |  Branch (1652:13): [True: 0, False: 4.30k]
  ------------------
 1653|      0|            && !WPACKET_allocate_bytes(thispkt,
  ------------------
  |  Branch (1653:16): [True: 0, False: 0]
  ------------------
 1654|      0|                thiswr->length - origlen,
 1655|      0|                NULL))) {
 1656|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1657|      0|        return 0;
 1658|      0|    }
 1659|  4.30k|    if (rl->use_etm && mac_size != 0) {
  ------------------
  |  Branch (1659:9): [True: 0, False: 4.30k]
  |  Branch (1659:24): [True: 0, False: 0]
  ------------------
 1660|      0|        unsigned char *mac;
 1661|       |
 1662|      0|        if (!WPACKET_allocate_bytes(thispkt, mac_size, &mac)
  ------------------
  |  Branch (1662:13): [True: 0, False: 0]
  ------------------
 1663|      0|            || !rl->funcs->mac(rl, thiswr, mac, 1)) {
  ------------------
  |  Branch (1663:16): [True: 0, False: 0]
  ------------------
 1664|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1665|      0|            return 0;
 1666|      0|        }
 1667|       |
 1668|      0|        TLS_RL_RECORD_add_length(thiswr, mac_size);
  ------------------
  |  |   87|      0|#define TLS_RL_RECORD_add_length(r, l) ((r)->length += (l))
  ------------------
 1669|      0|    }
 1670|       |
 1671|  4.30k|    if (!WPACKET_get_length(thispkt, &len)
  ------------------
  |  Branch (1671:9): [True: 0, False: 4.30k]
  ------------------
 1672|  4.30k|        || !WPACKET_close(thispkt)) {
  ------------------
  |  Branch (1672:12): [True: 0, False: 4.30k]
  ------------------
 1673|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1674|      0|        return 0;
 1675|      0|    }
 1676|       |
 1677|  4.30k|    if (rl->msg_callback != NULL) {
  ------------------
  |  Branch (1677:9): [True: 0, False: 4.30k]
  ------------------
 1678|      0|        unsigned char *recordstart;
 1679|       |
 1680|      0|        recordstart = WPACKET_get_curr(thispkt) - len - headerlen;
 1681|      0|        rl->msg_callback(1, thiswr->rec_version, SSL3_RT_HEADER, recordstart,
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
 1682|      0|            headerlen, rl->cbarg);
 1683|       |
 1684|      0|        if (rl->version == TLS1_3_VERSION && rl->enc_ctx != NULL) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1684:13): [True: 0, False: 0]
  |  Branch (1684:46): [True: 0, False: 0]
  ------------------
 1685|      0|            unsigned char ctype = thistempl->type;
 1686|       |
 1687|      0|            rl->msg_callback(1, thiswr->rec_version, SSL3_RT_INNER_CONTENT_TYPE,
  ------------------
  |  |  240|      0|#define SSL3_RT_INNER_CONTENT_TYPE 0x101
  ------------------
 1688|      0|                &ctype, 1, rl->cbarg);
 1689|      0|        }
 1690|      0|    }
 1691|       |
 1692|  4.30k|    if (!WPACKET_finish(thispkt)) {
  ------------------
  |  Branch (1692:9): [True: 0, False: 4.30k]
  ------------------
 1693|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1694|      0|        return 0;
 1695|      0|    }
 1696|       |
 1697|  4.30k|    TLS_RL_RECORD_add_length(thiswr, headerlen);
  ------------------
  |  |   87|  4.30k|#define TLS_RL_RECORD_add_length(r, l) ((r)->length += (l))
  ------------------
 1698|       |
 1699|  4.30k|    return 1;
 1700|  4.30k|}
tls_write_records_default:
 1705|  4.30k|{
 1706|  4.30k|    WPACKET pkt[SSL_MAX_PIPELINES + 1];
 1707|  4.30k|    TLS_RL_RECORD wr[SSL_MAX_PIPELINES + 1];
 1708|  4.30k|    WPACKET *thispkt;
 1709|  4.30k|    TLS_RL_RECORD *thiswr;
 1710|  4.30k|    int mac_size = 0, ret = 0;
 1711|  4.30k|    size_t wpinited = 0;
 1712|  4.30k|    size_t j, prefix = 0;
 1713|  4.30k|    OSSL_RECORD_TEMPLATE prefixtempl;
 1714|  4.30k|    OSSL_RECORD_TEMPLATE *thistempl;
 1715|       |
 1716|  4.30k|    if (rl->md_ctx != NULL && EVP_MD_CTX_get0_md(rl->md_ctx) != NULL) {
  ------------------
  |  Branch (1716:9): [True: 0, False: 4.30k]
  |  Branch (1716:31): [True: 0, False: 0]
  ------------------
 1717|      0|        mac_size = EVP_MD_CTX_get_size(rl->md_ctx);
  ------------------
  |  |  482|      0|#define EVP_MD_CTX_get_size(e) EVP_MD_CTX_get_size_ex(e)
  ------------------
 1718|      0|        if (mac_size < 0) {
  ------------------
  |  Branch (1718:13): [True: 0, False: 0]
  ------------------
 1719|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1720|      0|            goto err;
 1721|      0|        }
 1722|      0|    }
 1723|       |
 1724|  4.30k|    if (!rl->funcs->allocate_write_buffers(rl, templates, numtempl, &prefix)) {
  ------------------
  |  Branch (1724:9): [True: 0, False: 4.30k]
  ------------------
 1725|       |        /* RLAYERfatal() already called */
 1726|      0|        goto err;
 1727|      0|    }
 1728|       |
 1729|  4.30k|    if (!rl->funcs->initialise_write_packets(rl, templates, numtempl,
  ------------------
  |  Branch (1729:9): [True: 0, False: 4.30k]
  ------------------
 1730|  4.30k|            &prefixtempl, pkt, rl->wbuf,
 1731|  4.30k|            &wpinited)) {
 1732|       |        /* RLAYERfatal() already called */
 1733|      0|        goto err;
 1734|      0|    }
 1735|       |
 1736|       |    /* Clear our TLS_RL_RECORD structures */
 1737|  4.30k|    memset(wr, 0, sizeof(wr));
 1738|  8.60k|    for (j = 0; j < numtempl + prefix; j++) {
  ------------------
  |  Branch (1738:17): [True: 4.30k, False: 4.30k]
  ------------------
 1739|  4.30k|        unsigned char *compressdata = NULL;
 1740|  4.30k|        uint8_t rectype;
 1741|       |
 1742|  4.30k|        thispkt = &pkt[j];
 1743|  4.30k|        thiswr = &wr[j];
 1744|  4.30k|        thistempl = (j < prefix) ? &prefixtempl : &templates[j - prefix];
  ------------------
  |  Branch (1744:21): [True: 0, False: 4.30k]
  ------------------
 1745|       |
 1746|       |        /*
 1747|       |         * Default to the record type as specified in the template unless the
 1748|       |         * protocol implementation says differently.
 1749|       |         */
 1750|  4.30k|        if (rl->funcs->get_record_type != NULL)
  ------------------
  |  Branch (1750:13): [True: 0, False: 4.30k]
  ------------------
 1751|      0|            rectype = rl->funcs->get_record_type(rl, thistempl);
 1752|  4.30k|        else
 1753|  4.30k|            rectype = thistempl->type;
 1754|       |
 1755|  4.30k|        TLS_RL_RECORD_set_type(thiswr, rectype);
  ------------------
  |  |   83|  4.30k|#define TLS_RL_RECORD_set_type(r, t) ((r)->type = (t))
  ------------------
 1756|  4.30k|        TLS_RL_RECORD_set_rec_version(thiswr, thistempl->version);
  ------------------
  |  |   84|  4.30k|#define TLS_RL_RECORD_set_rec_version(r, v) ((r)->rec_version = (v))
  ------------------
 1757|       |
 1758|  4.30k|        if (!rl->funcs->prepare_record_header(rl, thispkt, thistempl, rectype,
  ------------------
  |  Branch (1758:13): [True: 0, False: 4.30k]
  ------------------
 1759|  4.30k|                &compressdata)) {
 1760|       |            /* RLAYERfatal() already called */
 1761|      0|            goto err;
 1762|      0|        }
 1763|       |
 1764|       |        /* lets setup the record stuff. */
 1765|  4.30k|        TLS_RL_RECORD_set_data(thiswr, compressdata);
  ------------------
  |  |   88|  4.30k|#define TLS_RL_RECORD_set_data(r, d) ((r)->data = (d))
  ------------------
 1766|  4.30k|        TLS_RL_RECORD_set_length(thiswr, thistempl->buflen);
  ------------------
  |  |   86|  4.30k|#define TLS_RL_RECORD_set_length(r, l) ((r)->length = (l))
  ------------------
 1767|       |
 1768|  4.30k|        TLS_RL_RECORD_set_input(thiswr, (unsigned char *)thistempl->buf);
  ------------------
  |  |   89|  4.30k|#define TLS_RL_RECORD_set_input(r, i) ((r)->input = (i))
  ------------------
 1769|       |
 1770|       |        /*
 1771|       |         * we now 'read' from thiswr->input, thiswr->length bytes into
 1772|       |         * thiswr->data
 1773|       |         */
 1774|       |
 1775|       |        /* first we compress */
 1776|  4.30k|        if (rl->compctx != NULL) {
  ------------------
  |  Branch (1776:13): [True: 0, False: 4.30k]
  ------------------
 1777|      0|            if (!tls_do_compress(rl, thiswr)
  ------------------
  |  Branch (1777:17): [True: 0, False: 0]
  ------------------
 1778|      0|                || !WPACKET_allocate_bytes(thispkt, thiswr->length, NULL)) {
  ------------------
  |  Branch (1778:20): [True: 0, False: 0]
  ------------------
 1779|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_COMPRESSION_FAILURE);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1780|      0|                goto err;
 1781|      0|            }
 1782|  4.30k|        } else if (compressdata != NULL) {
  ------------------
  |  Branch (1782:20): [True: 4.30k, False: 0]
  ------------------
 1783|  4.30k|            if (!WPACKET_memcpy(thispkt, thiswr->input, thiswr->length)) {
  ------------------
  |  Branch (1783:17): [True: 0, False: 4.30k]
  ------------------
 1784|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1785|      0|                goto err;
 1786|      0|            }
 1787|  4.30k|            TLS_RL_RECORD_reset_input(&wr[j]);
  ------------------
  |  |   90|  4.30k|#define TLS_RL_RECORD_reset_input(r) ((r)->input = (r)->data)
  ------------------
 1788|  4.30k|        }
 1789|       |
 1790|  4.30k|        if (rl->funcs->add_record_padding != NULL
  ------------------
  |  Branch (1790:13): [True: 0, False: 4.30k]
  ------------------
 1791|      0|            && !rl->funcs->add_record_padding(rl, thistempl, thispkt,
  ------------------
  |  Branch (1791:16): [True: 0, False: 0]
  ------------------
 1792|      0|                thiswr)) {
 1793|       |            /* RLAYERfatal() already called */
 1794|      0|            goto err;
 1795|      0|        }
 1796|       |
 1797|  4.30k|        if (!rl->funcs->prepare_for_encryption(rl, mac_size, thispkt, thiswr)) {
  ------------------
  |  Branch (1797:13): [True: 0, False: 4.30k]
  ------------------
 1798|       |            /* RLAYERfatal() already called */
 1799|      0|            goto err;
 1800|      0|        }
 1801|  4.30k|    }
 1802|       |
 1803|  4.30k|    if (prefix) {
  ------------------
  |  Branch (1803:9): [True: 0, False: 4.30k]
  ------------------
 1804|      0|        if (rl->funcs->cipher(rl, wr, 1, 1, NULL, mac_size) < 1) {
  ------------------
  |  Branch (1804:13): [True: 0, False: 0]
  ------------------
 1805|      0|            if (rl->alert == SSL_AD_NO_ALERT) {
  ------------------
  |  |   67|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (1805:17): [True: 0, False: 0]
  ------------------
 1806|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1807|      0|            }
 1808|      0|            goto err;
 1809|      0|        }
 1810|      0|    }
 1811|       |
 1812|  4.30k|    if (rl->funcs->cipher(rl, wr + prefix, numtempl, 1, NULL, mac_size) < 1) {
  ------------------
  |  Branch (1812:9): [True: 0, False: 4.30k]
  ------------------
 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|  8.60k|    for (j = 0; j < numtempl + prefix; j++) {
  ------------------
  |  Branch (1819:17): [True: 4.30k, False: 4.30k]
  ------------------
 1820|  4.30k|        thispkt = &pkt[j];
 1821|  4.30k|        thiswr = &wr[j];
 1822|  4.30k|        thistempl = (j < prefix) ? &prefixtempl : &templates[j - prefix];
  ------------------
  |  Branch (1822:21): [True: 0, False: 4.30k]
  ------------------
 1823|       |
 1824|  4.30k|        if (!rl->funcs->post_encryption_processing(rl, mac_size, thistempl,
  ------------------
  |  Branch (1824:13): [True: 0, False: 4.30k]
  ------------------
 1825|  4.30k|                thispkt, thiswr)) {
 1826|       |            /* RLAYERfatal() already called */
 1827|      0|            goto err;
 1828|      0|        }
 1829|       |
 1830|       |        /* now let's set up wb */
 1831|  4.30k|        TLS_BUFFER_set_left(&rl->wbuf[j], TLS_RL_RECORD_get_length(thiswr));
  ------------------
  |  |  528|  4.30k|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1832|  4.30k|    }
 1833|       |
 1834|  4.30k|    ret = 1;
 1835|  4.30k|err:
 1836|  8.60k|    for (j = 0; j < wpinited; j++)
  ------------------
  |  Branch (1836:17): [True: 4.30k, False: 4.30k]
  ------------------
 1837|  4.30k|        WPACKET_cleanup(&pkt[j]);
 1838|  4.30k|    return ret;
 1839|  4.30k|}
tls_write_records:
 1843|  4.30k|{
 1844|       |    /* Check we don't have pending data waiting to write */
 1845|  4.30k|    if (!ossl_assert(rl->nextwbuf >= rl->numwpipes
  ------------------
  |  |   52|  4.30k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 4.30k, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|  4.30k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1845:9): [True: 0, False: 4.30k]
  ------------------
 1846|  4.30k|            || TLS_BUFFER_get_left(&rl->wbuf[rl->nextwbuf]) == 0)) {
 1847|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1848|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1849|      0|    }
 1850|       |
 1851|  4.30k|    if (!rl->funcs->write_records(rl, templates, numtempl)) {
  ------------------
  |  Branch (1851:9): [True: 0, False: 4.30k]
  ------------------
 1852|       |        /* RLAYERfatal already called */
 1853|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1854|      0|    }
 1855|       |
 1856|  4.30k|    rl->nextwbuf = 0;
 1857|       |    /* we now just need to write the buffers */
 1858|  4.30k|    return tls_retry_write_records(rl);
 1859|  4.30k|}
tls_retry_write_records:
 1862|  4.30k|{
 1863|  4.30k|    int i, ret;
 1864|  4.30k|    TLS_BUFFER *thiswb;
 1865|  4.30k|    size_t tmpwrit = 0;
 1866|       |
 1867|  4.30k|    if (rl->nextwbuf >= rl->numwpipes)
  ------------------
  |  Branch (1867:9): [True: 0, False: 4.30k]
  ------------------
 1868|      0|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1869|       |
 1870|  4.30k|    for (;;) {
 1871|  4.30k|        thiswb = &rl->wbuf[rl->nextwbuf];
 1872|       |
 1873|  4.30k|        clear_sys_error();
  ------------------
  |  |   31|  4.30k|#define clear_sys_error() errno = 0
  ------------------
 1874|  4.30k|        if (rl->bio != NULL) {
  ------------------
  |  Branch (1874:13): [True: 4.30k, False: 0]
  ------------------
 1875|  4.30k|            if (rl->funcs->prepare_write_bio != NULL) {
  ------------------
  |  Branch (1875:17): [True: 0, False: 4.30k]
  ------------------
 1876|      0|                ret = rl->funcs->prepare_write_bio(rl, thiswb->type);
 1877|      0|                if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1877:21): [True: 0, False: 0]
  ------------------
 1878|      0|                    return ret;
 1879|      0|            }
 1880|  4.30k|            i = BIO_write(rl->bio, (char *)&(TLS_BUFFER_get_buf(thiswb)[TLS_BUFFER_get_offset(thiswb)]),
  ------------------
  |  |  524|  4.30k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
                          i = BIO_write(rl->bio, (char *)&(TLS_BUFFER_get_buf(thiswb)[TLS_BUFFER_get_offset(thiswb)]),
  ------------------
  |  |  530|  4.30k|#define TLS_BUFFER_get_offset(b) ((b)->offset)
  ------------------
 1881|  4.30k|                (unsigned int)TLS_BUFFER_get_left(thiswb));
  ------------------
  |  |  527|  4.30k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
 1882|  4.30k|            if (i >= 0) {
  ------------------
  |  Branch (1882:17): [True: 4.30k, False: 0]
  ------------------
 1883|  4.30k|                tmpwrit = i;
 1884|  4.30k|                if (i == 0 && BIO_should_retry(rl->bio))
  ------------------
  |  |  281|      0|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (281:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1884:21): [True: 0, False: 4.30k]
  ------------------
 1885|      0|                    ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|      0|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
 1886|  4.30k|                else
 1887|  4.30k|                    ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  4.30k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1888|  4.30k|            } else {
 1889|      0|                if (BIO_should_retry(rl->bio)) {
  ------------------
  |  |  281|      0|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (281:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1890|      0|                    ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|      0|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
 1891|      0|                } else {
 1892|      0|                    ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   55|      0|#define ERR_LIB_SYS 2
  ------------------
                                  ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      0|#define get_last_sys_error() errno
  ------------------
 1893|      0|                        "tls_retry_write_records failure");
 1894|      0|                    ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1895|      0|                }
 1896|      0|            }
 1897|  4.30k|        } else {
 1898|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_BIO_NOT_SET);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1899|      0|            ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1900|      0|            i = -1;
 1901|      0|        }
 1902|       |
 1903|       |        /*
 1904|       |         * When an empty fragment is sent on a connection using KTLS,
 1905|       |         * it is sent as a write of zero bytes.  If this zero byte
 1906|       |         * write succeeds, i will be 0 rather than a non-zero value.
 1907|       |         * Treat i == 0 as success rather than an error for zero byte
 1908|       |         * writes to permit this case.
 1909|       |         */
 1910|  4.30k|        if (i >= 0 && tmpwrit == TLS_BUFFER_get_left(thiswb)) {
  ------------------
  |  |  527|  4.30k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
  |  Branch (1910:13): [True: 4.30k, False: 0]
  |  Branch (1910:23): [True: 4.30k, False: 0]
  ------------------
 1911|  4.30k|            TLS_BUFFER_set_left(thiswb, 0);
  ------------------
  |  |  528|  4.30k|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1912|  4.30k|            TLS_BUFFER_add_offset(thiswb, tmpwrit);
  ------------------
  |  |  532|  4.30k|#define TLS_BUFFER_add_offset(b, o) ((b)->offset += (o))
  ------------------
 1913|  4.30k|            if (++(rl->nextwbuf) < rl->numwpipes)
  ------------------
  |  Branch (1913:17): [True: 0, False: 4.30k]
  ------------------
 1914|      0|                continue;
 1915|       |
 1916|  4.30k|            if (rl->nextwbuf == rl->numwpipes
  ------------------
  |  Branch (1916:17): [True: 4.30k, False: 0]
  ------------------
 1917|  4.30k|                && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0)
  ------------------
  |  |  537|  4.30k|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1917:20): [True: 0, False: 4.30k]
  ------------------
 1918|      0|                tls_release_write_buffer(rl);
 1919|  4.30k|            return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  4.30k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1920|  4.30k|        } else if (i <= 0) {
  ------------------
  |  Branch (1920:20): [True: 0, False: 0]
  ------------------
 1921|       |            /*
 1922|       |             * If the app buffer is used directly (kTLS) and the caller is
 1923|       |             * allowed to move it, copy the unsent data so the original
 1924|       |             * buffer can be safely released.
 1925|       |             */
 1926|      0|            if (TLS_BUFFER_is_app_buffer(thiswb)
  ------------------
  |  |  534|      0|#define TLS_BUFFER_is_app_buffer(b) ((b)->app_buffer)
  |  |  ------------------
  |  |  |  Branch (534:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1927|      0|                && (rl->mode & SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER) != 0) {
  ------------------
  |  |  526|      0|#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002U
  ------------------
  |  Branch (1927:20): [True: 0, False: 0]
  ------------------
 1928|      0|                size_t left = TLS_BUFFER_get_left(thiswb);
  ------------------
  |  |  527|      0|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
 1929|      0|                unsigned char *buf;
 1930|       |
 1931|      0|                buf = OPENSSL_malloc(left);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1932|      0|                if (buf == NULL) {
  ------------------
  |  Branch (1932:21): [True: 0, False: 0]
  ------------------
 1933|      0|                    RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1934|      0|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1935|      0|                }
 1936|      0|                memcpy(buf,
 1937|      0|                    TLS_BUFFER_get_buf(thiswb) + TLS_BUFFER_get_offset(thiswb),
  ------------------
  |  |  524|      0|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
                                  TLS_BUFFER_get_buf(thiswb) + TLS_BUFFER_get_offset(thiswb),
  ------------------
  |  |  530|      0|#define TLS_BUFFER_get_offset(b) ((b)->offset)
  ------------------
 1938|      0|                    left);
 1939|      0|                TLS_BUFFER_set_buf(thiswb, buf);
  ------------------
  |  |  525|      0|#define TLS_BUFFER_set_buf(b, n) ((b)->buf = (n))
  ------------------
 1940|      0|                TLS_BUFFER_set_offset(thiswb, 0);
  ------------------
  |  |  531|      0|#define TLS_BUFFER_set_offset(b, o) ((b)->offset = (o))
  ------------------
 1941|      0|                TLS_BUFFER_set_app_buffer(thiswb, 0);
  ------------------
  |  |  533|      0|#define TLS_BUFFER_set_app_buffer(b, l) ((b)->app_buffer = (l))
  ------------------
 1942|      0|            }
 1943|      0|            if (rl->isdtls) {
  ------------------
  |  Branch (1943:17): [True: 0, False: 0]
  ------------------
 1944|       |                /*
 1945|       |                 * For DTLS, just drop it. That's kind of the whole point in
 1946|       |                 * using a datagram service
 1947|       |                 */
 1948|      0|                TLS_BUFFER_set_left(thiswb, 0);
  ------------------
  |  |  528|      0|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1949|      0|                if (++(rl->nextwbuf) == rl->numwpipes
  ------------------
  |  Branch (1949:21): [True: 0, False: 0]
  ------------------
 1950|      0|                    && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0)
  ------------------
  |  |  537|      0|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1950:24): [True: 0, False: 0]
  ------------------
 1951|      0|                    tls_release_write_buffer(rl);
 1952|      0|            }
 1953|      0|            return ret;
 1954|      0|        }
 1955|      0|        TLS_BUFFER_add_offset(thiswb, tmpwrit);
  ------------------
  |  |  532|      0|#define TLS_BUFFER_add_offset(b, o) ((b)->offset += (o))
  ------------------
 1956|      0|        TLS_BUFFER_sub_left(thiswb, tmpwrit);
  ------------------
  |  |  529|      0|#define TLS_BUFFER_sub_left(b, l) ((b)->left -= (l))
  ------------------
 1957|      0|    }
 1958|  4.30k|}
tls_get_alert_code:
 1961|    244|{
 1962|    244|    return rl->alert;
 1963|    244|}
tls_set1_bio:
 1966|  23.2k|{
 1967|  23.2k|    if (bio != NULL && !BIO_up_ref(bio))
  ------------------
  |  Branch (1967:9): [True: 13.9k, False: 9.28k]
  |  Branch (1967:24): [True: 0, False: 13.9k]
  ------------------
 1968|      0|        return 0;
 1969|  23.2k|    BIO_free_all(rl->bio);
 1970|  23.2k|    rl->bio = bio;
 1971|       |
 1972|  23.2k|    return 1;
 1973|  23.2k|}
tls_set_protocol_version:
 1985|    100|{
 1986|    100|    return rl->funcs->set_protocol_version(rl, version);
 1987|    100|}
tls_set_first_handshake:
 1995|  13.9k|{
 1996|  13.9k|    rl->is_first_handshake = first;
 1997|  13.9k|}
tls_common.c:tls_allow_compression:
  114|  6.52k|{
  115|  6.52k|    if (rl->options & SSL_OP_NO_COMPRESSION)
  ------------------
  |  |  395|  6.52k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  351|  6.52k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 6.52k, False: 0]
  ------------------
  116|  6.52k|        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|  6.52k|}
tls_common.c:tls_release_write_buffer_int:
  124|  18.2k|{
  125|  18.2k|    TLS_BUFFER *wb;
  126|  18.2k|    size_t pipes;
  127|       |
  128|  18.2k|    pipes = rl->numwpipes;
  129|       |
  130|  20.5k|    while (pipes > start) {
  ------------------
  |  Branch (130:12): [True: 2.32k, False: 18.2k]
  ------------------
  131|  2.32k|        wb = &rl->wbuf[pipes - 1];
  132|       |
  133|  2.32k|        if (TLS_BUFFER_is_app_buffer(wb))
  ------------------
  |  |  534|  2.32k|#define TLS_BUFFER_is_app_buffer(b) ((b)->app_buffer)
  |  |  ------------------
  |  |  |  Branch (534:37): [True: 0, False: 2.32k]
  |  |  ------------------
  ------------------
  134|      0|            TLS_BUFFER_set_app_buffer(wb, 0);
  ------------------
  |  |  533|      0|#define TLS_BUFFER_set_app_buffer(b, l) ((b)->app_buffer = (l))
  ------------------
  135|  2.32k|        else
  136|  2.32k|            OPENSSL_free(wb->buf);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|       |        wb->buf = NULL;
  138|  2.32k|        pipes--;
  139|  2.32k|    }
  140|  18.2k|}
tls_common.c:tls_int_free:
 1399|  13.9k|{
 1400|  13.9k|    BIO_free(rl->prev);
 1401|  13.9k|    BIO_free_all(rl->bio);
 1402|  13.9k|    BIO_free(rl->next);
 1403|  13.9k|    ossl_tls_buffer_release(&rl->rbuf);
 1404|       |
 1405|  13.9k|    tls_release_write_buffer(rl);
 1406|       |
 1407|  13.9k|    EVP_CIPHER_CTX_free(rl->enc_ctx);
 1408|  13.9k|    EVP_MAC_CTX_free(rl->mac_ctx);
 1409|  13.9k|    EVP_MD_CTX_free(rl->md_ctx);
 1410|  13.9k|#ifndef OPENSSL_NO_COMP
 1411|  13.9k|    COMP_CTX_free(rl->compctx);
 1412|  13.9k|#endif
 1413|  13.9k|    OPENSSL_free(rl->iv);
  ------------------
  |  |  132|  13.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__
  |  |  ------------------
  ------------------
 1414|  13.9k|    OPENSSL_free(rl->nonce);
  ------------------
  |  |  132|  13.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__
  |  |  ------------------
  ------------------
 1415|  13.9k|    if (rl->version == SSL3_VERSION)
  ------------------
  |  |   23|  13.9k|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (1415:9): [True: 0, False: 13.9k]
  ------------------
 1416|      0|        OPENSSL_cleanse(rl->mac_secret, sizeof(rl->mac_secret));
 1417|       |
 1418|  13.9k|    TLS_RL_RECORD_release(rl->rrec, SSL_MAX_PIPELINES);
  ------------------
  |  |   74|  13.9k|#define SSL_MAX_PIPELINES 32
  ------------------
 1419|       |
 1420|  13.9k|    OPENSSL_free(rl);
  ------------------
  |  |  132|  13.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__
  |  |  ------------------
  ------------------
 1421|  13.9k|}
tls_common.c:TLS_RL_RECORD_release:
   33|  13.9k|{
   34|  13.9k|    size_t i;
   35|       |
   36|   459k|    for (i = 0; i < num_recs; i++) {
  ------------------
  |  Branch (36:17): [True: 445k, False: 13.9k]
  ------------------
   37|   445k|        OPENSSL_free(r[i].comp);
  ------------------
  |  |  132|   445k|    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|   445k|    }
   40|  13.9k|}
tls_common.c:tls_release_write_buffer:
  223|  13.9k|{
  224|  13.9k|    tls_release_write_buffer_int(rl, 0);
  225|       |
  226|  13.9k|    rl->numwpipes = 0;
  227|  13.9k|}
tls_common.c:tls_new_record_layer:
 1356|  13.9k|{
 1357|  13.9k|    int ret;
 1358|       |
 1359|  13.9k|    ret = tls_int_new_record_layer(libctx, propq, vers, role, direction, level,
 1360|  13.9k|        ciph, taglen, md, comp, prev,
 1361|  13.9k|        transport, next, settings,
 1362|  13.9k|        options, fns, cbarg, retrl);
 1363|       |
 1364|  13.9k|    if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  13.9k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1364:9): [True: 0, False: 13.9k]
  ------------------
 1365|      0|        return ret;
 1366|       |
 1367|  13.9k|    switch (vers) {
 1368|  13.9k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  13.9k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (1368:5): [True: 13.9k, False: 0]
  ------------------
 1369|  13.9k|        (*retrl)->funcs = &tls_any_funcs;
 1370|  13.9k|        break;
 1371|      0|    case TLS1_3_VERSION:
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1371:5): [True: 0, False: 13.9k]
  ------------------
 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: 13.9k]
  ------------------
 1375|      0|    case TLS1_1_VERSION:
  ------------------
  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  ------------------
  |  Branch (1375:5): [True: 0, False: 13.9k]
  ------------------
 1376|      0|    case TLS1_VERSION:
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (1376:5): [True: 0, False: 13.9k]
  ------------------
 1377|      0|        (*retrl)->funcs = &tls_1_funcs;
 1378|      0|        break;
 1379|      0|    default:
  ------------------
  |  Branch (1379:5): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    }
 1385|       |
 1386|  13.9k|    ret = (*retrl)->funcs->set_crypto_state(*retrl, level, key, keylen, iv,
 1387|  13.9k|        ivlen, mackey, mackeylen, ciph,
 1388|  13.9k|        taglen, mactype, md, comp);
 1389|       |
 1390|  13.9k|err:
 1391|  13.9k|    if (ret != OSSL_RECORD_RETURN_SUCCESS) {
  ------------------
  |  |   45|  13.9k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1391:9): [True: 0, False: 13.9k]
  ------------------
 1392|      0|        tls_int_free(*retrl);
 1393|       |        *retrl = NULL;
 1394|      0|    }
 1395|  13.9k|    return ret;
 1396|  13.9k|}

tlsany_meth.c:tls_any_set_crypto_state:
   26|  13.9k|{
   27|  13.9k|    if (level != OSSL_RECORD_PROTECTION_LEVEL_NONE) {
  ------------------
  |  | 2923|  13.9k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (27:9): [True: 0, False: 13.9k]
  ------------------
   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|  13.9k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  13.9k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
   35|  13.9k|}
tlsany_meth.c:tls_any_cipher:
   40|  4.50k|{
   41|  4.50k|    return 1;
   42|  4.50k|}
tlsany_meth.c:tls_any_set_protocol_version:
  117|    100|{
  118|    100|    if (rl->version != TLS_ANY_VERSION && rl->version != vers)
  ------------------
  |  |   40|    200|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (118:9): [True: 0, False: 100]
  |  Branch (118:43): [True: 0, False: 0]
  ------------------
  119|      0|        return 0;
  120|    100|    rl->version = vers;
  121|       |
  122|    100|    return 1;
  123|    100|}
tlsany_meth.c:tls_validate_record_header:
   45|    450|{
   46|    450|    if (rl->version == TLS_ANY_VERSION) {
  ------------------
  |  |   40|    450|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (46:9): [True: 450, False: 0]
  ------------------
   47|    450|        if ((rec->rec_version >> 8) != SSL3_VERSION_MAJOR) {
  ------------------
  |  |  216|    450|#define SSL3_VERSION_MAJOR 0x03
  ------------------
  |  Branch (47:13): [True: 219, False: 231]
  ------------------
   48|    219|            if (rl->is_first_record) {
  ------------------
  |  Branch (48:17): [True: 201, False: 18]
  ------------------
   49|    201|                unsigned char *p;
   50|       |
   51|       |                /*
   52|       |                 * Go back to start of packet, look at the five bytes that
   53|       |                 * we have.
   54|       |                 */
   55|    201|                p = rl->packet;
   56|    201|                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|    402|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 200]
  |  |  ------------------
  ------------------
                              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|    401|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 199]
  |  |  ------------------
  ------------------
                              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|    400|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 198]
  |  |  ------------------
  ------------------
                              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|    399|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 197]
  |  |  ------------------
  ------------------
                              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|    398|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 196]
  |  |  ------------------
  ------------------
                              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|    397|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 195]
  |  |  ------------------
  ------------------
                              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|    396|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 194]
  |  |  ------------------
  ------------------
                              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|    194|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 193]
  |  |  ------------------
  ------------------
   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|    193|                } else if (HAS_PREFIX((char *)p, "CONNE")) {
  ------------------
  |  |   58|    193|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 192]
  |  |  ------------------
  ------------------
   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|    201|                RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  390|    192|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|    192|    (ERR_new(),                                                  \
  |  |  |  |  393|    192|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|    192|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|    192|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   67|    192|                    SSL_R_WRONG_VERSION_NUMBER);
   68|    192|                return 0;
   69|    201|            } else {
   70|     18|                RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  390|     18|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|     18|    (ERR_new(),                                                  \
  |  |  |  |  393|     18|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     18|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|     18|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   71|     18|                    SSL_R_WRONG_VERSION_NUMBER);
   72|     18|                return 0;
   73|     18|            }
   74|    219|        }
   75|    450|    } else if (rl->version == TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (75:16): [True: 0, False: 0]
  ------------------
   76|       |        /*
   77|       |         * In this case we know we are going to negotiate TLSv1.3, but we've
   78|       |         * had an HRR, so we haven't actually done so yet. In TLSv1.3 we
   79|       |         * must ignore the legacy record version in plaintext records.
   80|       |         */
   81|      0|    } else if (rec->rec_version != rl->version) {
  ------------------
  |  Branch (81:16): [True: 0, False: 0]
  ------------------
   82|      0|        if ((rl->version & 0xFF00) == (rec->rec_version & 0xFF00)) {
  ------------------
  |  Branch (82:13): [True: 0, False: 0]
  ------------------
   83|      0|            if (rec->type == SSL3_RT_ALERT) {
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (83:17): [True: 0, False: 0]
  ------------------
   84|       |                /*
   85|       |                 * The record is using an incorrect version number,
   86|       |                 * but what we've got appears to be an alert. We
   87|       |                 * haven't read the body yet to check whether its a
   88|       |                 * fatal or not - but chances are it is. We probably
   89|       |                 * shouldn't send a fatal alert back. We'll just
   90|       |                 * end.
   91|       |                 */
   92|      0|                RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   93|      0|                    SSL_R_WRONG_VERSION_NUMBER);
   94|      0|                return 0;
   95|      0|            }
   96|       |            /* Send back error using their minor version number */
   97|      0|            rl->version = (unsigned short)rec->rec_version;
   98|      0|        }
   99|      0|        RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  390|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      0|    (ERR_new(),                                                  \
  |  |  |  |  393|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  100|      0|            SSL_R_WRONG_VERSION_NUMBER);
  101|      0|        return 0;
  102|      0|    }
  103|       |
  104|    231|    if (rec->length > SSL3_RT_MAX_PLAIN_LENGTH) {
  ------------------
  |  |  177|    231|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (104:9): [True: 2, False: 229]
  ------------------
  105|       |        /*
  106|       |         * We use SSL_R_DATA_LENGTH_TOO_LONG instead of
  107|       |         * SSL_R_ENCRYPTED_LENGTH_TOO_LONG here because we are the "any" method
  108|       |         * and we know that we are dealing with plaintext data
  109|       |         */
  110|      2|        RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  390|      2|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  392|      2|    (ERR_new(),                                                  \
  |  |  |  |  393|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  394|      2|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  111|      2|        return 0;
  112|      2|    }
  113|    229|    return 1;
  114|    231|}
tlsany_meth.c:tls_any_prepare_for_encryption:
  129|  4.30k|{
  130|       |    /* No encryption, so nothing to do */
  131|  4.30k|    return 1;
  132|  4.30k|}

RECORD_LAYER_init:
   28|  2.32k|{
   29|  2.32k|    rl->s = s;
   30|  2.32k|}
RECORD_LAYER_clear:
   33|  9.28k|{
   34|  9.28k|    int ret = 1;
   35|       |
   36|       |    /* Clear any buffered records we no longer need */
   37|  9.36k|    while (rl->curr_rec < rl->num_recs)
  ------------------
  |  Branch (37:12): [True: 78, False: 9.28k]
  ------------------
   38|     78|        ret &= ssl_release_record(rl->s,
   39|     78|            &(rl->tlsrecs[rl->curr_rec++]),
   40|     78|            0);
   41|       |
   42|  9.28k|    rl->wnum = 0;
   43|  9.28k|    memset(rl->handshake_fragment, 0, sizeof(rl->handshake_fragment));
   44|  9.28k|    rl->handshake_fragment_len = 0;
   45|  9.28k|    rl->wpend_tot = 0;
   46|  9.28k|    rl->wpend_type = 0;
   47|  9.28k|    rl->wpend_buf = NULL;
   48|  9.28k|    rl->alert_count = 0;
   49|  9.28k|    rl->num_recs = 0;
   50|  9.28k|    rl->curr_rec = 0;
   51|       |
   52|  9.28k|    BIO_free(rl->rrlnext);
   53|  9.28k|    rl->rrlnext = NULL;
   54|       |
   55|  9.28k|    if (rl->rrlmethod != NULL)
  ------------------
  |  Branch (55:9): [True: 6.96k, False: 2.32k]
  ------------------
   56|  6.96k|        rl->rrlmethod->free(rl->rrl); /* Ignore return value */
   57|  9.28k|    if (rl->wrlmethod != NULL)
  ------------------
  |  Branch (57:9): [True: 6.96k, False: 2.32k]
  ------------------
   58|  6.96k|        rl->wrlmethod->free(rl->wrl); /* Ignore return value */
   59|       |
   60|  9.28k|    rl->rrlmethod = NULL;
   61|  9.28k|    rl->wrlmethod = NULL;
   62|       |
   63|  9.28k|    rl->rrl = NULL;
   64|  9.28k|    rl->wrl = NULL;
   65|       |
   66|  9.28k|    if (rl->d)
  ------------------
  |  Branch (66:9): [True: 0, False: 9.28k]
  ------------------
   67|      0|        DTLS_RECORD_LAYER_clear(rl);
   68|       |
   69|  9.28k|    return ret;
   70|  9.28k|}
RECORD_LAYER_reset:
   73|  6.96k|{
   74|  6.96k|    int ret;
   75|       |
   76|  6.96k|    ret = RECORD_LAYER_clear(rl);
   77|       |
   78|       |    /* We try and reset both record layers even if one fails */
   79|  6.96k|    ret &= ssl_set_new_record_layer(rl->s,
   80|  6.96k|        SSL_CONNECTION_IS_DTLS(rl->s)
  ------------------
  |  |  266|  6.96k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  6.96k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  6.96k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 6.96k]
  |  |  ------------------
  ------------------
   81|  6.96k|            ? DTLS_ANY_VERSION
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
   82|  6.96k|            : TLS_ANY_VERSION,
  ------------------
  |  |   40|  6.96k|#define TLS_ANY_VERSION 0x10000
  ------------------
   83|  6.96k|        OSSL_RECORD_DIRECTION_READ,
  ------------------
  |  |   42|  6.96k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
   84|  6.96k|        OSSL_RECORD_PROTECTION_LEVEL_NONE, NULL, 0,
  ------------------
  |  | 2923|  6.96k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
   85|  6.96k|        NULL, 0, NULL, 0, NULL, 0, NULL, 0,
   86|  6.96k|        NID_undef, NULL, NULL, NULL);
  ------------------
  |  |   18|  6.96k|#define NID_undef                       0
  ------------------
   87|       |
   88|  6.96k|    ret &= ssl_set_new_record_layer(rl->s,
   89|  6.96k|        SSL_CONNECTION_IS_DTLS(rl->s)
  ------------------
  |  |  266|  6.96k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  6.96k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  6.96k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 6.96k]
  |  |  ------------------
  ------------------
   90|  6.96k|            ? DTLS_ANY_VERSION
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
   91|  6.96k|            : TLS_ANY_VERSION,
  ------------------
  |  |   40|  6.96k|#define TLS_ANY_VERSION 0x10000
  ------------------
   92|  6.96k|        OSSL_RECORD_DIRECTION_WRITE,
  ------------------
  |  |   43|  6.96k|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
   93|  6.96k|        OSSL_RECORD_PROTECTION_LEVEL_NONE, NULL, 0,
  ------------------
  |  | 2923|  6.96k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
   94|  6.96k|        NULL, 0, NULL, 0, NULL, 0, NULL, 0,
   95|  6.96k|        NID_undef, NULL, NULL, NULL);
  ------------------
  |  |   18|  6.96k|#define NID_undef                       0
  ------------------
   96|       |
   97|       |    /* SSLfatal already called in the event of failure */
   98|  6.96k|    return ret;
   99|  6.96k|}
RECORD_LAYER_write_pending:
  115|  4.16k|{
  116|  4.16k|    return rl->wpend_tot > 0;
  117|  4.16k|}
SSL_CTX_set_default_read_buffer_len:
  207|  3.03k|{
  208|  3.03k|    ctx->default_read_buf_len = len;
  209|  3.03k|}
ssl3_write_bytes:
  275|  2.22k|{
  276|  2.22k|    const unsigned char *buf = buf_;
  277|  2.22k|    size_t tot;
  278|  2.22k|    size_t n, max_send_fragment, split_send_fragment, maxpipes;
  279|  2.22k|    int i;
  280|  2.22k|    SSL_CONNECTION *s = SSL_CONNECTION_FROM_SSL_ONLY(ssl);
  ------------------
  |  |   23|  2.22k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  2.22k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 2.22k]
  |  |  |  |  ------------------
  |  |  |  |   18|  2.22k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.22k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 2.22k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  2.22k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  2.22k|                             : NULL))
  |  |  ------------------
  ------------------
  281|  2.22k|    OSSL_RECORD_TEMPLATE tmpls[SSL_MAX_PIPELINES];
  282|  2.22k|    unsigned int recversion;
  283|       |
  284|  2.22k|    if (s == NULL)
  ------------------
  |  Branch (284:9): [True: 0, False: 2.22k]
  ------------------
  285|      0|        return -1;
  286|       |
  287|  2.22k|    s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|  2.22k|#define SSL_NOTHING 1
  ------------------
  288|  2.22k|    tot = s->rlayer.wnum;
  289|       |    /*
  290|       |     * ensure that if we end up with a smaller value of data to write out
  291|       |     * than the original len from a write which didn't complete for
  292|       |     * non-blocking I/O and also somehow ended up avoiding the check for
  293|       |     * this in tls_write_check_pending/SSL_R_BAD_WRITE_RETRY as it must never be
  294|       |     * possible to end up with (len-tot) as a large number that will then
  295|       |     * promptly send beyond the end of the users buffer ... so we trap and
  296|       |     * report the error in a way the user will notice
  297|       |     */
  298|  2.22k|    if ((len < s->rlayer.wnum)
  ------------------
  |  Branch (298:9): [True: 0, False: 2.22k]
  ------------------
  299|  2.22k|        || ((s->rlayer.wpend_tot != 0)
  ------------------
  |  Branch (299:13): [True: 0, False: 2.22k]
  ------------------
  300|      0|            && (len < (s->rlayer.wnum + s->rlayer.wpend_tot)))) {
  ------------------
  |  Branch (300:16): [True: 0, False: 0]
  ------------------
  301|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_LENGTH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  302|      0|        return -1;
  303|      0|    }
  304|       |
  305|  2.22k|    if (s->early_data_state == SSL_EARLY_DATA_WRITING
  ------------------
  |  Branch (305:9): [True: 0, False: 2.22k]
  ------------------
  306|      0|        && !ossl_early_data_count_ok(s, len, 0, 1)) {
  ------------------
  |  Branch (306:12): [True: 0, False: 0]
  ------------------
  307|       |        /* SSLfatal() already called */
  308|      0|        return -1;
  309|      0|    }
  310|       |
  311|  2.22k|    s->rlayer.wnum = 0;
  312|       |
  313|       |    /*
  314|       |     * If we are supposed to be sending a KeyUpdate or NewSessionTicket then go
  315|       |     * into init unless we have writes pending - in which case we should finish
  316|       |     * doing that first.
  317|       |     */
  318|  2.22k|    if (s->rlayer.wpend_tot == 0 && (s->key_update != SSL_KEY_UPDATE_NONE || s->ext.extra_tickets_expected > 0))
  ------------------
  |  | 1071|  4.44k|#define SSL_KEY_UPDATE_NONE -1
  ------------------
  |  Branch (318:9): [True: 2.22k, False: 0]
  |  Branch (318:38): [True: 0, False: 2.22k]
  |  Branch (318:78): [True: 0, False: 2.22k]
  ------------------
  319|      0|        ossl_statem_set_in_init(s, 1);
  320|       |
  321|       |    /*
  322|       |     * When writing early data on the server side we could be "in_init" in
  323|       |     * between receiving the EoED and the CF - but we don't want to handle those
  324|       |     * messages yet.
  325|       |     */
  326|  2.22k|    if (SSL_in_init(ssl) && !ossl_statem_get_in_handshake(s)
  ------------------
  |  Branch (326:9): [True: 2.22k, False: 0]
  |  Branch (326:29): [True: 0, False: 2.22k]
  ------------------
  327|      0|        && s->early_data_state != SSL_EARLY_DATA_UNAUTH_WRITING) {
  ------------------
  |  Branch (327:12): [True: 0, False: 0]
  ------------------
  328|      0|        i = s->handshake_func(ssl);
  329|       |        /* SSLfatal() already called */
  330|      0|        if (i < 0)
  ------------------
  |  Branch (330:13): [True: 0, False: 0]
  ------------------
  331|      0|            return i;
  332|      0|        if (i == 0) {
  ------------------
  |  Branch (332:13): [True: 0, False: 0]
  ------------------
  333|      0|            return -1;
  334|      0|        }
  335|      0|    }
  336|       |
  337|  2.22k|    i = tls_write_check_pending(s, type, buf, len);
  338|  2.22k|    if (i < 0) {
  ------------------
  |  Branch (338:9): [True: 0, False: 2.22k]
  ------------------
  339|       |        /* SSLfatal() already called */
  340|      0|        return i;
  341|  2.22k|    } else if (i > 0) {
  ------------------
  |  Branch (341:16): [True: 0, False: 2.22k]
  ------------------
  342|       |        /* Retry needed */
  343|      0|        i = HANDLE_RLAYER_WRITE_RETURN(s,
  ------------------
  |  |  168|      0|    ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  344|      0|            s->rlayer.wrlmethod->retry_write_records(s->rlayer.wrl));
  345|      0|        if (i <= 0) {
  ------------------
  |  Branch (345:13): [True: 0, False: 0]
  ------------------
  346|      0|            s->rlayer.wnum = tot;
  347|      0|            return i;
  348|      0|        }
  349|      0|        tot += s->rlayer.wpend_tot;
  350|      0|        s->rlayer.wpend_tot = 0;
  351|      0|    } /* else no retry required */
  352|       |
  353|  2.22k|    if (tot == 0) {
  ------------------
  |  Branch (353:9): [True: 2.22k, False: 0]
  ------------------
  354|       |        /*
  355|       |         * We've not previously sent any data for this write so memorize
  356|       |         * arguments so that we can detect bad write retries later
  357|       |         */
  358|  2.22k|        s->rlayer.wpend_tot = 0;
  359|  2.22k|        s->rlayer.wpend_type = type;
  360|  2.22k|        s->rlayer.wpend_buf = buf;
  361|  2.22k|    }
  362|       |
  363|  2.22k|    if (tot == len) { /* done? */
  ------------------
  |  Branch (363:9): [True: 0, False: 2.22k]
  ------------------
  364|      0|        *written = tot;
  365|      0|        return 1;
  366|      0|    }
  367|       |
  368|       |    /* If we have an alert to send, lets send it */
  369|  2.22k|    if (s->s3.alert_dispatch > 0) {
  ------------------
  |  Branch (369:9): [True: 0, False: 2.22k]
  ------------------
  370|      0|        i = ssl->method->ssl_dispatch_alert(ssl);
  371|      0|        if (i <= 0) {
  ------------------
  |  Branch (371:13): [True: 0, False: 0]
  ------------------
  372|       |            /* SSLfatal() already called if appropriate */
  373|      0|            s->rlayer.wnum = tot;
  374|      0|            return i;
  375|      0|        }
  376|       |        /* if it went, fall through and send more stuff */
  377|      0|    }
  378|       |
  379|  2.22k|    n = (len - tot);
  380|       |
  381|  2.22k|    max_send_fragment = ssl_get_max_send_fragment(s);
  382|  2.22k|    split_send_fragment = ssl_get_split_send_fragment(s);
  383|       |
  384|  2.22k|    if (max_send_fragment == 0
  ------------------
  |  Branch (384:9): [True: 0, False: 2.22k]
  ------------------
  385|  2.22k|        || split_send_fragment == 0
  ------------------
  |  Branch (385:12): [True: 0, False: 2.22k]
  ------------------
  386|  2.22k|        || split_send_fragment > max_send_fragment) {
  ------------------
  |  Branch (386:12): [True: 0, False: 2.22k]
  ------------------
  387|       |        /*
  388|       |         * We should have prevented this when we set/get the split and max send
  389|       |         * fragments so we shouldn't get here
  390|       |         */
  391|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  392|      0|        return -1;
  393|      0|    }
  394|       |
  395|       |    /*
  396|       |     * Some servers hang if initial client hello is larger than 256 bytes
  397|       |     * and record version number > TLS 1.0
  398|       |     */
  399|  2.22k|    recversion = (s->version == TLS1_3_VERSION) ? TLS1_2_VERSION : s->version;
  ------------------
  |  |   27|  2.22k|#define TLS1_3_VERSION 0x0304
  ------------------
                  recversion = (s->version == TLS1_3_VERSION) ? TLS1_2_VERSION : s->version;
  ------------------
  |  |   26|  2.17k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (399:18): [True: 2.17k, False: 45]
  ------------------
  400|  2.22k|    if (SSL_get_state(ssl) == TLS_ST_CW_CLNT_HELLO
  ------------------
  |  Branch (400:9): [True: 2.22k, False: 0]
  ------------------
  401|  2.22k|        && !s->renegotiate
  ------------------
  |  Branch (401:12): [True: 2.22k, False: 0]
  ------------------
  402|  2.22k|        && TLS1_get_version(ssl) > TLS1_VERSION
  ------------------
  |  |   52|  2.22k|    ((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0)
  |  |  ------------------
  |  |  |  |   42|  2.22k|#define TLS1_VERSION_MAJOR 0x03
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 2.22k, False: 0]
  |  |  ------------------
  ------------------
                      && TLS1_get_version(ssl) > TLS1_VERSION
  ------------------
  |  |   24|  4.44k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (402:12): [True: 2.22k, False: 1]
  ------------------
  403|  2.22k|        && s->hello_retry_request == SSL_HRR_NONE)
  ------------------
  |  Branch (403:12): [True: 2.22k, False: 0]
  ------------------
  404|  2.22k|        recversion = TLS1_VERSION;
  ------------------
  |  |   24|  2.22k|#define TLS1_VERSION 0x0301
  ------------------
  405|       |
  406|  2.22k|    for (;;) {
  407|  2.22k|        size_t tmppipelen, remain;
  408|  2.22k|        size_t j, lensofar = 0;
  409|       |
  410|       |        /*
  411|       |         * Ask the record layer how it would like to split the amount of data
  412|       |         * that we have, and how many of those records it would like in one go.
  413|       |         */
  414|  2.22k|        maxpipes = s->rlayer.wrlmethod->get_max_records(s->rlayer.wrl, type, n,
  415|  2.22k|            max_send_fragment,
  416|  2.22k|            &split_send_fragment);
  417|       |        /*
  418|       |         * If max_pipelines is 0 then this means "undefined" and we default to
  419|       |         * whatever the record layer wants to do. Otherwise we use the smallest
  420|       |         * value from the number requested by the record layer, and max number
  421|       |         * configured by the user.
  422|       |         */
  423|  2.22k|        if (s->max_pipelines > 0 && maxpipes > s->max_pipelines)
  ------------------
  |  Branch (423:13): [True: 0, False: 2.22k]
  |  Branch (423:37): [True: 0, False: 0]
  ------------------
  424|      0|            maxpipes = s->max_pipelines;
  425|       |
  426|  2.22k|        if (maxpipes > SSL_MAX_PIPELINES)
  ------------------
  |  |   74|  2.22k|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (426:13): [True: 0, False: 2.22k]
  ------------------
  427|      0|            maxpipes = SSL_MAX_PIPELINES;
  ------------------
  |  |   74|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  428|       |
  429|  2.22k|        if (split_send_fragment > max_send_fragment) {
  ------------------
  |  Branch (429:13): [True: 0, False: 2.22k]
  ------------------
  430|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  431|      0|            return -1;
  432|      0|        }
  433|       |
  434|  2.22k|        if (n / maxpipes >= split_send_fragment) {
  ------------------
  |  Branch (434:13): [True: 0, False: 2.22k]
  ------------------
  435|       |            /*
  436|       |             * We have enough data to completely fill all available
  437|       |             * pipelines
  438|       |             */
  439|      0|            for (j = 0; j < maxpipes; j++) {
  ------------------
  |  Branch (439:25): [True: 0, False: 0]
  ------------------
  440|      0|                tmpls[j].type = type;
  441|      0|                tmpls[j].version = recversion;
  442|      0|                tmpls[j].buf = &(buf[tot]) + (j * split_send_fragment);
  443|      0|                tmpls[j].buflen = split_send_fragment;
  444|      0|            }
  445|       |            /* Remember how much data we are going to be sending */
  446|      0|            s->rlayer.wpend_tot = maxpipes * split_send_fragment;
  447|  2.22k|        } else {
  448|       |            /* We can partially fill all available pipelines */
  449|  2.22k|            tmppipelen = n / maxpipes;
  450|  2.22k|            remain = n % maxpipes;
  451|       |            /*
  452|       |             * If there is a remainder we add an extra byte to the first few
  453|       |             * pipelines
  454|       |             */
  455|  2.22k|            if (remain > 0)
  ------------------
  |  Branch (455:17): [True: 0, False: 2.22k]
  ------------------
  456|      0|                tmppipelen++;
  457|  4.44k|            for (j = 0; j < maxpipes; j++) {
  ------------------
  |  Branch (457:25): [True: 2.22k, False: 2.22k]
  ------------------
  458|  2.22k|                tmpls[j].type = type;
  459|  2.22k|                tmpls[j].version = recversion;
  460|  2.22k|                tmpls[j].buf = &(buf[tot]) + lensofar;
  461|  2.22k|                tmpls[j].buflen = tmppipelen;
  462|  2.22k|                lensofar += tmppipelen;
  463|  2.22k|                if (j + 1 == remain)
  ------------------
  |  Branch (463:21): [True: 0, False: 2.22k]
  ------------------
  464|      0|                    tmppipelen--;
  465|  2.22k|            }
  466|       |            /* Remember how much data we are going to be sending */
  467|  2.22k|            s->rlayer.wpend_tot = n;
  468|  2.22k|        }
  469|       |
  470|  2.22k|        i = HANDLE_RLAYER_WRITE_RETURN(s,
  ------------------
  |  |  168|  2.22k|    ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  471|  2.22k|            s->rlayer.wrlmethod->write_records(s->rlayer.wrl, tmpls, maxpipes));
  472|  2.22k|        if (i <= 0) {
  ------------------
  |  Branch (472:13): [True: 0, False: 2.22k]
  ------------------
  473|       |            /* SSLfatal() already called if appropriate */
  474|      0|            s->rlayer.wnum = tot;
  475|      0|            return i;
  476|      0|        }
  477|       |
  478|  2.22k|        if (s->rlayer.wpend_tot == n
  ------------------
  |  Branch (478:13): [True: 2.22k, False: 0]
  ------------------
  479|      0|            || (type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (479:17): [True: 0, False: 0]
  ------------------
  480|  2.22k|                && (s->mode & SSL_MODE_ENABLE_PARTIAL_WRITE) != 0)) {
  ------------------
  |  |  519|      0|#define SSL_MODE_ENABLE_PARTIAL_WRITE 0x00000001U
  ------------------
  |  Branch (480:20): [True: 0, False: 0]
  ------------------
  481|  2.22k|            *written = tot + s->rlayer.wpend_tot;
  482|  2.22k|            s->rlayer.wpend_tot = 0;
  483|  2.22k|            return 1;
  484|  2.22k|        }
  485|       |
  486|      0|        n -= s->rlayer.wpend_tot;
  487|      0|        tot += s->rlayer.wpend_tot;
  488|      0|    }
  489|  2.22k|}
ossl_tls_handle_rlayer_return:
  493|  7.44k|{
  494|  7.44k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  7.44k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  495|       |
  496|  7.44k|    if (ret == OSSL_RECORD_RETURN_RETRY) {
  ------------------
  |  |   46|  7.44k|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
  |  Branch (496:9): [True: 437, False: 7.00k]
  ------------------
  497|    437|        s->rwstate = writing ? SSL_WRITING : SSL_READING;
  ------------------
  |  |  956|      0|#define SSL_WRITING 2
  ------------------
                      s->rwstate = writing ? SSL_WRITING : SSL_READING;
  ------------------
  |  |  957|    874|#define SSL_READING 3
  ------------------
  |  Branch (497:22): [True: 0, False: 437]
  ------------------
  498|    437|        ret = -1;
  499|  7.00k|    } else {
  500|  7.00k|        s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|  7.00k|#define SSL_NOTHING 1
  ------------------
  501|  7.00k|        if (ret == OSSL_RECORD_RETURN_EOF) {
  ------------------
  |  |   49|  7.00k|#define OSSL_RECORD_RETURN_EOF -3
  ------------------
  |  Branch (501:13): [True: 1.82k, False: 5.17k]
  ------------------
  502|  1.82k|            if (writing) {
  ------------------
  |  Branch (502:17): [True: 0, False: 1.82k]
  ------------------
  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.82k|            } else if ((s->options & SSL_OP_IGNORE_UNEXPECTED_EOF) != 0) {
  ------------------
  |  |  366|  1.82k|#define SSL_OP_IGNORE_UNEXPECTED_EOF SSL_OP_BIT(7)
  |  |  ------------------
  |  |  |  |  351|  1.82k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (512:24): [True: 0, False: 1.82k]
  ------------------
  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.82k|            } else {
  516|  1.82k|                ERR_new();
  517|  1.82k|                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.82k|                ossl_statem_fatal(s, SSL_AD_DECODE_ERROR,
  ------------------
  |  | 1257|  1.82k|#define SSL_AD_DECODE_ERROR TLS1_AD_DECODE_ERROR
  |  |  ------------------
  |  |  |  |   61|  1.82k|#define TLS1_AD_DECODE_ERROR 50 /* fatal */
  |  |  ------------------
  ------------------
  523|  1.82k|                    SSL_R_UNEXPECTED_EOF_WHILE_READING, NULL);
  ------------------
  |  |  338|  1.82k|#define SSL_R_UNEXPECTED_EOF_WHILE_READING 294
  ------------------
  524|  1.82k|            }
  525|  5.17k|        } else if (ret == OSSL_RECORD_RETURN_FATAL) {
  ------------------
  |  |   48|  5.17k|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  |  Branch (525:20): [True: 244, False: 4.93k]
  ------------------
  526|    244|            int al = s->rlayer.rrlmethod->get_alert_code(s->rlayer.rrl);
  527|       |
  528|    244|            if (al != SSL_AD_NO_ALERT) {
  ------------------
  |  |   67|    244|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (528:17): [True: 20, False: 224]
  ------------------
  529|     20|                ERR_new();
  530|     20|                ERR_set_debug(file, line, 0);
  531|     20|                ossl_statem_fatal(s, al, SSL_R_RECORD_LAYER_FAILURE, NULL);
  ------------------
  |  |  249|     20|#define SSL_R_RECORD_LAYER_FAILURE 313
  ------------------
  532|    224|            } 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|    224|                ossl_statem_send_fatal(s, SSL_AD_NO_ALERT);
  ------------------
  |  |   67|    224|#define SSL_AD_NO_ALERT -1
  ------------------
  543|    224|            }
  544|    244|        }
  545|       |        /*
  546|       |         * The record layer distinguishes the cases of EOF, non-fatal
  547|       |         * err and retry. Upper layers do not.
  548|       |         * If we got a retry or success then *ret is already correct,
  549|       |         * otherwise we need to convert the return value.
  550|       |         */
  551|  7.00k|        if (ret == OSSL_RECORD_RETURN_NON_FATAL_ERR || ret == OSSL_RECORD_RETURN_EOF)
  ------------------
  |  |   47|  14.0k|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
                      if (ret == OSSL_RECORD_RETURN_NON_FATAL_ERR || ret == OSSL_RECORD_RETURN_EOF)
  ------------------
  |  |   49|  7.00k|#define OSSL_RECORD_RETURN_EOF -3
  ------------------
  |  Branch (551:13): [True: 0, False: 7.00k]
  |  Branch (551:56): [True: 1.82k, False: 5.17k]
  ------------------
  552|  1.82k|            ret = 0;
  553|  5.17k|        else if (ret < OSSL_RECORD_RETURN_NON_FATAL_ERR)
  ------------------
  |  |   47|  5.17k|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
  |  Branch (553:18): [True: 244, False: 4.93k]
  ------------------
  554|    244|            ret = -1;
  555|  7.00k|    }
  556|       |
  557|  7.44k|    return ret;
  558|  7.44k|}
ssl_release_record:
  565|    426|{
  566|    426|    assert(rr->length >= length);
  ------------------
  |  Branch (566:5): [True: 0, False: 426]
  |  Branch (566:5): [True: 426, False: 0]
  ------------------
  567|    426|    if (rr->rechandle != NULL) {
  ------------------
  |  Branch (567:9): [True: 426, False: 0]
  ------------------
  568|    426|        if (length == 0)
  ------------------
  |  Branch (568:13): [True: 97, False: 329]
  ------------------
  569|     97|            length = rr->length;
  570|       |        /* The record layer allocated the buffers for this record */
  571|    426|        if (HANDLE_RLAYER_READ_RETURN(s,
  ------------------
  |  |  165|    426|    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: 426]
  ------------------
  572|    426|                s->rlayer.rrlmethod->release_record(s->rlayer.rrl,
  573|    426|                    rr->rechandle,
  574|    426|                    length))
  575|    426|            <= 0) {
  576|       |            /* RLAYER_fatal already called */
  577|      0|            return 0;
  578|      0|        }
  579|       |
  580|    426|        if (length == rr->length)
  ------------------
  |  Branch (580:13): [True: 208, False: 218]
  ------------------
  581|    208|            s->rlayer.curr_rec++;
  582|    426|    } 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|    426|    rr->length -= length;
  589|    426|    if (rr->length > 0)
  ------------------
  |  Branch (589:9): [True: 218, False: 208]
  ------------------
  590|    218|        rr->off += length;
  591|    208|    else
  592|    208|        rr->off = 0;
  593|       |
  594|    426|    return 1;
  595|    426|}
ssl3_read_bytes:
  630|  2.85k|{
  631|  2.85k|    int i, j, ret;
  632|  2.85k|    size_t n, curr_rec, totalbytes;
  633|  2.85k|    TLS_RECORD *rr;
  634|  2.85k|    void (*cb)(const SSL *ssl, int type2, int val) = NULL;
  635|  2.85k|    int is_tls13;
  636|  2.85k|    SSL_CONNECTION *s = SSL_CONNECTION_FROM_SSL_ONLY(ssl);
  ------------------
  |  |   23|  2.85k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  2.85k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 2.85k]
  |  |  |  |  ------------------
  |  |  |  |   18|  2.85k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.85k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 2.85k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  2.85k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  2.85k|                             : NULL))
  |  |  ------------------
  ------------------
  637|       |
  638|  2.85k|    is_tls13 = SSL_CONNECTION_IS_TLS13(s);
  ------------------
  |  |  273|  2.85k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  5.71k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  2.85k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  2.85k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 2.85k, False: 0]
  |  |  ------------------
  |  |  274|  2.85k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  2.85k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  5.71k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 2.85k, False: 0]
  |  |  ------------------
  |  |  275|  2.85k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  2.85k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  2.85k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 2.85k]
  |  |  ------------------
  ------------------
  639|       |
  640|  2.85k|    if ((type != 0
  ------------------
  |  Branch (640:10): [True: 2.85k, False: 0]
  ------------------
  641|  2.85k|            && (type != SSL3_RT_APPLICATION_DATA)
  ------------------
  |  |  222|  2.85k|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (641:16): [True: 2.85k, False: 0]
  ------------------
  642|  2.85k|            && (type != SSL3_RT_HANDSHAKE))
  ------------------
  |  |  221|  2.85k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (642:16): [True: 0, False: 2.85k]
  ------------------
  643|  2.85k|        || (peek && (type != SSL3_RT_APPLICATION_DATA))) {
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (643:13): [True: 0, False: 2.85k]
  |  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.85k|    if ((type == SSL3_RT_HANDSHAKE) && (s->rlayer.handshake_fragment_len > 0))
  ------------------
  |  |  221|  2.85k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (648:9): [True: 2.85k, False: 0]
  |  Branch (648:40): [True: 0, False: 2.85k]
  ------------------
  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.85k|    if (!ossl_statem_get_in_handshake(s) && SSL_in_init(ssl)) {
  ------------------
  |  Branch (678:9): [True: 0, False: 2.85k]
  |  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.87k|start:
  688|  2.87k|    s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|  2.87k|#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.87k|    if (s->rlayer.curr_rec >= s->rlayer.num_recs) {
  ------------------
  |  Branch (698:9): [True: 2.71k, False: 157]
  ------------------
  699|  2.71k|        s->rlayer.curr_rec = s->rlayer.num_recs = 0;
  700|  2.71k|        do {
  701|  2.71k|            rr = &s->rlayer.tlsrecs[s->rlayer.num_recs];
  702|       |
  703|  2.71k|            ret = HANDLE_RLAYER_READ_RETURN(s,
  ------------------
  |  |  165|  2.71k|    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|  2.71k|                s->rlayer.rrlmethod->read_record(s->rlayer.rrl,
  705|  2.71k|                    &rr->rechandle,
  706|  2.71k|                    &rr->version, &rr->type,
  707|  2.71k|                    &rr->data, &rr->length,
  708|  2.71k|                    NULL, NULL));
  709|  2.71k|            if (ret <= 0) {
  ------------------
  |  Branch (709:17): [True: 2.50k, False: 208]
  ------------------
  710|       |                /* SSLfatal() already called if appropriate */
  711|  2.50k|                return ret;
  712|  2.50k|            }
  713|    208|            rr->off = 0;
  714|    208|            s->rlayer.num_recs++;
  715|    208|        } while (s->rlayer.rrlmethod->processed_read_pending(s->rlayer.rrl)
  ------------------
  |  Branch (715:18): [True: 0, False: 208]
  ------------------
  716|      0|            && s->rlayer.num_recs < SSL_MAX_PIPELINES);
  ------------------
  |  |   74|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (716:16): [True: 0, False: 0]
  ------------------
  717|  2.71k|    }
  718|    365|    rr = &s->rlayer.tlsrecs[s->rlayer.curr_rec];
  719|       |
  720|    365|    if (s->rlayer.handshake_fragment_len > 0
  ------------------
  |  Branch (720:9): [True: 0, False: 365]
  ------------------
  721|      0|        && rr->type != SSL3_RT_HANDSHAKE
  ------------------
  |  |  221|    365|#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|    365|    if (rr->type != SSL3_RT_ALERT && rr->length != 0)
  ------------------
  |  |  220|    730|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (732:9): [True: 350, False: 15]
  |  Branch (732:38): [True: 337, False: 13]
  ------------------
  733|    337|        s->rlayer.alert_count = 0;
  734|       |
  735|       |    /* we now have a packet which can be read and processed */
  736|       |
  737|    365|    if (s->s3.change_cipher_spec /* set when we receive ChangeCipherSpec,
  ------------------
  |  Branch (737:9): [True: 0, False: 365]
  ------------------
  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|    365|    if (s->shutdown & SSL_RECEIVED_SHUTDOWN) {
  ------------------
  |  |  217|    365|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  |  Branch (749:9): [True: 0, False: 365]
  ------------------
  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|    365|    if (type == rr->type
  ------------------
  |  Branch (755:9): [True: 330, False: 35]
  ------------------
  756|     35|        || (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC
  ------------------
  |  |  219|     70|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (756:13): [True: 11, False: 24]
  ------------------
  757|     11|            && type == SSL3_RT_HANDSHAKE && recvd_type != NULL
  ------------------
  |  |  221|     46|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (757:16): [True: 11, False: 0]
  |  Branch (757:45): [True: 9, False: 2]
  ------------------
  758|    339|            && !is_tls13)) {
  ------------------
  |  Branch (758:16): [True: 9, 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|    339|        if (SSL_in_init(ssl) && type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|    678|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (768:13): [True: 339, False: 0]
  |  Branch (768:33): [True: 0, False: 339]
  ------------------
  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|    339|        if (type == SSL3_RT_HANDSHAKE
  ------------------
  |  |  221|    678|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (774:13): [True: 339, False: 0]
  ------------------
  775|    339|            && rr->type == SSL3_RT_CHANGE_CIPHER_SPEC
  ------------------
  |  |  219|    678|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (775:16): [True: 9, False: 330]
  ------------------
  776|      9|            && s->rlayer.handshake_fragment_len > 0) {
  ------------------
  |  Branch (776:16): [True: 0, False: 9]
  ------------------
  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|    339|        if (recvd_type != NULL)
  ------------------
  |  Branch (781:13): [True: 197, False: 142]
  ------------------
  782|    197|            *recvd_type = rr->type;
  783|       |
  784|    339|        if (len == 0) {
  ------------------
  |  Branch (784:13): [True: 0, False: 339]
  ------------------
  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|    339|        totalbytes = 0;
  797|    339|        curr_rec = s->rlayer.curr_rec;
  798|    339|        do {
  799|    339|            if (len - totalbytes > rr->length)
  ------------------
  |  Branch (799:17): [True: 65, False: 274]
  ------------------
  800|     65|                n = rr->length;
  801|    274|            else
  802|    274|                n = len - totalbytes;
  803|       |
  804|    339|            memcpy(buf, &(rr->data[rr->off]), n);
  805|    339|            buf += n;
  806|    339|            if (peek) {
  ------------------
  |  Branch (806:17): [True: 0, False: 339]
  ------------------
  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|    339|            } else {
  811|    339|                if (!ssl_release_record(s, rr, n))
  ------------------
  |  Branch (811:21): [True: 0, False: 339]
  ------------------
  812|      0|                    return -1;
  813|    339|            }
  814|    339|            if (rr->length == 0
  ------------------
  |  Branch (814:17): [True: 121, False: 218]
  ------------------
  815|    218|                || (peek && n == rr->length)) {
  ------------------
  |  Branch (815:21): [True: 0, False: 218]
  |  Branch (815:29): [True: 0, False: 0]
  ------------------
  816|    121|                rr++;
  817|    121|                curr_rec++;
  818|    121|            }
  819|    339|            totalbytes += n;
  820|    339|        } while (type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|    678|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (820:18): [True: 0, False: 339]
  ------------------
  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|    339|        if (totalbytes == 0) {
  ------------------
  |  Branch (823:13): [True: 10, False: 329]
  ------------------
  824|       |            /* We must have read empty records. Get more data */
  825|     10|            goto start;
  826|     10|        }
  827|    329|        *readbytes = totalbytes;
  828|    329|        return 1;
  829|    339|    }
  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|     26|    if (rr->version == SSL2_VERSION) {
  ------------------
  |  |   23|     26|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (840:9): [True: 0, False: 26]
  ------------------
  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|     26|    if (ssl->method->version == TLS_ANY_VERSION
  ------------------
  |  |   40|     52|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (851:9): [True: 26, False: 0]
  ------------------
  852|     26|        && (s->server || rr->type != SSL3_RT_ALERT)) {
  ------------------
  |  |  220|     26|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (852:13): [True: 0, False: 26]
  |  Branch (852:26): [True: 11, False: 15]
  ------------------
  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|     15|    if (rr->type == SSL3_RT_ALERT) {
  ------------------
  |  |  220|     15|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (869:9): [True: 15, False: 0]
  ------------------
  870|     15|        unsigned int alert_level, alert_descr;
  871|     15|        const unsigned char *alert_bytes = rr->data + rr->off;
  872|     15|        PACKET alert;
  873|       |
  874|     15|        if (!PACKET_buf_init(&alert, alert_bytes, rr->length)
  ------------------
  |  Branch (874:13): [True: 0, False: 15]
  ------------------
  875|     15|            || !PACKET_get_1(&alert, &alert_level)
  ------------------
  |  Branch (875:16): [True: 1, False: 14]
  ------------------
  876|     14|            || !PACKET_get_1(&alert, &alert_descr)
  ------------------
  |  Branch (876:16): [True: 1, False: 13]
  ------------------
  877|     13|            || PACKET_remaining(&alert) != 0) {
  ------------------
  |  Branch (877:16): [True: 1, False: 12]
  ------------------
  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|     12|        if (s->msg_callback)
  ------------------
  |  Branch (882:13): [True: 0, False: 12]
  ------------------
  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|     12|        if (s->info_callback != NULL)
  ------------------
  |  Branch (886:13): [True: 0, False: 12]
  ------------------
  887|      0|            cb = s->info_callback;
  888|     12|        else if (ssl->ctx->info_callback != NULL)
  ------------------
  |  Branch (888:18): [True: 0, False: 12]
  ------------------
  889|      0|            cb = ssl->ctx->info_callback;
  890|       |
  891|     12|        if (cb != NULL) {
  ------------------
  |  Branch (891:13): [True: 0, False: 12]
  ------------------
  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|     12|        if ((!is_tls13 && alert_level == SSL3_AL_WARNING)
  ------------------
  |  |  249|     12|#define SSL3_AL_WARNING 1
  ------------------
  |  Branch (896:14): [True: 12, False: 0]
  |  Branch (896:27): [True: 5, False: 7]
  ------------------
  897|      7|            || (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: 7]
  |  Branch (897:29): [True: 0, False: 0]
  ------------------
  898|      5|            s->s3.warn_alert = alert_descr;
  899|      5|            if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (899:17): [True: 0, False: 5]
  ------------------
  900|      0|                return -1;
  901|       |
  902|      5|            s->rlayer.alert_count++;
  903|      5|            if (s->rlayer.alert_count == MAX_WARN_ALERT_COUNT) {
  ------------------
  |  |   17|      5|#define MAX_WARN_ALERT_COUNT 5
  ------------------
  |  Branch (903:17): [True: 0, False: 5]
  ------------------
  904|      0|                SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  905|      0|                    SSL_R_TOO_MANY_WARN_ALERTS);
  906|      0|                return -1;
  907|      0|            }
  908|      5|        }
  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|     12|        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: 12]
  |  Branch (914:25): [True: 0, False: 0]
  ------------------
  915|      0|            goto start;
  916|     12|        } else if (alert_descr == SSL_AD_CLOSE_NOTIFY
  ------------------
  |  | 1232|     12|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|     24|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  |  Branch (916:20): [True: 3, False: 9]
  ------------------
  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|     10|        } else if (alert_level == SSL3_AL_FATAL || is_tls13) {
  ------------------
  |  |  250|     20|#define SSL3_AL_FATAL 2
  ------------------
  |  Branch (920:20): [True: 4, False: 6]
  |  Branch (920:52): [True: 0, False: 6]
  ------------------
  921|      4|            s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|      4|#define SSL_NOTHING 1
  ------------------
  922|      4|            s->s3.fatal_alert = alert_descr;
  923|      4|            SSLfatal_data(s, SSL_AD_NO_ALERT,
  ------------------
  |  |  157|      4|    (ERR_new(),                                                  \
  |  |  158|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      4|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|      4|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_NO_ALERT,
  ------------------
  |  |   67|      4|#define SSL_AD_NO_ALERT -1
  ------------------
  924|      4|                SSL_AD_REASON_OFFSET + alert_descr,
  ------------------
  |  | 1229|      4|#define SSL_AD_REASON_OFFSET 1000 /* offset to get SSL_R_... value \
  ------------------
  925|      4|                "SSL alert number %d", alert_descr);
  926|      4|            s->shutdown |= SSL_RECEIVED_SHUTDOWN;
  ------------------
  |  |  217|      4|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  927|      4|            if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (927:17): [True: 0, False: 4]
  ------------------
  928|      0|                return -1;
  929|      4|            SSL_CTX_remove_session(s->session_ctx, s->session);
  930|      4|            return 0;
  931|      6|        } else if (alert_descr == SSL_AD_NO_RENEGOTIATION) {
  ------------------
  |  | 1268|      6|#define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION
  |  |  ------------------
  |  |  |  |   69|      6|#define TLS1_AD_NO_RENEGOTIATION 100
  |  |  ------------------
  ------------------
  |  Branch (931:20): [True: 1, False: 5]
  ------------------
  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|      5|        } else if (alert_level == SSL3_AL_WARNING) {
  ------------------
  |  |  249|      5|#define SSL3_AL_WARNING 1
  ------------------
  |  Branch (942:20): [True: 3, False: 2]
  ------------------
  943|       |            /* We ignore any other warning alert in TLSv1.2 and below */
  944|      3|            goto start;
  945|      3|        }
  946|       |
  947|     12|        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|     12|    }
  950|       |
  951|      0|    if ((s->shutdown & SSL_SENT_SHUTDOWN) != 0) {
  ------------------
  |  |  216|      0|#define SSL_SENT_SHUTDOWN 1
  ------------------
  |  Branch (951:9): [True: 0, False: 0]
  ------------------
  952|      0|        if (rr->type == SSL3_RT_HANDSHAKE) {
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (952:13): [True: 0, False: 0]
  ------------------
  953|      0|            BIO *rbio;
  954|       |
  955|       |            /*
  956|       |             * We ignore any handshake messages sent to us unless they are
  957|       |             * TLSv1.3 in which case we want to process them. For all other
  958|       |             * handshake messages we can't do anything reasonable with them
  959|       |             * because we are unable to write any response due to having already
  960|       |             * sent close_notify.
  961|       |             */
  962|      0|            if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  963|      0|                if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (963:21): [True: 0, False: 0]
  ------------------
  964|      0|                    return -1;
  965|       |
  966|      0|                if ((s->mode & SSL_MODE_AUTO_RETRY) != 0)
  ------------------
  |  |  530|      0|#define SSL_MODE_AUTO_RETRY 0x00000004U
  ------------------
  |  Branch (966:21): [True: 0, False: 0]
  ------------------
  967|      0|                    goto start;
  968|       |
  969|      0|                s->rwstate = SSL_READING;
  ------------------
  |  |  957|      0|#define SSL_READING 3
  ------------------
  970|      0|                rbio = SSL_get_rbio(ssl);
  971|      0|                BIO_clear_retry_flags(rbio);
  ------------------
  |  |  272|      0|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|      0|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  972|      0|                BIO_set_retry_read(rbio);
  ------------------
  |  |  266|      0|    BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |                   BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  973|      0|                return -1;
  974|      0|            }
  975|      0|        } else {
  976|       |            /*
  977|       |             * The peer is continuing to send application data, but we have
  978|       |             * already sent close_notify. If this was expected we should have
  979|       |             * been called via SSL_read() and this would have been handled
  980|       |             * above.
  981|       |             * No alert sent because we already sent close_notify
  982|       |             */
  983|      0|            if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (983:17): [True: 0, False: 0]
  ------------------
  984|      0|                return -1;
  985|      0|            SSLfatal(s, SSL_AD_NO_ALERT,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  986|      0|                SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY);
  987|      0|            return -1;
  988|      0|        }
  989|      0|    }
  990|       |
  991|       |    /*
  992|       |     * For handshake data we have 'fragment' storage, so fill that so that we
  993|       |     * can process the header at a fixed place. This is done after the
  994|       |     * "SHUTDOWN" code above to avoid filling the fragment storage with data
  995|       |     * that we're just going to discard.
  996|       |     */
  997|      0|    if (rr->type == SSL3_RT_HANDSHAKE) {
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (997:9): [True: 0, False: 0]
  ------------------
  998|      0|        size_t dest_maxlen = sizeof(s->rlayer.handshake_fragment);
  999|      0|        unsigned char *dest = s->rlayer.handshake_fragment;
 1000|      0|        size_t *dest_len = &s->rlayer.handshake_fragment_len;
 1001|       |
 1002|      0|        n = dest_maxlen - *dest_len; /* available space in 'dest' */
 1003|      0|        if (rr->length < n)
  ------------------
  |  Branch (1003:13): [True: 0, False: 0]
  ------------------
 1004|      0|            n = rr->length; /* available bytes */
 1005|       |
 1006|       |        /* now move 'n' bytes: */
 1007|      0|        if (n > 0) {
  ------------------
  |  Branch (1007:13): [True: 0, False: 0]
  ------------------
 1008|      0|            memcpy(dest + *dest_len, rr->data + rr->off, n);
 1009|      0|            *dest_len += n;
 1010|      0|        }
 1011|       |        /*
 1012|       |         * We release the number of bytes consumed, or the whole record if it
 1013|       |         * is zero length
 1014|       |         */
 1015|      0|        if ((n > 0 || rr->length == 0) && !ssl_release_record(s, rr, n))
  ------------------
  |  Branch (1015:14): [True: 0, False: 0]
  |  Branch (1015:23): [True: 0, False: 0]
  |  Branch (1015:43): [True: 0, False: 0]
  ------------------
 1016|      0|            return -1;
 1017|       |
 1018|      0|        if (*dest_len < dest_maxlen)
  ------------------
  |  Branch (1018:13): [True: 0, False: 0]
  ------------------
 1019|      0|            goto start; /* fragment was too small */
 1020|      0|    }
 1021|       |
 1022|      0|    if (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (1022:9): [True: 0, False: 0]
  ------------------
 1023|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_CCS_RECEIVED_EARLY);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1024|      0|        return -1;
 1025|      0|    }
 1026|       |
 1027|       |    /*
 1028|       |     * Unexpected handshake message (ClientHello, NewSessionTicket (TLS1.3) or
 1029|       |     * protocol violation)
 1030|       |     */
 1031|      0|    if ((s->rlayer.handshake_fragment_len >= 4)
  ------------------
  |  Branch (1031:9): [True: 0, False: 0]
  ------------------
 1032|      0|        && !ossl_statem_get_in_handshake(s)) {
  ------------------
  |  Branch (1032:12): [True: 0, False: 0]
  ------------------
 1033|      0|        int ined = (s->early_data_state == SSL_EARLY_DATA_READING);
 1034|       |
 1035|       |        /* We found handshake data, so we're going back into init */
 1036|      0|        ossl_statem_set_in_init(s, 1);
 1037|       |
 1038|      0|        i = s->handshake_func(ssl);
 1039|       |        /* SSLfatal() already called if appropriate */
 1040|      0|        if (i < 0)
  ------------------
  |  Branch (1040:13): [True: 0, False: 0]
  ------------------
 1041|      0|            return i;
 1042|      0|        if (i == 0) {
  ------------------
  |  Branch (1042:13): [True: 0, False: 0]
  ------------------
 1043|      0|            return -1;
 1044|      0|        }
 1045|       |
 1046|       |        /*
 1047|       |         * If we were actually trying to read early data and we found a
 1048|       |         * handshake message, then we don't want to continue to try and read
 1049|       |         * the application data any more. It won't be "early" now.
 1050|       |         */
 1051|      0|        if (ined)
  ------------------
  |  Branch (1051:13): [True: 0, False: 0]
  ------------------
 1052|      0|            return -1;
 1053|       |
 1054|      0|        if (!(s->mode & SSL_MODE_AUTO_RETRY)) {
  ------------------
  |  |  530|      0|#define SSL_MODE_AUTO_RETRY 0x00000004U
  ------------------
  |  Branch (1054:13): [True: 0, False: 0]
  ------------------
 1055|      0|            if (!RECORD_LAYER_read_pending(&s->rlayer)) {
  ------------------
  |  Branch (1055:17): [True: 0, False: 0]
  ------------------
 1056|      0|                BIO *bio;
 1057|       |                /*
 1058|       |                 * In the case where we try to read application data, but we
 1059|       |                 * trigger an SSL handshake, we return -1 with the retry
 1060|       |                 * option set.  Otherwise renegotiation may cause nasty
 1061|       |                 * problems in the blocking world
 1062|       |                 */
 1063|      0|                s->rwstate = SSL_READING;
  ------------------
  |  |  957|      0|#define SSL_READING 3
  ------------------
 1064|      0|                bio = SSL_get_rbio(ssl);
 1065|      0|                BIO_clear_retry_flags(bio);
  ------------------
  |  |  272|      0|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|      0|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
 1066|      0|                BIO_set_retry_read(bio);
  ------------------
  |  |  266|      0|    BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |                   BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
 1067|      0|                return -1;
 1068|      0|            }
 1069|      0|        }
 1070|      0|        goto start;
 1071|      0|    }
 1072|       |
 1073|      0|    switch (rr->type) {
 1074|      0|    default:
  ------------------
  |  Branch (1074:5): [True: 0, False: 0]
  ------------------
 1075|       |        /*
 1076|       |         * TLS 1.0 and 1.1 say you SHOULD ignore unrecognised record types, but
 1077|       |         * TLS 1.2 says you MUST send an unexpected message alert. We use the
 1078|       |         * TLS 1.2 behaviour for all protocol versions to prevent issues where
 1079|       |         * no progress is being made and the peer continually sends unrecognised
 1080|       |         * record types, using up resources processing them.
 1081|       |         */
 1082|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_RECORD);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1083|      0|        return -1;
 1084|      0|    case SSL3_RT_CHANGE_CIPHER_SPEC:
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (1084:5): [True: 0, False: 0]
  ------------------
 1085|      0|    case SSL3_RT_ALERT:
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (1085:5): [True: 0, False: 0]
  ------------------
 1086|      0|    case SSL3_RT_HANDSHAKE:
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (1086:5): [True: 0, False: 0]
  ------------------
 1087|       |        /*
 1088|       |         * we already handled all of these, with the possible exception of
 1089|       |         * SSL3_RT_HANDSHAKE when ossl_statem_get_in_handshake(s) is true, but
 1090|       |         * that should not happen when type != rr->type
 1091|       |         */
 1092|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1093|      0|        return -1;
 1094|      0|    case SSL3_RT_APPLICATION_DATA:
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (1094:5): [True: 0, False: 0]
  ------------------
 1095|       |        /*
 1096|       |         * At this point, we were expecting handshake data, but have
 1097|       |         * application data.  If the library was running inside ssl3_read()
 1098|       |         * (i.e. in_read_app_data is set) and it makes sense to read
 1099|       |         * application data at this point (session renegotiation not yet
 1100|       |         * started), we will indulge it.
 1101|       |         */
 1102|      0|        if (ossl_statem_app_data_allowed(s)) {
  ------------------
  |  Branch (1102:13): [True: 0, False: 0]
  ------------------
 1103|      0|            s->s3.in_read_app_data = 2;
 1104|      0|            return -1;
 1105|      0|        } else if (ossl_statem_skip_early_data(s)) {
  ------------------
  |  Branch (1105:20): [True: 0, False: 0]
  ------------------
 1106|       |            /*
 1107|       |             * This can happen after a client sends a CH followed by early_data,
 1108|       |             * but the server responds with a HelloRetryRequest. The server
 1109|       |             * reads the next record from the client expecting to find a
 1110|       |             * plaintext ClientHello but gets a record which appears to be
 1111|       |             * application data. The trial decrypt "works" because null
 1112|       |             * decryption was applied. We just skip it and move on to the next
 1113|       |             * record.
 1114|       |             */
 1115|      0|            if (!ossl_early_data_count_ok(s, rr->length,
  ------------------
  |  Branch (1115:17): [True: 0, False: 0]
  ------------------
 1116|      0|                    EARLY_DATA_CIPHERTEXT_OVERHEAD, 0)) {
  ------------------
  |  |  626|      0|#define EARLY_DATA_CIPHERTEXT_OVERHEAD ((6 * (EVP_GCM_TLS_TAG_LEN + 1)) + 2)
  |  |  ------------------
  |  |  |  |  375|      0|#define EVP_GCM_TLS_TAG_LEN 16
  |  |  ------------------
  ------------------
 1117|       |                /* SSLfatal() already called */
 1118|      0|                return -1;
 1119|      0|            }
 1120|      0|            if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (1120:17): [True: 0, False: 0]
  ------------------
 1121|      0|                return -1;
 1122|      0|            goto start;
 1123|      0|        } else {
 1124|       |            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_RECORD);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1125|      0|            return -1;
 1126|      0|        }
 1127|      0|    }
 1128|      0|}
ssl_set_new_record_layer:
 1246|  13.9k|{
 1247|  13.9k|    OSSL_PARAM options[5], *opts = options;
 1248|  13.9k|    OSSL_PARAM settings[6], *set = settings;
 1249|  13.9k|    const OSSL_RECORD_METHOD **thismethod;
 1250|  13.9k|    OSSL_RECORD_LAYER **thisrl, *newrl = NULL;
 1251|  13.9k|    BIO *thisbio;
 1252|  13.9k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  13.9k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1253|  13.9k|    const OSSL_RECORD_METHOD *meth;
 1254|  13.9k|    int use_etm, stream_mac = 0, tlstree = 0;
 1255|  13.9k|    unsigned int maxfrag = (direction == OSSL_RECORD_DIRECTION_WRITE)
  ------------------
  |  |   43|  13.9k|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
  |  Branch (1255:28): [True: 6.96k, False: 6.96k]
  ------------------
 1256|  13.9k|        ? ssl_get_max_send_fragment(s)
 1257|  13.9k|        : SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  6.96k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 1258|  13.9k|    int use_early_data = 0;
 1259|  13.9k|    uint32_t max_early_data;
 1260|  13.9k|    COMP_METHOD *compm = (comp == NULL) ? NULL : comp->method;
  ------------------
  |  Branch (1260:26): [True: 13.9k, False: 0]
  ------------------
 1261|       |
 1262|  13.9k|    meth = ssl_select_next_record_layer(s, direction, level);
 1263|       |
 1264|  13.9k|    if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  13.9k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1264:9): [True: 6.96k, False: 6.96k]
  ------------------
 1265|  6.96k|        thismethod = &s->rlayer.rrlmethod;
 1266|  6.96k|        thisrl = &s->rlayer.rrl;
 1267|  6.96k|        thisbio = s->rbio;
 1268|  6.96k|    } else {
 1269|  6.96k|        thismethod = &s->rlayer.wrlmethod;
 1270|  6.96k|        thisrl = &s->rlayer.wrl;
 1271|  6.96k|        thisbio = s->wbio;
 1272|  6.96k|    }
 1273|       |
 1274|  13.9k|    if (meth == NULL)
  ------------------
  |  Branch (1274:9): [True: 0, False: 13.9k]
  ------------------
 1275|      0|        meth = *thismethod;
 1276|       |
 1277|  13.9k|    if (!ossl_assert(meth != NULL)) {
  ------------------
  |  |   52|  13.9k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  13.9k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1277:9): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    *opts++ = OSSL_PARAM_construct_uint64(OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS,
  ------------------
  |  |  340|  13.9k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS "options"
  ------------------
 1284|  13.9k|        &s->options);
 1285|  13.9k|    *opts++ = OSSL_PARAM_construct_uint32(OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE,
  ------------------
  |  |  339|  13.9k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
  ------------------
 1286|  13.9k|        &s->mode);
 1287|  13.9k|    if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  13.9k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1287:9): [True: 6.96k, False: 6.96k]
  ------------------
 1288|  6.96k|        *opts++ = OSSL_PARAM_construct_size_t(OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN,
  ------------------
  |  |  345|  6.96k|# define OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN "read_buffer_len"
  ------------------
 1289|  6.96k|            &s->rlayer.default_read_buf_len);
 1290|  6.96k|        *opts++ = OSSL_PARAM_construct_int(OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD,
  ------------------
  |  |  341|  6.96k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD "read_ahead"
  ------------------
 1291|  6.96k|            &s->rlayer.read_ahead);
 1292|  6.96k|    } else {
 1293|  6.96k|        *opts++ = OSSL_PARAM_construct_size_t(OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING,
  ------------------
  |  |  335|  6.96k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING "block_padding"
  ------------------
 1294|  6.96k|            &s->rlayer.block_padding);
 1295|  6.96k|        *opts++ = OSSL_PARAM_construct_size_t(OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING,
  ------------------
  |  |  336|  6.96k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING "hs_padding"
  ------------------
 1296|  6.96k|            &s->rlayer.hs_padding);
 1297|  6.96k|    }
 1298|  13.9k|    *opts = OSSL_PARAM_construct_end();
 1299|       |
 1300|       |    /* Parameters that *must* be supported by a record layer if passed */
 1301|  13.9k|    if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  13.9k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1301:9): [True: 6.96k, False: 6.96k]
  ------------------
 1302|  6.96k|        use_etm = SSL_READ_ETM(s) ? 1 : 0;
  ------------------
  |  |  308|  6.96k|#define SSL_READ_ETM(s) (s->s3.flags & TLS1_FLAGS_ENCRYPT_THEN_MAC_READ)
  |  |  ------------------
  |  |  |  |  296|  6.96k|#define TLS1_FLAGS_ENCRYPT_THEN_MAC_READ 0x0100
  |  |  ------------------
  |  |  |  Branch (308:25): [True: 0, False: 6.96k]
  |  |  ------------------
  ------------------
 1303|  6.96k|        if ((s->mac_flags & SSL_MAC_FLAG_READ_MAC_STREAM) != 0)
  ------------------
  |  |  974|  6.96k|#define SSL_MAC_FLAG_READ_MAC_STREAM 1
  ------------------
  |  Branch (1303:13): [True: 0, False: 6.96k]
  ------------------
 1304|      0|            stream_mac = 1;
 1305|       |
 1306|  6.96k|        if ((s->mac_flags & SSL_MAC_FLAG_READ_MAC_TLSTREE) != 0)
  ------------------
  |  |  976|  6.96k|#define SSL_MAC_FLAG_READ_MAC_TLSTREE 4
  ------------------
  |  Branch (1306:13): [True: 0, False: 6.96k]
  ------------------
 1307|      0|            tlstree = 1;
 1308|  6.96k|    } else {
 1309|  6.96k|        use_etm = SSL_WRITE_ETM(s) ? 1 : 0;
  ------------------
  |  |  309|  6.96k|#define SSL_WRITE_ETM(s) (s->s3.flags & TLS1_FLAGS_ENCRYPT_THEN_MAC_WRITE)
  |  |  ------------------
  |  |  |  |  302|  6.96k|#define TLS1_FLAGS_ENCRYPT_THEN_MAC_WRITE 0x0400
  |  |  ------------------
  |  |  |  Branch (309:26): [True: 0, False: 6.96k]
  |  |  ------------------
  ------------------
 1310|  6.96k|        if ((s->mac_flags & SSL_MAC_FLAG_WRITE_MAC_STREAM) != 0)
  ------------------
  |  |  975|  6.96k|#define SSL_MAC_FLAG_WRITE_MAC_STREAM 2
  ------------------
  |  Branch (1310:13): [True: 0, False: 6.96k]
  ------------------
 1311|      0|            stream_mac = 1;
 1312|       |
 1313|  6.96k|        if ((s->mac_flags & SSL_MAC_FLAG_WRITE_MAC_TLSTREE) != 0)
  ------------------
  |  |  977|  6.96k|#define SSL_MAC_FLAG_WRITE_MAC_TLSTREE 8
  ------------------
  |  Branch (1313:13): [True: 0, False: 6.96k]
  ------------------
 1314|      0|            tlstree = 1;
 1315|  6.96k|    }
 1316|       |
 1317|  13.9k|    if (use_etm)
  ------------------
  |  Branch (1317:9): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    if (stream_mac)
  ------------------
  |  Branch (1321:9): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    if (tlstree)
  ------------------
  |  Branch (1325:9): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    if (direction == OSSL_RECORD_DIRECTION_READ
  ------------------
  |  |   42|  27.8k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1333:9): [True: 6.96k, False: 6.96k]
  ------------------
 1334|  6.96k|        && s->session != NULL
  ------------------
  |  Branch (1334:12): [True: 0, False: 6.96k]
  ------------------
 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|  13.9k|    if (maxfrag != SSL3_RT_MAX_PLAIN_LENGTH)
  ------------------
  |  |  177|  13.9k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (1338:9): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    if (s->server && direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|      0|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1347:9): [True: 0, False: 13.9k]
  |  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|  13.9k|    } else if (!s->server && direction == OSSL_RECORD_DIRECTION_WRITE) {
  ------------------
  |  |   43|  13.9k|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
  |  Branch (1350:16): [True: 13.9k, False: 0]
  |  Branch (1350:30): [True: 6.96k, False: 6.96k]
  ------------------
 1351|  6.96k|        use_early_data = (level == OSSL_RECORD_PROTECTION_LEVEL_EARLY);
  ------------------
  |  | 2924|  6.96k|#define OSSL_RECORD_PROTECTION_LEVEL_EARLY 1
  ------------------
 1352|  6.96k|    }
 1353|  13.9k|    if (use_early_data) {
  ------------------
  |  Branch (1353:9): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|    *set = OSSL_PARAM_construct_end();
 1362|       |
 1363|  13.9k|    for (;;) {
 1364|  13.9k|        int rlret;
 1365|  13.9k|        BIO *prev = NULL;
 1366|  13.9k|        BIO *next = NULL;
 1367|  13.9k|        unsigned int epoch = 0;
 1368|  13.9k|        OSSL_DISPATCH rlayer_dispatch_tmp[OSSL_NELEM(rlayer_dispatch)];
 1369|  13.9k|        size_t i, j;
 1370|       |
 1371|  13.9k|        if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  13.9k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1371:13): [True: 6.96k, False: 6.96k]
  ------------------
 1372|  6.96k|            prev = s->rlayer.rrlnext;
 1373|  6.96k|            if (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  13.9k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  6.96k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  6.96k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 6.96k]
  |  |  ------------------
  ------------------
 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|  6.96k|#ifndef OPENSSL_NO_DGRAM
 1378|  6.96k|            if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|  6.96k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  6.96k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  6.96k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 6.96k]
  |  |  ------------------
  ------------------
 1379|      0|                next = BIO_new(BIO_s_dgram_mem());
 1380|  6.96k|            else
 1381|  6.96k|#endif
 1382|  6.96k|                next = BIO_new(BIO_s_mem());
 1383|       |
 1384|  6.96k|            if (next == NULL) {
  ------------------
  |  Branch (1384:17): [True: 0, False: 6.96k]
  ------------------
 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|  6.96k|            s->rlayer.rrlnext = next;
 1389|  6.96k|        } else {
 1390|  6.96k|            if (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  13.9k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  6.96k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  6.96k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 6.96k]
  |  |  ------------------
  ------------------
 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|  6.96k|        }
 1394|       |
 1395|       |        /*
 1396|       |         * Create a copy of the dispatch array, missing out wrappers for
 1397|       |         * callbacks that we don't need.
 1398|       |         */
 1399|  83.5k|        for (i = 0, j = 0; i < OSSL_NELEM(rlayer_dispatch); i++) {
  ------------------
  |  |   14|  83.5k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1399:28): [True: 69.6k, False: 13.9k]
  ------------------
 1400|  69.6k|            switch (rlayer_dispatch[i].function_id) {
 1401|  13.9k|            case OSSL_FUNC_RLAYER_MSG_CALLBACK:
  ------------------
  |  |  186|  13.9k|#define OSSL_FUNC_RLAYER_MSG_CALLBACK 2
  ------------------
  |  Branch (1401:13): [True: 13.9k, False: 55.7k]
  ------------------
 1402|  13.9k|                if (s->msg_callback == NULL)
  ------------------
  |  Branch (1402:21): [True: 13.9k, False: 0]
  ------------------
 1403|  13.9k|                    continue;
 1404|      0|                break;
 1405|  13.9k|            case OSSL_FUNC_RLAYER_PADDING:
  ------------------
  |  |  190|  13.9k|#define OSSL_FUNC_RLAYER_PADDING 4
  ------------------
  |  Branch (1405:13): [True: 13.9k, False: 55.7k]
  ------------------
 1406|  13.9k|                if (s->rlayer.record_padding_cb == NULL)
  ------------------
  |  Branch (1406:21): [True: 13.9k, False: 0]
  ------------------
 1407|  13.9k|                    continue;
 1408|      0|                break;
 1409|  41.7k|            default:
  ------------------
  |  Branch (1409:13): [True: 41.7k, False: 27.8k]
  ------------------
 1410|  41.7k|                break;
 1411|  69.6k|            }
 1412|  41.7k|            rlayer_dispatch_tmp[j++] = rlayer_dispatch[i];
 1413|  41.7k|        }
 1414|       |
 1415|  13.9k|        rlret = meth->new_record_layer(sctx->libctx, sctx->propq, version,
 1416|  13.9k|            s->server, direction, level, epoch,
 1417|  13.9k|            secret, secretlen, key, keylen, iv,
 1418|  13.9k|            ivlen, mackey, mackeylen, ciph, taglen,
 1419|  13.9k|            mactype, md, compm, kdfdigest, prev,
 1420|  13.9k|            thisbio, next, NULL, NULL, settings,
 1421|  13.9k|            options, rlayer_dispatch_tmp, s,
 1422|  13.9k|            s->rlayer.rlarg, &newrl);
 1423|  13.9k|        BIO_free(prev);
 1424|  13.9k|        switch (rlret) {
 1425|      0|        case OSSL_RECORD_RETURN_FATAL:
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  |  Branch (1425:9): [True: 0, False: 13.9k]
  ------------------
 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: 13.9k]
  ------------------
 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|  13.9k|        case OSSL_RECORD_RETURN_SUCCESS:
  ------------------
  |  |   45|  13.9k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1441:9): [True: 13.9k, False: 0]
  ------------------
 1442|  13.9k|            break;
 1443|       |
 1444|      0|        default:
  ------------------
  |  Branch (1444:9): [True: 0, False: 13.9k]
  ------------------
 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|  13.9k|        }
 1449|  13.9k|        break;
 1450|  13.9k|    }
 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|  13.9k|    if (!SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  27.8k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  13.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  13.9k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (1459:9): [True: 13.9k, False: 0]
  ------------------
 1460|      0|        || direction == OSSL_RECORD_DIRECTION_READ
  ------------------
  |  |   42|  13.9k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1460:12): [True: 0, False: 0]
  ------------------
 1461|  13.9k|        || pqueue_peek(s->d1->sent_messages) == NULL) {
  ------------------
  |  Branch (1461:12): [True: 0, False: 0]
  ------------------
 1462|  13.9k|        if (*thismethod != NULL && !(*thismethod)->free(*thisrl)) {
  ------------------
  |  Branch (1462:13): [True: 0, False: 13.9k]
  |  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|  13.9k|    }
 1467|       |
 1468|  13.9k|    *thisrl = newrl;
 1469|  13.9k|    *thismethod = meth;
 1470|       |
 1471|  13.9k|    return ssl_post_record_layer_select(s, direction);
 1472|  13.9k|}
ssl_set_record_protocol_version:
 1475|     50|{
 1476|     50|    if (!ossl_assert(s->rlayer.rrlmethod != NULL)
  ------------------
  |  |   52|    100|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    100|    __FILE__, __LINE__)
  ------------------
  |  Branch (1476:9): [True: 0, False: 50]
  ------------------
 1477|     50|        || !ossl_assert(s->rlayer.wrlmethod != NULL))
  ------------------
  |  |   52|     50|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     50|    __FILE__, __LINE__)
  ------------------
  |  Branch (1477:12): [True: 0, False: 50]
  ------------------
 1478|      0|        return 0;
 1479|     50|    s->rlayer.rrlmethod->set_protocol_version(s->rlayer.rrl, s->version);
 1480|     50|    s->rlayer.wrlmethod->set_protocol_version(s->rlayer.wrl, s->version);
 1481|       |
 1482|     50|    return 1;
 1483|     50|}
rec_layer_s3.c:tls_write_check_pending:
  254|  2.22k|{
  255|  2.22k|    if (s->rlayer.wpend_tot == 0)
  ------------------
  |  Branch (255:9): [True: 2.22k, False: 0]
  ------------------
  256|  2.22k|        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|  13.9k|{
 1182|  13.9k|    if (s->rlayer.custom_rlmethod != NULL)
  ------------------
  |  Branch (1182:9): [True: 0, False: 13.9k]
  ------------------
 1183|      0|        return s->rlayer.custom_rlmethod;
 1184|       |
 1185|  13.9k|    if (level == OSSL_RECORD_PROTECTION_LEVEL_NONE) {
  ------------------
  |  | 2923|  13.9k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (1185:9): [True: 13.9k, False: 0]
  ------------------
 1186|  13.9k|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|  13.9k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  13.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  13.9k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 13.9k]
  |  |  ------------------
  ------------------
 1187|      0|            return &ossl_dtls_record_method;
 1188|       |
 1189|  13.9k|        return &ossl_tls_record_method;
 1190|  13.9k|    }
 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|  13.9k|}
rec_layer_s3.c:ssl_post_record_layer_select:
 1206|  13.9k|{
 1207|  13.9k|    const OSSL_RECORD_METHOD *thismethod;
 1208|  13.9k|    OSSL_RECORD_LAYER *thisrl;
 1209|       |
 1210|  13.9k|    if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  13.9k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1210:9): [True: 6.96k, False: 6.96k]
  ------------------
 1211|  6.96k|        thismethod = s->rlayer.rrlmethod;
 1212|  6.96k|        thisrl = s->rlayer.rrl;
 1213|  6.96k|    } else {
 1214|  6.96k|        thismethod = s->rlayer.wrlmethod;
 1215|  6.96k|        thisrl = s->rlayer.wrl;
 1216|  6.96k|    }
 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|  13.9k|    if (SSL_IS_FIRST_HANDSHAKE(s) && thismethod->set_first_handshake != NULL)
  ------------------
  |  |  285|  27.8k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 13.9k, False: 0]
  |  |  ------------------
  |  |  286|  27.8k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1228:38): [True: 13.9k, False: 0]
  ------------------
 1229|  13.9k|        thismethod->set_first_handshake(thisrl, 1);
 1230|       |
 1231|  13.9k|    if (s->max_pipelines != 0 && thismethod->set_max_pipelines != NULL)
  ------------------
  |  Branch (1231:9): [True: 0, False: 13.9k]
  |  Branch (1231:34): [True: 0, False: 0]
  ------------------
 1232|      0|        thismethod->set_max_pipelines(thisrl, s->max_pipelines);
 1233|       |
 1234|  13.9k|    return 1;
 1235|  13.9k|}

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

ssl_sort_cipher_list:
 3766|      1|{
 3767|      1|    qsort(tls13_ciphers, TLS13_NUM_CIPHERS, sizeof(tls13_ciphers[0]),
  ------------------
  |  |   27|      1|#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|      1|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3768|      1|        cipher_compare);
 3769|      1|    qsort(ssl3_ciphers, SSL3_NUM_CIPHERS, sizeof(ssl3_ciphers[0]),
  ------------------
  |  |   28|      1|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|      1|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3770|      1|        cipher_compare);
 3771|      1|    qsort(ssl3_scsvs, SSL3_NUM_SCSVS, sizeof(ssl3_scsvs[0]), cipher_compare);
  ------------------
  |  |   29|      1|#define SSL3_NUM_SCSVS OSSL_NELEM(ssl3_scsvs)
  |  |  ------------------
  |  |  |  |   14|      1|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3772|      1|}
ssl3_num_ciphers:
 3775|  4.39k|{
 3776|  4.39k|    return SSL3_NUM_CIPHERS;
  ------------------
  |  |   28|  4.39k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|  4.39k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3777|  4.39k|}
ssl3_get_cipher:
 3780|   751k|{
 3781|   751k|    if (u < SSL3_NUM_CIPHERS)
  ------------------
  |  |   28|   751k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|   751k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  |  Branch (3781:9): [True: 751k, False: 0]
  ------------------
 3782|   751k|        return &(ssl3_ciphers[SSL3_NUM_CIPHERS - 1 - u]);
  ------------------
  |  |   28|   751k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|   751k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3783|      0|    else
 3784|      0|        return NULL;
 3785|   751k|}
ssl3_set_handshake_header:
 3788|  2.31k|{
 3789|       |    /* No header in the event of a CCS */
 3790|  2.31k|    if (htype == SSL3_MT_CHANGE_CIPHER_SPEC)
  ------------------
  |  |  337|  2.31k|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (3790:9): [True: 0, False: 2.31k]
  ------------------
 3791|      0|        return 1;
 3792|       |
 3793|       |    /* Set the content type and 3 bytes for the message len */
 3794|  2.31k|    if (!WPACKET_put_bytes_u8(pkt, htype)
  ------------------
  |  |  909|  4.62k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (3794:9): [True: 0, False: 2.31k]
  ------------------
 3795|  2.31k|        || !WPACKET_start_sub_packet_u24(pkt))
  ------------------
  |  |  814|  2.31k|    WPACKET_start_sub_packet_len__((pkt), 3)
  ------------------
  |  Branch (3795:12): [True: 0, False: 2.31k]
  ------------------
 3796|      0|        return 0;
 3797|       |
 3798|  2.31k|    return 1;
 3799|  2.31k|}
ssl3_handshake_write:
 3802|  2.22k|{
 3803|  2.22k|    return ssl3_do_write(s, SSL3_RT_HANDSHAKE);
  ------------------
  |  |  221|  2.22k|#define SSL3_RT_HANDSHAKE 22
  ------------------
 3804|  2.22k|}
ssl3_new:
 3807|  2.32k|{
 3808|  2.32k|#ifndef OPENSSL_NO_SRP
 3809|  2.32k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.32k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.32k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.32k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.32k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.32k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.32k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.32k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.32k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3810|       |
 3811|  2.32k|    if (sc == NULL)
  ------------------
  |  Branch (3811:9): [True: 0, False: 2.32k]
  ------------------
 3812|      0|        return 0;
 3813|       |
 3814|  2.32k|    if (!ssl_srp_ctx_init_intern(sc))
  ------------------
  |  Branch (3814:9): [True: 0, False: 2.32k]
  ------------------
 3815|      0|        return 0;
 3816|  2.32k|#endif
 3817|       |
 3818|  2.32k|    if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (3818:9): [True: 0, False: 2.32k]
  ------------------
 3819|      0|        return 0;
 3820|       |
 3821|  2.32k|    return 1;
 3822|  2.32k|}
ssl3_free:
 3825|  2.32k|{
 3826|  2.32k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.32k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.32k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.32k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.32k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.32k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.32k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.32k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.32k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3827|  2.32k|    size_t i;
 3828|       |
 3829|  2.32k|    if (sc == NULL)
  ------------------
  |  Branch (3829:9): [True: 0, False: 2.32k]
  ------------------
 3830|      0|        return;
 3831|       |
 3832|  2.32k|    ssl3_cleanup_key_block(sc);
 3833|       |
 3834|  2.32k|    EVP_PKEY_free(sc->s3.peer_tmp);
 3835|  2.32k|    sc->s3.peer_tmp = NULL;
 3836|       |
 3837|  6.48k|    for (i = 0; i < sc->s3.tmp.num_ks_pkey; i++)
  ------------------
  |  Branch (3837:17): [True: 4.16k, False: 2.32k]
  ------------------
 3838|  4.16k|        if (sc->s3.tmp.ks_pkey[i] != NULL) {
  ------------------
  |  Branch (3838:13): [True: 4.16k, False: 0]
  ------------------
 3839|  4.16k|            if (sc->s3.tmp.pkey == sc->s3.tmp.ks_pkey[i])
  ------------------
  |  Branch (3839:17): [True: 2.17k, False: 1.98k]
  ------------------
 3840|  2.17k|                sc->s3.tmp.pkey = NULL;
 3841|       |
 3842|  4.16k|            EVP_PKEY_free(sc->s3.tmp.ks_pkey[i]);
 3843|  4.16k|            sc->s3.tmp.ks_pkey[i] = NULL;
 3844|  4.16k|        }
 3845|  2.32k|    sc->s3.tmp.num_ks_pkey = 0;
 3846|       |
 3847|  2.32k|    if (sc->s3.tmp.pkey != NULL) {
  ------------------
  |  Branch (3847:9): [True: 0, False: 2.32k]
  ------------------
 3848|      0|        EVP_PKEY_free(sc->s3.tmp.pkey);
 3849|      0|        sc->s3.tmp.pkey = NULL;
 3850|      0|    }
 3851|       |
 3852|  2.32k|    ssl_evp_cipher_free(sc->s3.tmp.new_sym_enc);
 3853|  2.32k|    ssl_evp_md_free(sc->s3.tmp.new_hash);
 3854|       |
 3855|  2.32k|    OPENSSL_free(sc->s3.tmp.ctype);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3856|  2.32k|    sk_X509_NAME_pop_free(sc->s3.tmp.peer_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  2.32k|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 3857|  2.32k|    OPENSSL_free(sc->s3.tmp.ciphers_raw);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3858|  2.32k|    OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen);
  ------------------
  |  |  130|  2.32k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3859|  2.32k|    OPENSSL_free(sc->s3.tmp.peer_sigalgs);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3860|  2.32k|    OPENSSL_free(sc->s3.tmp.peer_cert_sigalgs);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3861|  2.32k|    OPENSSL_free(sc->s3.tmp.valid_flags);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3862|  2.32k|    ssl3_free_digest_list(sc);
 3863|  2.32k|    OPENSSL_free(sc->s3.alpn_selected);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3864|  2.32k|    OPENSSL_free(sc->s3.alpn_proposed);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3865|  2.32k|    ossl_quic_tls_free(sc->qtls);
 3866|       |
 3867|  2.32k|#ifndef OPENSSL_NO_PSK
 3868|  2.32k|    OPENSSL_free(sc->s3.tmp.psk);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3869|  2.32k|#endif
 3870|       |
 3871|  2.32k|#ifndef OPENSSL_NO_SRP
 3872|  2.32k|    ssl_srp_ctx_free_intern(sc);
 3873|  2.32k|#endif
 3874|  2.32k|    memset(&sc->s3, 0, sizeof(sc->s3));
 3875|  2.32k|}
ssl3_clear:
 3878|  9.28k|{
 3879|  9.28k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  9.28k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  9.28k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 9.28k]
  |  |  |  |  ------------------
  |  |  |  |   33|  9.28k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  9.28k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 9.28k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  9.28k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  9.28k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3880|  9.28k|    int flags;
 3881|  9.28k|    size_t i;
 3882|       |
 3883|  9.28k|    if (sc == NULL)
  ------------------
  |  Branch (3883:9): [True: 0, False: 9.28k]
  ------------------
 3884|      0|        return 0;
 3885|       |
 3886|  9.28k|    ssl3_cleanup_key_block(sc);
 3887|  9.28k|    OPENSSL_free(sc->s3.tmp.ctype);
  ------------------
  |  |  132|  9.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__
  |  |  ------------------
  ------------------
 3888|  9.28k|    sk_X509_NAME_pop_free(sc->s3.tmp.peer_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  9.28k|#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|  9.28k|    OPENSSL_free(sc->s3.tmp.ciphers_raw);
  ------------------
  |  |  132|  9.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__
  |  |  ------------------
  ------------------
 3890|  9.28k|    OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen);
  ------------------
  |  |  130|  9.28k|    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|  9.28k|    OPENSSL_free(sc->s3.tmp.peer_sigalgs);
  ------------------
  |  |  132|  9.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__
  |  |  ------------------
  ------------------
 3892|  9.28k|    OPENSSL_free(sc->s3.tmp.peer_cert_sigalgs);
  ------------------
  |  |  132|  9.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__
  |  |  ------------------
  ------------------
 3893|  9.28k|    OPENSSL_free(sc->s3.tmp.valid_flags);
  ------------------
  |  |  132|  9.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__
  |  |  ------------------
  ------------------
 3894|       |
 3895|  9.28k|    EVP_PKEY_free(sc->s3.peer_tmp);
 3896|       |
 3897|  9.28k|    for (i = 0; i < sc->s3.tmp.num_ks_pkey; i++)
  ------------------
  |  Branch (3897:17): [True: 0, False: 9.28k]
  ------------------
 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|  9.28k|    sc->s3.tmp.num_ks_pkey = 0;
 3906|       |
 3907|  9.28k|    if (sc->s3.tmp.pkey != NULL) {
  ------------------
  |  Branch (3907:9): [True: 0, False: 9.28k]
  ------------------
 3908|      0|        EVP_PKEY_free(sc->s3.tmp.pkey);
 3909|      0|        sc->s3.tmp.pkey = NULL;
 3910|      0|    }
 3911|       |
 3912|  9.28k|    ssl3_free_digest_list(sc);
 3913|       |
 3914|  9.28k|    OPENSSL_free(sc->s3.alpn_selected);
  ------------------
  |  |  132|  9.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__
  |  |  ------------------
  ------------------
 3915|  9.28k|    OPENSSL_free(sc->s3.alpn_proposed);
  ------------------
  |  |  132|  9.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__
  |  |  ------------------
  ------------------
 3916|       |
 3917|       |    /*
 3918|       |     * NULL/zero-out everything in the s3 struct, but remember if we are doing
 3919|       |     * QUIC.
 3920|       |     */
 3921|  9.28k|    flags = sc->s3.flags & (TLS1_FLAGS_QUIC | TLS1_FLAGS_QUIC_INTERNAL);
  ------------------
  |  |   22|  9.28k|#define TLS1_FLAGS_QUIC 0x2000
  ------------------
                  flags = sc->s3.flags & (TLS1_FLAGS_QUIC | TLS1_FLAGS_QUIC_INTERNAL);
  ------------------
  |  |   24|  9.28k|#define TLS1_FLAGS_QUIC_INTERNAL 0x4000
  ------------------
 3922|  9.28k|    memset(&sc->s3, 0, sizeof(sc->s3));
 3923|  9.28k|    sc->s3.flags |= flags;
 3924|       |
 3925|  9.28k|    if (!ssl_free_wbio_buffer(sc))
  ------------------
  |  Branch (3925:9): [True: 0, False: 9.28k]
  ------------------
 3926|      0|        return 0;
 3927|       |
 3928|  9.28k|    sc->version = TLS1_VERSION;
  ------------------
  |  |   24|  9.28k|#define TLS1_VERSION 0x0301
  ------------------
 3929|       |
 3930|  9.28k|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 3931|  9.28k|    OPENSSL_free(sc->ext.npn);
  ------------------
  |  |  132|  9.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__
  |  |  ------------------
  ------------------
 3932|  9.28k|    sc->ext.npn = NULL;
 3933|  9.28k|    sc->ext.npn_len = 0;
 3934|  9.28k|#endif
 3935|       |
 3936|  9.28k|    return 1;
 3937|  9.28k|}
ssl3_ctrl:
 3954|    943|{
 3955|    943|    int ret = 0;
 3956|    943|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|    943|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|    943|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 943]
  |  |  |  |  ------------------
  |  |  |  |   33|    943|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|    943|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 943, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|    943|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|    943|                             : (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|    943|#ifndef OPENSSL_NO_OCSP
 3958|    943|    unsigned char *p = NULL;
 3959|    943|    OCSP_RESPONSE *resp = NULL;
 3960|    943|#endif
 3961|       |
 3962|    943|    if (sc == NULL)
  ------------------
  |  Branch (3962:9): [True: 0, False: 943]
  ------------------
 3963|      0|        return ret;
 3964|       |
 3965|    943|    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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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|    941|    case SSL_CTRL_SET_TLSEXT_HOSTNAME:
  ------------------
  |  | 1341|    941|#define SSL_CTRL_SET_TLSEXT_HOSTNAME 55
  ------------------
  |  Branch (4022:5): [True: 941, 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|    941|        if (larg == TLSEXT_NAMETYPE_host_name) {
  ------------------
  |  |  179|    941|#define TLSEXT_NAMETYPE_host_name 0
  ------------------
  |  Branch (4031:13): [True: 941, False: 0]
  ------------------
 4032|    941|            size_t len;
 4033|       |
 4034|    941|            OPENSSL_free(sc->ext.hostname);
  ------------------
  |  |  132|    941|    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|    941|            sc->ext.hostname = NULL;
 4036|       |
 4037|    941|            ret = 1;
 4038|    941|            if (parg == NULL)
  ------------------
  |  Branch (4038:17): [True: 0, False: 941]
  ------------------
 4039|      0|                break;
 4040|    941|            len = strlen((char *)parg);
 4041|    941|            if (len == 0 || len > TLSEXT_MAXLEN_host_name) {
  ------------------
  |  |  256|    941|#define TLSEXT_MAXLEN_host_name 255
  ------------------
  |  Branch (4041:17): [True: 0, False: 941]
  |  Branch (4041:29): [True: 1, False: 940]
  ------------------
 4042|      1|                ERR_raise(ERR_LIB_SSL, SSL_R_TLS_EXT_INVALID_SERVERNAME);
  ------------------
  |  |  357|      1|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      1|    (ERR_new(),                                                  \
  |  |  |  |  360|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      1|        ERR_set_error)
  |  |  ------------------
  ------------------
 4043|      1|                return 0;
 4044|      1|            }
 4045|    940|            if ((sc->ext.hostname = OPENSSL_strdup((char *)parg)) == NULL) {
  ------------------
  |  |  136|    940|    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: 940]
  ------------------
 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|    940|        } 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|    940|        break;
 4054|    940|    case SSL_CTRL_SET_TLSEXT_DEBUG_ARG:
  ------------------
  |  | 1343|      0|#define SSL_CTRL_SET_TLSEXT_DEBUG_ARG 57
  ------------------
  |  Branch (4054:5): [True: 0, False: 943]
  ------------------
 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: 943]
  ------------------
 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: 941]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 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: 943]
  ------------------
 4373|      0|        sc->msg_callback_arg = parg;
 4374|      0|        return 1;
 4375|       |
 4376|      0|    default:
  ------------------
  |  Branch (4376:5): [True: 0, False: 943]
  ------------------
 4377|      0|        break;
 4378|    943|    }
 4379|    942|    return ret;
 4380|    943|}
ssl3_ctx_ctrl:
 4418|  3.62k|{
 4419|  3.62k|    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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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|  3.62k|    case SSL_CTRL_SET_GROUPS_LIST:
  ------------------
  |  | 1379|  3.62k|#define SSL_CTRL_SET_GROUPS_LIST 92
  ------------------
  |  Branch (4559:5): [True: 3.62k, False: 0]
  ------------------
 4560|  3.62k|        return tls1_set_groups_list(ctx,
 4561|  3.62k|            &ctx->ext.supportedgroups,
 4562|  3.62k|            &ctx->ext.supportedgroups_len,
 4563|  3.62k|            &ctx->ext.keyshares,
 4564|  3.62k|            &ctx->ext.keyshares_len,
 4565|  3.62k|            &ctx->ext.tuples,
 4566|  3.62k|            &ctx->ext.tuples_len,
 4567|  3.62k|            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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 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: 3.62k]
  ------------------
 4651|      0|        return ssl_cert_set_current(ctx->cert, larg);
 4652|       |
 4653|      0|    default:
  ------------------
  |  Branch (4653:5): [True: 0, False: 3.62k]
  ------------------
 4654|      0|        return 0;
 4655|  3.62k|    }
 4656|      0|    return 1;
 4657|  3.62k|}
ssl3_get_cipher_by_id:
 4714|     46|{
 4715|     46|    SSL_CIPHER c;
 4716|     46|    const SSL_CIPHER *cp;
 4717|       |
 4718|     46|    c.id = id;
 4719|     46|    cp = OBJ_bsearch_ssl_cipher_id(&c, tls13_ciphers, TLS13_NUM_CIPHERS);
  ------------------
  |  |   27|     46|#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|     46|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4720|     46|    if (cp != NULL)
  ------------------
  |  Branch (4720:9): [True: 4, False: 42]
  ------------------
 4721|      4|        return cp;
 4722|     42|    cp = OBJ_bsearch_ssl_cipher_id(&c, ssl3_ciphers, SSL3_NUM_CIPHERS);
  ------------------
  |  |   28|     42|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|     42|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4723|     42|    if (cp != NULL)
  ------------------
  |  Branch (4723:9): [True: 8, False: 34]
  ------------------
 4724|      8|        return cp;
 4725|     34|    return OBJ_bsearch_ssl_cipher_id(&c, ssl3_scsvs, SSL3_NUM_SCSVS);
  ------------------
  |  |   29|     34|#define SSL3_NUM_SCSVS OSSL_NELEM(ssl3_scsvs)
  |  |  ------------------
  |  |  |  |   14|     34|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4726|     42|}
ssl3_get_tls13_cipher_by_std_name:
 4729|  15.3k|{
 4730|  15.3k|    SSL_CIPHER *end = &tls13_ciphers[TLS13_NUM_CIPHERS];
  ------------------
  |  |   27|  15.3k|#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|  15.3k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4731|       |
 4732|       |    /* this is not efficient, necessary to optimize this? */
 4733|  97.4k|    for (SSL_CIPHER *c = tls13_ciphers; c < end; ++c) {
  ------------------
  |  Branch (4733:41): [True: 91.5k, False: 5.95k]
  ------------------
 4734|  91.5k|        if (c->stdname == NULL)
  ------------------
  |  Branch (4734:13): [True: 0, False: 91.5k]
  ------------------
 4735|      0|            continue;
 4736|  91.5k|        if (OPENSSL_strcasecmp(stdname, c->stdname) == 0)
  ------------------
  |  Branch (4736:13): [True: 9.44k, False: 82.0k]
  ------------------
 4737|  9.44k|            return c;
 4738|  91.5k|    }
 4739|  5.95k|    return NULL;
 4740|  15.3k|}
ssl3_get_cipher_by_char:
 4766|     46|{
 4767|     46|    return ssl3_get_cipher_by_id(SSL3_CK_CIPHERSUITE_FLAG
  ------------------
  |  |  262|     46|#define SSL3_CK_CIPHERSUITE_FLAG 0x03000000
  ------------------
 4768|     46|        | ((uint32_t)p[0] << 8L)
 4769|     46|        | (uint32_t)p[1]);
 4770|     46|}
ssl3_put_cipher_by_char:
 4773|  67.9k|{
 4774|  67.9k|    if ((c->id & 0xff000000) != SSL3_CK_CIPHERSUITE_FLAG) {
  ------------------
  |  |  262|  67.9k|#define SSL3_CK_CIPHERSUITE_FLAG 0x03000000
  ------------------
  |  Branch (4774:9): [True: 0, False: 67.9k]
  ------------------
 4775|      0|        *len = 0;
 4776|      0|        return 1;
 4777|      0|    }
 4778|       |
 4779|  67.9k|    if (!WPACKET_put_bytes_u16(pkt, c->id & 0xffff))
  ------------------
  |  |  911|  67.9k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (4779:9): [True: 0, False: 67.9k]
  ------------------
 4780|      0|        return 0;
 4781|       |
 4782|  67.9k|    *len = 2;
 4783|  67.9k|    return 1;
 4784|  67.9k|}
ssl3_renegotiate_check:
 5199|  2.74k|{
 5200|  2.74k|    int ret = 0;
 5201|  2.74k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  2.74k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  2.74k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 2.74k]
  |  |  |  |  ------------------
  |  |  |  |   18|  2.74k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.74k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 2.74k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  2.74k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  2.74k|                             : NULL))
  |  |  ------------------
  ------------------
 5202|       |
 5203|  2.74k|    if (sc == NULL)
  ------------------
  |  Branch (5203:9): [True: 0, False: 2.74k]
  ------------------
 5204|      0|        return 0;
 5205|       |
 5206|  2.74k|    if (sc->s3.renegotiate) {
  ------------------
  |  Branch (5206:9): [True: 0, False: 2.74k]
  ------------------
 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|  2.74k|    return ret;
 5223|  2.74k|}
ssl_fill_hello_random:
 5256|  2.31k|{
 5257|  2.31k|    int send_time = 0, ret;
 5258|       |
 5259|  2.31k|    if (len < 4)
  ------------------
  |  Branch (5259:9): [True: 0, False: 2.31k]
  ------------------
 5260|      0|        return 0;
 5261|  2.31k|    if (server)
  ------------------
  |  Branch (5261:9): [True: 0, False: 2.31k]
  ------------------
 5262|      0|        send_time = (s->mode & SSL_MODE_SEND_SERVERHELLO_TIME) != 0;
  ------------------
  |  |  544|      0|#define SSL_MODE_SEND_SERVERHELLO_TIME 0x00000040U
  ------------------
 5263|  2.31k|    else
 5264|  2.31k|        send_time = (s->mode & SSL_MODE_SEND_CLIENTHELLO_TIME) != 0;
  ------------------
  |  |  543|  2.31k|#define SSL_MODE_SEND_CLIENTHELLO_TIME 0x00000020U
  ------------------
 5265|  2.31k|    if (send_time) {
  ------------------
  |  Branch (5265:9): [True: 0, False: 2.31k]
  ------------------
 5266|      0|        unsigned long Time = (unsigned long)time(NULL);
 5267|      0|        unsigned char *p = result;
 5268|       |
 5269|      0|        l2n(Time, p);
  ------------------
  |  |  153|      0|#define l2n(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  154|      0|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                \
  |  |  155|      0|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                 \
  |  |  156|      0|    *((c)++) = (unsigned char)(((l)) & 0xff))
  ------------------
 5270|      0|        ret = RAND_bytes_ex(SSL_CONNECTION_GET_CTX(s)->libctx, p, len - 4, 0);
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5271|  2.31k|    } else {
 5272|  2.31k|        ret = RAND_bytes_ex(SSL_CONNECTION_GET_CTX(s)->libctx, result, len, 0);
  ------------------
  |  |   26|  2.31k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5273|  2.31k|    }
 5274|       |
 5275|  2.31k|    if (ret > 0) {
  ------------------
  |  Branch (5275:9): [True: 2.31k, False: 0]
  ------------------
 5276|  2.31k|        if (!ossl_assert(sizeof(tls11downgrade) < len)
  ------------------
  |  |   52|  4.62k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  4.62k|    __FILE__, __LINE__)
  ------------------
  |  Branch (5276:13): [True: 0, False: 2.31k]
  ------------------
 5277|  2.31k|            || !ossl_assert(sizeof(tls12downgrade) < len))
  ------------------
  |  |   52|  2.31k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.31k|    __FILE__, __LINE__)
  ------------------
  |  Branch (5277:16): [True: 0, False: 2.31k]
  ------------------
 5278|      0|            return 0;
 5279|  2.31k|        if (dgrd == DOWNGRADE_TO_1_2)
  ------------------
  |  Branch (5279:13): [True: 0, False: 2.31k]
  ------------------
 5280|      0|            memcpy(result + len - sizeof(tls12downgrade), tls12downgrade,
 5281|      0|                sizeof(tls12downgrade));
 5282|  2.31k|        else if (dgrd == DOWNGRADE_TO_1_1)
  ------------------
  |  Branch (5282:18): [True: 0, False: 2.31k]
  ------------------
 5283|      0|            memcpy(result + len - sizeof(tls11downgrade), tls11downgrade,
 5284|      0|                sizeof(tls11downgrade));
 5285|  2.31k|    }
 5286|       |
 5287|  2.31k|    return ret;
 5288|  2.31k|}
ssl_generate_pkey_group:
 5388|  4.16k|{
 5389|  4.16k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  4.16k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5390|  4.16k|    const TLS_GROUP_INFO *ginf = tls1_group_id_lookup(sctx, id);
 5391|  4.16k|    EVP_PKEY_CTX *pctx = NULL;
 5392|  4.16k|    EVP_PKEY *pkey = NULL;
 5393|       |
 5394|  4.16k|    if (ginf == NULL) {
  ------------------
  |  Branch (5394:9): [True: 0, False: 4.16k]
  ------------------
 5395|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5396|      0|        goto err;
 5397|      0|    }
 5398|       |
 5399|  4.16k|    pctx = EVP_PKEY_CTX_new_from_name(sctx->libctx, ginf->algorithm,
 5400|  4.16k|        sctx->propq);
 5401|       |
 5402|  4.16k|    if (pctx == NULL) {
  ------------------
  |  Branch (5402:9): [True: 0, False: 4.16k]
  ------------------
 5403|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5404|      0|        goto err;
 5405|      0|    }
 5406|  4.16k|    if (EVP_PKEY_keygen_init(pctx) <= 0) {
  ------------------
  |  Branch (5406:9): [True: 0, False: 4.16k]
  ------------------
 5407|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5408|      0|        goto err;
 5409|      0|    }
 5410|  4.16k|    if (EVP_PKEY_CTX_set_group_name(pctx, ginf->realname) <= 0) {
  ------------------
  |  Branch (5410:9): [True: 0, False: 4.16k]
  ------------------
 5411|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5412|      0|        goto err;
 5413|      0|    }
 5414|  4.16k|    if (EVP_PKEY_keygen(pctx, &pkey) <= 0) {
  ------------------
  |  Branch (5414:9): [True: 0, False: 4.16k]
  ------------------
 5415|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5416|      0|        EVP_PKEY_free(pkey);
 5417|      0|        pkey = NULL;
 5418|      0|    }
 5419|       |
 5420|  4.16k|err:
 5421|  4.16k|    EVP_PKEY_CTX_free(pctx);
 5422|  4.16k|    return pkey;
 5423|  4.16k|}
s3_lib.c:cipher_compare:
 3756|    982|{
 3757|    982|    const SSL_CIPHER *ap = (const SSL_CIPHER *)a;
 3758|    982|    const SSL_CIPHER *bp = (const SSL_CIPHER *)b;
 3759|       |
 3760|    982|    if (ap->id == bp->id)
  ------------------
  |  Branch (3760:9): [True: 0, False: 982]
  ------------------
 3761|      0|        return 0;
 3762|    982|    return ap->id < bp->id ? -1 : 1;
  ------------------
  |  Branch (3762:12): [True: 629, False: 353]
  ------------------
 3763|    982|}

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

SSL_get_ex_data_X509_STORE_CTX_idx:
   56|  3.13k|{
   57|       |
   58|  3.13k|    if (!RUN_ONCE(&ssl_x509_store_ctx_once, ssl_x509_store_ctx_init))
  ------------------
  |  |  130|  3.13k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 3.13k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (58:9): [True: 0, False: 3.13k]
  ------------------
   59|      0|        return -1;
   60|  3.13k|    return ssl_x509_store_ctx_idx;
   61|  3.13k|}
ssl_cert_new:
   64|  3.13k|{
   65|  3.13k|    CERT *ret = NULL;
   66|       |
   67|       |    /* Should never happen */
   68|  3.13k|    if (!ossl_assert(ssl_pkey_num >= SSL_PKEY_NUM))
  ------------------
  |  |   52|  3.13k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.13k|    __FILE__, __LINE__)
  ------------------
  |  Branch (68:9): [True: 0, False: 3.13k]
  ------------------
   69|      0|        return NULL;
   70|       |
   71|  3.13k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  3.13k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   72|  3.13k|    if (ret == NULL)
  ------------------
  |  Branch (72:9): [True: 0, False: 3.13k]
  ------------------
   73|      0|        return NULL;
   74|       |
   75|  3.13k|    ret->ssl_pkey_num = ssl_pkey_num;
   76|  3.13k|    ret->pkeys = OPENSSL_calloc(ret->ssl_pkey_num, sizeof(CERT_PKEY));
  ------------------
  |  |  113|  3.13k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|  3.13k|    if (ret->pkeys == NULL) {
  ------------------
  |  Branch (77:9): [True: 0, False: 3.13k]
  ------------------
   78|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|      0|        return NULL;
   80|      0|    }
   81|       |
   82|  3.13k|    ret->key = &(ret->pkeys[SSL_PKEY_RSA]);
  ------------------
  |  |  327|  3.13k|#define SSL_PKEY_RSA 0
  ------------------
   83|  3.13k|    ret->sec_cb = ssl_security_default_callback;
   84|  3.13k|    ret->sec_level = OPENSSL_TLS_SECURITY_LEVEL;
  ------------------
  |  |   31|  3.13k|#define OPENSSL_TLS_SECURITY_LEVEL 2
  ------------------
   85|  3.13k|    ret->sec_ex = NULL;
   86|  3.13k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 3.13k]
  ------------------
   87|      0|        OPENSSL_free(ret->pkeys);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   88|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   89|      0|        return NULL;
   90|      0|    }
   91|       |
   92|  3.13k|    return ret;
   93|  3.13k|}
ssl_cert_dup:
   96|  2.32k|{
   97|  2.32k|    CERT *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  2.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__
  |  |  ------------------
  ------------------
   98|  2.32k|    size_t i;
   99|       |#ifndef OPENSSL_NO_COMP_ALG
  100|       |    int j;
  101|       |#endif
  102|       |
  103|  2.32k|    if (ret == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 2.32k]
  ------------------
  104|      0|        return NULL;
  105|       |
  106|  2.32k|    ret->ssl_pkey_num = cert->ssl_pkey_num;
  107|  2.32k|    ret->pkeys = OPENSSL_calloc(ret->ssl_pkey_num, sizeof(CERT_PKEY));
  ------------------
  |  |  113|  2.32k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  108|  2.32k|    if (ret->pkeys == NULL) {
  ------------------
  |  Branch (108:9): [True: 0, False: 2.32k]
  ------------------
  109|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|      0|        return NULL;
  111|      0|    }
  112|       |
  113|  2.32k|    ret->key = &ret->pkeys[cert->key - cert->pkeys];
  114|  2.32k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (114:9): [True: 0, False: 2.32k]
  ------------------
  115|      0|        OPENSSL_free(ret->pkeys);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  116|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  117|      0|        return NULL;
  118|      0|    }
  119|       |
  120|  2.32k|    if (cert->dh_tmp != NULL) {
  ------------------
  |  Branch (120:9): [True: 0, False: 2.32k]
  ------------------
  121|      0|        if (!EVP_PKEY_up_ref(cert->dh_tmp))
  ------------------
  |  Branch (121:13): [True: 0, False: 0]
  ------------------
  122|      0|            goto err;
  123|      0|        ret->dh_tmp = cert->dh_tmp;
  124|      0|    }
  125|       |
  126|  2.32k|    ret->dh_tmp_cb = cert->dh_tmp_cb;
  127|  2.32k|    ret->dh_tmp_auto = cert->dh_tmp_auto;
  128|       |
  129|  32.5k|    for (i = 0; i < ret->ssl_pkey_num; i++) {
  ------------------
  |  Branch (129:17): [True: 30.1k, False: 2.32k]
  ------------------
  130|  30.1k|        CERT_PKEY *cpk = cert->pkeys + i;
  131|  30.1k|        CERT_PKEY *rpk = ret->pkeys + i;
  132|       |
  133|  30.1k|        if (cpk->x509 != NULL) {
  ------------------
  |  Branch (133:13): [True: 0, False: 30.1k]
  ------------------
  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|  30.1k|        if (cpk->privatekey != NULL) {
  ------------------
  |  Branch (139:13): [True: 0, False: 30.1k]
  ------------------
  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|  30.1k|        if (cpk->chain) {
  ------------------
  |  Branch (145:13): [True: 0, False: 30.1k]
  ------------------
  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|  30.1k|        if (cpk->serverinfo != NULL) {
  ------------------
  |  Branch (152:13): [True: 0, False: 30.1k]
  ------------------
  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|  30.1k|    }
  169|       |
  170|       |    /* Configured sigalgs copied across */
  171|  2.32k|    if (cert->conf_sigalgs) {
  ------------------
  |  Branch (171:9): [True: 0, False: 2.32k]
  ------------------
  172|      0|        ret->conf_sigalgs = OPENSSL_malloc_array(cert->conf_sigalgslen,
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  173|      0|            sizeof(*cert->conf_sigalgs));
  174|      0|        if (ret->conf_sigalgs == NULL)
  ------------------
  |  Branch (174:13): [True: 0, False: 0]
  ------------------
  175|      0|            goto err;
  176|      0|        memcpy(ret->conf_sigalgs, cert->conf_sigalgs,
  177|      0|            cert->conf_sigalgslen * sizeof(*cert->conf_sigalgs));
  178|      0|        ret->conf_sigalgslen = cert->conf_sigalgslen;
  179|      0|    } else
  180|  2.32k|        ret->conf_sigalgs = NULL;
  181|       |
  182|  2.32k|    if (cert->client_sigalgs) {
  ------------------
  |  Branch (182:9): [True: 0, False: 2.32k]
  ------------------
  183|      0|        ret->client_sigalgs = OPENSSL_malloc_array(cert->client_sigalgslen,
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  184|      0|            sizeof(*cert->client_sigalgs));
  185|      0|        if (ret->client_sigalgs == NULL)
  ------------------
  |  Branch (185:13): [True: 0, False: 0]
  ------------------
  186|      0|            goto err;
  187|      0|        memcpy(ret->client_sigalgs, cert->client_sigalgs,
  188|      0|            cert->client_sigalgslen * sizeof(*cert->client_sigalgs));
  189|      0|        ret->client_sigalgslen = cert->client_sigalgslen;
  190|      0|    } else
  191|  2.32k|        ret->client_sigalgs = NULL;
  192|       |    /* Copy any custom client certificate types */
  193|  2.32k|    if (cert->ctype) {
  ------------------
  |  Branch (193:9): [True: 0, False: 2.32k]
  ------------------
  194|      0|        ret->ctype = OPENSSL_memdup(cert->ctype, cert->ctype_len);
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  195|      0|        if (ret->ctype == NULL)
  ------------------
  |  Branch (195:13): [True: 0, False: 0]
  ------------------
  196|      0|            goto err;
  197|      0|        ret->ctype_len = cert->ctype_len;
  198|      0|    }
  199|       |
  200|  2.32k|    ret->cert_flags = cert->cert_flags;
  201|       |
  202|  2.32k|    ret->cert_cb = cert->cert_cb;
  203|  2.32k|    ret->cert_cb_arg = cert->cert_cb_arg;
  204|       |
  205|  2.32k|    if (cert->verify_store) {
  ------------------
  |  Branch (205:9): [True: 0, False: 2.32k]
  ------------------
  206|      0|        if (!X509_STORE_up_ref(cert->verify_store))
  ------------------
  |  Branch (206:13): [True: 0, False: 0]
  ------------------
  207|      0|            goto err;
  208|      0|        ret->verify_store = cert->verify_store;
  209|      0|    }
  210|       |
  211|  2.32k|    if (cert->chain_store) {
  ------------------
  |  Branch (211:9): [True: 0, False: 2.32k]
  ------------------
  212|      0|        if (!X509_STORE_up_ref(cert->chain_store))
  ------------------
  |  Branch (212:13): [True: 0, False: 0]
  ------------------
  213|      0|            goto err;
  214|      0|        ret->chain_store = cert->chain_store;
  215|      0|    }
  216|       |
  217|  2.32k|    ret->sec_cb = cert->sec_cb;
  218|  2.32k|    ret->sec_level = cert->sec_level;
  219|  2.32k|    ret->sec_ex = cert->sec_ex;
  220|       |
  221|  2.32k|    if (!custom_exts_copy(&ret->custext, &cert->custext))
  ------------------
  |  Branch (221:9): [True: 0, False: 2.32k]
  ------------------
  222|      0|        goto err;
  223|  2.32k|#ifndef OPENSSL_NO_PSK
  224|  2.32k|    if (cert->psk_identity_hint) {
  ------------------
  |  Branch (224:9): [True: 0, False: 2.32k]
  ------------------
  225|      0|        ret->psk_identity_hint = OPENSSL_strdup(cert->psk_identity_hint);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  226|      0|        if (ret->psk_identity_hint == NULL)
  ------------------
  |  Branch (226:13): [True: 0, False: 0]
  ------------------
  227|      0|            goto err;
  228|      0|    }
  229|  2.32k|#endif
  230|  2.32k|    return ret;
  231|       |
  232|      0|err:
  233|      0|    ssl_cert_free(ret);
  234|       |
  235|       |    return NULL;
  236|  2.32k|}
ssl_cert_clear_certs:
  241|  5.45k|{
  242|  5.45k|    size_t i;
  243|       |#ifndef OPENSSL_NO_COMP_ALG
  244|       |    int j;
  245|       |#endif
  246|       |
  247|  5.45k|    if (c == NULL)
  ------------------
  |  Branch (247:9): [True: 0, False: 5.45k]
  ------------------
  248|      0|        return;
  249|  75.9k|    for (i = 0; i < c->ssl_pkey_num; i++) {
  ------------------
  |  Branch (249:17): [True: 70.5k, False: 5.45k]
  ------------------
  250|  70.5k|        CERT_PKEY *cpk = c->pkeys + i;
  251|  70.5k|        X509_free(cpk->x509);
  252|  70.5k|        cpk->x509 = NULL;
  253|  70.5k|        EVP_PKEY_free(cpk->privatekey);
  254|  70.5k|        cpk->privatekey = NULL;
  255|  70.5k|        OSSL_STACK_OF_X509_free(cpk->chain);
  256|  70.5k|        cpk->chain = NULL;
  257|  70.5k|        OPENSSL_free(cpk->serverinfo);
  ------------------
  |  |  132|  70.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__
  |  |  ------------------
  ------------------
  258|  70.5k|        cpk->serverinfo = NULL;
  259|  70.5k|        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|  70.5k|    }
  268|  5.45k|}
ssl_cert_free:
  271|  5.45k|{
  272|  5.45k|    int i;
  273|       |
  274|  5.45k|    if (c == NULL)
  ------------------
  |  Branch (274:9): [True: 0, False: 5.45k]
  ------------------
  275|      0|        return;
  276|  5.45k|    CRYPTO_DOWN_REF(&c->references, &i);
  277|  5.45k|    REF_PRINT_COUNT("CERT", i, c);
  ------------------
  |  |  301|  5.45k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  5.45k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  5.45k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  5.45k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  278|  5.45k|    if (i > 0)
  ------------------
  |  Branch (278:9): [True: 0, False: 5.45k]
  ------------------
  279|      0|        return;
  280|  5.45k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  5.45k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 5.45k]
  |  |  ------------------
  ------------------
  281|       |
  282|  5.45k|    EVP_PKEY_free(c->dh_tmp);
  283|       |
  284|  5.45k|    ssl_cert_clear_certs(c);
  285|  5.45k|    OPENSSL_free(c->conf_sigalgs);
  ------------------
  |  |  132|  5.45k|    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|  5.45k|    OPENSSL_free(c->client_sigalgs);
  ------------------
  |  |  132|  5.45k|    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|  5.45k|    OPENSSL_free(c->ctype);
  ------------------
  |  |  132|  5.45k|    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|  5.45k|    X509_STORE_free(c->verify_store);
  289|  5.45k|    X509_STORE_free(c->chain_store);
  290|  5.45k|    custom_exts_free(&c->custext);
  291|  5.45k|#ifndef OPENSSL_NO_PSK
  292|  5.45k|    OPENSSL_free(c->psk_identity_hint);
  ------------------
  |  |  132|  5.45k|    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|  5.45k|#endif
  294|  5.45k|    OPENSSL_free(c->pkeys);
  ------------------
  |  |  132|  5.45k|    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|  5.45k|    CRYPTO_FREE_REF(&c->references);
  296|  5.45k|    OPENSSL_free(c);
  ------------------
  |  |  132|  5.45k|    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|  5.45k|}
SSL_get0_CA_list:
  631|  2.17k|{
  632|  2.17k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  2.17k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  2.17k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.17k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.17k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.17k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.17k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.17k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.17k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  633|       |
  634|  2.17k|    if (sc == NULL)
  ------------------
  |  Branch (634:9): [True: 0, False: 2.17k]
  ------------------
  635|      0|        return NULL;
  636|       |
  637|  2.17k|    return sc->ca_names != NULL ? sc->ca_names : s->ctx->ca_names;
  ------------------
  |  Branch (637:12): [True: 0, False: 2.17k]
  ------------------
  638|  2.17k|}
ssl_get_security_level_bits:
 1222|   463k|{
 1223|   463k|    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|   463k|    static const int minbits_table[5 + 1] = { 0, 80, 112, 128, 192, 256 };
 1230|       |
 1231|   463k|    if (ctx != NULL)
  ------------------
  |  Branch (1231:9): [True: 0, False: 463k]
  ------------------
 1232|      0|        level = SSL_CTX_get_security_level(ctx);
 1233|   463k|    else
 1234|   463k|        level = SSL_get_security_level(s);
 1235|       |
 1236|   463k|    if (level > 5)
  ------------------
  |  Branch (1236:9): [True: 0, False: 463k]
  ------------------
 1237|      0|        level = 5;
 1238|   463k|    else if (level < 0)
  ------------------
  |  Branch (1238:14): [True: 0, False: 463k]
  ------------------
 1239|      0|        level = 0;
 1240|       |
 1241|   463k|    if (levelp != NULL)
  ------------------
  |  Branch (1241:9): [True: 463k, False: 0]
  ------------------
 1242|   463k|        *levelp = level;
 1243|       |
 1244|   463k|    return minbits_table[level];
 1245|   463k|}
ssl_security:
 1318|   463k|{
 1319|   463k|    return s->cert->sec_cb(SSL_CONNECTION_GET_USER_SSL(s), NULL, op, bits, nid,
  ------------------
  |  |   28|   463k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1320|   463k|        other, s->cert->sec_ex);
 1321|   463k|}
ssl_cert_lookup_by_idx:
 1379|   356k|{
 1380|   356k|    if (idx >= (OSSL_NELEM(ssl_cert_info) + ctx->sigalg_list_len))
  ------------------
  |  |   14|   356k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1380:9): [True: 0, False: 356k]
  ------------------
 1381|      0|        return NULL;
 1382|   356k|    else if (idx >= (OSSL_NELEM(ssl_cert_info)))
  ------------------
  |  |   14|   356k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1382:14): [True: 36.1k, False: 320k]
  ------------------
 1383|  36.1k|        return &(ctx->ssl_cert_info[idx - SSL_PKEY_NUM]);
  ------------------
  |  |  336|  36.1k|#define SSL_PKEY_NUM 9
  ------------------
 1384|   320k|    return &ssl_cert_info[idx];
 1385|   356k|}
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|   463k|{
 1251|   463k|    int level, minbits, pfs_mask;
 1252|   463k|    const SSL_CONNECTION *sc;
 1253|       |
 1254|   463k|    minbits = ssl_get_security_level_bits(s, ctx, &level);
 1255|       |
 1256|   463k|    if (level == 0) {
  ------------------
  |  Branch (1256:9): [True: 6.36k, False: 456k]
  ------------------
 1257|       |        /*
 1258|       |         * No EDH keys weaker than 1024-bits even at level 0, otherwise,
 1259|       |         * anything goes.
 1260|       |         */
 1261|  6.36k|        if (op == SSL_SECOP_TMP_DH && bits < 80)
  ------------------
  |  | 2755|  12.7k|#define SSL_SECOP_TMP_DH (7 | SSL_SECOP_OTHER_PKEY)
  |  |  ------------------
  |  |  |  | 2732|  6.36k|#define SSL_SECOP_OTHER_PKEY (4 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1261:13): [True: 0, False: 6.36k]
  |  Branch (1261:39): [True: 0, False: 0]
  ------------------
 1262|      0|            return 0;
 1263|  6.36k|        return 1;
 1264|  6.36k|    }
 1265|   456k|    switch (op) {
 1266|   275k|    case SSL_SECOP_CIPHER_SUPPORTED:
  ------------------
  |  | 2743|   275k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2729|   275k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1266:5): [True: 275k, False: 181k]
  ------------------
 1267|   275k|    case SSL_SECOP_CIPHER_SHARED:
  ------------------
  |  | 2745|   275k|#define SSL_SECOP_CIPHER_SHARED (2 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2729|   275k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1267:5): [True: 0, False: 456k]
  ------------------
 1268|   275k|    case SSL_SECOP_CIPHER_CHECK: {
  ------------------
  |  | 2747|   275k|#define SSL_SECOP_CIPHER_CHECK (3 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2729|   275k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1268:5): [True: 7, False: 456k]
  ------------------
 1269|   275k|        const SSL_CIPHER *c = other;
 1270|       |        /* No ciphers below security level */
 1271|   275k|        if (bits < minbits)
  ------------------
  |  Branch (1271:13): [True: 5.39k, False: 270k]
  ------------------
 1272|  5.39k|            return 0;
 1273|       |        /* No unauthenticated ciphersuites */
 1274|   270k|        if (c->algorithm_auth & SSL_aNULL)
  ------------------
  |  |  116|   270k|#define SSL_aNULL 0x00000004U
  ------------------
  |  Branch (1274:13): [True: 4.52k, False: 265k]
  ------------------
 1275|  4.52k|            return 0;
 1276|       |        /* No MD5 mac ciphersuites */
 1277|   265k|        if (c->algorithm_mac & SSL_MD5)
  ------------------
  |  |  174|   265k|#define SSL_MD5 0x00000001U
  ------------------
  |  Branch (1277:13): [True: 0, False: 265k]
  ------------------
 1278|      0|            return 0;
 1279|       |        /* SHA1 HMAC is 160 bits of security */
 1280|   265k|        if (minbits > 160 && c->algorithm_mac & SSL_SHA1)
  ------------------
  |  |  175|  1.35k|#define SSL_SHA1 0x00000002U
  ------------------
  |  Branch (1280:13): [True: 1.35k, False: 264k]
  |  Branch (1280:30): [True: 351, False: 1.00k]
  ------------------
 1281|    351|            return 0;
 1282|       |        /* Level 3: forward secure ciphersuites only */
 1283|   265k|        pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   87|   265k|#define SSL_kDHE 0x00000002U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   89|   265k|#define SSL_kECDHE 0x00000004U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   99|   265k|#define SSL_kDHEPSK 0x00000100U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   98|   265k|#define SSL_kECDHEPSK 0x00000080U
  ------------------
 1284|   265k|        if (level >= 3 && c->min_tls != TLS1_3_VERSION && !(c->algorithm_mkey & pfs_mask))
  ------------------
  |  |   27|   266k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1284:13): [True: 1.50k, False: 263k]
  |  Branch (1284:27): [True: 1.33k, False: 172]
  |  Branch (1284:59): [True: 291, False: 1.04k]
  ------------------
 1285|    291|            return 0;
 1286|   264k|        break;
 1287|   265k|    }
 1288|   264k|    case SSL_SECOP_VERSION:
  ------------------
  |  | 2757|  56.7k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|  56.7k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1288:5): [True: 56.7k, False: 400k]
  ------------------
 1289|  56.7k|        if ((sc = SSL_CONNECTION_FROM_CONST_SSL(s)) == NULL)
  ------------------
  |  |   41|  56.7k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  56.7k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 56.7k]
  |  |  |  |  ------------------
  |  |  |  |   33|  56.7k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  56.7k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 56.7k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  56.7k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  56.7k|                             : (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: 56.7k]
  ------------------
 1290|      0|            return 0;
 1291|  56.7k|        if (!SSL_CONNECTION_IS_DTLS(sc)) {
  ------------------
  |  |  266|  56.7k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  56.7k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  56.7k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (1291:13): [True: 56.7k, False: 0]
  ------------------
 1292|       |            /* SSLv3, TLS v1.0 and TLS v1.1 only allowed at level 0 */
 1293|  56.7k|            if (nid <= TLS1_1_VERSION && level > 0)
  ------------------
  |  |   25|   113k|#define TLS1_1_VERSION 0x0302
  ------------------
  |  Branch (1293:17): [True: 4.84k, False: 51.8k]
  |  Branch (1293:42): [True: 4.84k, False: 0]
  ------------------
 1294|  4.84k|                return 0;
 1295|  56.7k|        } 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|  51.8k|        break;
 1301|       |
 1302|  51.8k|    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: 456k]
  ------------------
 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: 456k]
  ------------------
 1307|      0|        if (level >= 3)
  ------------------
  |  Branch (1307:13): [True: 0, False: 0]
  ------------------
 1308|      0|            return 0;
 1309|      0|        break;
 1310|   124k|    default:
  ------------------
  |  Branch (1310:5): [True: 124k, False: 332k]
  ------------------
 1311|   124k|        if (bits < minbits)
  ------------------
  |  Branch (1311:13): [True: 7.76k, False: 116k]
  ------------------
 1312|  7.76k|            return 0;
 1313|   456k|    }
 1314|   433k|    return 1;
 1315|   456k|}

ssl_load_ciphers:
  278|  3.13k|{
  279|  3.13k|    size_t i;
  280|  3.13k|    const ssl_cipher_table *t;
  281|  3.13k|    EVP_KEYEXCH *kex = NULL;
  282|  3.13k|    EVP_SIGNATURE *sig = NULL;
  283|       |
  284|  3.13k|    ctx->disabled_enc_mask = 0;
  285|  84.5k|    for (i = 0, t = ssl_cipher_table_cipher; i < SSL_ENC_NUM_IDX; i++, t++) {
  ------------------
  |  |  364|  84.5k|#define SSL_ENC_NUM_IDX 26
  ------------------
  |  Branch (285:46): [True: 81.4k, False: 3.13k]
  ------------------
  286|  81.4k|        if (t->nid != NID_undef) {
  ------------------
  |  |   18|  81.4k|#define NID_undef                       0
  ------------------
  |  Branch (286:13): [True: 78.2k, False: 3.13k]
  ------------------
  287|  78.2k|            const EVP_CIPHER *cipher = ssl_evp_cipher_fetch(ctx->libctx,
  288|  78.2k|                OBJ_nid2sn(t->nid),
  289|  78.2k|                ctx->propq);
  290|       |
  291|  78.2k|            ctx->ssl_cipher_methods[i] = cipher;
  292|  78.2k|            if (cipher == NULL)
  ------------------
  |  Branch (292:17): [True: 29.6k, False: 48.5k]
  ------------------
  293|  29.6k|                ctx->disabled_enc_mask |= t->mask;
  294|  78.2k|        }
  295|  81.4k|    }
  296|  3.13k|    ctx->disabled_mac_mask = 0;
  297|  50.0k|    for (i = 0, t = ssl_cipher_table_mac; i < SSL_MD_NUM_IDX; i++, t++) {
  ------------------
  |  |  210|  50.0k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  208|  50.0k|#define SSL_MAX_DIGEST 15
  |  |  ------------------
  ------------------
  |  Branch (297:43): [True: 46.9k, False: 3.13k]
  ------------------
  298|       |        /*
  299|       |         * We ignore any errors from the fetch below. It is expected to fail
  300|       |         * if these algorithms are not available.
  301|       |         */
  302|  46.9k|        ERR_set_mark();
  303|  46.9k|        const EVP_MD *md = EVP_MD_fetch(ctx->libctx,
  304|  46.9k|            OBJ_nid2sn(t->nid),
  305|  46.9k|            ctx->propq);
  306|  46.9k|        ERR_pop_to_mark();
  307|       |
  308|  46.9k|        ctx->ssl_digest_methods[i] = md;
  309|  46.9k|        if (md == NULL) {
  ------------------
  |  Branch (309:13): [True: 22.6k, False: 24.2k]
  ------------------
  310|  22.6k|            ctx->disabled_mac_mask |= t->mask;
  311|  24.2k|        } else {
  312|  24.2k|            int tmpsize = EVP_MD_get_size(md);
  313|       |
  314|  24.2k|            if (!ossl_assert(tmpsize > 0))
  ------------------
  |  |   52|  24.2k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  24.2k|    __FILE__, __LINE__)
  ------------------
  |  Branch (314:17): [True: 0, False: 24.2k]
  ------------------
  315|      0|                return 0;
  316|  24.2k|            ctx->ssl_mac_secret_size[i] = tmpsize;
  317|  24.2k|        }
  318|  46.9k|    }
  319|       |
  320|  3.13k|    ctx->disabled_mkey_mask = 0;
  321|  3.13k|    ctx->disabled_auth_mask = 0;
  322|       |
  323|       |    /*
  324|       |     * We ignore any errors from the fetches below. They are expected to fail
  325|       |     * if these algorithms are not available.
  326|       |     */
  327|  3.13k|    ERR_set_mark();
  328|  3.13k|    sig = EVP_SIGNATURE_fetch(ctx->libctx, "DSA", ctx->propq);
  329|  3.13k|    if (sig == NULL)
  ------------------
  |  Branch (329:9): [True: 95, False: 3.03k]
  ------------------
  330|     95|        ctx->disabled_auth_mask |= SSL_aDSS;
  ------------------
  |  |  114|     95|#define SSL_aDSS 0x00000002U
  ------------------
  331|  3.03k|    else
  332|  3.03k|        EVP_SIGNATURE_free(sig);
  333|  3.13k|    kex = EVP_KEYEXCH_fetch(ctx->libctx, "DH", ctx->propq);
  334|  3.13k|    if (kex == NULL)
  ------------------
  |  Branch (334:9): [True: 95, False: 3.03k]
  ------------------
  335|     95|        ctx->disabled_mkey_mask |= SSL_kDHE | SSL_kDHEPSK;
  ------------------
  |  |   87|     95|#define SSL_kDHE 0x00000002U
  ------------------
                      ctx->disabled_mkey_mask |= SSL_kDHE | SSL_kDHEPSK;
  ------------------
  |  |   99|     95|#define SSL_kDHEPSK 0x00000100U
  ------------------
  336|  3.03k|    else
  337|  3.03k|        EVP_KEYEXCH_free(kex);
  338|  3.13k|    kex = EVP_KEYEXCH_fetch(ctx->libctx, "ECDH", ctx->propq);
  339|  3.13k|    if (kex == NULL)
  ------------------
  |  Branch (339:9): [True: 95, False: 3.03k]
  ------------------
  340|     95|        ctx->disabled_mkey_mask |= SSL_kECDHE | SSL_kECDHEPSK;
  ------------------
  |  |   89|     95|#define SSL_kECDHE 0x00000004U
  ------------------
                      ctx->disabled_mkey_mask |= SSL_kECDHE | SSL_kECDHEPSK;
  ------------------
  |  |   98|     95|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  341|  3.03k|    else
  342|  3.03k|        EVP_KEYEXCH_free(kex);
  343|  3.13k|    sig = EVP_SIGNATURE_fetch(ctx->libctx, "ECDSA", ctx->propq);
  344|  3.13k|    if (sig == NULL)
  ------------------
  |  Branch (344:9): [True: 95, False: 3.03k]
  ------------------
  345|     95|        ctx->disabled_auth_mask |= SSL_aECDSA;
  ------------------
  |  |  118|     95|#define SSL_aECDSA 0x00000008U
  ------------------
  346|  3.03k|    else
  347|  3.03k|        EVP_SIGNATURE_free(sig);
  348|  3.13k|    ERR_pop_to_mark();
  349|       |
  350|       |#ifdef OPENSSL_NO_PSK
  351|       |    ctx->disabled_mkey_mask |= SSL_PSK;
  352|       |    ctx->disabled_auth_mask |= SSL_aPSK;
  353|       |#endif
  354|       |#ifdef OPENSSL_NO_SRP
  355|       |    ctx->disabled_mkey_mask |= SSL_kSRP;
  356|       |#endif
  357|       |
  358|       |    /*
  359|       |     * Check for presence of GOST 34.10 algorithms, and if they are not
  360|       |     * present, disable appropriate auth and key exchange
  361|       |     */
  362|  3.13k|    memcpy(ctx->ssl_mac_pkey_id, default_mac_pkey_id,
  363|  3.13k|        sizeof(ctx->ssl_mac_pkey_id));
  364|       |
  365|  3.13k|    ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC_IDX] = 0;
  ------------------
  |  |  196|  3.13k|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
  366|  3.13k|    if (ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC_IDX])
  ------------------
  |  |  196|  3.13k|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
  |  Branch (366:9): [True: 0, False: 3.13k]
  ------------------
  367|      0|        ctx->ssl_mac_secret_size[SSL_MD_GOST89MAC_IDX] = 32;
  ------------------
  |  |  196|      0|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
  368|  3.13k|    else
  369|  3.13k|        ctx->disabled_mac_mask |= SSL_GOST89MAC;
  ------------------
  |  |  177|  3.13k|#define SSL_GOST89MAC 0x00000008U
  ------------------
  370|       |
  371|  3.13k|    ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC12_IDX] = 0;
  ------------------
  |  |  200|  3.13k|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
  372|  3.13k|    if (ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC12_IDX])
  ------------------
  |  |  200|  3.13k|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
  |  Branch (372:9): [True: 0, False: 3.13k]
  ------------------
  373|      0|        ctx->ssl_mac_secret_size[SSL_MD_GOST89MAC12_IDX] = 32;
  ------------------
  |  |  200|      0|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
  374|  3.13k|    else
  375|  3.13k|        ctx->disabled_mac_mask |= SSL_GOST89MAC12;
  ------------------
  |  |  183|  3.13k|#define SSL_GOST89MAC12 0x00000100U
  ------------------
  376|       |
  377|  3.13k|    ctx->ssl_mac_pkey_id[SSL_MD_MAGMAOMAC_IDX] = 0;
  ------------------
  |  |  205|  3.13k|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
  378|  3.13k|    if (ctx->ssl_mac_pkey_id[SSL_MD_MAGMAOMAC_IDX])
  ------------------
  |  |  205|  3.13k|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
  |  Branch (378:9): [True: 0, False: 3.13k]
  ------------------
  379|      0|        ctx->ssl_mac_secret_size[SSL_MD_MAGMAOMAC_IDX] = 32;
  ------------------
  |  |  205|      0|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
  380|  3.13k|    else
  381|  3.13k|        ctx->disabled_mac_mask |= SSL_MAGMAOMAC;
  ------------------
  |  |  185|  3.13k|#define SSL_MAGMAOMAC 0x00000400U
  ------------------
  382|       |
  383|  3.13k|    ctx->ssl_mac_pkey_id[SSL_MD_KUZNYECHIKOMAC_IDX] = 0;
  ------------------
  |  |  206|  3.13k|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
  384|  3.13k|    if (ctx->ssl_mac_pkey_id[SSL_MD_KUZNYECHIKOMAC_IDX])
  ------------------
  |  |  206|  3.13k|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
  |  Branch (384:9): [True: 0, False: 3.13k]
  ------------------
  385|      0|        ctx->ssl_mac_secret_size[SSL_MD_KUZNYECHIKOMAC_IDX] = 32;
  ------------------
  |  |  206|      0|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
  386|  3.13k|    else
  387|  3.13k|        ctx->disabled_mac_mask |= SSL_KUZNYECHIKOMAC;
  ------------------
  |  |  186|  3.13k|#define SSL_KUZNYECHIKOMAC 0x00000800U
  ------------------
  388|       |
  389|  3.13k|    ctx->disabled_auth_mask |= SSL_aGOST01 | SSL_aGOST12;
  ------------------
  |  |  122|  3.13k|#define SSL_aGOST01 0x00000020U
  ------------------
                  ctx->disabled_auth_mask |= SSL_aGOST01 | SSL_aGOST12;
  ------------------
  |  |  126|  3.13k|#define SSL_aGOST12 0x00000080U
  ------------------
  390|  3.13k|    ctx->disabled_auth_mask |= SSL_aGOST12;
  ------------------
  |  |  126|  3.13k|#define SSL_aGOST12 0x00000080U
  ------------------
  391|  3.13k|    ctx->disabled_auth_mask |= SSL_aGOST12;
  ------------------
  |  |  126|  3.13k|#define SSL_aGOST12 0x00000080U
  ------------------
  392|       |    /*
  393|       |     * Disable GOST key exchange if no GOST signature algs are available *
  394|       |     */
  395|  3.13k|    if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  122|  3.13k|#define SSL_aGOST01 0x00000020U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  126|  3.13k|#define SSL_aGOST12 0x00000080U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  122|  3.13k|#define SSL_aGOST01 0x00000020U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  126|  3.13k|#define SSL_aGOST12 0x00000080U
  ------------------
  |  Branch (395:9): [True: 3.13k, False: 0]
  ------------------
  396|  3.13k|        ctx->disabled_mkey_mask |= SSL_kGOST;
  ------------------
  |  |   93|  3.13k|#define SSL_kGOST 0x00000010U
  ------------------
  397|       |
  398|  3.13k|    if ((ctx->disabled_auth_mask & SSL_aGOST12) == SSL_aGOST12)
  ------------------
  |  |  126|  3.13k|#define SSL_aGOST12 0x00000080U
  ------------------
                  if ((ctx->disabled_auth_mask & SSL_aGOST12) == SSL_aGOST12)
  ------------------
  |  |  126|  3.13k|#define SSL_aGOST12 0x00000080U
  ------------------
  |  Branch (398:9): [True: 3.13k, False: 0]
  ------------------
  399|  3.13k|        ctx->disabled_mkey_mask |= SSL_kGOST18;
  ------------------
  |  |  101|  3.13k|#define SSL_kGOST18 0x00000200U
  ------------------
  400|       |
  401|  3.13k|    return 1;
  402|  3.13k|}
ssl_md:
  551|  80.8k|{
  552|  80.8k|    idx &= SSL_HANDSHAKE_MAC_MASK;
  ------------------
  |  |  215|  80.8k|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
  553|  80.8k|    if (idx < 0 || idx >= SSL_MD_NUM_IDX)
  ------------------
  |  |  210|  80.8k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  208|  80.8k|#define SSL_MAX_DIGEST 15
  |  |  ------------------
  ------------------
  |  Branch (553:9): [True: 0, False: 80.8k]
  |  Branch (553:20): [True: 0, False: 80.8k]
  ------------------
  554|      0|        return NULL;
  555|  80.8k|    return ctx->ssl_digest_methods[idx];
  556|  80.8k|}
SSL_CTX_set_ciphersuites:
 1352|  3.25k|{
 1353|  3.25k|    int ret = set_ciphersuites(&(ctx->tls13_ciphersuites), str);
 1354|       |
 1355|  3.25k|    if (ret && ctx->cipher_list != NULL)
  ------------------
  |  Branch (1355:9): [True: 3.18k, False: 64]
  |  Branch (1355:16): [True: 55, False: 3.13k]
  ------------------
 1356|     55|        return update_cipher_list(ctx, &ctx->cipher_list, &ctx->cipher_list_by_id,
 1357|     55|            ctx->tls13_ciphersuites);
 1358|       |
 1359|  3.19k|    return ret;
 1360|  3.25k|}
ssl_create_cipher_list:
 1391|  3.93k|{
 1392|  3.93k|    int ok, num_of_ciphers, num_of_alias_max, num_of_group_aliases, i;
 1393|  3.93k|    uint32_t disabled_mkey, disabled_auth, disabled_enc, disabled_mac;
 1394|  3.93k|    STACK_OF(SSL_CIPHER) *cipherstack;
  ------------------
  |  |   33|  3.93k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1395|  3.93k|    const char *rule_p;
 1396|  3.93k|    CIPHER_ORDER *co_list = NULL, *head = NULL, *tail = NULL, *curr;
 1397|  3.93k|    const SSL_CIPHER **ca_list = NULL;
 1398|  3.93k|    const SSL_METHOD *ssl_method = ctx->method;
 1399|       |
 1400|       |    /*
 1401|       |     * Return with error if nothing to do.
 1402|       |     */
 1403|  3.93k|    if (rule_str == NULL || cipher_list == NULL || cipher_list_by_id == NULL)
  ------------------
  |  Branch (1403:9): [True: 0, False: 3.93k]
  |  Branch (1403:29): [True: 0, False: 3.93k]
  |  Branch (1403:52): [True: 0, False: 3.93k]
  ------------------
 1404|      0|        return NULL;
 1405|       |
 1406|  3.93k|    if (!check_suiteb_cipher_list(ssl_method, c, &rule_str))
  ------------------
  |  Branch (1406:9): [True: 0, False: 3.93k]
  ------------------
 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.93k|    disabled_mkey = ctx->disabled_mkey_mask;
 1415|  3.93k|    disabled_auth = ctx->disabled_auth_mask;
 1416|  3.93k|    disabled_enc = ctx->disabled_enc_mask;
 1417|  3.93k|    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.93k|    num_of_ciphers = ssl_method->num_ciphers();
 1425|       |
 1426|  3.93k|    if (num_of_ciphers > 0) {
  ------------------
  |  Branch (1426:9): [True: 3.93k, False: 0]
  ------------------
 1427|  3.93k|        co_list = OPENSSL_malloc_array(num_of_ciphers, sizeof(*co_list));
  ------------------
  |  |  111|  3.93k|    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.93k|        if (co_list == NULL)
  ------------------
  |  Branch (1428:13): [True: 0, False: 3.93k]
  ------------------
 1429|      0|            return NULL; /* Failure */
 1430|  3.93k|    }
 1431|       |
 1432|  3.93k|    ssl_cipher_collect_ciphers(ssl_method, num_of_ciphers,
 1433|  3.93k|        disabled_mkey, disabled_auth, disabled_enc,
 1434|  3.93k|        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.93k|    ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |   89|  3.93k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  118|  3.93k|#define SSL_aECDSA 0x00000008U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  141|  3.93k|#define CIPHER_ADD 1
  ------------------
 1446|  3.93k|        -1, &head, &tail);
 1447|  3.93k|    ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head,
  ------------------
  |  |   89|  3.93k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head,
  ------------------
  |  |  141|  3.93k|#define CIPHER_ADD 1
  ------------------
 1448|  3.93k|        &tail);
 1449|  3.93k|    ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
  ------------------
  |  |   89|  3.93k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
  ------------------
  |  |  143|  3.93k|#define CIPHER_DEL 3
  ------------------
 1450|  3.93k|        &tail);
 1451|       |
 1452|       |    /* Within each strength group, we prefer GCM over CHACHA... */
 1453|  3.93k|    ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  161|  3.93k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  146|  3.93k|#define SSL_AES128GCM 0x00001000U
  |  |  ------------------
  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  147|  3.93k|#define SSL_AES256GCM 0x00002000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  141|  3.93k|#define CIPHER_ADD 1
  ------------------
 1454|  3.93k|        &head, &tail);
 1455|  3.93k|    ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  165|  3.93k|#define SSL_CHACHA20 (SSL_CHACHA20POLY1305)
  |  |  ------------------
  |  |  |  |  153|  3.93k|#define SSL_CHACHA20POLY1305 0x00080000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  141|  3.93k|#define CIPHER_ADD 1
  ------------------
 1456|  3.93k|        &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.93k|    ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  163|  3.93k|#define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  140|  3.93k|#define SSL_AES128 0x00000040U
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  141|  3.93k|#define SSL_AES256 0x00000080U
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  161|  3.93k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  3.93k|#define SSL_AES128GCM 0x00001000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  3.93k|#define SSL_AES256GCM 0x00002000U
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  162|  3.93k|#define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  148|  3.93k|#define SSL_AES128CCM 0x00004000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  149|  3.93k|#define SSL_AES256CCM 0x00008000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  150|  3.93k|#define SSL_AES128CCM8 0x00010000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  151|  3.93k|#define SSL_AES256CCM8 0x00020000U
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  161|  3.93k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  146|  3.93k|#define SSL_AES128GCM 0x00001000U
  |  |  ------------------
  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  147|  3.93k|#define SSL_AES256GCM 0x00002000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  141|  3.93k|#define CIPHER_ADD 1
  ------------------
 1464|  3.93k|        -1, &head, &tail);
 1465|       |
 1466|       |    /* Temporarily enable everything else for sorting */
 1467|  3.93k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head, &tail);
  ------------------
  |  |  141|  3.93k|#define CIPHER_ADD 1
  ------------------
 1468|       |
 1469|       |    /* Low priority for MD5 */
 1470|  3.93k|    ssl_cipher_apply_rule(0, 0, 0, 0, SSL_MD5, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  174|  3.93k|#define SSL_MD5 0x00000001U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, SSL_MD5, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  3.93k|#define CIPHER_ORD 4
  ------------------
 1471|  3.93k|        &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.93k|    ssl_cipher_apply_rule(0, 0, SSL_aNULL, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  116|  3.93k|#define SSL_aNULL 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, 0, SSL_aNULL, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  3.93k|#define CIPHER_ORD 4
  ------------------
 1479|  3.93k|        &tail);
 1480|       |
 1481|  3.93k|    ssl_cipher_apply_rule(0, SSL_kRSA, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |   85|  3.93k|#define SSL_kRSA 0x00000001U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kRSA, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  3.93k|#define CIPHER_ORD 4
  ------------------
 1482|  3.93k|        &tail);
 1483|  3.93k|    ssl_cipher_apply_rule(0, SSL_kPSK, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |   91|  3.93k|#define SSL_kPSK 0x00000008U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kPSK, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  3.93k|#define CIPHER_ORD 4
  ------------------
 1484|  3.93k|        &tail);
 1485|       |
 1486|       |    /* RC4 is sort-of broken -- move to the end */
 1487|  3.93k|    ssl_cipher_apply_rule(0, 0, 0, SSL_RC4, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  136|  3.93k|#define SSL_RC4 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_RC4, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  3.93k|#define CIPHER_ORD 4
  ------------------
 1488|  3.93k|        &tail);
 1489|       |
 1490|       |    /*
 1491|       |     * Now sort by symmetric encryption strength.  The above ordering remains
 1492|       |     * in force within each class
 1493|       |     */
 1494|  3.93k|    if (!ssl_cipher_strength_sort(&head, &tail)) {
  ------------------
  |  Branch (1494:9): [True: 0, False: 3.93k]
  ------------------
 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.93k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, TLS1_2_VERSION, 0, CIPHER_BUMP, -1,
  ------------------
  |  |   26|  3.93k|#define TLS1_2_VERSION 0x0303
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, 0, TLS1_2_VERSION, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  150|  3.93k|#define CIPHER_BUMP 6
  ------------------
 1503|  3.93k|        &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.93k|    ssl_cipher_apply_rule(0, 0, 0, 0, SSL_AEAD, 0, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  181|  3.93k|#define SSL_AEAD 0x00000040U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, SSL_AEAD, 0, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  150|  3.93k|#define CIPHER_BUMP 6
  ------------------
 1519|  3.93k|        &head, &tail);
 1520|  3.93k|    ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, 0, 0, 0,
  ------------------
  |  |   87|  3.93k|#define SSL_kDHE 0x00000002U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, 0, 0, 0,
  ------------------
  |  |   89|  3.93k|#define SSL_kECDHE 0x00000004U
  ------------------
 1521|  3.93k|        CIPHER_BUMP, -1, &head, &tail);
  ------------------
  |  |  150|  3.93k|#define CIPHER_BUMP 6
  ------------------
 1522|  3.93k|    ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |   87|  3.93k|#define SSL_kDHE 0x00000002U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |   89|  3.93k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |  181|  3.93k|#define SSL_AEAD 0x00000040U
  ------------------
 1523|  3.93k|        CIPHER_BUMP, -1, &head, &tail);
  ------------------
  |  |  150|  3.93k|#define CIPHER_BUMP 6
  ------------------
 1524|       |
 1525|       |    /* Now disable everything (maintaining the ordering!) */
 1526|  3.93k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head, &tail);
  ------------------
  |  |  143|  3.93k|#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.93k|    num_of_group_aliases = OSSL_NELEM(cipher_aliases);
  ------------------
  |  |   14|  3.93k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 1537|  3.93k|    num_of_alias_max = num_of_ciphers + num_of_group_aliases + 1;
 1538|  3.93k|    ca_list = OPENSSL_malloc_array(num_of_alias_max, sizeof(*ca_list));
  ------------------
  |  |  111|  3.93k|    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.93k|    if (ca_list == NULL) {
  ------------------
  |  Branch (1539:9): [True: 0, False: 3.93k]
  ------------------
 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.93k|    ssl_cipher_collect_aliases(ca_list, num_of_group_aliases,
 1544|  3.93k|        disabled_mkey, disabled_auth, disabled_enc,
 1545|  3.93k|        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.93k|    ok = 1;
 1552|  3.93k|    rule_p = rule_str;
 1553|  3.93k|    if (HAS_CASE_PREFIX(rule_str, "DEFAULT")) {
  ------------------
  |  |   63|  3.93k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 25, False: 3.91k]
  |  |  ------------------
  ------------------
 1554|     25|        ok = ssl_cipher_process_rulestr(OSSL_default_cipher_list(),
 1555|     25|            &head, &tail, ca_list, c);
 1556|     25|        rule_p += 7;
 1557|     25|        if (*rule_p == ':')
  ------------------
  |  Branch (1557:13): [True: 1, False: 24]
  ------------------
 1558|      1|            rule_p++;
 1559|     25|    }
 1560|       |
 1561|  3.93k|    if (ok && (rule_p[0] != '\0'))
  ------------------
  |  Branch (1561:9): [True: 3.93k, False: 0]
  |  Branch (1561:15): [True: 3.93k, False: 4]
  ------------------
 1562|  3.93k|        ok = ssl_cipher_process_rulestr(rule_p, &head, &tail, ca_list, c);
 1563|       |
 1564|  3.93k|    OPENSSL_free(ca_list); /* Not needed anymore */
  ------------------
  |  |  132|  3.93k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1565|       |
 1566|  3.93k|    if (!ok) { /* Rule processing failure */
  ------------------
  |  Branch (1566:9): [True: 346, False: 3.59k]
  ------------------
 1567|    346|        OPENSSL_free(co_list);
  ------------------
  |  |  132|    346|    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|    346|        return NULL;
 1569|    346|    }
 1570|       |
 1571|       |    /*
 1572|       |     * Allocate new "cipherstack" for the result, return with error
 1573|       |     * if we cannot get one.
 1574|       |     */
 1575|  3.59k|    if ((cipherstack = sk_SSL_CIPHER_new_null()) == NULL) {
  ------------------
  |  | 1031|  3.59k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_SSL_CIPHER_freefunc_thunk))
  ------------------
  |  Branch (1575:9): [True: 0, False: 3.59k]
  ------------------
 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|  14.3k|    for (i = 0; i < sk_SSL_CIPHER_num(tls13_ciphersuites); i++) {
  ------------------
  |  | 1028|  14.3k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1581:17): [True: 10.7k, False: 3.59k]
  ------------------
 1582|  10.7k|        const SSL_CIPHER *sslc = sk_SSL_CIPHER_value(tls13_ciphersuites, i);
  ------------------
  |  | 1029|  10.7k|#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|  10.7k|        if ((sslc->algorithm_enc & disabled_enc) != 0
  ------------------
  |  Branch (1585:13): [True: 285, False: 10.4k]
  ------------------
 1586|  10.4k|            || (ssl_cipher_table_mac[sslc->algorithm2
  ------------------
  |  Branch (1586:16): [True: 0, False: 10.4k]
  ------------------
 1587|  10.4k|                    & SSL_HANDSHAKE_MAC_MASK]
  ------------------
  |  |  215|  10.4k|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
 1588|  10.4k|                       .mask
 1589|  10.4k|                   & ctx->disabled_mac_mask)
 1590|  10.4k|                != 0) {
 1591|    285|            sk_SSL_CIPHER_delete(tls13_ciphersuites, i);
  ------------------
  |  | 1036|    285|#define sk_SSL_CIPHER_delete(sk, i) ((const SSL_CIPHER *)OPENSSL_sk_delete(ossl_check_SSL_CIPHER_sk_type(sk), (i)))
  ------------------
 1592|    285|            i--;
 1593|    285|            continue;
 1594|    285|        }
 1595|       |
 1596|  10.4k|        if (!sk_SSL_CIPHER_push(cipherstack, sslc)) {
  ------------------
  |  | 1038|  10.4k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (1596:13): [True: 0, False: 10.4k]
  ------------------
 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|  10.4k|    }
 1602|       |
 1603|  3.59k|    OSSL_TRACE_BEGIN(TLS_CIPHER)
  ------------------
  |  |  219|  3.59k|    do {                           \
  |  |  220|  3.59k|        BIO *trc_out = NULL;       \
  |  |  221|  3.59k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 3.59k]
  |  |  ------------------
  ------------------
 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|   245k|    for (curr = head; curr != NULL; curr = curr->next) {
  ------------------
  |  Branch (1611:23): [True: 241k, False: 3.59k]
  ------------------
 1612|   241k|        if (curr->active) {
  ------------------
  |  Branch (1612:13): [True: 188k, False: 52.8k]
  ------------------
 1613|   188k|            if (!sk_SSL_CIPHER_push(cipherstack, curr->cipher)) {
  ------------------
  |  | 1038|   188k|#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: 188k]
  ------------------
 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|   188k|            if (trc_out != NULL)
  ------------------
  |  Branch (1619:17): [True: 0, False: 188k]
  ------------------
 1620|      0|                BIO_printf(trc_out, "<%s>\n", curr->cipher->name);
 1621|   188k|        }
 1622|   241k|    }
 1623|  3.59k|    OPENSSL_free(co_list); /* Not needed any longer */
  ------------------
  |  |  132|  3.59k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1624|  3.59k|    OSSL_TRACE_END(TLS_CIPHER);
  ------------------
  |  |  224|  3.59k|    }                            \
  |  |  225|  3.59k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 3.59k]
  |  |  ------------------
  ------------------
 1625|       |
 1626|  3.59k|    if (!update_cipher_list_by_id(cipher_list_by_id, cipherstack)) {
  ------------------
  |  Branch (1626:9): [True: 0, False: 3.59k]
  ------------------
 1627|      0|        sk_SSL_CIPHER_free(cipherstack);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1628|      0|        return NULL;
 1629|      0|    }
 1630|  3.59k|    sk_SSL_CIPHER_free(*cipher_list);
  ------------------
  |  | 1034|  3.59k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1631|  3.59k|    *cipher_list = cipherstack;
 1632|       |
 1633|  3.59k|    return cipherstack;
 1634|  3.59k|}
SSL_COMP_get_compression_methods:
 1951|  3.03k|{
 1952|  3.03k|    STACK_OF(SSL_COMP) **rv;
  ------------------
  |  |   33|  3.03k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1953|       |
 1954|  3.03k|    rv = (STACK_OF(SSL_COMP) **)OSSL_LIB_CTX_get_data(NULL,
 1955|  3.03k|        OSSL_LIB_CTX_COMP_METHODS);
  ------------------
  |  |  118|  3.03k|#define OSSL_LIB_CTX_COMP_METHODS 21
  ------------------
 1956|  3.03k|    if (rv != NULL)
  ------------------
  |  Branch (1956:9): [True: 3.03k, False: 0]
  ------------------
 1957|  3.03k|        return *rv;
 1958|      0|    else
 1959|      0|        return NULL;
 1960|  3.03k|}
ssl_get_cipher_by_char:
 2056|     46|{
 2057|     46|    const SSL_CIPHER *c = SSL_CONNECTION_GET_SSL(s)->method->get_cipher_by_char(ptr);
  ------------------
  |  |   27|     46|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2058|       |
 2059|     46|    if (c == NULL || (!all && c->valid == 0))
  ------------------
  |  Branch (2059:9): [True: 33, False: 13]
  |  Branch (2059:23): [True: 13, False: 0]
  |  Branch (2059:31): [True: 1, False: 12]
  ------------------
 2060|     34|        return NULL;
 2061|     12|    return c;
 2062|     46|}
ssl_get_md_idx:
 2108|  12.1k|{
 2109|  12.1k|    int i;
 2110|       |
 2111|   194k|    for (i = 0; i < SSL_MD_NUM_IDX; i++) {
  ------------------
  |  |  210|   194k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  208|   194k|#define SSL_MAX_DIGEST 15
  |  |  ------------------
  ------------------
  |  Branch (2111:17): [True: 182k, False: 12.1k]
  ------------------
 2112|   182k|        if (md_nid == ssl_cipher_table_mac[i].nid)
  ------------------
  |  Branch (2112:13): [True: 0, False: 182k]
  ------------------
 2113|      0|            return i;
 2114|   182k|    }
 2115|  12.1k|    return -1;
 2116|  12.1k|}
ssl_cert_is_disabled:
 2190|  94.0k|{
 2191|  94.0k|    const SSL_CERT_LOOKUP *cl;
 2192|       |
 2193|       |    /* A provider-loaded key type is always enabled */
 2194|  94.0k|    if (idx >= SSL_PKEY_NUM)
  ------------------
  |  |  336|  94.0k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2194:9): [True: 8.71k, False: 85.2k]
  ------------------
 2195|  8.71k|        return 0;
 2196|       |
 2197|  85.2k|    cl = ssl_cert_lookup_by_idx(idx, ctx);
 2198|  85.2k|    if (cl == NULL || (cl->amask & ctx->disabled_auth_mask) != 0)
  ------------------
  |  Branch (2198:9): [True: 0, False: 85.2k]
  |  Branch (2198:23): [True: 0, False: 85.2k]
  ------------------
 2199|      0|        return 1;
 2200|  85.2k|    return 0;
 2201|  85.2k|}
OSSL_default_cipher_list:
 2209|  3.15k|{
 2210|  3.15k|    return "ALL:!COMPLEMENTOFDEFAULT:!eNULL";
 2211|  3.15k|}
OSSL_default_ciphersuites:
 2219|  3.13k|{
 2220|  3.13k|    return "TLS_AES_256_GCM_SHA384:"
 2221|  3.13k|           "TLS_CHACHA20_POLY1305_SHA256:"
 2222|  3.13k|           "TLS_AES_128_GCM_SHA256";
 2223|  3.13k|}
ssl_cipher_list_to_bytes:
 2227|  2.31k|{
 2228|  2.31k|    int i;
 2229|  2.31k|    size_t totlen = 0, len, maxlen, maxverok = 0;
 2230|  2.31k|    int empty_reneg_info_scsv = !s->renegotiate
  ------------------
  |  Branch (2230:33): [True: 2.31k, False: 0]
  ------------------
 2231|  2.31k|        && !SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  4.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.31k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.31k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (2231:12): [True: 2.31k, False: 0]
  ------------------
 2232|  2.31k|        && ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  | 2757|  2.31k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|  2.31k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
                      && ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  |   24|  2.31k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (2232:12): [True: 27, False: 2.28k]
  ------------------
 2233|     27|        && s->min_proto_version <= TLS1_VERSION;
  ------------------
  |  |   24|     27|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (2233:12): [True: 4, False: 23]
  ------------------
 2234|  2.31k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.31k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2235|       |
 2236|       |    /* Set disabled masks for this session */
 2237|  2.31k|    if (!ssl_set_client_disabled(s)) {
  ------------------
  |  Branch (2237:9): [True: 0, False: 2.31k]
  ------------------
 2238|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_PROTOCOLS_AVAILABLE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2239|      0|        return 0;
 2240|      0|    }
 2241|       |
 2242|  2.31k|    if (sk == NULL) {
  ------------------
  |  Branch (2242:9): [True: 0, False: 2.31k]
  ------------------
 2243|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2244|      0|        return 0;
 2245|      0|    }
 2246|       |
 2247|       |#ifdef OPENSSL_MAX_TLS1_2_CIPHER_LENGTH
 2248|       |#if OPENSSL_MAX_TLS1_2_CIPHER_LENGTH < 6
 2249|       |#error Max cipher length too short
 2250|       |#endif
 2251|       |    /*
 2252|       |     * Some servers hang if client hello > 256 bytes as hack workaround
 2253|       |     * chop number of supported ciphers to keep it well below this if we
 2254|       |     * use TLS v1.2
 2255|       |     */
 2256|       |    if (TLS1_get_version(ssl) >= TLS1_2_VERSION)
 2257|       |        maxlen = OPENSSL_MAX_TLS1_2_CIPHER_LENGTH & ~1;
 2258|       |    else
 2259|       |#endif
 2260|       |        /* Maximum length that can be stored in 2 bytes. Length must be even */
 2261|  2.31k|        maxlen = 0xfffe;
 2262|       |
 2263|  2.31k|    if (empty_reneg_info_scsv)
  ------------------
  |  Branch (2263:9): [True: 4, False: 2.30k]
  ------------------
 2264|      4|        maxlen -= 2;
 2265|  2.31k|    if (s->mode & SSL_MODE_SEND_FALLBACK_SCSV)
  ------------------
  |  |  553|  2.31k|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (2265:9): [True: 0, False: 2.31k]
  ------------------
 2266|      0|        maxlen -= 2;
 2267|       |
 2268|   140k|    for (i = 0; i < sk_SSL_CIPHER_num(sk) && totlen < maxlen; i++) {
  ------------------
  |  | 1028|   281k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (2268:17): [True: 138k, False: 2.31k]
  |  Branch (2268:46): [True: 138k, False: 0]
  ------------------
 2269|   138k|        const SSL_CIPHER *c;
 2270|       |
 2271|   138k|        c = sk_SSL_CIPHER_value(sk, i);
  ------------------
  |  | 1029|   138k|#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|   138k|        if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_SUPPORTED, 0))
  ------------------
  |  | 2743|   138k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2729|   138k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (2273:13): [True: 70.3k, False: 67.9k]
  ------------------
 2274|  70.3k|            continue;
 2275|       |
 2276|  67.9k|        if (!ssl->method->put_cipher_by_char(c, pkt, &len)) {
  ------------------
  |  Branch (2276:13): [True: 0, False: 67.9k]
  ------------------
 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|  67.9k|        if (!maxverok) {
  ------------------
  |  Branch (2282:13): [True: 3.05k, False: 64.8k]
  ------------------
 2283|  3.05k|            int minproto = SSL_CONNECTION_IS_DTLS(s) ? c->min_dtls : c->min_tls;
  ------------------
  |  |  266|  3.05k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.05k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.05k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.05k]
  |  |  ------------------
  ------------------
 2284|  3.05k|            int maxproto = SSL_CONNECTION_IS_DTLS(s) ? c->max_dtls : c->max_tls;
  ------------------
  |  |  266|  3.05k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.05k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.05k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.05k]
  |  |  ------------------
  ------------------
 2285|       |
 2286|  3.05k|            if (ssl_version_cmp(s, maxproto, s->s3.tmp.max_ver) >= 0
  ------------------
  |  Branch (2286:17): [True: 2.25k, False: 802]
  ------------------
 2287|  2.25k|                && ssl_version_cmp(s, minproto, s->s3.tmp.max_ver) <= 0)
  ------------------
  |  Branch (2287:20): [True: 2.25k, False: 0]
  ------------------
 2288|  2.25k|                maxverok = 1;
 2289|  3.05k|        }
 2290|       |
 2291|  67.9k|        totlen += len;
 2292|  67.9k|    }
 2293|       |
 2294|  2.31k|    if (totlen == 0 || !maxverok) {
  ------------------
  |  Branch (2294:9): [True: 19, False: 2.29k]
  |  Branch (2294:24): [True: 38, False: 2.25k]
  ------------------
 2295|     57|        const char *maxvertext = !maxverok
  ------------------
  |  Branch (2295:34): [True: 57, False: 0]
  ------------------
 2296|     57|            ? "No ciphers enabled for max supported SSL/TLS version"
 2297|     57|            : NULL;
 2298|       |
 2299|     57|        SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  157|     57|    (ERR_new(),                                                  \
  |  |  158|     57|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     57|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|     57|        ossl_statem_fatal)
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  | 1266|     57|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|     57|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  198|     57|#define SSL_R_NO_CIPHERS_AVAILABLE 181
  ------------------
 2300|     57|            maxvertext);
 2301|     57|        return 0;
 2302|     57|    }
 2303|       |
 2304|  2.25k|    if (totlen != 0) {
  ------------------
  |  Branch (2304:9): [True: 2.25k, False: 0]
  ------------------
 2305|  2.25k|        if (empty_reneg_info_scsv) {
  ------------------
  |  Branch (2305:13): [True: 4, False: 2.25k]
  ------------------
 2306|      4|            static const SSL_CIPHER scsv = {
 2307|      4|                0, NULL, NULL, SSL3_CK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0
  ------------------
  |  |   33|      4|#define SSL3_CK_SCSV 0x030000FF
  ------------------
 2308|      4|            };
 2309|      4|            if (!ssl->method->put_cipher_by_char(&scsv, pkt, &len)) {
  ------------------
  |  Branch (2309:17): [True: 0, False: 4]
  ------------------
 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|      4|        }
 2314|  2.25k|        if (s->mode & SSL_MODE_SEND_FALLBACK_SCSV) {
  ------------------
  |  |  553|  2.25k|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (2314:13): [True: 0, False: 2.25k]
  ------------------
 2315|      0|            static const SSL_CIPHER scsv = {
 2316|      0|                0, NULL, NULL, SSL3_CK_FALLBACK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0
  ------------------
  |  |   39|      0|#define SSL3_CK_FALLBACK_SCSV 0x03005600
  ------------------
 2317|      0|            };
 2318|      0|            if (!ssl->method->put_cipher_by_char(&scsv, pkt, &len)) {
  ------------------
  |  Branch (2318:17): [True: 0, False: 0]
  ------------------
 2319|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2320|      0|                return 0;
 2321|      0|            }
 2322|      0|        }
 2323|  2.25k|    }
 2324|       |
 2325|  2.25k|    return 1;
 2326|  2.25k|}
ssl_ciph.c:set_ciphersuites:
 1267|  3.25k|{
 1268|  3.25k|    STACK_OF(SSL_CIPHER) *newciphers = sk_SSL_CIPHER_new_null();
  ------------------
  |  |   33|  3.25k|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *newciphers = sk_SSL_CIPHER_new_null();
  ------------------
  |  | 1031|  3.25k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_SSL_CIPHER_freefunc_thunk))
  ------------------
 1269|       |
 1270|  3.25k|    if (newciphers == NULL)
  ------------------
  |  Branch (1270:9): [True: 0, False: 3.25k]
  ------------------
 1271|      0|        return 0;
 1272|       |
 1273|       |    /* Parse the list. We explicitly allow an empty list */
 1274|  3.25k|    if (*str != '\0'
  ------------------
  |  Branch (1274:9): [True: 3.20k, False: 43]
  ------------------
 1275|  3.20k|        && (CONF_parse_list(str, ':', 1, ciphersuite_cb, newciphers) <= 0
  ------------------
  |  Branch (1275:13): [True: 0, False: 3.20k]
  ------------------
 1276|  3.20k|            || sk_SSL_CIPHER_num(newciphers) == 0)) {
  ------------------
  |  | 1028|  3.20k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1276:16): [True: 64, False: 3.14k]
  ------------------
 1277|     64|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_CIPHER_MATCH);
  ------------------
  |  |  357|     64|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|     64|    (ERR_new(),                                                  \
  |  |  |  |  360|     64|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     64|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|     64|        ERR_set_error)
  |  |  ------------------
  ------------------
 1278|     64|        sk_SSL_CIPHER_free(newciphers);
  ------------------
  |  | 1034|     64|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1279|     64|        return 0;
 1280|     64|    }
 1281|  3.18k|    sk_SSL_CIPHER_free(*currciphers);
  ------------------
  |  | 1034|  3.18k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1282|  3.18k|    *currciphers = newciphers;
 1283|       |
 1284|  3.18k|    return 1;
 1285|  3.25k|}
ssl_ciph.c:ciphersuite_cb:
 1231|  22.0k|{
 1232|  22.0k|    STACK_OF(SSL_CIPHER) *ciphersuites = (STACK_OF(SSL_CIPHER) *)arg;
  ------------------
  |  |   33|  22.0k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1233|  22.0k|    const SSL_CIPHER *cipher;
 1234|       |    /* Arbitrary sized temp buffer for the cipher name. Should be big enough */
 1235|  22.0k|    char name[80];
 1236|       |
 1237|       |    /* CONF_parse_list signals empty elements with elem == NULL; skip them */
 1238|  22.0k|    if (elem == NULL || len == 0)
  ------------------
  |  Branch (1238:9): [True: 6.58k, False: 15.4k]
  |  Branch (1238:25): [True: 0, False: 15.4k]
  ------------------
 1239|  6.58k|        return 1;
 1240|       |
 1241|  15.4k|    if (len > (int)(sizeof(name) - 1))
  ------------------
  |  Branch (1241:9): [True: 86, False: 15.3k]
  ------------------
 1242|       |        /* Anyway return 1 so we can parse rest of the list */
 1243|     86|        return 1;
 1244|       |
 1245|  15.3k|    memcpy(name, elem, len);
 1246|  15.3k|    name[len] = '\0';
 1247|       |
 1248|  15.3k|    cipher = ssl3_get_tls13_cipher_by_std_name(name);
 1249|  15.3k|    if (cipher == NULL)
  ------------------
  |  Branch (1249:9): [True: 5.95k, False: 9.44k]
  ------------------
 1250|       |        /* Ciphersuite not found but return 1 to parse rest of the list */
 1251|  5.95k|        return 1;
 1252|       |
 1253|       |    /* Suppress duplicates */
 1254|  18.8k|    for (int i = 0; i < sk_SSL_CIPHER_num(ciphersuites); ++i)
  ------------------
  |  | 1028|  18.8k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1254:21): [True: 9.45k, False: 9.41k]
  ------------------
 1255|  9.45k|        if (sk_SSL_CIPHER_value(ciphersuites, i)->id == cipher->id)
  ------------------
  |  | 1029|  9.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: 33, False: 9.41k]
  ------------------
 1256|     33|            return 1;
 1257|       |
 1258|  9.41k|    if (!sk_SSL_CIPHER_push(ciphersuites, cipher)) {
  ------------------
  |  | 1038|  9.41k|#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: 9.41k]
  ------------------
 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|  9.41k|    return 1;
 1264|  9.41k|}
ssl_ciph.c:update_cipher_list:
 1309|     55|{
 1310|     55|    int i;
 1311|     55|    STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(*cipher_list);
  ------------------
  |  |   33|     55|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(*cipher_list);
  ------------------
  |  | 1050|     55|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
 1312|       |
 1313|     55|    if (tmp_cipher_list == NULL)
  ------------------
  |  Branch (1313:9): [True: 0, False: 55]
  ------------------
 1314|      0|        return 0;
 1315|       |
 1316|       |    /*
 1317|       |     * Delete any existing TLSv1.3 ciphersuites. These are always first in the
 1318|       |     * list.
 1319|       |     */
 1320|    220|    while (sk_SSL_CIPHER_num(tmp_cipher_list) > 0
  ------------------
  |  | 1028|    220|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1320:12): [True: 220, False: 0]
  ------------------
 1321|    220|        && sk_SSL_CIPHER_value(tmp_cipher_list, 0)->min_tls
  ------------------
  |  | 1029|    220|#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: 165, False: 55]
  ------------------
 1322|    220|            == TLS1_3_VERSION)
  ------------------
  |  |   27|    220|#define TLS1_3_VERSION 0x0304
  ------------------
 1323|    165|        (void)sk_SSL_CIPHER_delete(tmp_cipher_list, 0);
  ------------------
  |  | 1036|    220|#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|     55|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1326:57): [True: 20, False: 55]
  ------------------
 1327|     20|        const SSL_CIPHER *sslc = sk_SSL_CIPHER_value(tls13_ciphersuites, i);
  ------------------
  |  | 1029|     20|#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|     20|        if ((sslc->algorithm_enc & ctx->disabled_enc_mask) == 0
  ------------------
  |  Branch (1330:13): [True: 20, False: 0]
  ------------------
 1331|     20|            && (ssl_cipher_table_mac[sslc->algorithm2
  ------------------
  |  Branch (1331:16): [True: 20, False: 0]
  ------------------
 1332|     20|                    & SSL_HANDSHAKE_MAC_MASK]
  ------------------
  |  |  215|     20|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
 1333|     20|                       .mask
 1334|     20|                   & ctx->disabled_mac_mask)
 1335|     20|                == 0) {
 1336|     20|            sk_SSL_CIPHER_unshift(tmp_cipher_list, sslc);
  ------------------
  |  | 1039|     20|#define sk_SSL_CIPHER_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
 1337|     20|        }
 1338|     20|    }
 1339|       |
 1340|     55|    if (!update_cipher_list_by_id(cipher_list_by_id, tmp_cipher_list)) {
  ------------------
  |  Branch (1340:9): [True: 0, False: 55]
  ------------------
 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|     55|    sk_SSL_CIPHER_free(*cipher_list);
  ------------------
  |  | 1034|     55|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1346|     55|    *cipher_list = tmp_cipher_list;
 1347|       |
 1348|     55|    return 1;
 1349|     55|}
ssl_ciph.c:check_suiteb_cipher_list:
 1184|  3.93k|{
 1185|  3.93k|    unsigned int suiteb_flags = 0, suiteb_comb2 = 0;
 1186|  3.93k|    if (HAS_CASE_PREFIX(*prule_str, "SUITEB128ONLY")) {
  ------------------
  |  |   63|  3.93k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 2, False: 3.93k]
  |  |  ------------------
  ------------------
 1187|      2|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS_ONLY;
  ------------------
  |  |  580|      2|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
 1188|  3.93k|    } else if (HAS_CASE_PREFIX(*prule_str, "SUITEB128C2")) {
  ------------------
  |  |   63|  3.93k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 1, False: 3.93k]
  |  |  ------------------
  ------------------
 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.93k|    } else if (HAS_CASE_PREFIX(*prule_str, "SUITEB128")) {
  ------------------
  |  |   63|  3.93k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 5, False: 3.92k]
  |  |  ------------------
  ------------------
 1192|      5|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  584|      5|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1193|  3.92k|    } else if (HAS_CASE_PREFIX(*prule_str, "SUITEB192")) {
  ------------------
  |  |   63|  3.92k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 3, False: 3.92k]
  |  |  ------------------
  ------------------
 1194|      3|        suiteb_flags = SSL_CERT_FLAG_SUITEB_192_LOS;
  ------------------
  |  |  582|      3|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
 1195|      3|    }
 1196|       |
 1197|  3.93k|    if (suiteb_flags) {
  ------------------
  |  Branch (1197:9): [True: 11, False: 3.92k]
  ------------------
 1198|     11|        c->cert_flags &= ~SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  584|     11|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1199|     11|        c->cert_flags |= suiteb_flags;
 1200|  3.92k|    } else {
 1201|  3.92k|        suiteb_flags = c->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  584|  3.92k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1202|  3.92k|    }
 1203|       |
 1204|  3.93k|    if (!suiteb_flags)
  ------------------
  |  Branch (1204:9): [True: 3.92k, False: 11]
  ------------------
 1205|  3.92k|        return 1;
 1206|       |    /* Check version: if TLS 1.2 ciphers allowed we can use Suite B */
 1207|       |
 1208|     11|    if (!(meth->ssl3_enc->enc_flags & SSL_ENC_FLAG_TLS1_2_CIPHERS)) {
  ------------------
  |  | 2201|     11|#define SSL_ENC_FLAG_TLS1_2_CIPHERS 0x10
  ------------------
  |  Branch (1208:9): [True: 0, False: 11]
  ------------------
 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|     11|    switch (suiteb_flags) {
  ------------------
  |  Branch (1213:13): [True: 11, False: 0]
  ------------------
 1214|      6|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  584|      6|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (1214:5): [True: 6, False: 5]
  ------------------
 1215|      6|        if (suiteb_comb2)
  ------------------
  |  Branch (1215:13): [True: 1, False: 5]
  ------------------
 1216|      1|            *prule_str = "ECDHE-ECDSA-AES256-GCM-SHA384";
 1217|      5|        else
 1218|      5|            *prule_str = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384";
 1219|      6|        break;
 1220|      2|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  580|      2|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (1220:5): [True: 2, False: 9]
  ------------------
 1221|      2|        *prule_str = "ECDHE-ECDSA-AES128-GCM-SHA256";
 1222|      2|        break;
 1223|      3|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  582|      3|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (1223:5): [True: 3, False: 8]
  ------------------
 1224|      3|        *prule_str = "ECDHE-ECDSA-AES256-GCM-SHA384";
 1225|      3|        break;
 1226|     11|    }
 1227|     11|    return 1;
 1228|     11|}
ssl_ciph.c:ssl_cipher_collect_ciphers:
  615|  3.93k|{
  616|  3.93k|    int i, co_list_num;
  617|  3.93k|    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.93k|    co_list_num = 0; /* actual count of ciphers */
  628|   755k|    for (i = 0; i < num_of_ciphers; i++) {
  ------------------
  |  Branch (628:17): [True: 751k, False: 3.93k]
  ------------------
  629|   751k|        c = ssl_method->get_cipher(i);
  630|       |        /* drop those that use any of that is not available */
  631|   751k|        if (c == NULL || !c->valid)
  ------------------
  |  Branch (631:13): [True: 0, False: 751k]
  |  Branch (631:26): [True: 0, False: 751k]
  ------------------
  632|      0|            continue;
  633|   751k|        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: 38.4k, False: 713k]
  |  Branch (633:52): [True: 285, False: 713k]
  |  Branch (633:91): [True: 63.0k, False: 649k]
  |  Branch (633:128): [True: 855, False: 649k]
  ------------------
  634|   102k|            continue;
  635|   649k|        if (((ssl_method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS) == 0) && c->min_tls == 0)
  ------------------
  |  | 2196|   649k|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (635:13): [True: 649k, False: 0]
  |  Branch (635:77): [True: 0, False: 649k]
  ------------------
  636|      0|            continue;
  637|   649k|        if (((ssl_method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS) != 0) && c->min_dtls == 0)
  ------------------
  |  | 2196|   649k|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (637:13): [True: 0, False: 649k]
  |  Branch (637:77): [True: 0, False: 0]
  ------------------
  638|      0|            continue;
  639|       |
  640|   649k|        co_list[co_list_num].cipher = c;
  641|   649k|        co_list[co_list_num].next = NULL;
  642|   649k|        co_list[co_list_num].prev = NULL;
  643|   649k|        co_list[co_list_num].active = 0;
  644|   649k|        co_list_num++;
  645|   649k|    }
  646|       |
  647|       |    /*
  648|       |     * Prepare linked list from list entries
  649|       |     */
  650|  3.93k|    if (co_list_num > 0) {
  ------------------
  |  Branch (650:9): [True: 3.84k, False: 95]
  ------------------
  651|  3.84k|        co_list[0].prev = NULL;
  652|       |
  653|  3.84k|        if (co_list_num > 1) {
  ------------------
  |  Branch (653:13): [True: 3.84k, False: 0]
  ------------------
  654|  3.84k|            co_list[0].next = &co_list[1];
  655|       |
  656|   645k|            for (i = 1; i < co_list_num - 1; i++) {
  ------------------
  |  Branch (656:25): [True: 641k, False: 3.84k]
  ------------------
  657|   641k|                co_list[i].prev = &co_list[i - 1];
  658|   641k|                co_list[i].next = &co_list[i + 1];
  659|   641k|            }
  660|       |
  661|  3.84k|            co_list[co_list_num - 1].prev = &co_list[co_list_num - 2];
  662|  3.84k|        }
  663|       |
  664|  3.84k|        co_list[co_list_num - 1].next = NULL;
  665|       |
  666|  3.84k|        *head_p = &co_list[0];
  667|  3.84k|        *tail_p = &co_list[co_list_num - 1];
  668|  3.84k|    }
  669|  3.93k|}
ssl_ciph.c:ssl_cipher_apply_rule:
  739|   105k|{
  740|   105k|    CIPHER_ORDER *head, *tail, *curr, *next, *last;
  741|   105k|    const SSL_CIPHER *cp;
  742|   105k|    int reverse = 0;
  743|       |
  744|   105k|    OSSL_TRACE_BEGIN(TLS_CIPHER)
  ------------------
  |  |  219|   105k|    do {                           \
  |  |  220|   105k|        BIO *trc_out = NULL;       \
  |  |  221|   105k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 105k]
  |  |  ------------------
  ------------------
  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|   105k|    if (rule == CIPHER_DEL || rule == CIPHER_BUMP)
  ------------------
  |  |  143|   211k|#define CIPHER_DEL 3
  ------------------
                  if (rule == CIPHER_DEL || rule == CIPHER_BUMP)
  ------------------
  |  |  150|  96.1k|#define CIPHER_BUMP 6
  ------------------
  |  Branch (753:9): [True: 9.50k, False: 96.1k]
  |  Branch (753:31): [True: 15.7k, False: 80.3k]
  ------------------
  754|  25.2k|        reverse = 1; /* needed to maintain sorting between currently
  755|       |                      * deleted ciphers */
  756|       |
  757|   105k|    head = *head_p;
  758|   105k|    tail = *tail_p;
  759|       |
  760|   105k|    if (reverse) {
  ------------------
  |  Branch (760:9): [True: 25.2k, False: 80.3k]
  ------------------
  761|  25.2k|        next = tail;
  762|  25.2k|        last = head;
  763|  80.3k|    } else {
  764|  80.3k|        next = head;
  765|  80.3k|        last = tail;
  766|  80.3k|    }
  767|       |
  768|   105k|    curr = NULL;
  769|  17.0M|    for (;;) {
  770|  17.0M|        if (curr == last)
  ------------------
  |  Branch (770:13): [True: 105k, False: 16.9M]
  ------------------
  771|   105k|            break;
  772|       |
  773|  16.9M|        curr = next;
  774|       |
  775|  16.9M|        if (curr == NULL)
  ------------------
  |  Branch (775:13): [True: 0, False: 16.9M]
  ------------------
  776|      0|            break;
  777|       |
  778|  16.9M|        next = reverse ? curr->prev : curr->next;
  ------------------
  |  Branch (778:16): [True: 4.12M, False: 12.7M]
  ------------------
  779|       |
  780|  16.9M|        cp = curr->cipher;
  781|       |
  782|       |        /*
  783|       |         * Selection criteria is either the value of strength_bits
  784|       |         * or the algorithms used.
  785|       |         */
  786|  16.9M|        if (strength_bits >= 0) {
  ------------------
  |  Branch (786:13): [True: 3.53M, False: 13.3M]
  ------------------
  787|  3.53M|            if (strength_bits != cp->strength_bits)
  ------------------
  |  Branch (787:17): [True: 2.82M, False: 712k]
  ------------------
  788|  2.82M|                continue;
  789|  13.3M|        } else {
  790|  13.3M|            if (trc_out != NULL) {
  ------------------
  |  Branch (790:17): [True: 0, False: 13.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|  13.3M|            if (cipher_id != 0 && (cipher_id != cp->id))
  ------------------
  |  Branch (802:17): [True: 63.9k, False: 13.3M]
  |  Branch (802:35): [True: 63.5k, False: 410]
  ------------------
  803|  63.5k|                continue;
  804|  13.3M|            if (alg_mkey && !(alg_mkey & cp->algorithm_mkey))
  ------------------
  |  Branch (804:17): [True: 4.80M, False: 8.49M]
  |  Branch (804:29): [True: 3.62M, False: 1.18M]
  ------------------
  805|  3.62M|                continue;
  806|  9.67M|            if (alg_auth && !(alg_auth & cp->algorithm_auth))
  ------------------
  |  Branch (806:17): [True: 823k, False: 8.85M]
  |  Branch (806:29): [True: 682k, False: 141k]
  ------------------
  807|   682k|                continue;
  808|  8.99M|            if (alg_enc && !(alg_enc & cp->algorithm_enc))
  ------------------
  |  Branch (808:17): [True: 3.48M, False: 5.51M]
  |  Branch (808:28): [True: 2.53M, False: 943k]
  ------------------
  809|  2.53M|                continue;
  810|  6.45M|            if (alg_mac && !(alg_mac & cp->algorithm_mac))
  ------------------
  |  Branch (810:17): [True: 2.02M, False: 4.43M]
  |  Branch (810:28): [True: 1.55M, False: 467k]
  ------------------
  811|  1.55M|                continue;
  812|  4.90M|            if (min_tls && (min_tls != cp->min_tls))
  ------------------
  |  Branch (812:17): [True: 679k, False: 4.22M]
  |  Branch (812:28): [True: 337k, False: 341k]
  ------------------
  813|   337k|                continue;
  814|  4.56M|            if ((algo_strength & SSL_STRONG_MASK)
  ------------------
  |  |  249|  4.56M|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (814:17): [True: 84.6k, False: 4.48M]
  ------------------
  815|  84.6k|                && !(algo_strength & SSL_STRONG_MASK & cp->algo_strength))
  ------------------
  |  |  249|  84.6k|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (815:20): [True: 49.0k, False: 35.5k]
  ------------------
  816|  49.0k|                continue;
  817|  4.51M|            if ((algo_strength & SSL_DEFAULT_MASK)
  ------------------
  |  |  250|  4.51M|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (817:17): [True: 558k, False: 3.96M]
  ------------------
  818|   558k|                && !(algo_strength & SSL_DEFAULT_MASK & cp->algo_strength))
  ------------------
  |  |  250|   558k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (818:20): [True: 248k, False: 310k]
  ------------------
  819|   248k|                continue;
  820|  4.51M|        }
  821|       |
  822|  4.98M|        if (trc_out != NULL)
  ------------------
  |  Branch (822:13): [True: 0, False: 4.98M]
  ------------------
  823|      0|            BIO_printf(trc_out, "Action = %d\n", rule);
  824|       |
  825|       |        /* add the cipher if it has not been added yet. */
  826|  4.98M|        if (rule == CIPHER_ADD) {
  ------------------
  |  |  141|  4.98M|#define CIPHER_ADD 1
  ------------------
  |  Branch (826:13): [True: 1.87M, False: 3.10M]
  ------------------
  827|       |            /* reverse == 0 */
  828|  1.87M|            if (!curr->active) {
  ------------------
  |  Branch (828:17): [True: 1.31M, False: 567k]
  ------------------
  829|  1.31M|                ll_append_tail(&head, curr, &tail);
  830|  1.31M|                curr->active = 1;
  831|  1.31M|            }
  832|  1.87M|        }
  833|       |        /* Move the added cipher to this location */
  834|  3.10M|        else if (rule == CIPHER_ORD) {
  ------------------
  |  |  144|  3.10M|#define CIPHER_ORD 4
  ------------------
  |  Branch (834:18): [True: 929k, False: 2.17M]
  ------------------
  835|       |            /* reverse == 0 */
  836|   929k|            if (curr->active) {
  ------------------
  |  Branch (836:17): [True: 903k, False: 26.3k]
  ------------------
  837|   903k|                ll_append_tail(&head, curr, &tail);
  838|   903k|            }
  839|  2.17M|        } else if (rule == CIPHER_DEL) {
  ------------------
  |  |  143|  2.17M|#define CIPHER_DEL 3
  ------------------
  |  Branch (839:20): [True: 845k, False: 1.32M]
  ------------------
  840|       |            /* reverse == 1 */
  841|   845k|            if (curr->active) {
  ------------------
  |  Branch (841:17): [True: 816k, False: 29.3k]
  ------------------
  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|   816k|                ll_append_head(&head, curr, &tail);
  848|   816k|                curr->active = 0;
  849|   816k|            }
  850|  1.32M|        } else if (rule == CIPHER_BUMP) {
  ------------------
  |  |  150|  1.32M|#define CIPHER_BUMP 6
  ------------------
  |  Branch (850:20): [True: 967k, False: 361k]
  ------------------
  851|   967k|            if (curr->active)
  ------------------
  |  Branch (851:17): [True: 967k, False: 0]
  ------------------
  852|   967k|                ll_append_head(&head, curr, &tail);
  853|   967k|        } else if (rule == CIPHER_KILL) {
  ------------------
  |  |  142|   361k|#define CIPHER_KILL 2
  ------------------
  |  Branch (853:20): [True: 361k, False: 0]
  ------------------
  854|       |            /* reverse == 0 */
  855|   361k|            if (head == curr)
  ------------------
  |  Branch (855:17): [True: 60.6k, False: 301k]
  ------------------
  856|  60.6k|                head = curr->next;
  857|   301k|            else
  858|   301k|                curr->prev->next = curr->next;
  859|   361k|            if (tail == curr)
  ------------------
  |  Branch (859:17): [True: 3.17k, False: 358k]
  ------------------
  860|  3.17k|                tail = curr->prev;
  861|   361k|            curr->active = 0;
  862|   361k|            if (curr->next != NULL)
  ------------------
  |  Branch (862:17): [True: 358k, False: 3.17k]
  ------------------
  863|   358k|                curr->next->prev = curr->prev;
  864|   361k|            if (curr->prev != NULL)
  ------------------
  |  Branch (864:17): [True: 301k, False: 60.6k]
  ------------------
  865|   301k|                curr->prev->next = curr->next;
  866|   361k|            curr->next = NULL;
  867|   361k|            curr->prev = NULL;
  868|   361k|        }
  869|  4.98M|    }
  870|       |
  871|   105k|    *head_p = head;
  872|   105k|    *tail_p = tail;
  873|       |
  874|   105k|    OSSL_TRACE_END(TLS_CIPHER);
  ------------------
  |  |  224|   105k|    }                            \
  |  |  225|   105k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 105k]
  |  |  ------------------
  ------------------
  875|   105k|}
ssl_ciph.c:ll_append_tail:
  574|  2.21M|{
  575|  2.21M|    if (curr == *tail)
  ------------------
  |  Branch (575:9): [True: 4.01k, False: 2.21M]
  ------------------
  576|  4.01k|        return;
  577|  2.21M|    if (curr == *head)
  ------------------
  |  Branch (577:9): [True: 692k, False: 1.51M]
  ------------------
  578|   692k|        *head = curr->next;
  579|  2.21M|    if (curr->prev != NULL)
  ------------------
  |  Branch (579:9): [True: 1.51M, False: 692k]
  ------------------
  580|  1.51M|        curr->prev->next = curr->next;
  581|  2.21M|    if (curr->next != NULL)
  ------------------
  |  Branch (581:9): [True: 2.21M, False: 0]
  ------------------
  582|  2.21M|        curr->next->prev = curr->prev;
  583|  2.21M|    (*tail)->next = curr;
  584|  2.21M|    curr->prev = *tail;
  585|       |    curr->next = NULL;
  586|  2.21M|    *tail = curr;
  587|  2.21M|}
ssl_ciph.c:ll_append_head:
  591|  1.78M|{
  592|  1.78M|    if (curr == *head)
  ------------------
  |  Branch (592:9): [True: 20, False: 1.78M]
  ------------------
  593|     20|        return;
  594|  1.78M|    if (curr == *tail)
  ------------------
  |  Branch (594:9): [True: 809k, False: 974k]
  ------------------
  595|   809k|        *tail = curr->prev;
  596|  1.78M|    if (curr->next != NULL)
  ------------------
  |  Branch (596:9): [True: 974k, False: 809k]
  ------------------
  597|   974k|        curr->next->prev = curr->prev;
  598|  1.78M|    if (curr->prev != NULL)
  ------------------
  |  Branch (598:9): [True: 1.78M, False: 0]
  ------------------
  599|  1.78M|        curr->prev->next = curr->next;
  600|  1.78M|    (*head)->prev = curr;
  601|  1.78M|    curr->next = *head;
  602|       |    curr->prev = NULL;
  603|  1.78M|    *head = curr;
  604|  1.78M|}
ssl_ciph.c:ssl_cipher_strength_sort:
  879|  4.63k|{
  880|  4.63k|    int32_t max_strength_bits;
  881|  4.63k|    int i, *number_uses;
  882|  4.63k|    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|  4.63k|    max_strength_bits = 0;
  890|  4.63k|    curr = *head_p;
  891|   737k|    while (curr != NULL) {
  ------------------
  |  Branch (891:12): [True: 732k, False: 4.63k]
  ------------------
  892|   732k|        if (curr->active && (curr->cipher->strength_bits > max_strength_bits))
  ------------------
  |  Branch (892:13): [True: 688k, False: 44.5k]
  |  Branch (892:29): [True: 4.33k, False: 683k]
  ------------------
  893|  4.33k|            max_strength_bits = curr->cipher->strength_bits;
  894|   732k|        curr = curr->next;
  895|   732k|    }
  896|       |
  897|  4.63k|    number_uses = OPENSSL_calloc(max_strength_bits + 1, sizeof(int));
  ------------------
  |  |  113|  4.63k|    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|  4.63k|    if (number_uses == NULL)
  ------------------
  |  Branch (898:9): [True: 0, False: 4.63k]
  ------------------
  899|      0|        return 0;
  900|       |
  901|       |    /*
  902|       |     * Now find the strength_bits values actually used
  903|       |     */
  904|  4.63k|    curr = *head_p;
  905|   737k|    while (curr != NULL) {
  ------------------
  |  Branch (905:12): [True: 732k, False: 4.63k]
  ------------------
  906|   732k|        if (curr->active)
  ------------------
  |  Branch (906:13): [True: 688k, False: 44.5k]
  ------------------
  907|   688k|            number_uses[curr->cipher->strength_bits]++;
  908|   732k|        curr = curr->next;
  909|   732k|    }
  910|       |    /*
  911|       |     * Go through the list of used strength_bits values in descending
  912|       |     * order.
  913|       |     */
  914|  1.10M|    for (i = max_strength_bits; i >= 0; i--)
  ------------------
  |  Branch (914:33): [True: 1.10M, False: 4.63k]
  ------------------
  915|  1.10M|        if (number_uses[i] > 0)
  ------------------
  |  Branch (915:13): [True: 21.1k, False: 1.07M]
  ------------------
  916|  21.1k|            ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_ORD, i, head_p,
  ------------------
  |  |  144|  21.1k|#define CIPHER_ORD 4
  ------------------
  917|  21.1k|                tail_p);
  918|       |
  919|  4.63k|    OPENSSL_free(number_uses);
  ------------------
  |  |  132|  4.63k|    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|  4.63k|    return 1;
  921|  4.63k|}
ssl_ciph.c:ssl_cipher_collect_aliases:
  678|  3.93k|{
  679|  3.93k|    CIPHER_ORDER *ciph_curr;
  680|  3.93k|    const SSL_CIPHER **ca_curr;
  681|  3.93k|    int i;
  682|  3.93k|    uint32_t mask_mkey = ~disabled_mkey;
  683|  3.93k|    uint32_t mask_auth = ~disabled_auth;
  684|  3.93k|    uint32_t mask_enc = ~disabled_enc;
  685|  3.93k|    uint32_t mask_mac = ~disabled_mac;
  686|       |
  687|       |    /*
  688|       |     * First, add the real ciphers as already collected
  689|       |     */
  690|  3.93k|    ciph_curr = head;
  691|  3.93k|    ca_curr = ca_list;
  692|   653k|    while (ciph_curr != NULL) {
  ------------------
  |  Branch (692:12): [True: 649k, False: 3.93k]
  ------------------
  693|   649k|        *ca_curr = ciph_curr->cipher;
  694|   649k|        ca_curr++;
  695|   649k|        ciph_curr = ciph_curr->next;
  696|   649k|    }
  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|   307k|    for (i = 0; i < num_of_group_aliases; i++) {
  ------------------
  |  Branch (704:17): [True: 303k, False: 3.93k]
  ------------------
  705|   303k|        uint32_t algorithm_mkey = cipher_aliases[i].algorithm_mkey;
  706|   303k|        uint32_t algorithm_auth = cipher_aliases[i].algorithm_auth;
  707|   303k|        uint32_t algorithm_enc = cipher_aliases[i].algorithm_enc;
  708|   303k|        uint32_t algorithm_mac = cipher_aliases[i].algorithm_mac;
  709|       |
  710|   303k|        if (algorithm_mkey)
  ------------------
  |  Branch (710:13): [True: 98.4k, False: 204k]
  ------------------
  711|  98.4k|            if ((algorithm_mkey & mask_mkey) == 0)
  ------------------
  |  Branch (711:17): [True: 9.39k, False: 89.0k]
  ------------------
  712|  9.39k|                continue;
  713|       |
  714|   293k|        if (algorithm_auth)
  ------------------
  |  Branch (714:13): [True: 77.9k, False: 215k]
  ------------------
  715|  77.9k|            if ((algorithm_auth & mask_auth) == 0)
  ------------------
  |  Branch (715:17): [True: 12.1k, False: 65.7k]
  ------------------
  716|  12.1k|                continue;
  717|       |
  718|   281k|        if (algorithm_enc)
  ------------------
  |  Branch (718:13): [True: 110k, False: 171k]
  ------------------
  719|   110k|            if ((algorithm_enc & mask_enc) == 0)
  ------------------
  |  Branch (719:17): [True: 25.1k, False: 84.8k]
  ------------------
  720|  25.1k|                continue;
  721|       |
  722|   256k|        if (algorithm_mac)
  ------------------
  |  Branch (722:13): [True: 39.1k, False: 217k]
  ------------------
  723|  39.1k|            if ((algorithm_mac & mask_mac) == 0)
  ------------------
  |  Branch (723:17): [True: 12.2k, False: 26.8k]
  ------------------
  724|  12.2k|                continue;
  725|       |
  726|   244k|        *ca_curr = (SSL_CIPHER *)(cipher_aliases + i);
  727|   244k|        ca_curr++;
  728|   244k|    }
  729|       |
  730|       |    *ca_curr = NULL; /* end of list */
  731|  3.93k|}
ssl_ciph.c:ssl_cipher_process_rulestr:
  927|  3.95k|{
  928|  3.95k|    uint32_t alg_mkey, alg_auth, alg_enc, alg_mac, algo_strength;
  929|  3.95k|    int min_tls;
  930|  3.95k|    const char *l, *buf;
  931|  3.95k|    int j, multi, found, rule, retval, ok, buflen;
  932|  3.95k|    uint32_t cipher_id = 0;
  933|  3.95k|    char ch;
  934|       |
  935|  3.95k|    retval = 1;
  936|  3.95k|    l = rule_str;
  937|   118k|    for (;;) {
  938|   118k|        ch = *l;
  939|       |
  940|   118k|        if (ch == '\0')
  ------------------
  |  Branch (940:13): [True: 106, False: 118k]
  ------------------
  941|    106|            break; /* done */
  942|   118k|        if (ch == '-') {
  ------------------
  |  Branch (942:13): [True: 4.47k, False: 113k]
  ------------------
  943|  4.47k|            rule = CIPHER_DEL;
  ------------------
  |  |  143|  4.47k|#define CIPHER_DEL 3
  ------------------
  944|  4.47k|            l++;
  945|   113k|        } else if (ch == '+') {
  ------------------
  |  Branch (945:20): [True: 1.93k, False: 111k]
  ------------------
  946|  1.93k|            rule = CIPHER_ORD;
  ------------------
  |  |  144|  1.93k|#define CIPHER_ORD 4
  ------------------
  947|  1.93k|            l++;
  948|   111k|        } else if (ch == '!') {
  ------------------
  |  Branch (948:20): [True: 8.34k, False: 103k]
  ------------------
  949|  8.34k|            rule = CIPHER_KILL;
  ------------------
  |  |  142|  8.34k|#define CIPHER_KILL 2
  ------------------
  950|  8.34k|            l++;
  951|   103k|        } else if (ch == '@') {
  ------------------
  |  Branch (951:20): [True: 4.28k, False: 99.2k]
  ------------------
  952|  4.28k|            rule = CIPHER_SPECIAL;
  ------------------
  |  |  145|  4.28k|#define CIPHER_SPECIAL 5
  ------------------
  953|  4.28k|            l++;
  954|  99.2k|        } else {
  955|  99.2k|            rule = CIPHER_ADD;
  ------------------
  |  |  141|  99.2k|#define CIPHER_ADD 1
  ------------------
  956|  99.2k|        }
  957|       |
  958|   118k|        if (ITEM_SEP(ch)) {
  ------------------
  |  |  570|   118k|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (570:6): [True: 10.8k, False: 107k]
  |  |  |  Branch (570:22): [True: 4.98k, False: 102k]
  |  |  |  Branch (570:38): [True: 27.3k, False: 74.9k]
  |  |  |  Branch (570:54): [True: 24.0k, False: 50.9k]
  |  |  ------------------
  ------------------
  959|  67.3k|            l++;
  960|  67.3k|            continue;
  961|  67.3k|        }
  962|       |
  963|  50.9k|        alg_mkey = 0;
  964|  50.9k|        alg_auth = 0;
  965|  50.9k|        alg_enc = 0;
  966|  50.9k|        alg_mac = 0;
  967|  50.9k|        min_tls = 0;
  968|  50.9k|        algo_strength = 0;
  969|       |
  970|  54.0k|        for (;;) {
  971|  54.0k|            ch = *l;
  972|  54.0k|            buf = l;
  973|  54.0k|            buflen = 0;
  974|  54.0k|#ifndef CHARSET_EBCDIC
  975|   297k|            while (((ch >= 'A') && (ch <= 'Z')) || ((ch >= '0') && (ch <= '9')) || ((ch >= 'a') && (ch <= 'z')) || (ch == '-') || (ch == '_') || (ch == '.') || (ch == '='))
  ------------------
  |  Branch (975:21): [True: 227k, False: 70.3k]
  |  Branch (975:36): [True: 201k, False: 25.9k]
  |  Branch (975:53): [True: 61.1k, False: 35.1k]
  |  Branch (975:68): [True: 8.00k, False: 53.1k]
  |  Branch (975:85): [True: 22.4k, False: 65.7k]
  |  Branch (975:100): [True: 22.1k, False: 372]
  |  Branch (975:116): [True: 3.59k, False: 62.5k]
  |  Branch (975:131): [True: 1.74k, False: 60.7k]
  |  Branch (975:146): [True: 3.96k, False: 56.8k]
  |  Branch (975:161): [True: 2.74k, False: 54.0k]
  ------------------
  976|       |#else
  977|       |            while (isalnum((unsigned char)ch) || (ch == '-') || (ch == '_') || (ch == '.')
  978|       |                || (ch == '='))
  979|       |#endif
  980|   243k|            {
  981|   243k|                ch = *(++l);
  982|   243k|                buflen++;
  983|   243k|            }
  984|       |
  985|  54.0k|            if (buflen == 0) {
  ------------------
  |  Branch (985:17): [True: 178, False: 53.9k]
  ------------------
  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|    178|                ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  357|    178|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|    178|    (ERR_new(),                                                  \
  |  |  |  |  360|    178|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|    178|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|    178|        ERR_set_error)
  |  |  ------------------
  ------------------
  992|    178|                return 0;
  993|    178|            }
  994|       |
  995|  53.9k|            if (rule == CIPHER_SPECIAL) {
  ------------------
  |  |  145|  53.9k|#define CIPHER_SPECIAL 5
  ------------------
  |  Branch (995:17): [True: 4.27k, False: 49.6k]
  ------------------
  996|  4.27k|                found = 0; /* unused -- avoid compiler warning */
  997|  4.27k|                break; /* special treatment */
  998|  4.27k|            }
  999|       |
 1000|       |            /* check for multi-part specification */
 1001|  49.6k|            if (ch == '+') {
  ------------------
  |  Branch (1001:17): [True: 4.33k, False: 45.3k]
  ------------------
 1002|  4.33k|                multi = 1;
 1003|  4.33k|                l++;
 1004|  45.3k|            } else {
 1005|  45.3k|                multi = 0;
 1006|  45.3k|            }
 1007|       |
 1008|       |            /*
 1009|       |             * Now search for the cipher alias in the ca_list. Be careful
 1010|       |             * with the strncmp, because the "buflen" limitation
 1011|       |             * will make the rule "ADH:SOME" and the cipher
 1012|       |             * "ADH-MY-CIPHER" look like a match for buflen=3.
 1013|       |             * So additionally check whether the cipher name found
 1014|       |             * has the correct length. We can save a strlen() call:
 1015|       |             * just checking for the '\0' at the right place is
 1016|       |             * sufficient, we have to strncmp() anyway. (We cannot
 1017|       |             * use strcasecmp(), because buf is not '\0' terminated.)
 1018|       |             */
 1019|  49.6k|            j = found = 0;
 1020|  49.6k|            cipher_id = 0;
 1021|  10.7M|            while (ca_list[j]) {
  ------------------
  |  Branch (1021:20): [True: 10.6M, False: 28.5k]
  ------------------
 1022|  10.6M|                if (OPENSSL_strncasecmp(buf, ca_list[j]->name, buflen) == 0
  ------------------
  |  Branch (1022:21): [True: 391k, False: 10.2M]
  ------------------
 1023|   391k|                    && (ca_list[j]->name[buflen] == '\0')) {
  ------------------
  |  Branch (1023:24): [True: 21.1k, False: 370k]
  ------------------
 1024|  21.1k|                    found = 1;
 1025|  21.1k|                    break;
 1026|  10.6M|                } else if (ca_list[j]->stdname != NULL
  ------------------
  |  Branch (1026:28): [True: 8.33M, False: 2.32M]
  ------------------
 1027|  8.33M|                    && OPENSSL_strncasecmp(buf, ca_list[j]->stdname, buflen) == 0
  ------------------
  |  Branch (1027:24): [True: 82.8k, False: 8.24M]
  ------------------
 1028|  82.8k|                    && ca_list[j]->stdname[buflen] == '\0') {
  ------------------
  |  Branch (1028:24): [True: 21, False: 82.8k]
  ------------------
 1029|     21|                    found = 1;
 1030|     21|                    break;
 1031|     21|                } else
 1032|  10.6M|                    j++;
 1033|  10.6M|            }
 1034|       |
 1035|  49.6k|            if (!found)
  ------------------
  |  Branch (1035:17): [True: 28.5k, False: 21.1k]
  ------------------
 1036|  28.5k|                break; /* ignore this entry */
 1037|       |
 1038|  21.1k|            if (ca_list[j]->algorithm_mkey) {
  ------------------
  |  Branch (1038:17): [True: 4.10k, False: 17.0k]
  ------------------
 1039|  4.10k|                if (alg_mkey) {
  ------------------
  |  Branch (1039:21): [True: 832, False: 3.27k]
  ------------------
 1040|    832|                    alg_mkey &= ca_list[j]->algorithm_mkey;
 1041|    832|                    if (!alg_mkey) {
  ------------------
  |  Branch (1041:25): [True: 93, False: 739]
  ------------------
 1042|     93|                        found = 0;
 1043|     93|                        break;
 1044|     93|                    }
 1045|  3.27k|                } else {
 1046|  3.27k|                    alg_mkey = ca_list[j]->algorithm_mkey;
 1047|  3.27k|                }
 1048|  4.10k|            }
 1049|       |
 1050|  21.0k|            if (ca_list[j]->algorithm_auth) {
  ------------------
  |  Branch (1050:17): [True: 2.46k, False: 18.5k]
  ------------------
 1051|  2.46k|                if (alg_auth) {
  ------------------
  |  Branch (1051:21): [True: 335, False: 2.13k]
  ------------------
 1052|    335|                    alg_auth &= ca_list[j]->algorithm_auth;
 1053|    335|                    if (!alg_auth) {
  ------------------
  |  Branch (1053:25): [True: 26, False: 309]
  ------------------
 1054|     26|                        found = 0;
 1055|     26|                        break;
 1056|     26|                    }
 1057|  2.13k|                } else {
 1058|  2.13k|                    alg_auth = ca_list[j]->algorithm_auth;
 1059|  2.13k|                }
 1060|  2.46k|            }
 1061|       |
 1062|  21.0k|            if (ca_list[j]->algorithm_enc) {
  ------------------
  |  Branch (1062:17): [True: 8.01k, False: 12.9k]
  ------------------
 1063|  8.01k|                if (alg_enc) {
  ------------------
  |  Branch (1063:21): [True: 37, False: 7.97k]
  ------------------
 1064|     37|                    alg_enc &= ca_list[j]->algorithm_enc;
 1065|     37|                    if (!alg_enc) {
  ------------------
  |  Branch (1065:25): [True: 10, False: 27]
  ------------------
 1066|     10|                        found = 0;
 1067|     10|                        break;
 1068|     10|                    }
 1069|  7.97k|                } else {
 1070|  7.97k|                    alg_enc = ca_list[j]->algorithm_enc;
 1071|  7.97k|                }
 1072|  8.01k|            }
 1073|       |
 1074|  20.9k|            if (ca_list[j]->algorithm_mac) {
  ------------------
  |  Branch (1074:17): [True: 3.93k, False: 17.0k]
  ------------------
 1075|  3.93k|                if (alg_mac) {
  ------------------
  |  Branch (1075:21): [True: 145, False: 3.78k]
  ------------------
 1076|    145|                    alg_mac &= ca_list[j]->algorithm_mac;
 1077|    145|                    if (!alg_mac) {
  ------------------
  |  Branch (1077:25): [True: 18, False: 127]
  ------------------
 1078|     18|                        found = 0;
 1079|     18|                        break;
 1080|     18|                    }
 1081|  3.78k|                } else {
 1082|  3.78k|                    alg_mac = ca_list[j]->algorithm_mac;
 1083|  3.78k|                }
 1084|  3.93k|            }
 1085|       |
 1086|  20.9k|            if (ca_list[j]->algo_strength & SSL_STRONG_MASK) {
  ------------------
  |  |  249|  20.9k|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1086:17): [True: 2.22k, False: 18.7k]
  ------------------
 1087|  2.22k|                if (algo_strength & SSL_STRONG_MASK) {
  ------------------
  |  |  249|  2.22k|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1087:21): [True: 327, False: 1.90k]
  ------------------
 1088|    327|                    algo_strength &= (ca_list[j]->algo_strength & SSL_STRONG_MASK) | ~SSL_STRONG_MASK;
  ------------------
  |  |  249|    327|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
                                  algo_strength &= (ca_list[j]->algo_strength & SSL_STRONG_MASK) | ~SSL_STRONG_MASK;
  ------------------
  |  |  249|    327|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
 1089|    327|                    if (!(algo_strength & SSL_STRONG_MASK)) {
  ------------------
  |  |  249|    327|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1089:25): [True: 133, False: 194]
  ------------------
 1090|    133|                        found = 0;
 1091|    133|                        break;
 1092|    133|                    }
 1093|  1.90k|                } else {
 1094|  1.90k|                    algo_strength = ca_list[j]->algo_strength & SSL_STRONG_MASK;
  ------------------
  |  |  249|  1.90k|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
 1095|  1.90k|                }
 1096|  2.22k|            }
 1097|       |
 1098|  20.8k|            if (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) {
  ------------------
  |  |  250|  20.8k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1098:17): [True: 3.70k, False: 17.1k]
  ------------------
 1099|  3.70k|                if (algo_strength & SSL_DEFAULT_MASK) {
  ------------------
  |  |  250|  3.70k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1099:21): [True: 215, False: 3.48k]
  ------------------
 1100|    215|                    algo_strength &= (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) | ~SSL_DEFAULT_MASK;
  ------------------
  |  |  250|    215|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
                                  algo_strength &= (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) | ~SSL_DEFAULT_MASK;
  ------------------
  |  |  250|    215|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
 1101|    215|                    if (!(algo_strength & SSL_DEFAULT_MASK)) {
  ------------------
  |  |  250|    215|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1101:25): [True: 0, False: 215]
  ------------------
 1102|      0|                        found = 0;
 1103|      0|                        break;
 1104|      0|                    }
 1105|  3.48k|                } else {
 1106|  3.48k|                    algo_strength |= ca_list[j]->algo_strength & SSL_DEFAULT_MASK;
  ------------------
  |  |  250|  3.48k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
 1107|  3.48k|                }
 1108|  3.70k|            }
 1109|       |
 1110|  20.8k|            if (ca_list[j]->valid) {
  ------------------
  |  Branch (1110:17): [True: 456, False: 20.3k]
  ------------------
 1111|       |                /*
 1112|       |                 * explicit ciphersuite found; its protocol version does not
 1113|       |                 * become part of the search pattern!
 1114|       |                 */
 1115|       |
 1116|    456|                cipher_id = ca_list[j]->id;
 1117|  20.3k|            } 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|  20.3k|                if (ca_list[j]->min_tls) {
  ------------------
  |  Branch (1123:21): [True: 417, False: 19.9k]
  ------------------
 1124|    417|                    if (min_tls != 0 && min_tls != ca_list[j]->min_tls) {
  ------------------
  |  Branch (1124:25): [True: 106, False: 311]
  |  Branch (1124:41): [True: 67, False: 39]
  ------------------
 1125|     67|                        found = 0;
 1126|     67|                        break;
 1127|    350|                    } else {
 1128|    350|                        min_tls = ca_list[j]->min_tls;
 1129|    350|                    }
 1130|    417|                }
 1131|  20.3k|            }
 1132|       |
 1133|  20.7k|            if (!multi)
  ------------------
  |  Branch (1133:17): [True: 17.6k, False: 3.17k]
  ------------------
 1134|  17.6k|                break;
 1135|  20.7k|        }
 1136|       |
 1137|       |        /*
 1138|       |         * Ok, we have the rule, now apply it
 1139|       |         */
 1140|  50.7k|        if (rule == CIPHER_SPECIAL) { /* special command */
  ------------------
  |  |  145|  50.7k|#define CIPHER_SPECIAL 5
  ------------------
  |  Branch (1140:13): [True: 4.27k, False: 46.4k]
  ------------------
 1141|  4.27k|            ok = 0;
 1142|  4.27k|            if ((buflen == 8) && HAS_CASE_PREFIX(buf, "STRENGTH")) {
  ------------------
  |  |   63|    997|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 696, False: 301]
  |  |  ------------------
  ------------------
  |  Branch (1142:17): [True: 997, False: 3.27k]
  ------------------
 1143|    696|                ok = ssl_cipher_strength_sort(head_p, tail_p);
 1144|  3.57k|            } else if (buflen == 10
  ------------------
  |  Branch (1144:24): [True: 426, False: 3.15k]
  ------------------
 1145|    426|                && CHECK_AND_SKIP_CASE_PREFIX(buf, "SECLEVEL=")) {
  ------------------
  |  |   66|    426|    (HAS_CASE_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   63|    426|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:31): [True: 250, False: 176]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (66:5): [True: 250, False: 176]
  |  |  ------------------
  ------------------
 1146|    250|                int level = *buf - '0';
 1147|    250|                if (level < 0 || level > 5) {
  ------------------
  |  Branch (1147:21): [True: 82, False: 168]
  |  Branch (1147:34): [True: 42, False: 126]
  ------------------
 1148|    124|                    ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  357|    124|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|    124|    (ERR_new(),                                                  \
  |  |  |  |  360|    124|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|    124|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|    124|        ERR_set_error)
  |  |  ------------------
  ------------------
 1149|    126|                } else {
 1150|    126|                    c->sec_level = level;
 1151|    126|                    ok = 1;
 1152|    126|                }
 1153|  3.32k|            } else {
 1154|  3.32k|                ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  357|  3.32k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  3.32k|    (ERR_new(),                                                  \
  |  |  |  |  360|  3.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|  3.32k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  3.32k|        ERR_set_error)
  |  |  ------------------
  ------------------
 1155|  3.32k|            }
 1156|  4.27k|            if (ok == 0)
  ------------------
  |  Branch (1156:17): [True: 3.45k, False: 822]
  ------------------
 1157|  3.45k|                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|  25.1k|            while ((*l != '\0') && !ITEM_SEP(*l))
  ------------------
  |  |  570|  25.0k|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (570:6): [True: 743, False: 24.2k]
  |  |  |  Branch (570:22): [True: 476, False: 23.7k]
  |  |  |  Branch (570:38): [True: 1.56k, False: 22.2k]
  |  |  |  Branch (570:54): [True: 1.38k, False: 20.8k]
  |  |  ------------------
  ------------------
  |  Branch (1164:20): [True: 25.0k, False: 106]
  ------------------
 1165|  20.8k|                l++;
 1166|  46.4k|        } else if (found) {
  ------------------
  |  Branch (1166:20): [True: 17.6k, False: 28.8k]
  ------------------
 1167|  17.6k|            ssl_cipher_apply_rule(cipher_id,
 1168|  17.6k|                alg_mkey, alg_auth, alg_enc, alg_mac,
 1169|  17.6k|                min_tls, algo_strength, rule, -1, head_p,
 1170|  17.6k|                tail_p);
 1171|  28.8k|        } else {
 1172|   114k|            while ((*l != '\0') && !ITEM_SEP(*l))
  ------------------
  |  |  570|   114k|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (570:6): [True: 2.63k, False: 111k]
  |  |  |  Branch (570:22): [True: 1.48k, False: 110k]
  |  |  |  Branch (570:38): [True: 16.0k, False: 94.2k]
  |  |  |  Branch (570:54): [True: 8.35k, False: 85.8k]
  |  |  ------------------
  ------------------
  |  Branch (1172:20): [True: 114k, False: 336]
  ------------------
 1173|  85.8k|                l++;
 1174|  28.8k|        }
 1175|  50.7k|        if (*l == '\0')
  ------------------
  |  Branch (1175:13): [True: 3.67k, False: 47.0k]
  ------------------
 1176|  3.67k|            break; /* done */
 1177|  50.7k|    }
 1178|       |
 1179|  3.77k|    return retval;
 1180|  3.95k|}
ssl_ciph.c:update_cipher_list_by_id:
 1289|  3.64k|{
 1290|  3.64k|    STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack);
  ------------------
  |  |   33|  3.64k|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack);
  ------------------
  |  | 1050|  3.64k|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
 1291|       |
 1292|  3.64k|    if (tmp_cipher_list == NULL) {
  ------------------
  |  Branch (1292:9): [True: 0, False: 3.64k]
  ------------------
 1293|      0|        return 0;
 1294|      0|    }
 1295|       |
 1296|  3.64k|    sk_SSL_CIPHER_free(*cipher_list_by_id);
  ------------------
  |  | 1034|  3.64k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1297|  3.64k|    *cipher_list_by_id = tmp_cipher_list;
 1298|       |
 1299|  3.64k|    (void)sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id, ssl_cipher_ptr_id_cmp);
  ------------------
  |  | 1052|  3.64k|#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|  3.64k|    sk_SSL_CIPHER_sort(*cipher_list_by_id);
  ------------------
  |  | 1048|  3.64k|#define sk_SSL_CIPHER_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1301|       |
 1302|  3.64k|    return 1;
 1303|  3.64k|}

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

OPENSSL_init_ssl:
   47|  5.44k|{
   48|  5.44k|    static int stoperrset = 0;
   49|       |
   50|  5.44k|    if (stopped) {
  ------------------
  |  Branch (50:9): [True: 0, False: 5.44k]
  ------------------
   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|  5.44k|    opts |= OPENSSL_INIT_ADD_ALL_CIPHERS
  ------------------
  |  |  507|  5.44k|#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
  ------------------
   64|  5.44k|        | OPENSSL_INIT_ADD_ALL_DIGESTS;
  ------------------
  |  |  508|  5.44k|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
   65|  5.44k|#ifndef OPENSSL_NO_AUTOLOAD_CONFIG
   66|  5.44k|    if ((opts & OPENSSL_INIT_NO_LOAD_CONFIG) == 0)
  ------------------
  |  |  512|  5.44k|#define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L
  ------------------
  |  Branch (66:9): [True: 5.44k, False: 0]
  ------------------
   67|  5.44k|        opts |= OPENSSL_INIT_LOAD_CONFIG;
  ------------------
  |  |  511|  5.44k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
   68|  5.44k|#endif
   69|       |
   70|  5.44k|    if (!OPENSSL_init_crypto(opts, settings))
  ------------------
  |  Branch (70:9): [True: 0, False: 5.44k]
  ------------------
   71|      0|        return 0;
   72|       |
   73|  5.44k|    if (!RUN_ONCE(&ssl_base, ossl_init_ssl_base))
  ------------------
  |  |  130|  5.44k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 5.44k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (73:9): [True: 0, False: 5.44k]
  ------------------
   74|      0|        return 0;
   75|       |
   76|  5.44k|    return 1;
   77|  5.44k|}
ssl_init.c:ossl_init_ssl_base:
   25|      1|{
   26|      1|#ifndef OPENSSL_NO_COMP
   27|      1|    OSSL_TRACE(INIT, "ossl_init_ssl_base: "
  ------------------
  |  |  288|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   28|      1|                     "SSL_COMP_get_compression_methods()\n");
   29|       |    /*
   30|       |     * This will initialise the built-in compression algorithms. The value
   31|       |     * returned is a STACK_OF(SSL_COMP), but that can be discarded safely
   32|       |     */
   33|      1|    SSL_COMP_get_compression_methods();
   34|      1|#endif
   35|      1|    ssl_sort_cipher_list();
   36|      1|    OSSL_TRACE(INIT, "ossl_init_ssl_base: SSL_add_ssl_module()\n");
  ------------------
  |  |  288|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   37|      1|    ssl_base_inited = 1;
   38|      1|    return 1;
   39|      1|}

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

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

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

SSL_CTX_use_certificate_file:
  312|      1|{
  313|      1|    int j = SSL_R_BAD_VALUE;
  ------------------
  |  |   61|      1|#define SSL_R_BAD_VALUE 384
  ------------------
  314|      1|    BIO *in = NULL;
  315|      1|    int ret = 0;
  316|      1|    X509 *x = NULL, *cert = NULL;
  317|       |
  318|      1|    if (file == NULL) {
  ------------------
  |  Branch (318:9): [True: 0, False: 1]
  ------------------
  319|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  320|      0|        goto end;
  321|      0|    }
  322|       |
  323|      1|    in = BIO_new(BIO_s_file());
  324|      1|    if (in == NULL) {
  ------------------
  |  Branch (324:9): [True: 0, False: 1]
  ------------------
  325|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  326|      0|        goto end;
  327|      0|    }
  328|       |
  329|      1|    if (BIO_read_filename(in, file) <= 0) {
  ------------------
  |  |  596|      1|#define BIO_read_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
  |  |  ------------------
  |  |  |  |  451|      1|#define BIO_C_SET_FILENAME 108
  |  |  ------------------
  |  |  597|      1|    BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |   85|      1|#define BIO_CLOSE 0x01
  |  |  ------------------
  |  |                   BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |  217|      1|#define BIO_FP_READ 0x02
  |  |  ------------------
  ------------------
  |  Branch (329:9): [True: 1, False: 0]
  ------------------
  330|      1|        ERR_raise(ERR_LIB_SSL, ERR_R_SYS_LIB);
  ------------------
  |  |  357|      1|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      1|    (ERR_new(),                                                  \
  |  |  |  |  360|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      1|        ERR_set_error)
  |  |  ------------------
  ------------------
  331|      1|        goto end;
  332|      1|    }
  333|       |
  334|      0|    x = X509_new_ex(ctx->libctx, ctx->propq);
  335|      0|    if (x == NULL) {
  ------------------
  |  Branch (335:9): [True: 0, False: 0]
  ------------------
  336|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  337|      0|        goto end;
  338|      0|    }
  339|      0|    if (type == SSL_FILETYPE_ASN1) {
  ------------------
  |  |  227|      0|#define SSL_FILETYPE_ASN1 X509_FILETYPE_ASN1
  |  |  ------------------
  |  |  |  |  169|      0|#define X509_FILETYPE_ASN1 2
  |  |  ------------------
  ------------------
  |  Branch (339:9): [True: 0, False: 0]
  ------------------
  340|      0|        j = ERR_R_ASN1_LIB;
  ------------------
  |  |  279|      0|#define ERR_R_ASN1_LIB (ERR_LIB_ASN1 /* 13 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   66|      0|#define ERR_LIB_ASN1 13
  |  |  ------------------
  |  |               #define ERR_R_ASN1_LIB (ERR_LIB_ASN1 /* 13 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  341|      0|        cert = d2i_X509_bio(in, &x);
  342|      0|    } else if (type == SSL_FILETYPE_PEM) {
  ------------------
  |  |  228|      0|#define SSL_FILETYPE_PEM X509_FILETYPE_PEM
  |  |  ------------------
  |  |  |  |  168|      0|#define X509_FILETYPE_PEM 1
  |  |  ------------------
  ------------------
  |  Branch (342:16): [True: 0, False: 0]
  ------------------
  343|      0|        j = ERR_R_PEM_LIB;
  ------------------
  |  |  276|      0|#define ERR_R_PEM_LIB (ERR_LIB_PEM /* 9 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   62|      0|#define ERR_LIB_PEM 9
  |  |  ------------------
  |  |               #define ERR_R_PEM_LIB (ERR_LIB_PEM /* 9 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  344|      0|        cert = PEM_read_bio_X509(in, &x, ctx->default_passwd_callback,
  345|      0|            ctx->default_passwd_callback_userdata);
  346|      0|    } else {
  347|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_BAD_SSL_FILETYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  348|      0|        goto end;
  349|      0|    }
  350|      0|    if (cert == NULL) {
  ------------------
  |  Branch (350:9): [True: 0, False: 0]
  ------------------
  351|      0|        ERR_raise(ERR_LIB_SSL, j);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  352|      0|        goto end;
  353|      0|    }
  354|       |
  355|      0|    ret = SSL_CTX_use_certificate(ctx, x);
  356|      1|end:
  357|      1|    X509_free(x);
  358|      1|    BIO_free(in);
  359|      1|    return ret;
  360|      0|}
SSL_CTX_use_certificate_chain_file:
  590|     13|{
  591|       |    return use_certificate_chain_file(ctx, NULL, file);
  592|     13|}
ssl_rsa.c:use_certificate_chain_file:
  464|     13|{
  465|     13|    BIO *in = NULL;
  466|     13|    int ret = 0;
  467|     13|    X509 *x = NULL;
  468|     13|    pem_password_cb *passwd_callback;
  469|     13|    void *passwd_callback_userdata;
  470|     13|    SSL_CTX *real_ctx = (ssl == NULL) ? ctx : ssl->ctx;
  ------------------
  |  Branch (470:25): [True: 13, False: 0]
  ------------------
  471|       |
  472|     13|    if (ctx == NULL && ssl == NULL)
  ------------------
  |  Branch (472:9): [True: 0, False: 13]
  |  Branch (472:24): [True: 0, False: 0]
  ------------------
  473|      0|        return 0;
  474|       |
  475|     13|    ERR_clear_error(); /* clear error stack for
  476|       |                        * SSL_CTX_use_certificate() */
  477|       |
  478|     13|    if (ctx != NULL) {
  ------------------
  |  Branch (478:9): [True: 13, False: 0]
  ------------------
  479|     13|        passwd_callback = ctx->default_passwd_callback;
  480|     13|        passwd_callback_userdata = ctx->default_passwd_callback_userdata;
  481|     13|    } 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|     13|    if (file == NULL) {
  ------------------
  |  Branch (491:9): [True: 0, False: 13]
  ------------------
  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|     13|    in = BIO_new(BIO_s_file());
  497|     13|    if (in == NULL) {
  ------------------
  |  Branch (497:9): [True: 0, False: 13]
  ------------------
  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|     13|    if (BIO_read_filename(in, file) <= 0) {
  ------------------
  |  |  596|     13|#define BIO_read_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
  |  |  ------------------
  |  |  |  |  451|     13|#define BIO_C_SET_FILENAME 108
  |  |  ------------------
  |  |  597|     13|    BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |   85|     13|#define BIO_CLOSE 0x01
  |  |  ------------------
  |  |                   BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |  217|     13|#define BIO_FP_READ 0x02
  |  |  ------------------
  ------------------
  |  Branch (502:9): [True: 10, False: 3]
  ------------------
  503|     10|        ERR_raise(ERR_LIB_SSL, ERR_R_SYS_LIB);
  ------------------
  |  |  357|     10|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|     10|    (ERR_new(),                                                  \
  |  |  |  |  360|     10|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     10|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|     10|        ERR_set_error)
  |  |  ------------------
  ------------------
  504|     10|        goto end;
  505|     10|    }
  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|     13|end:
  584|     13|    X509_free(x);
  585|     13|    BIO_free(in);
  586|     13|    return ret;
  587|      0|}

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

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

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

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

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

ossl_statem_client_read_transition:
  228|    156|{
  229|    156|    OSSL_STATEM *st = &s->statem;
  230|    156|    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|    156|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|    156|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|    312|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    156|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|    156|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 156, False: 0]
  |  |  ------------------
  |  |  274|    156|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|    156|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|    312|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 156, False: 0]
  |  |  ------------------
  |  |  275|    156|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|    156|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|    156|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 156]
  |  |  ------------------
  ------------------
  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|    156|    switch (st->hand_state) {
  243|      0|    default:
  ------------------
  |  Branch (243:5): [True: 0, False: 156]
  ------------------
  244|      0|        break;
  245|       |
  246|    156|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (246:5): [True: 156, False: 0]
  ------------------
  247|    156|        if (mt == SSL3_MT_SERVER_HELLO) {
  ------------------
  |  |  314|    156|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (247:13): [True: 148, False: 8]
  ------------------
  248|    148|            st->hand_state = TLS_ST_CR_SRVR_HELLO;
  249|    148|            return 1;
  250|    148|        }
  251|       |
  252|      8|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|      8|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      8|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      8|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 8]
  |  |  ------------------
  ------------------
  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|      8|        break;
  259|       |
  260|      8|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (260:5): [True: 0, False: 156]
  ------------------
  261|       |        /*
  262|       |         * We've not actually selected TLSv1.3 yet, but we have sent early
  263|       |         * data. The only thing allowed now is a ServerHello or a
  264|       |         * HelloRetryRequest.
  265|       |         */
  266|      0|        if (mt == SSL3_MT_SERVER_HELLO) {
  ------------------
  |  |  314|      0|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (266:13): [True: 0, False: 0]
  ------------------
  267|      0|            st->hand_state = TLS_ST_CR_SRVR_HELLO;
  268|      0|            return 1;
  269|      0|        }
  270|      0|        break;
  271|       |
  272|      0|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (272:5): [True: 0, False: 156]
  ------------------
  273|      0|        if (s->hit) {
  ------------------
  |  Branch (273:13): [True: 0, False: 0]
  ------------------
  274|      0|            if (s->ext.ticket_expected) {
  ------------------
  |  Branch (274:17): [True: 0, False: 0]
  ------------------
  275|      0|                if (mt == SSL3_MT_NEWSESSION_TICKET) {
  ------------------
  |  |  315|      0|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (275:21): [True: 0, False: 0]
  ------------------
  276|      0|                    st->hand_state = TLS_ST_CR_SESSION_TICKET;
  277|      0|                    return 1;
  278|      0|                }
  279|      0|            } else if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (279:24): [True: 0, False: 0]
  ------------------
  280|      0|                st->hand_state = TLS_ST_CR_CHANGE;
  281|      0|                return 1;
  282|      0|            }
  283|      0|        } else {
  284|      0|            if (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  285|      0|                && mt == DTLS1_MT_HELLO_VERIFY_REQUEST) {
  ------------------
  |  |  334|      0|#define DTLS1_MT_HELLO_VERIFY_REQUEST 3
  ------------------
  |  Branch (285:20): [True: 0, False: 0]
  ------------------
  286|      0|                st->hand_state = DTLS_ST_CR_HELLO_VERIFY_REQUEST;
  287|      0|                return 1;
  288|      0|            } else if (s->version >= TLS1_VERSION
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (288:24): [True: 0, False: 0]
  ------------------
  289|      0|                && s->ext.session_secret_cb != NULL
  ------------------
  |  Branch (289:20): [True: 0, False: 0]
  ------------------
  290|      0|                && s->session->ext.tick != NULL
  ------------------
  |  Branch (290:20): [True: 0, False: 0]
  ------------------
  291|      0|                && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (291:20): [True: 0, False: 0]
  ------------------
  292|       |                /*
  293|       |                 * Normally, we can tell if the server is resuming the session
  294|       |                 * from the session ID. EAP-FAST (RFC 4851), however, relies on
  295|       |                 * the next server message after the ServerHello to determine if
  296|       |                 * the server is resuming.
  297|       |                 */
  298|      0|                s->hit = 1;
  299|      0|                st->hand_state = TLS_ST_CR_CHANGE;
  300|      0|                return 1;
  301|      0|            } else if (!(s->s3.tmp.new_cipher->algorithm_auth
  ------------------
  |  Branch (301:24): [True: 0, False: 0]
  ------------------
  302|      0|                           & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  116|      0|#define SSL_aNULL 0x00000004U
  ------------------
                                         & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  124|      0|#define SSL_aSRP 0x00000040U
  ------------------
                                         & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  120|      0|#define SSL_aPSK 0x00000010U
  ------------------
  303|      0|                if (mt == SSL3_MT_CERTIFICATE) {
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  |  Branch (303:21): [True: 0, False: 0]
  ------------------
  304|      0|                    st->hand_state = TLS_ST_CR_CERT;
  305|      0|                    return 1;
  306|      0|                }
  307|      0|            } else {
  308|      0|                ske_expected = key_exchange_expected(s);
  309|       |                /* SKE is optional for some PSK ciphersuites */
  310|      0|                if (ske_expected
  ------------------
  |  Branch (310:21): [True: 0, False: 0]
  ------------------
  311|      0|                    || ((s->s3.tmp.new_cipher->algorithm_mkey & SSL_PSK)
  ------------------
  |  |  105|      0|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   91|      0|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   97|      0|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   98|      0|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   99|      0|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
  |  Branch (311:25): [True: 0, False: 0]
  ------------------
  312|      0|                        && mt == SSL3_MT_SERVER_KEY_EXCHANGE)) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (312:28): [True: 0, False: 0]
  ------------------
  313|      0|                    if (mt == SSL3_MT_SERVER_KEY_EXCHANGE) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (313:25): [True: 0, False: 0]
  ------------------
  314|      0|                        st->hand_state = TLS_ST_CR_KEY_EXCH;
  315|      0|                        return 1;
  316|      0|                    }
  317|      0|                } else if (mt == SSL3_MT_CERTIFICATE_REQUEST
  ------------------
  |  |  320|      0|#define SSL3_MT_CERTIFICATE_REQUEST 13
  ------------------
  |  Branch (317:28): [True: 0, False: 0]
  ------------------
  318|      0|                    && cert_req_allowed(s)) {
  ------------------
  |  Branch (318:24): [True: 0, False: 0]
  ------------------
  319|      0|                    st->hand_state = TLS_ST_CR_CERT_REQ;
  320|      0|                    return 1;
  321|      0|                } else if (mt == SSL3_MT_SERVER_DONE) {
  ------------------
  |  |  321|      0|#define SSL3_MT_SERVER_DONE 14
  ------------------
  |  Branch (321:28): [True: 0, False: 0]
  ------------------
  322|      0|                    st->hand_state = TLS_ST_CR_SRVR_DONE;
  323|      0|                    return 1;
  324|      0|                }
  325|      0|            }
  326|      0|        }
  327|      0|        break;
  328|       |
  329|      0|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (329:5): [True: 0, False: 156]
  ------------------
  330|      0|    case TLS_ST_CR_COMP_CERT:
  ------------------
  |  Branch (330:5): [True: 0, False: 156]
  ------------------
  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: 156]
  ------------------
  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: 156]
  ------------------
  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: 156]
  ------------------
  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: 156]
  ------------------
  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: 156]
  ------------------
  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: 156]
  ------------------
  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: 156]
  ------------------
  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|    156|    }
  403|       |
  404|      8|err:
  405|       |    /* No valid transition found */
  406|      8|    if (SSL_CONNECTION_IS_DTLS(s) && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  266|     16|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      8|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      8|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 8]
  |  |  ------------------
  ------------------
                  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|      8|    SSLfatal(s, SSL3_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
  ------------------
  |  |  155|      8|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      8|    (ERR_new(),                                                  \
  |  |  |  |  158|      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__
  |  |  |  |  ------------------
  |  |  |  |  159|      8|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  421|      8|    return 0;
  422|      8|}
ossl_statem_client_write_transition:
  539|  4.53k|{
  540|  4.53k|    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|  4.53k|    if (SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|  4.53k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  9.06k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.53k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  4.53k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 4.53k, False: 0]
  |  |  ------------------
  |  |  274|  4.53k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  4.53k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  9.06k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 4.53k, False: 0]
  |  |  ------------------
  |  |  275|  4.53k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  4.53k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  4.53k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 4.53k]
  |  |  ------------------
  ------------------
  548|      0|        return ossl_statem_client13_write_transition(s);
  549|       |
  550|  4.53k|    switch (st->hand_state) {
  551|      0|    default:
  ------------------
  |  Branch (551:5): [True: 0, False: 4.53k]
  ------------------
  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: 4.53k]
  ------------------
  557|      0|        if (!s->renegotiate) {
  ------------------
  |  Branch (557:13): [True: 0, False: 0]
  ------------------
  558|       |            /*
  559|       |             * We haven't requested a renegotiation ourselves so we must have
  560|       |             * received a message from the server. Better read it.
  561|       |             */
  562|      0|            return WRITE_TRAN_FINISHED;
  563|      0|        }
  564|       |        /* Renegotiation */
  565|       |        /* fall thru */
  566|  2.31k|    case TLS_ST_BEFORE:
  ------------------
  |  Branch (566:5): [True: 2.31k, False: 2.22k]
  ------------------
  567|  2.31k|        st->hand_state = TLS_ST_CW_CLNT_HELLO;
  568|  2.31k|        return WRITE_TRAN_CONTINUE;
  569|       |
  570|  2.22k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (570:5): [True: 2.22k, False: 2.31k]
  ------------------
  571|  2.22k|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (571:13): [True: 0, False: 2.22k]
  ------------------
  572|      0|            && !SSL_IS_QUIC_HANDSHAKE(s)) {
  ------------------
  |  |  311|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  ------------------
  |  Branch (572:16): [True: 0, False: 0]
  ------------------
  573|       |            /*
  574|       |             * We are assuming this is a TLSv1.3 connection, although we haven't
  575|       |             * actually selected a version yet.
  576|       |             */
  577|      0|            if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0)
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (577:17): [True: 0, False: 0]
  ------------------
  578|      0|                st->hand_state = TLS_ST_CW_CHANGE;
  579|      0|            else
  580|      0|                st->hand_state = TLS_ST_EARLY_DATA;
  581|      0|            return WRITE_TRAN_CONTINUE;
  582|      0|        }
  583|       |        /*
  584|       |         * No transition at the end of writing because we don't know what
  585|       |         * we will be sent
  586|       |         */
  587|  2.22k|        s->ts_msg_write = ossl_time_now();
  588|  2.22k|        return WRITE_TRAN_FINISHED;
  589|       |
  590|      0|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (590:5): [True: 0, False: 4.53k]
  ------------------
  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: 4.53k]
  ------------------
  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: 4.53k]
  ------------------
  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: 4.53k]
  ------------------
  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: 4.53k]
  ------------------
  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: 4.53k]
  ------------------
  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: 4.53k]
  ------------------
  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: 4.53k]
  ------------------
  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: 4.53k]
  ------------------
  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: 4.53k]
  ------------------
  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: 4.53k]
  ------------------
  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: 4.53k]
  ------------------
  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|  4.53k|    }
  704|  4.53k|}
ossl_statem_client_pre_work:
  711|  2.31k|{
  712|  2.31k|    OSSL_STATEM *st = &s->statem;
  713|       |
  714|  2.31k|    switch (st->hand_state) {
  715|      0|    default:
  ------------------
  |  Branch (715:5): [True: 0, False: 2.31k]
  ------------------
  716|       |        /* No pre work to be done */
  717|      0|        break;
  718|       |
  719|  2.31k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (719:5): [True: 2.31k, False: 0]
  ------------------
  720|  2.31k|        s->shutdown = 0;
  721|  2.31k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  2.31k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.31k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.31k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 2.31k]
  |  |  ------------------
  ------------------
  722|       |            /* every DTLS ClientHello resets Finished MAC */
  723|      0|            if (!ssl3_init_finished_mac(s)) {
  ------------------
  |  Branch (723:17): [True: 0, False: 0]
  ------------------
  724|       |                /* SSLfatal() already called */
  725|      0|                return WORK_ERROR;
  726|      0|            }
  727|  2.31k|        } else if (s->ext.early_data == SSL_EARLY_DATA_REJECTED) {
  ------------------
  |  | 2073|  2.31k|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
  |  Branch (727:20): [True: 0, False: 2.31k]
  ------------------
  728|       |            /*
  729|       |             * This must be a second ClientHello after an HRR following an
  730|       |             * earlier rejected attempt to send early data. Since we were
  731|       |             * previously encrypting the early data we now need to reset the
  732|       |             * write record layer in order to write in plaintext again.
  733|       |             */
  734|      0|            if (!ssl_set_new_record_layer(s,
  ------------------
  |  Branch (734:17): [True: 0, False: 0]
  ------------------
  735|      0|                    TLS_ANY_VERSION,
  ------------------
  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  ------------------
  736|      0|                    OSSL_RECORD_DIRECTION_WRITE,
  ------------------
  |  |   43|      0|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
  737|      0|                    OSSL_RECORD_PROTECTION_LEVEL_NONE,
  ------------------
  |  | 2923|      0|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  738|      0|                    NULL, 0, NULL, 0, NULL, 0, NULL, 0,
  739|      0|                    NULL, 0, NID_undef, NULL, NULL,
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  740|      0|                    NULL)) {
  741|       |                /* SSLfatal already called */
  742|      0|                return WORK_ERROR;
  743|      0|            }
  744|      0|        }
  745|  2.31k|        break;
  746|       |
  747|  2.31k|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (747:5): [True: 0, False: 2.31k]
  ------------------
  748|      0|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  749|      0|            if (s->hit) {
  ------------------
  |  Branch (749:17): [True: 0, False: 0]
  ------------------
  750|       |                /*
  751|       |                 * We're into the last flight so we don't retransmit these
  752|       |                 * messages unless we need to.
  753|       |                 */
  754|      0|                st->use_timer = 0;
  755|      0|            }
  756|       |#ifndef OPENSSL_NO_SCTP
  757|       |            if (BIO_dgram_is_sctp(SSL_get_wbio(SSL_CONNECTION_GET_SSL(s)))) {
  758|       |                /* Calls SSLfatal() as required */
  759|       |                return dtls_wait_for_dry(s);
  760|       |            }
  761|       |#endif
  762|      0|        }
  763|      0|        break;
  764|       |
  765|      0|    case TLS_ST_PENDING_EARLY_DATA_END:
  ------------------
  |  Branch (765:5): [True: 0, False: 2.31k]
  ------------------
  766|       |        /*
  767|       |         * If we've been called by SSL_do_handshake()/SSL_write(), or we did not
  768|       |         * attempt to write early data before calling SSL_read() then we press
  769|       |         * on with the handshake. Otherwise we pause here.
  770|       |         */
  771|      0|        if (s->early_data_state == SSL_EARLY_DATA_FINISHED_WRITING
  ------------------
  |  Branch (771:13): [True: 0, False: 0]
  ------------------
  772|      0|            || s->early_data_state == SSL_EARLY_DATA_NONE)
  ------------------
  |  Branch (772:16): [True: 0, False: 0]
  ------------------
  773|      0|            return WORK_FINISHED_CONTINUE;
  774|       |        /* Fall through */
  775|       |
  776|      0|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (776:5): [True: 0, False: 2.31k]
  ------------------
  777|      0|        return tls_finish_handshake(s, wst, 0, 1);
  778|       |
  779|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (779:5): [True: 0, False: 2.31k]
  ------------------
  780|       |        /* Calls SSLfatal() as required */
  781|      0|        return tls_finish_handshake(s, wst, 1, 1);
  782|  2.31k|    }
  783|       |
  784|  2.31k|    return WORK_FINISHED_CONTINUE;
  785|  2.31k|}
ossl_statem_client_post_work:
  792|  2.22k|{
  793|  2.22k|    OSSL_STATEM *st = &s->statem;
  794|  2.22k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.22k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  795|       |
  796|  2.22k|    s->init_num = 0;
  797|       |
  798|  2.22k|    switch (st->hand_state) {
  799|      0|    default:
  ------------------
  |  Branch (799:5): [True: 0, False: 2.22k]
  ------------------
  800|       |        /* No post work to be done */
  801|      0|        break;
  802|       |
  803|  2.22k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (803:5): [True: 2.22k, False: 0]
  ------------------
  804|  2.22k|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (804:13): [True: 0, False: 2.22k]
  ------------------
  805|      0|            && s->max_early_data > 0) {
  ------------------
  |  Branch (805:16): [True: 0, False: 0]
  ------------------
  806|       |            /*
  807|       |             * We haven't selected TLSv1.3 yet so we don't call the change
  808|       |             * cipher state function associated with the SSL_METHOD. Instead
  809|       |             * we call tls13_change_cipher_state() directly.
  810|       |             */
  811|      0|            if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) == 0) {
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (811:17): [True: 0, False: 0]
  ------------------
  812|      0|                if (!tls13_change_cipher_state(s,
  ------------------
  |  Branch (812:21): [True: 0, False: 0]
  ------------------
  813|      0|                        SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  346|      0|#define SSL3_CC_EARLY 0x040
  ------------------
                                      SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  814|       |                    /* SSLfatal() already called */
  815|      0|                    return WORK_ERROR;
  816|      0|                }
  817|      0|            }
  818|       |            /* else we're in compat mode so we delay flushing until after CCS */
  819|  2.22k|        } else if (!statem_flush(s)) {
  ------------------
  |  Branch (819:20): [True: 0, False: 2.22k]
  ------------------
  820|      0|            return WORK_MORE_A;
  821|      0|        }
  822|       |
  823|  2.22k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  2.22k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.22k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.22k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 2.22k]
  |  |  ------------------
  ------------------
  824|       |            /* Treat the next message as the first packet */
  825|      0|            s->first_packet = 1;
  826|      0|        }
  827|  2.22k|        break;
  828|       |
  829|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (829:5): [True: 0, False: 2.22k]
  ------------------
  830|      0|        if (tls_client_key_exchange_post_work(s) == 0) {
  ------------------
  |  Branch (830:13): [True: 0, False: 0]
  ------------------
  831|       |            /* SSLfatal() already called */
  832|      0|            return WORK_ERROR;
  833|      0|        }
  834|      0|        break;
  835|       |
  836|      0|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (836:5): [True: 0, False: 2.22k]
  ------------------
  837|      0|        if (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  838|      0|            || s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (838:16): [True: 0, False: 0]
  ------------------
  839|      0|            break;
  840|      0|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (840:13): [True: 0, False: 0]
  ------------------
  841|      0|            && s->max_early_data > 0) {
  ------------------
  |  Branch (841:16): [True: 0, False: 0]
  ------------------
  842|       |            /*
  843|       |             * We haven't selected TLSv1.3 yet so we don't call the change
  844|       |             * cipher state function associated with the SSL_METHOD. Instead
  845|       |             * we call tls13_change_cipher_state() directly.
  846|       |             */
  847|      0|            if (!tls13_change_cipher_state(s,
  ------------------
  |  Branch (847:17): [True: 0, False: 0]
  ------------------
  848|      0|                    SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_CLIENT_WRITE))
  ------------------
  |  |  346|      0|#define SSL3_CC_EARLY 0x040
  ------------------
                                  SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_CLIENT_WRITE))
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  849|      0|                return WORK_ERROR;
  850|      0|            break;
  851|      0|        }
  852|      0|        s->session->cipher = s->s3.tmp.new_cipher;
  853|       |#ifdef OPENSSL_NO_COMP
  854|       |        s->session->compress_meth = 0;
  855|       |#else
  856|      0|        if (s->s3.tmp.new_compression == NULL)
  ------------------
  |  Branch (856:13): [True: 0, False: 0]
  ------------------
  857|      0|            s->session->compress_meth = 0;
  858|      0|        else
  859|      0|            s->session->compress_meth = s->s3.tmp.new_compression->id;
  860|      0|#endif
  861|      0|        if (!ssl->method->ssl3_enc->setup_key_block(s)) {
  ------------------
  |  Branch (861:13): [True: 0, False: 0]
  ------------------
  862|       |            /* SSLfatal() already called */
  863|      0|            return WORK_ERROR;
  864|      0|        }
  865|       |
  866|      0|        if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (866:13): [True: 0, False: 0]
  ------------------
  867|      0|                SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  868|       |            /* SSLfatal() already called */
  869|      0|            return WORK_ERROR;
  870|      0|        }
  871|       |
  872|       |#ifndef OPENSSL_NO_SCTP
  873|       |        if (SSL_CONNECTION_IS_DTLS(s) && s->hit) {
  874|       |            /*
  875|       |             * Change to new shared key of SCTP-Auth, will be ignored if
  876|       |             * no SCTP used.
  877|       |             */
  878|       |            BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY,
  879|       |                0, NULL);
  880|       |        }
  881|       |#endif
  882|      0|        break;
  883|       |
  884|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (884:5): [True: 0, False: 2.22k]
  ------------------
  885|       |#ifndef OPENSSL_NO_SCTP
  886|       |        if (wst == WORK_MORE_A && SSL_CONNECTION_IS_DTLS(s) && s->hit == 0) {
  887|       |            /*
  888|       |             * Change to new shared key of SCTP-Auth, will be ignored if
  889|       |             * no SCTP used.
  890|       |             */
  891|       |            BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY,
  892|       |                0, NULL);
  893|       |        }
  894|       |#endif
  895|      0|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (895:13): [True: 0, False: 0]
  ------------------
  896|      0|            return WORK_MORE_B;
  897|       |
  898|      0|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  899|      0|            if (!tls13_save_handshake_digest_for_pha(s)) {
  ------------------
  |  Branch (899:17): [True: 0, False: 0]
  ------------------
  900|       |                /* SSLfatal() already called */
  901|      0|                return WORK_ERROR;
  902|      0|            }
  903|      0|            if (s->post_handshake_auth != SSL_PHA_REQUESTED) {
  ------------------
  |  Branch (903:17): [True: 0, False: 0]
  ------------------
  904|      0|                if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (904:21): [True: 0, False: 0]
  ------------------
  905|      0|                        SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  348|      0|#define SSL3_CC_APPLICATION 0x100
  ------------------
                                      SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  906|       |                    /* SSLfatal() already called */
  907|      0|                    return WORK_ERROR;
  908|      0|                }
  909|       |                /*
  910|       |                 * For QUIC we deferred setting up these keys until now so
  911|       |                 * that we can ensure write keys are always set up before read
  912|       |                 * keys.
  913|       |                 */
  914|      0|                if (SSL_IS_QUIC_HANDSHAKE(s)
  ------------------
  |  |  311|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  |  |  |  Branch (311:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  915|      0|                    && !ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (915:24): [True: 0, False: 0]
  ------------------
  916|      0|                        SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  348|      0|#define SSL3_CC_APPLICATION 0x100
  ------------------
                                      SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  351|      0|#define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  342|      0|#define SSL3_CC_READ 0x001
  |  |  ------------------
  ------------------
  917|       |                    /* SSLfatal() already called */
  918|      0|                    return WORK_ERROR;
  919|      0|                }
  920|      0|            }
  921|      0|        }
  922|      0|        break;
  923|       |
  924|      0|    case TLS_ST_CW_KEY_UPDATE:
  ------------------
  |  Branch (924:5): [True: 0, False: 2.22k]
  ------------------
  925|      0|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (925:13): [True: 0, False: 0]
  ------------------
  926|      0|            return WORK_MORE_A;
  927|      0|        if (!tls13_update_key(s, 1)) {
  ------------------
  |  Branch (927:13): [True: 0, False: 0]
  ------------------
  928|       |            /* SSLfatal() already called */
  929|      0|            return WORK_ERROR;
  930|      0|        }
  931|      0|        break;
  932|  2.22k|    }
  933|       |
  934|  2.22k|    return WORK_FINISHED_CONTINUE;
  935|  2.22k|}
ossl_statem_client_construct_message:
  947|  2.31k|{
  948|  2.31k|    OSSL_STATEM *st = &s->statem;
  949|       |
  950|  2.31k|    switch (st->hand_state) {
  951|      0|    default:
  ------------------
  |  Branch (951:5): [True: 0, False: 2.31k]
  ------------------
  952|       |        /* Shouldn't happen */
  953|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_HANDSHAKE_STATE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  954|      0|        return 0;
  955|       |
  956|      0|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (956:5): [True: 0, False: 2.31k]
  ------------------
  957|      0|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  958|      0|            *confunc = dtls_construct_change_cipher_spec;
  959|      0|        else
  960|      0|            *confunc = tls_construct_change_cipher_spec;
  961|      0|        *mt = SSL3_MT_CHANGE_CIPHER_SPEC;
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  962|      0|        break;
  963|       |
  964|  2.31k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (964:5): [True: 2.31k, False: 0]
  ------------------
  965|  2.31k|        *confunc = tls_construct_client_hello;
  966|  2.31k|        *mt = SSL3_MT_CLIENT_HELLO;
  ------------------
  |  |  313|  2.31k|#define SSL3_MT_CLIENT_HELLO 1
  ------------------
  967|  2.31k|        break;
  968|       |
  969|      0|    case TLS_ST_CW_END_OF_EARLY_DATA:
  ------------------
  |  Branch (969:5): [True: 0, False: 2.31k]
  ------------------
  970|      0|        *confunc = tls_construct_end_of_early_data;
  971|      0|        *mt = SSL3_MT_END_OF_EARLY_DATA;
  ------------------
  |  |  316|      0|#define SSL3_MT_END_OF_EARLY_DATA 5
  ------------------
  972|      0|        break;
  973|       |
  974|      0|    case TLS_ST_PENDING_EARLY_DATA_END:
  ------------------
  |  Branch (974:5): [True: 0, False: 2.31k]
  ------------------
  975|      0|        *confunc = NULL;
  976|      0|        *mt = SSL3_MT_DUMMY;
  ------------------
  |  |   41|      0|#define SSL3_MT_DUMMY -1
  ------------------
  977|      0|        break;
  978|       |
  979|      0|    case TLS_ST_CW_CERT:
  ------------------
  |  Branch (979:5): [True: 0, False: 2.31k]
  ------------------
  980|      0|        *confunc = tls_construct_client_certificate;
  981|      0|        *mt = SSL3_MT_CERTIFICATE;
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  982|      0|        break;
  983|       |
  984|       |#ifndef OPENSSL_NO_COMP_ALG
  985|       |    case TLS_ST_CW_COMP_CERT:
  986|       |        *confunc = tls_construct_client_compressed_certificate;
  987|       |        *mt = SSL3_MT_COMPRESSED_CERTIFICATE;
  988|       |        break;
  989|       |#endif
  990|       |
  991|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (991:5): [True: 0, False: 2.31k]
  ------------------
  992|      0|        *confunc = tls_construct_client_key_exchange;
  993|      0|        *mt = SSL3_MT_CLIENT_KEY_EXCHANGE;
  ------------------
  |  |  323|      0|#define SSL3_MT_CLIENT_KEY_EXCHANGE 16
  ------------------
  994|      0|        break;
  995|       |
  996|      0|    case TLS_ST_CW_CERT_VRFY:
  ------------------
  |  Branch (996:5): [True: 0, False: 2.31k]
  ------------------
  997|      0|        *confunc = tls_construct_cert_verify;
  998|      0|        *mt = SSL3_MT_CERTIFICATE_VERIFY;
  ------------------
  |  |  322|      0|#define SSL3_MT_CERTIFICATE_VERIFY 15
  ------------------
  999|      0|        break;
 1000|       |
 1001|      0|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 1002|      0|    case TLS_ST_CW_NEXT_PROTO:
  ------------------
  |  Branch (1002:5): [True: 0, False: 2.31k]
  ------------------
 1003|      0|        *confunc = tls_construct_next_proto;
 1004|      0|        *mt = SSL3_MT_NEXT_PROTO;
  ------------------
  |  |  331|      0|#define SSL3_MT_NEXT_PROTO 67
  ------------------
 1005|      0|        break;
 1006|      0|#endif
 1007|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (1007:5): [True: 0, False: 2.31k]
  ------------------
 1008|      0|        *confunc = tls_construct_finished;
 1009|      0|        *mt = SSL3_MT_FINISHED;
  ------------------
  |  |  324|      0|#define SSL3_MT_FINISHED 20
  ------------------
 1010|      0|        break;
 1011|       |
 1012|      0|    case TLS_ST_CW_KEY_UPDATE:
  ------------------
  |  Branch (1012:5): [True: 0, False: 2.31k]
  ------------------
 1013|      0|        *confunc = tls_construct_key_update;
 1014|      0|        *mt = SSL3_MT_KEY_UPDATE;
  ------------------
  |  |  328|      0|#define SSL3_MT_KEY_UPDATE 24
  ------------------
 1015|      0|        break;
 1016|  2.31k|    }
 1017|       |
 1018|  2.31k|    return 1;
 1019|  2.31k|}
ossl_statem_client_max_message_size:
 1026|    148|{
 1027|    148|    OSSL_STATEM *st = &s->statem;
 1028|       |
 1029|    148|    switch (st->hand_state) {
 1030|      0|    default:
  ------------------
  |  Branch (1030:5): [True: 0, False: 148]
  ------------------
 1031|       |        /* Shouldn't happen */
 1032|      0|        return 0;
 1033|       |
 1034|    148|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (1034:5): [True: 148, False: 0]
  ------------------
 1035|    148|        return SERVER_HELLO_MAX_LENGTH;
  ------------------
  |  |   32|    148|#define SERVER_HELLO_MAX_LENGTH 65607
  ------------------
 1036|       |
 1037|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (1037:5): [True: 0, False: 148]
  ------------------
 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: 148]
  ------------------
 1041|      0|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (1041:5): [True: 0, False: 148]
  ------------------
 1042|      0|        return s->max_cert_list;
 1043|       |
 1044|      0|    case TLS_ST_CR_CERT_VRFY:
  ------------------
  |  Branch (1044:5): [True: 0, False: 148]
  ------------------
 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: 148]
  ------------------
 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: 148]
  ------------------
 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: 148]
  ------------------
 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: 148]
  ------------------
 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: 148]
  ------------------
 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: 148]
  ------------------
 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: 148]
  ------------------
 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: 148]
  ------------------
 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: 148]
  ------------------
 1080|      0|        return KEY_UPDATE_MAX_LENGTH;
  ------------------
  |  |   28|      0|#define KEY_UPDATE_MAX_LENGTH 1
  ------------------
 1081|    148|    }
 1082|    148|}
ossl_statem_client_process_message:
 1089|     93|{
 1090|     93|    OSSL_STATEM *st = &s->statem;
 1091|       |
 1092|     93|    switch (st->hand_state) {
 1093|      0|    default:
  ------------------
  |  Branch (1093:5): [True: 0, False: 93]
  ------------------
 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|     93|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (1098:5): [True: 93, False: 0]
  ------------------
 1099|     93|        return tls_process_server_hello(s, pkt);
 1100|       |
 1101|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (1101:5): [True: 0, False: 93]
  ------------------
 1102|      0|        return dtls_process_hello_verify(s, pkt);
 1103|       |
 1104|      0|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (1104:5): [True: 0, False: 93]
  ------------------
 1105|      0|        return tls_process_server_certificate(s, pkt);
 1106|       |
 1107|       |#ifndef OPENSSL_NO_COMP_ALG
 1108|       |    case TLS_ST_CR_COMP_CERT:
 1109|       |        return tls_process_server_compressed_certificate(s, pkt);
 1110|       |#endif
 1111|       |
 1112|      0|    case TLS_ST_CR_CERT_VRFY:
  ------------------
  |  Branch (1112:5): [True: 0, False: 93]
  ------------------
 1113|      0|        return tls_process_cert_verify(s, pkt);
 1114|       |
 1115|      0|    case TLS_ST_CR_CERT_STATUS:
  ------------------
  |  Branch (1115:5): [True: 0, False: 93]
  ------------------
 1116|      0|        return tls_process_cert_status(s, pkt);
 1117|       |
 1118|      0|    case TLS_ST_CR_KEY_EXCH:
  ------------------
  |  Branch (1118:5): [True: 0, False: 93]
  ------------------
 1119|      0|        return tls_process_key_exchange(s, pkt);
 1120|       |
 1121|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (1121:5): [True: 0, False: 93]
  ------------------
 1122|      0|        return tls_process_certificate_request(s, pkt);
 1123|       |
 1124|      0|    case TLS_ST_CR_SRVR_DONE:
  ------------------
  |  Branch (1124:5): [True: 0, False: 93]
  ------------------
 1125|      0|        return tls_process_server_done(s, pkt);
 1126|       |
 1127|      0|    case TLS_ST_CR_CHANGE:
  ------------------
  |  Branch (1127:5): [True: 0, False: 93]
  ------------------
 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: 93]
  ------------------
 1131|      0|        return tls_process_new_session_ticket(s, pkt);
 1132|       |
 1133|      0|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (1133:5): [True: 0, False: 93]
  ------------------
 1134|      0|        return tls_process_finished(s, pkt);
 1135|       |
 1136|      0|    case TLS_ST_CR_HELLO_REQ:
  ------------------
  |  Branch (1136:5): [True: 0, False: 93]
  ------------------
 1137|      0|        return tls_process_hello_req(s, pkt);
 1138|       |
 1139|      0|    case TLS_ST_CR_ENCRYPTED_EXTENSIONS:
  ------------------
  |  Branch (1139:5): [True: 0, False: 93]
  ------------------
 1140|      0|        return tls_process_encrypted_extensions(s, pkt);
 1141|       |
 1142|      0|    case TLS_ST_CR_KEY_UPDATE:
  ------------------
  |  Branch (1142:5): [True: 0, False: 93]
  ------------------
 1143|      0|        return tls_process_key_update(s, pkt);
 1144|     93|    }
 1145|     93|}
tls_construct_client_hello:
 1214|  2.31k|{
 1215|  2.31k|    WPACKET inner; /* "fake" pkt for inner */
 1216|  2.31k|    BUF_MEM *inner_mem = NULL;
 1217|  2.31k|    PACKET rpkt; /* we'll decode back the inner ch to help make the outer */
 1218|  2.31k|    SSL_SESSION *sess = NULL;
 1219|  2.31k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  2.31k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1220|  2.31k|    size_t sess_id_len = 0, innerlen = 0;
 1221|  2.31k|    int mt = SSL3_MT_CLIENT_HELLO, rv = 0;
  ------------------
  |  |  313|  2.31k|#define SSL3_MT_CLIENT_HELLO 1
  ------------------
 1222|  2.31k|    OSSL_HPKE_SUITE suite;
 1223|  2.31k|    OSSL_ECHSTORE_ENTRY *ee = NULL;
 1224|       |    /* Work out what SSL/TLS/DTLS version to use */
 1225|  2.31k|    int protverr = ssl_set_client_hello_version(s);
 1226|       |
 1227|  2.31k|    if (protverr != 0) {
  ------------------
  |  Branch (1227:9): [True: 0, False: 2.31k]
  ------------------
 1228|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, protverr);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1229|      0|        return 0;
 1230|      0|    }
 1231|       |    /* If we're not really attempting ECH, just call existing code.  */
 1232|  2.31k|    if (s->ext.ech.es == NULL)
  ------------------
  |  Branch (1232:9): [True: 2.31k, False: 0]
  ------------------
 1233|  2.31k|        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|     93|{
 1718|     93|    PACKET session_id, extpkt;
 1719|     93|    size_t session_id_len;
 1720|     93|    const unsigned char *cipherchars;
 1721|     93|    int hrr = 0;
 1722|     93|    unsigned int compression;
 1723|     93|    unsigned int sversion;
 1724|     93|    unsigned int context;
 1725|     93|    RAW_EXTENSION *extensions = NULL;
 1726|     93|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|     93|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1727|     93|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|     93|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1728|     93|#ifndef OPENSSL_NO_COMP
 1729|     93|    SSL_COMP *comp;
 1730|     93|#endif
 1731|     93|#ifndef OPENSSL_NO_ECH
 1732|     93|    const unsigned char *shbuf = NULL;
 1733|     93|    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|     93|    unsigned char c_signal[OSSL_ECH_SIGNAL_LEN] = { 0 };
 1740|     93|    unsigned char s_signal[OSSL_ECH_SIGNAL_LEN] = { 0xff };
 1741|     93|    unsigned char *abuf = NULL;
 1742|       |
 1743|     93|    shlen = PACKET_remaining(pkt);
 1744|     93|    if (PACKET_peek_bytes(pkt, &shbuf, shlen) != 1) {
  ------------------
  |  Branch (1744:9): [True: 0, False: 93]
  ------------------
 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|     93|#endif
 1749|       |
 1750|     93|    if (!PACKET_get_net_2(pkt, &sversion)) {
  ------------------
  |  Branch (1750:9): [True: 2, False: 91]
  ------------------
 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|     91|    if (s->version == TLS1_3_VERSION
  ------------------
  |  |   27|    182|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1756:9): [True: 89, False: 2]
  ------------------
 1757|     89|        && sversion == TLS1_2_VERSION
  ------------------
  |  |   26|    180|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (1757:12): [True: 64, False: 25]
  ------------------
 1758|     64|        && PACKET_remaining(pkt) >= SSL3_RANDOM_SIZE
  ------------------
  |  |  137|    155|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1758:12): [True: 62, False: 2]
  ------------------
 1759|     62|        && memcmp(hrrrandom, PACKET_data(pkt), SSL3_RANDOM_SIZE) == 0) {
  ------------------
  |  |  137|     62|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1759:12): [True: 1, False: 61]
  ------------------
 1760|      1|        if (s->hello_retry_request != SSL_HRR_NONE) {
  ------------------
  |  Branch (1760:13): [True: 0, False: 1]
  ------------------
 1761|      0|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1762|      0|            goto err;
 1763|      0|        }
 1764|      1|        s->hello_retry_request = SSL_HRR_PENDING;
 1765|       |        /* Tell the record layer that we know we're going to get TLSv1.3 */
 1766|      1|        if (!ssl_set_record_protocol_version(s, s->version)) {
  ------------------
  |  Branch (1766:13): [True: 0, False: 1]
  ------------------
 1767|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1768|      0|            goto err;
 1769|      0|        }
 1770|      1|        hrr = 1;
 1771|      1|        if (!PACKET_forward(pkt, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|      1|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1771:13): [True: 0, False: 1]
  ------------------
 1772|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1773|      0|            goto err;
 1774|      0|        }
 1775|     90|    } else {
 1776|     90|        if (!PACKET_copy_bytes(pkt, s->s3.server_random, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|     90|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1776:13): [True: 3, False: 87]
  ------------------
 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|     90|    }
 1781|       |
 1782|       |    /* Get the session-id. */
 1783|     88|    if (!PACKET_get_length_prefixed_1(pkt, &session_id)) {
  ------------------
  |  Branch (1783:9): [True: 9, False: 79]
  ------------------
 1784|      9|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      9|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      9|    (ERR_new(),                                                  \
  |  |  |  |  158|      9|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      9|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      9|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1785|      9|        goto err;
 1786|      9|    }
 1787|     79|    session_id_len = PACKET_remaining(&session_id);
 1788|     79|    if (session_id_len > sizeof(s->session->session_id)
  ------------------
  |  Branch (1788:9): [True: 0, False: 79]
  ------------------
 1789|     79|        || session_id_len > SSL3_SESSION_ID_SIZE) {
  ------------------
  |  |  138|     79|#define SSL3_SESSION_ID_SIZE 32
  ------------------
  |  Branch (1789:12): [True: 0, False: 79]
  ------------------
 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|     79|    if (!PACKET_get_bytes(pkt, &cipherchars, TLS_CIPHER_LEN)) {
  ------------------
  |  |  389|     79|#define TLS_CIPHER_LEN 2
  ------------------
  |  Branch (1794:9): [True: 3, False: 76]
  ------------------
 1795|      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)
  |  |  ------------------
  ------------------
 1796|      3|        goto err;
 1797|      3|    }
 1798|       |
 1799|     76|    if (!PACKET_get_1(pkt, &compression)) {
  ------------------
  |  Branch (1799:9): [True: 1, False: 75]
  ------------------
 1800|      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)
  |  |  ------------------
  ------------------
 1801|      1|        goto err;
 1802|      1|    }
 1803|       |
 1804|       |    /* TLS extensions */
 1805|     75|    if (PACKET_remaining(pkt) == 0 && !hrr) {
  ------------------
  |  Branch (1805:9): [True: 72, False: 3]
  |  Branch (1805:39): [True: 71, False: 1]
  ------------------
 1806|     71|        PACKET_null_init(&extpkt);
 1807|     71|    } else if (!PACKET_as_length_prefixed_2(pkt, &extpkt)
  ------------------
  |  Branch (1807:16): [True: 4, False: 0]
  ------------------
 1808|      4|        || PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (1808:12): [True: 0, False: 0]
  ------------------
 1809|      4|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_LENGTH);
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
 1810|      4|        goto err;
 1811|      4|    }
 1812|       |
 1813|     71|    if (hrr) {
  ------------------
  |  Branch (1813:9): [True: 0, False: 71]
  ------------------
 1814|      0|        if (!tls_collect_extensions(s, &extpkt, SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST,
  ------------------
  |  |  305|      0|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (1814:13): [True: 0, False: 0]
  ------------------
 1815|      0|                &extensions, NULL, 1)
 1816|      0|            || !tls_parse_extension(s, TLSEXT_IDX_ech,
  ------------------
  |  Branch (1816:16): [True: 0, False: 0]
  ------------------
 1817|      0|                SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST,
  ------------------
  |  |  305|      0|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
 1818|      0|                extensions, NULL, 0)) {
 1819|       |            /* SSLfatal() already called */
 1820|      0|            goto err;
 1821|      0|        }
 1822|     71|    } else {
 1823|     71|        if (!tls_collect_extensions(s, &extpkt,
  ------------------
  |  Branch (1823:13): [True: 0, False: 71]
  ------------------
 1824|     71|                SSL_EXT_TLS1_2_SERVER_HELLO
  ------------------
  |  |  302|     71|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 1825|     71|                    | SSL_EXT_TLS1_3_SERVER_HELLO,
  ------------------
  |  |  303|     71|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 1826|     71|                &extensions, NULL, 1)) {
 1827|       |            /* SSLfatal() already called */
 1828|      0|            goto err;
 1829|      0|        }
 1830|     71|    }
 1831|       |
 1832|     71|#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|     71|    if (s->ext.ech.es != NULL
  ------------------
  |  Branch (1840:9): [True: 0, False: 71]
  ------------------
 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|     71|#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|     71|#endif
 1928|       |
 1929|     71|    if (!hrr) {
  ------------------
  |  Branch (1929:9): [True: 71, False: 0]
  ------------------
 1930|     71|        if (!ssl_choose_client_version(s, sversion, extensions)) {
  ------------------
  |  Branch (1930:13): [True: 22, False: 49]
  ------------------
 1931|       |            /* SSLfatal() already called */
 1932|     22|            goto err;
 1933|     22|        }
 1934|     71|    }
 1935|       |
 1936|     49|    if (SSL_CONNECTION_IS_TLS13(s) || hrr) {
  ------------------
  |  |  273|     98|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|     98|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     49|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|     49|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 49, False: 0]
  |  |  ------------------
  |  |  274|     49|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     49|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     98|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3, False: 46]
  |  |  ------------------
  |  |  275|     98|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      3|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      3|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1936:39): [True: 0, False: 46]
  ------------------
 1937|      3|        if (compression != 0) {
  ------------------
  |  Branch (1937:13): [True: 2, False: 1]
  ------------------
 1938|      2|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
 1939|      2|                SSL_R_INVALID_COMPRESSION_ALGORITHM);
 1940|      2|            goto err;
 1941|      2|        }
 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|     46|    if (hrr) {
  ------------------
  |  Branch (1952:9): [True: 0, False: 46]
  ------------------
 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|     46|    context = SSL_CONNECTION_IS_TLS13(s) ? SSL_EXT_TLS1_3_SERVER_HELLO
  ------------------
  |  |  273|     46|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|     92|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     46|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|     46|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 46, False: 0]
  |  |  ------------------
  |  |  274|     46|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     46|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     92|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 46]
  |  |  ------------------
  |  |  275|     46|    && 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|     46|                                         : SSL_EXT_TLS1_2_SERVER_HELLO;
  ------------------
  |  |  302|     92|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 1972|     46|    if (!tls_validate_all_contexts(s, context, extensions)) {
  ------------------
  |  Branch (1972:9): [True: 0, False: 46]
  ------------------
 1973|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1974|      0|        goto err;
 1975|      0|    }
 1976|       |
 1977|     46|    s->hit = 0;
 1978|       |
 1979|     46|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|     46|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|     92|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     46|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|     46|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 46, False: 0]
  |  |  ------------------
  |  |  274|     46|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     46|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     92|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 46]
  |  |  ------------------
  |  |  275|     46|    && 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|     46|    } 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|     46|        if (s->version >= TLS1_VERSION
  ------------------
  |  |   24|     92|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (2010:13): [True: 46, False: 0]
  ------------------
 2011|     46|            && s->ext.session_secret_cb != NULL && s->session->ext.tick) {
  ------------------
  |  Branch (2011:16): [True: 0, False: 46]
  |  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|     46|        if (session_id_len != 0
  ------------------
  |  Branch (2033:13): [True: 27, False: 19]
  ------------------
 2034|     27|            && session_id_len == s->session->session_id_length
  ------------------
  |  Branch (2034:16): [True: 0, False: 27]
  ------------------
 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|     46|    }
 2040|       |
 2041|     46|    if (s->hit) {
  ------------------
  |  Branch (2041:9): [True: 0, False: 46]
  ------------------
 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|     46|    } 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|     46|        if (s->session->session_id_length > 0) {
  ------------------
  |  Branch (2057:13): [True: 0, False: 46]
  ------------------
 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|     46|        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|     46|        if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|     46|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|     92|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     46|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|     46|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 46, False: 0]
  |  |  ------------------
  |  |  274|     46|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     46|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     92|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 46]
  |  |  ------------------
  |  |  275|     46|    && 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|     46|            s->session->session_id_length = session_id_len;
 2074|       |            /* session_id_len could be 0 */
 2075|     46|            if (session_id_len > 0)
  ------------------
  |  Branch (2075:17): [True: 27, False: 19]
  ------------------
 2076|     27|                memcpy(s->session->session_id, PACKET_data(&session_id),
 2077|     27|                    session_id_len);
 2078|     46|        }
 2079|     46|    }
 2080|       |
 2081|       |    /* Session version and negotiated protocol version should match */
 2082|     46|    if (s->version != s->session->ssl_version) {
  ------------------
  |  Branch (2082:9): [True: 0, False: 46]
  ------------------
 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|     46|    s->s3.tmp.min_ver = s->version;
 2092|     46|    s->s3.tmp.max_ver = s->version;
 2093|       |
 2094|     46|    if (!set_client_ciphersuite(s, cipherchars)) {
  ------------------
  |  Branch (2094:9): [True: 44, False: 2]
  ------------------
 2095|       |        /* SSLfatal() already called */
 2096|     44|        goto err;
 2097|     44|    }
 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|      2|    if (s->hit && compression != s->session->compress_meth) {
  ------------------
  |  Branch (2114:9): [True: 0, False: 2]
  |  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|      2|    if (compression == 0)
  ------------------
  |  Branch (2119:9): [True: 1, False: 1]
  ------------------
 2120|      1|        comp = NULL;
 2121|      1|    else if (!ssl_allow_compression(s)) {
  ------------------
  |  Branch (2121:14): [True: 1, False: 0]
  ------------------
 2122|      1|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_COMPRESSION_DISABLED);
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
 2123|      1|        goto err;
 2124|      1|    } else {
 2125|      0|        comp = ssl3_comp_find(SSL_CONNECTION_GET_CTX(s)->comp_methods,
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2126|      0|            compression);
 2127|      0|    }
 2128|       |
 2129|      1|    if (compression != 0 && comp == NULL) {
  ------------------
  |  Branch (2129:9): [True: 0, False: 1]
  |  Branch (2129:29): [True: 0, False: 0]
  ------------------
 2130|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2131|      0|            SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM);
 2132|      0|        goto err;
 2133|      1|    } else {
 2134|      1|        s->s3.tmp.new_compression = comp;
 2135|      1|    }
 2136|      1|#endif
 2137|       |
 2138|      1|    if (!tls_parse_all_extensions(s, context, extensions, NULL, 0, 1)) {
  ------------------
  |  Branch (2138:9): [True: 1, False: 0]
  ------------------
 2139|       |        /* SSLfatal() already called */
 2140|      1|        goto err;
 2141|      1|    }
 2142|       |
 2143|       |#ifndef OPENSSL_NO_SCTP
 2144|       |    if (SSL_CONNECTION_IS_DTLS(s) && s->hit) {
 2145|       |        unsigned char sctpauthkey[64];
 2146|       |        char labelbuffer[sizeof(DTLS1_SCTP_AUTH_LABEL)];
 2147|       |        size_t labellen;
 2148|       |
 2149|       |        /*
 2150|       |         * Add new shared key for SCTP-Auth, will be ignored if
 2151|       |         * no SCTP used.
 2152|       |         */
 2153|       |        memcpy(labelbuffer, DTLS1_SCTP_AUTH_LABEL,
 2154|       |            sizeof(DTLS1_SCTP_AUTH_LABEL));
 2155|       |
 2156|       |        /* Don't include the terminating zero. */
 2157|       |        labellen = sizeof(labelbuffer) - 1;
 2158|       |        if (s->mode & SSL_MODE_DTLS_SCTP_LABEL_LENGTH_BUG)
 2159|       |            labellen += 1;
 2160|       |
 2161|       |        if (SSL_export_keying_material(ssl, sctpauthkey,
 2162|       |                sizeof(sctpauthkey),
 2163|       |                labelbuffer,
 2164|       |                labellen, NULL, 0, 0)
 2165|       |            <= 0) {
 2166|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 2167|       |            goto err;
 2168|       |        }
 2169|       |
 2170|       |        BIO_ctrl(SSL_get_wbio(ssl),
 2171|       |            BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY,
 2172|       |            sizeof(sctpauthkey), sctpauthkey);
 2173|       |    }
 2174|       |#endif
 2175|       |
 2176|       |    /*
 2177|       |     * In TLSv1.3 we have some post-processing to change cipher state, otherwise
 2178|       |     * we're done with this message
 2179|       |     */
 2180|      0|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2181|      0|        if (!ssl->method->ssl3_enc->setup_key_block(s)
  ------------------
  |  Branch (2181:13): [True: 0, False: 0]
  ------------------
 2182|      0|            || !tls13_store_handshake_traffic_hash(s)) {
  ------------------
  |  Branch (2182:16): [True: 0, False: 0]
  ------------------
 2183|       |            /* SSLfatal() already called */
 2184|      0|            goto err;
 2185|      0|        }
 2186|       |        /*
 2187|       |         * If we're not doing early-data and we're not going to send a dummy CCS
 2188|       |         * (i.e. no middlebox compat mode) then we can change the write keys
 2189|       |         * immediately. Otherwise we have to defer this until after all possible
 2190|       |         * early data is written. We could just always defer until the last
 2191|       |         * moment except QUIC needs it done at the same time as the read keys
 2192|       |         * are changed. Since QUIC doesn't do TLS early data or need middlebox
 2193|       |         * compat this doesn't cause a problem.
 2194|       |         */
 2195|      0|        if (SSL_IS_QUIC_HANDSHAKE(s)
  ------------------
  |  |  311|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  |  |  |  Branch (311:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2196|      0|            || (s->early_data_state == SSL_EARLY_DATA_NONE
  ------------------
  |  Branch (2196:17): [True: 0, False: 0]
  ------------------
 2197|      0|                && (s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) == 0)) {
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2197:20): [True: 0, False: 0]
  ------------------
 2198|      0|            if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (2198:17): [True: 0, False: 0]
  ------------------
 2199|      0|                    SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  347|      0|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
                                  SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
 2200|       |                /* SSLfatal() already called */
 2201|      0|                goto err;
 2202|      0|            }
 2203|      0|        }
 2204|      0|        if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (2204:13): [True: 0, False: 0]
  ------------------
 2205|      0|                SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  347|      0|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
                              SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  351|      0|#define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  342|      0|#define SSL3_CC_READ 0x001
  |  |  ------------------
  ------------------
 2206|       |            /* SSLfatal() already called */
 2207|      0|            goto err;
 2208|      0|        }
 2209|      0|    }
 2210|       |
 2211|      0|    OPENSSL_free(extensions);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2212|      0|    return MSG_PROCESS_CONTINUE_READING;
 2213|     93|err:
 2214|     93|    OPENSSL_free(extensions);
  ------------------
  |  |  132|     93|    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|     93|    return MSG_PROCESS_ERROR;
 2216|      0|}
statem_clnt.c:tls_construct_client_hello_aux:
 1399|  2.31k|{
 1400|  2.31k|    unsigned char *p;
 1401|  2.31k|    size_t sess_id_len;
 1402|  2.31k|    int i, protverr;
 1403|  2.31k|#ifndef OPENSSL_NO_COMP
 1404|  2.31k|    SSL_COMP *comp;
 1405|  2.31k|#endif
 1406|  2.31k|    SSL_SESSION *sess = s->session;
 1407|  2.31k|    unsigned char *session_id;
 1408|  2.31k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  2.31k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1409|       |
 1410|       |    /* Work out what SSL/TLS/DTLS version to use */
 1411|  2.31k|    protverr = ssl_set_client_hello_version(s);
 1412|  2.31k|    if (protverr != 0) {
  ------------------
  |  Branch (1412:9): [True: 0, False: 2.31k]
  ------------------
 1413|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, protverr);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1414|      0|        return CON_FUNC_ERROR;
 1415|      0|    }
 1416|       |
 1417|  2.31k|#ifndef OPENSSL_NO_ECH
 1418|       |    /* if we're doing ECH, re-use session ID setup earlier */
 1419|  2.31k|    if (s->ext.ech.es == NULL)
  ------------------
  |  Branch (1419:9): [True: 2.31k, False: 0]
  ------------------
 1420|  2.31k|#endif
 1421|  2.31k|        if (sess == NULL
  ------------------
  |  Branch (1421:13): [True: 2.31k, False: 0]
  ------------------
 1422|      0|            || !ssl_version_supported(s, sess->ssl_version, NULL)
  ------------------
  |  Branch (1422:16): [True: 0, False: 0]
  ------------------
 1423|  2.31k|            || !SSL_SESSION_is_resumable(sess)) {
  ------------------
  |  Branch (1423:16): [True: 0, False: 0]
  ------------------
 1424|  2.31k|            if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1424:17): [True: 2.31k, False: 0]
  ------------------
 1425|  2.31k|                && !ssl_get_new_session(s, 0)) {
  ------------------
  |  Branch (1425:20): [True: 0, False: 2.31k]
  ------------------
 1426|       |                /* SSLfatal() already called */
 1427|      0|                return CON_FUNC_ERROR;
 1428|      0|            }
 1429|  2.31k|        }
 1430|       |    /* else use the pre-loaded session */
 1431|       |
 1432|  2.31k|#ifndef OPENSSL_NO_ECH
 1433|       |    /* use different client_random fields for inner and outer */
 1434|  2.31k|    if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 1)
  ------------------
  |  Branch (1434:9): [True: 0, False: 2.31k]
  |  Branch (1434:34): [True: 0, False: 0]
  ------------------
 1435|      0|        p = s->ext.ech.client_random;
 1436|  2.31k|    else
 1437|  2.31k|#endif
 1438|  2.31k|        p = s->s3.client_random;
 1439|       |
 1440|       |    /*
 1441|       |     * for DTLS if client_random is initialized, reuse it, we are
 1442|       |     * required to use same upon reply to HelloVerify
 1443|       |     */
 1444|  2.31k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  2.31k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.31k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.31k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 2.31k]
  |  |  ------------------
  ------------------
 1445|      0|        size_t idx;
 1446|      0|        i = 1;
 1447|      0|        for (idx = 0; idx < sizeof(s->s3.client_random); idx++) {
  ------------------
  |  Branch (1447:23): [True: 0, False: 0]
  ------------------
 1448|      0|            if (p[idx]) {
  ------------------
  |  Branch (1448:17): [True: 0, False: 0]
  ------------------
 1449|      0|                i = 0;
 1450|      0|                break;
 1451|      0|            }
 1452|      0|        }
 1453|  2.31k|    } else {
 1454|  2.31k|        i = (s->hello_retry_request == SSL_HRR_NONE);
 1455|  2.31k|    }
 1456|       |
 1457|  2.31k|    if (i && ssl_fill_hello_random(s, 0, p, sizeof(s->s3.client_random), DOWNGRADE_NONE) <= 0) {
  ------------------
  |  Branch (1457:9): [True: 2.31k, False: 0]
  |  Branch (1457:14): [True: 0, False: 2.31k]
  ------------------
 1458|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1459|      0|        return CON_FUNC_ERROR;
 1460|      0|    }
 1461|       |
 1462|       |    /*-
 1463|       |     * version indicates the negotiated version: for example from
 1464|       |     * an SSLv2/v3 compatible client hello). The client_version
 1465|       |     * field is the maximum version we permit and it is also
 1466|       |     * used in RSA encrypted premaster secrets. Some servers can
 1467|       |     * choke if we initially report a higher version then
 1468|       |     * renegotiate to a lower one in the premaster secret. This
 1469|       |     * didn't happen with TLS 1.0 as most servers supported it
 1470|       |     * but it can with TLS 1.1 or later if the server only supports
 1471|       |     * 1.0.
 1472|       |     *
 1473|       |     * Possible scenario with previous logic:
 1474|       |     *      1. Client hello indicates TLS 1.2
 1475|       |     *      2. Server hello says TLS 1.0
 1476|       |     *      3. RSA encrypted premaster secret uses 1.2.
 1477|       |     *      4. Handshake proceeds using TLS 1.0.
 1478|       |     *      5. Server sends hello request to renegotiate.
 1479|       |     *      6. Client hello indicates TLS v1.0 as we now
 1480|       |     *         know that is maximum server supports.
 1481|       |     *      7. Server chokes on RSA encrypted premaster secret
 1482|       |     *         containing version 1.0.
 1483|       |     *
 1484|       |     * For interoperability it should be OK to always use the
 1485|       |     * maximum version we support in client hello and then rely
 1486|       |     * on the checking of version to ensure the servers isn't
 1487|       |     * being inconsistent: for example initially negotiating with
 1488|       |     * TLS 1.0 and renegotiating with TLS 1.2. We do this by using
 1489|       |     * client_version in client hello and not resetting it to
 1490|       |     * the negotiated version.
 1491|       |     *
 1492|       |     * For TLS 1.3 we always set the ClientHello version to 1.2 and rely on the
 1493|       |     * supported_versions extension for the real supported versions.
 1494|       |     */
 1495|  2.31k|    if (!WPACKET_put_bytes_u16(pkt, s->client_version)
  ------------------
  |  |  911|  4.62k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1495:9): [True: 0, False: 2.31k]
  ------------------
 1496|  2.31k|        || !WPACKET_memcpy(pkt, p, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|  2.31k|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1496:12): [True: 0, False: 2.31k]
  ------------------
 1497|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1498|      0|        return CON_FUNC_ERROR;
 1499|      0|    }
 1500|       |
 1501|       |    /* Session ID */
 1502|  2.31k|    session_id = s->session->session_id;
 1503|  2.31k|#ifndef OPENSSL_NO_ECH
 1504|       |    /* same session ID is used for inner/outer when doing ECH */
 1505|  2.31k|    if (s->ext.ech.es != NULL) {
  ------------------
  |  Branch (1505:9): [True: 0, False: 2.31k]
  ------------------
 1506|      0|        if (s->version != TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1506:13): [True: 0, False: 0]
  ------------------
 1507|      0|            SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_UNSUPPORTED_SSL_VERSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1508|      0|            return CON_FUNC_ERROR;
 1509|      0|        }
 1510|      0|        if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0)
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1510:13): [True: 0, False: 0]
  ------------------
 1511|      0|            sess_id_len = sizeof(s->tmp_session_id);
 1512|      0|        else
 1513|      0|            sess_id_len = 0;
 1514|  2.31k|    } else {
 1515|  2.31k|#endif
 1516|  2.31k|        if (s->new_session || s->session->ssl_version == TLS1_3_VERSION) {
  ------------------
  |  |   27|  2.31k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1516:13): [True: 0, False: 2.31k]
  |  Branch (1516:31): [True: 2.25k, False: 57]
  ------------------
 1517|  2.25k|            if (s->version == TLS1_3_VERSION
  ------------------
  |  |   27|  4.51k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1517:17): [True: 2.25k, False: 0]
  ------------------
 1518|  2.25k|                && (s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0) {
  ------------------
  |  |  404|  2.25k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|  2.25k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1518:20): [True: 2.25k, False: 0]
  ------------------
 1519|  2.25k|                sess_id_len = sizeof(s->tmp_session_id);
 1520|  2.25k|                s->tmp_session_id_len = sess_id_len;
 1521|  2.25k|                session_id = s->tmp_session_id;
 1522|  2.25k|                if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1522:21): [True: 2.25k, False: 0]
  ------------------
 1523|  2.25k|                    && RAND_bytes_ex(sctx->libctx, s->tmp_session_id,
  ------------------
  |  Branch (1523:24): [True: 0, False: 2.25k]
  ------------------
 1524|  2.25k|                           sess_id_len, 0)
 1525|  2.25k|                        <= 0) {
 1526|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1527|      0|                    return CON_FUNC_ERROR;
 1528|      0|                }
 1529|  2.25k|            } else {
 1530|      0|                sess_id_len = 0;
 1531|      0|            }
 1532|  2.25k|        } else {
 1533|     57|            assert(s->session->session_id_length <= sizeof(s->session->session_id));
  ------------------
  |  Branch (1533:13): [True: 0, False: 57]
  |  Branch (1533:13): [True: 57, False: 0]
  ------------------
 1534|     57|            sess_id_len = s->session->session_id_length;
 1535|     57|            if (s->version == TLS1_3_VERSION) {
  ------------------
  |  |   27|     57|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1535:17): [True: 0, False: 57]
  ------------------
 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|     57|        }
 1540|  2.31k|#ifndef OPENSSL_NO_ECH
 1541|  2.31k|    }
 1542|  2.31k|#endif
 1543|       |
 1544|  2.31k|    if (!WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  810|  4.62k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (1544:9): [True: 0, False: 2.31k]
  ------------------
 1545|  2.31k|        || (sess_id_len != 0 && !WPACKET_memcpy(pkt, session_id, sess_id_len))
  ------------------
  |  Branch (1545:13): [True: 2.25k, False: 57]
  |  Branch (1545:33): [True: 0, False: 2.25k]
  ------------------
 1546|  2.31k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1546:12): [True: 0, False: 2.31k]
  ------------------
 1547|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1548|      0|        return CON_FUNC_ERROR;
 1549|      0|    }
 1550|       |
 1551|       |    /* cookie stuff for DTLS */
 1552|  2.31k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  2.31k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.31k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.31k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 2.31k]
  |  |  ------------------
  ------------------
 1553|      0|        if (s->d1->cookie_len > sizeof(s->d1->cookie)
  ------------------
  |  Branch (1553:13): [True: 0, False: 0]
  ------------------
 1554|      0|            || !WPACKET_sub_memcpy_u8(pkt, s->d1->cookie,
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (1554:16): [True: 0, False: 0]
  ------------------
 1555|      0|                s->d1->cookie_len)) {
 1556|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1557|      0|            return CON_FUNC_ERROR;
 1558|      0|        }
 1559|      0|    }
 1560|       |
 1561|       |    /* Ciphers supported */
 1562|  2.31k|    if (!WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|  2.31k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1562:9): [True: 0, False: 2.31k]
  ------------------
 1563|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1564|      0|        return CON_FUNC_ERROR;
 1565|      0|    }
 1566|       |
 1567|  2.31k|    if (!ssl_cipher_list_to_bytes(s, SSL_get_ciphers(SSL_CONNECTION_GET_SSL(s)),
  ------------------
  |  |   27|  2.31k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (1567:9): [True: 57, False: 2.25k]
  ------------------
 1568|  2.31k|            pkt)) {
 1569|       |        /* SSLfatal() already called */
 1570|     57|        return CON_FUNC_ERROR;
 1571|     57|    }
 1572|  2.25k|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1572:9): [True: 0, False: 2.25k]
  ------------------
 1573|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1574|      0|        return CON_FUNC_ERROR;
 1575|      0|    }
 1576|       |
 1577|       |    /* COMPRESSION */
 1578|  2.25k|    if (!WPACKET_start_sub_packet_u8(pkt)) {
  ------------------
  |  |  810|  2.25k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (1578:9): [True: 0, False: 2.25k]
  ------------------
 1579|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1580|      0|        return CON_FUNC_ERROR;
 1581|      0|    }
 1582|  2.25k|#ifndef OPENSSL_NO_COMP
 1583|  2.25k|    if (ssl_allow_compression(s)
  ------------------
  |  Branch (1583:9): [True: 0, False: 2.25k]
  ------------------
 1584|      0|        && sctx->comp_methods
  ------------------
  |  Branch (1584:12): [True: 0, False: 0]
  ------------------
 1585|      0|        && (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1586|      0|            || s->s3.tmp.max_ver < TLS1_3_VERSION)) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1586:16): [True: 0, False: 0]
  ------------------
 1587|      0|        int compnum = sk_SSL_COMP_num(sctx->comp_methods);
  ------------------
  |  |   70|      0|#define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
  ------------------
 1588|      0|        for (i = 0; i < compnum; i++) {
  ------------------
  |  Branch (1588:21): [True: 0, False: 0]
  ------------------
 1589|      0|            comp = sk_SSL_COMP_value(sctx->comp_methods, i);
  ------------------
  |  |   71|      0|#define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
  ------------------
 1590|      0|            if (!WPACKET_put_bytes_u8(pkt, comp->id)) {
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1590:17): [True: 0, False: 0]
  ------------------
 1591|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1592|      0|                return CON_FUNC_ERROR;
 1593|      0|            }
 1594|      0|        }
 1595|      0|    }
 1596|  2.25k|#endif
 1597|       |    /* Add the NULL method */
 1598|  2.25k|    if (!WPACKET_put_bytes_u8(pkt, 0) || !WPACKET_close(pkt)) {
  ------------------
  |  |  909|  4.51k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1598:9): [True: 0, False: 2.25k]
  |  Branch (1598:42): [True: 0, False: 2.25k]
  ------------------
 1599|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1600|      0|        return CON_FUNC_ERROR;
 1601|      0|    }
 1602|       |
 1603|       |    /* TLS extensions */
 1604|  2.25k|    if (!tls_construct_extensions(s, pkt, SSL_EXT_CLIENT_HELLO, NULL, 0)) {
  ------------------
  |  |  300|  2.25k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1604:9): [True: 34, False: 2.22k]
  ------------------
 1605|       |        /* SSLfatal() already called */
 1606|     34|        return CON_FUNC_ERROR;
 1607|     34|    }
 1608|       |
 1609|  2.22k|    return CON_FUNC_SUCCESS;
 1610|  2.25k|}
statem_clnt.c:set_client_ciphersuite:
 1640|     46|{
 1641|     46|    STACK_OF(SSL_CIPHER) *sk;
  ------------------
  |  |   33|     46|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1642|     46|    const SSL_CIPHER *c;
 1643|     46|    int i;
 1644|     46|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|     46|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1645|       |
 1646|     46|    c = ssl_get_cipher_by_char(s, cipherchars, 0);
 1647|     46|    if (c == NULL) {
  ------------------
  |  Branch (1647:9): [True: 34, False: 12]
  ------------------
 1648|       |        /* unknown cipher */
 1649|     34|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_UNKNOWN_CIPHER_RETURNED);
  ------------------
  |  |  155|     34|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|     34|    (ERR_new(),                                                  \
  |  |  |  |  158|     34|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|     34|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|     34|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1650|     34|        return 0;
 1651|     34|    }
 1652|       |    /*
 1653|       |     * If it is a disabled cipher we either didn't send it in client hello,
 1654|       |     * or it's not allowed for the selected protocol. So we return an error.
 1655|       |     */
 1656|     12|    if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_CHECK, 1)) {
  ------------------
  |  | 2747|     12|#define SSL_SECOP_CIPHER_CHECK (3 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2729|     12|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1656:9): [True: 9, False: 3]
  ------------------
 1657|      9|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CIPHER_RETURNED);
  ------------------
  |  |  155|      9|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      9|    (ERR_new(),                                                  \
  |  |  |  |  158|      9|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      9|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      9|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1658|      9|        return 0;
 1659|      9|    }
 1660|       |
 1661|      3|    sk = ssl_get_ciphers_by_id(s);
 1662|      3|    i = sk_SSL_CIPHER_find(sk, c);
  ------------------
  |  | 1045|      3|#define sk_SSL_CIPHER_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
 1663|      3|    if (i < 0) {
  ------------------
  |  Branch (1663:9): [True: 1, False: 2]
  ------------------
 1664|       |        /* we did not say we would use this cipher */
 1665|      1|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CIPHER_RETURNED);
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
 1666|      1|        return 0;
 1667|      1|    }
 1668|       |
 1669|      2|    if (SSL_CONNECTION_IS_TLS13(s) && s->s3.tmp.new_cipher != NULL
  ------------------
  |  |  273|      4|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      4|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      2|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      2|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 2, False: 0]
  |  |  ------------------
  |  |  274|      2|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      2|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      4|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 0, False: 2]
  |  |  ------------------
  |  |  275|      4|    && 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|      2|    if (s->session->cipher != NULL)
  ------------------
  |  Branch (1681:9): [True: 0, False: 2]
  ------------------
 1682|      0|        s->session->cipher_id = s->session->cipher->id;
 1683|      2|    if (s->hit && (s->session->cipher_id != c->id)) {
  ------------------
  |  Branch (1683:9): [True: 0, False: 2]
  |  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|      2|    s->s3.tmp.new_cipher = c;
 1712|       |
 1713|      2|    return 1;
 1714|      2|}

ssl3_do_write:
   64|  2.22k|{
   65|  2.22k|    int ret;
   66|  2.22k|    size_t written = 0;
   67|  2.22k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.22k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
   68|  2.22k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  2.22k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
   69|       |
   70|       |    /*
   71|       |     * If we're running the test suite then we may need to mutate the message
   72|       |     * we've been asked to write. Does not happen in normal operation.
   73|       |     */
   74|  2.22k|    if (s->statem.mutate_handshake_cb != NULL
  ------------------
  |  Branch (74:9): [True: 0, False: 2.22k]
  ------------------
   75|      0|        && !s->statem.write_in_progress
  ------------------
  |  Branch (75:12): [True: 0, False: 0]
  ------------------
   76|      0|        && type == SSL3_RT_HANDSHAKE
  ------------------
  |  |  221|  2.22k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (76:12): [True: 0, False: 0]
  ------------------
   77|      0|        && s->init_num >= SSL3_HM_HEADER_LENGTH) {
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (77:12): [True: 0, False: 0]
  ------------------
   78|      0|        unsigned char *msg;
   79|      0|        size_t msglen;
   80|       |
   81|      0|        if (!s->statem.mutate_handshake_cb((unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (81:13): [True: 0, False: 0]
  ------------------
   82|      0|                s->init_num,
   83|      0|                &msg, &msglen,
   84|      0|                s->statem.mutatearg))
   85|      0|            return -1;
   86|      0|        if (msglen < SSL3_HM_HEADER_LENGTH
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (86:13): [True: 0, False: 0]
  ------------------
   87|      0|            || !BUF_MEM_grow(s->init_buf, msglen))
  ------------------
  |  Branch (87:16): [True: 0, False: 0]
  ------------------
   88|      0|            return -1;
   89|      0|        memcpy(s->init_buf->data, msg, msglen);
   90|      0|        s->init_num = msglen;
   91|      0|        s->init_msg = s->init_buf->data + SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
   92|      0|        s->statem.finish_mutate_handshake_cb(s->statem.mutatearg);
   93|      0|        s->statem.write_in_progress = 1;
   94|      0|    }
   95|       |
   96|  2.22k|    ret = ssl3_write_bytes(ssl, type, &s->init_buf->data[s->init_off],
   97|  2.22k|        s->init_num, &written);
   98|  2.22k|    if (ret <= 0)
  ------------------
  |  Branch (98:9): [True: 0, False: 2.22k]
  ------------------
   99|      0|        return -1;
  100|  2.22k|    if (type == SSL3_RT_HANDSHAKE)
  ------------------
  |  |  221|  2.22k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (100:9): [True: 2.22k, False: 0]
  ------------------
  101|       |        /*
  102|       |         * should not be done for 'Hello Request's, but in that case we'll
  103|       |         * ignore the result anyway
  104|       |         * TLS1.3 KeyUpdate and NewSessionTicket do not need to be added
  105|       |         */
  106|  2.22k|        if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  4.44k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  4.44k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  2.22k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  2.22k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 2.22k, False: 0]
  |  |  ------------------
  |  |  274|  2.22k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  2.22k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  4.44k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 2.22k, False: 0]
  |  |  ------------------
  |  |  275|  4.44k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  2.22k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  2.22k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 2.22k]
  |  |  ------------------
  ------------------
  107|      0|            || (s->statem.hand_state != TLS_ST_SW_SESSION_TICKET
  ------------------
  |  Branch (107:17): [True: 0, False: 0]
  ------------------
  108|      0|                && s->statem.hand_state != TLS_ST_CW_KEY_UPDATE
  ------------------
  |  Branch (108:20): [True: 0, False: 0]
  ------------------
  109|      0|                && s->statem.hand_state != TLS_ST_SW_KEY_UPDATE))
  ------------------
  |  Branch (109:20): [True: 0, False: 0]
  ------------------
  110|  2.22k|            if (!ssl3_finish_mac(s,
  ------------------
  |  Branch (110:17): [True: 0, False: 2.22k]
  ------------------
  111|  2.22k|                    (unsigned char *)&s->init_buf->data[s->init_off],
  112|  2.22k|                    written))
  113|      0|                return -1;
  114|  2.22k|    if (written == s->init_num) {
  ------------------
  |  Branch (114:9): [True: 2.22k, False: 0]
  ------------------
  115|  2.22k|        s->statem.write_in_progress = 0;
  116|  2.22k|        if (s->msg_callback)
  ------------------
  |  Branch (116:13): [True: 0, False: 2.22k]
  ------------------
  117|      0|            s->msg_callback(1, s->version, type, s->init_buf->data,
  118|      0|                (size_t)(s->init_off + s->init_num), ussl,
  119|      0|                s->msg_callback_arg);
  120|  2.22k|        return 1;
  121|  2.22k|    }
  122|      0|    s->init_off += written;
  123|      0|    s->init_num -= written;
  124|      0|    return 0;
  125|  2.22k|}
tls_close_construct_packet:
  128|  2.22k|{
  129|  2.22k|    size_t msglen;
  130|       |
  131|  2.22k|    if ((htype != SSL3_MT_CHANGE_CIPHER_SPEC && !WPACKET_close(pkt))
  ------------------
  |  |  337|  4.44k|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (131:10): [True: 2.22k, False: 0]
  |  Branch (131:49): [True: 0, False: 2.22k]
  ------------------
  132|  2.22k|        || !WPACKET_get_length(pkt, &msglen)
  ------------------
  |  Branch (132:12): [True: 0, False: 2.22k]
  ------------------
  133|  2.22k|        || msglen > INT_MAX)
  ------------------
  |  Branch (133:12): [True: 0, False: 2.22k]
  ------------------
  134|      0|        return 0;
  135|  2.22k|    s->init_num = (int)msglen;
  136|  2.22k|    s->init_off = 0;
  137|       |
  138|  2.22k|    return 1;
  139|  2.22k|}
tls_setup_handshake:
  142|  2.32k|{
  143|  2.32k|    int ver_min, ver_max, ok;
  144|  2.32k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.32k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  145|  2.32k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  2.32k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  146|       |
  147|  2.32k|    if (!ssl3_init_finished_mac(s)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 2.32k]
  ------------------
  148|       |        /* SSLfatal() already called */
  149|      0|        return 0;
  150|      0|    }
  151|       |
  152|       |    /* Reset any extension flags */
  153|  2.32k|    memset(s->ext.extflags, 0, sizeof(s->ext.extflags));
  154|       |
  155|  2.32k|    if (ssl_get_min_max_version(s, &ver_min, &ver_max, NULL) != 0) {
  ------------------
  |  Branch (155:9): [True: 9, False: 2.31k]
  ------------------
  156|      9|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_NO_PROTOCOLS_AVAILABLE);
  ------------------
  |  |  155|      9|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      9|    (ERR_new(),                                                  \
  |  |  |  |  158|      9|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      9|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      9|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  157|      9|        return 0;
  158|      9|    }
  159|       |
  160|       |    /* Sanity check that we have MD5-SHA1 if we need it */
  161|  2.31k|    if (sctx->ssl_digest_methods[SSL_MD_MD5_SHA1_IDX] == NULL) {
  ------------------
  |  |  202|  2.31k|#define SSL_MD_MD5_SHA1_IDX 9
  ------------------
  |  Branch (161:9): [True: 0, False: 2.31k]
  ------------------
  162|      0|        int negotiated_minversion;
  163|      0|        int md5sha1_needed_maxversion = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  164|      0|            ? DTLS1_VERSION
  ------------------
  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  ------------------
  165|      0|            : TLS1_1_VERSION;
  ------------------
  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  ------------------
  166|       |
  167|       |        /* We don't have MD5-SHA1 - do we need it? */
  168|      0|        if (ssl_version_cmp(s, ver_max, md5sha1_needed_maxversion) <= 0) {
  ------------------
  |  Branch (168:13): [True: 0, False: 0]
  ------------------
  169|      0|            SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|      0|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  | 1242|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  170|      0|                SSL_R_NO_SUITABLE_DIGEST_ALGORITHM,
  ------------------
  |  |  216|      0|#define SSL_R_NO_SUITABLE_DIGEST_ALGORITHM 297
  ------------------
  171|      0|                "The max supported SSL/TLS version needs the"
  172|      0|                " MD5-SHA1 digest but it is not available"
  173|      0|                " in the loaded providers. Use (D)TLSv1.2 or"
  174|      0|                " above, or load different providers");
  175|      0|            return 0;
  176|      0|        }
  177|       |
  178|      0|        ok = 1;
  179|       |
  180|       |        /* Don't allow TLSv1.1 or below to be negotiated */
  181|      0|        negotiated_minversion = SSL_CONNECTION_IS_DTLS(s) ? DTLS1_2_VERSION : TLS1_2_VERSION;
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                      negotiated_minversion = SSL_CONNECTION_IS_DTLS(s) ? DTLS1_2_VERSION : TLS1_2_VERSION;
  ------------------
  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  ------------------
                      negotiated_minversion = SSL_CONNECTION_IS_DTLS(s) ? DTLS1_2_VERSION : TLS1_2_VERSION;
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  182|      0|        if (ssl_version_cmp(s, ver_min, negotiated_minversion) < 0)
  ------------------
  |  Branch (182:13): [True: 0, False: 0]
  ------------------
  183|      0|            ok = SSL_set_min_proto_version(ssl, negotiated_minversion);
  ------------------
  |  | 1591|      0|    SSL_ctrl(s, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
  |  |  ------------------
  |  |  |  | 1403|      0|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  |  |  ------------------
  ------------------
  184|      0|        if (!ok) {
  ------------------
  |  Branch (184:13): [True: 0, False: 0]
  ------------------
  185|       |            /* Shouldn't happen */
  186|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  187|      0|            return 0;
  188|      0|        }
  189|      0|    }
  190|       |
  191|  2.31k|    ok = 0;
  192|  2.31k|    if (s->server) {
  ------------------
  |  Branch (192:9): [True: 0, False: 2.31k]
  ------------------
  193|      0|        STACK_OF(SSL_CIPHER) *ciphers = SSL_get_ciphers(ssl);
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
  194|      0|        int i;
  195|       |
  196|       |        /*
  197|       |         * Sanity check that the maximum version we accept has ciphers
  198|       |         * enabled. For clients we do this check during construction of the
  199|       |         * ClientHello.
  200|       |         */
  201|      0|        for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) {
  ------------------
  |  | 1028|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (201:21): [True: 0, False: 0]
  ------------------
  202|      0|            const SSL_CIPHER *c = sk_SSL_CIPHER_value(ciphers, i);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  203|      0|            int cipher_minprotover = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  204|      0|                ? c->min_dtls
  205|      0|                : c->min_tls;
  206|      0|            int cipher_maxprotover = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  207|      0|                ? c->max_dtls
  208|      0|                : c->max_tls;
  209|       |
  210|      0|            if (ssl_version_cmp(s, ver_max, cipher_minprotover) >= 0
  ------------------
  |  Branch (210:17): [True: 0, False: 0]
  ------------------
  211|      0|                && ssl_version_cmp(s, ver_max, cipher_maxprotover) <= 0) {
  ------------------
  |  Branch (211:20): [True: 0, False: 0]
  ------------------
  212|      0|                ok = 1;
  213|      0|                break;
  214|      0|            }
  215|      0|        }
  216|      0|        if (!ok) {
  ------------------
  |  Branch (216:13): [True: 0, False: 0]
  ------------------
  217|      0|            SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|      0|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  | 1242|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  218|      0|                SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  198|      0|#define SSL_R_NO_CIPHERS_AVAILABLE 181
  ------------------
  219|      0|                "No ciphers enabled for max supported "
  220|      0|                "SSL/TLS version");
  221|      0|            return 0;
  222|      0|        }
  223|      0|        if (SSL_IS_FIRST_HANDSHAKE(s)) {
  ------------------
  |  |  285|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  286|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  224|       |            /* N.B. s->session_ctx == s->ctx here */
  225|      0|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_accept);
  226|      0|        } else {
  227|       |            /* N.B. s->ctx may not equal s->session_ctx */
  228|      0|            ssl_tsan_counter(sctx, &sctx->stats.sess_accept_renegotiate);
  229|       |
  230|      0|            s->s3.tmp.cert_request = 0;
  231|      0|        }
  232|  2.31k|    } else {
  233|  2.31k|        if (SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|  2.31k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 2.31k, False: 0]
  |  |  ------------------
  |  |  286|  2.31k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  234|  2.31k|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_connect);
  235|      0|        else
  236|      0|            ssl_tsan_counter(s->session_ctx,
  237|      0|                &s->session_ctx->stats.sess_connect_renegotiate);
  238|       |
  239|       |        /* mark client_random uninitialized */
  240|  2.31k|        memset(s->s3.client_random, 0, sizeof(s->s3.client_random));
  241|  2.31k|        s->hit = 0;
  242|       |
  243|  2.31k|        s->s3.tmp.cert_req = 0;
  244|       |
  245|  2.31k|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|  2.31k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.31k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  2.31k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 2.31k]
  |  |  ------------------
  ------------------
  246|      0|            s->statem.use_timer = 1;
  247|  2.31k|    }
  248|       |
  249|  2.31k|    return 1;
  250|  2.31k|}
tls_get_message_header:
 1539|  2.64k|{
 1540|       |    /* s->init_num < SSL3_HM_HEADER_LENGTH */
 1541|  2.64k|    int skip_message, i;
 1542|  2.64k|    uint8_t recvd_type;
 1543|  2.64k|    unsigned char *p;
 1544|  2.64k|    size_t l, readbytes;
 1545|  2.64k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.64k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1546|  2.64k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  2.64k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1547|       |
 1548|  2.64k|    p = (unsigned char *)s->init_buf->data;
 1549|       |
 1550|  2.67k|    do {
 1551|  2.85k|        while (s->init_num < SSL3_HM_HEADER_LENGTH) {
  ------------------
  |  |  141|  2.85k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1551:16): [True: 2.67k, False: 182]
  ------------------
 1552|  2.67k|            i = ssl->method->ssl_read_bytes(ssl, SSL3_RT_HANDSHAKE, &recvd_type,
  ------------------
  |  |  221|  2.67k|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1553|  2.67k|                &p[s->init_num],
 1554|  2.67k|                SSL3_HM_HEADER_LENGTH - s->init_num,
  ------------------
  |  |  141|  2.67k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1555|  2.67k|                0, &readbytes);
 1556|  2.67k|            if (i <= 0) {
  ------------------
  |  Branch (1556:17): [True: 2.48k, False: 188]
  ------------------
 1557|  2.48k|                s->rwstate = SSL_READING;
  ------------------
  |  |  957|  2.48k|#define SSL_READING 3
  ------------------
 1558|  2.48k|                return 0;
 1559|  2.48k|            }
 1560|    188|            if (recvd_type == SSL3_RT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  219|    188|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (1560:17): [True: 3, False: 185]
  ------------------
 1561|       |                /*
 1562|       |                 * A ChangeCipherSpec must be a single byte and may not occur
 1563|       |                 * in the middle of a handshake message.
 1564|       |                 */
 1565|      3|                if (s->init_num != 0 || readbytes != 1 || p[0] != SSL3_MT_CCS) {
  ------------------
  |  |  339|      2|#define SSL3_MT_CCS 1
  ------------------
  |  Branch (1565:21): [True: 0, False: 3]
  |  Branch (1565:41): [True: 1, False: 2]
  |  Branch (1565:59): [True: 1, False: 1]
  ------------------
 1566|      2|                    SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
 1567|      2|                        SSL_R_BAD_CHANGE_CIPHER_SPEC);
 1568|      2|                    return 0;
 1569|      2|                }
 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|    185|            } else if (recvd_type != SSL3_RT_HANDSHAKE) {
  ------------------
  |  |  221|    185|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (1586:24): [True: 0, False: 185]
  ------------------
 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|    185|            s->init_num += readbytes;
 1592|    185|        }
 1593|       |
 1594|    182|        skip_message = 0;
 1595|    182|        if (!s->server)
  ------------------
  |  Branch (1595:13): [True: 182, False: 0]
  ------------------
 1596|    182|            if (s->statem.hand_state != TLS_ST_OK
  ------------------
  |  Branch (1596:17): [True: 182, False: 0]
  ------------------
 1597|    182|                && p[0] == SSL3_MT_HELLO_REQUEST)
  ------------------
  |  |  312|    182|#define SSL3_MT_HELLO_REQUEST 0
  ------------------
  |  Branch (1597:20): [True: 31, False: 151]
  ------------------
 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|     31|                if (p[1] == 0 && p[2] == 0 && p[3] == 0) {
  ------------------
  |  Branch (1604:21): [True: 29, False: 2]
  |  Branch (1604:34): [True: 28, False: 1]
  |  Branch (1604:47): [True: 27, False: 1]
  ------------------
 1605|     27|                    s->init_num = 0;
 1606|     27|                    skip_message = 1;
 1607|       |
 1608|     27|                    if (s->msg_callback)
  ------------------
  |  Branch (1608:25): [True: 0, False: 27]
  ------------------
 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|     27|                }
 1613|    182|    } while (skip_message);
  ------------------
  |  Branch (1613:14): [True: 27, False: 155]
  ------------------
 1614|       |    /* s->init_num == SSL3_HM_HEADER_LENGTH */
 1615|       |
 1616|    155|    *mt = *p;
 1617|    155|    s->s3.tmp.message_type = *(p++);
 1618|       |
 1619|    155|    n2l3(p, l);
  ------------------
  |  |  196|    155|#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|    155|    if (l > (INT_MAX - SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|    155|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1621:9): [True: 0, False: 155]
  ------------------
 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|    155|    s->s3.tmp.message_size = l;
 1626|       |
 1627|    155|    s->init_msg = s->init_buf->data + SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|    155|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1628|    155|    s->init_num = 0;
 1629|       |
 1630|    155|    return 1;
 1631|    155|}
tls_get_message_body:
 1650|    133|{
 1651|    133|    size_t toread, readbytes;
 1652|    133|    unsigned char *p;
 1653|    133|    int i;
 1654|    133|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|    133|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1655|    133|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|    133|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1656|       |
 1657|    133|    if (s->s3.tmp.message_type == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|    133|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (1657:9): [True: 0, False: 133]
  ------------------
 1658|       |        /* We've already read everything in */
 1659|      0|        *len = (unsigned long)s->init_num;
 1660|      0|        return 1;
 1661|      0|    }
 1662|       |
 1663|    133|    toread = s->s3.tmp.message_size - s->init_num;
 1664|    274|    while (toread > 0) {
  ------------------
  |  Branch (1664:12): [True: 181, False: 93]
  ------------------
 1665|    181|        size_t chunk = toread > SSL3_RT_MAX_PLAIN_LENGTH ? SSL3_RT_MAX_PLAIN_LENGTH : toread;
  ------------------
  |  |  177|    181|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
                      size_t chunk = toread > SSL3_RT_MAX_PLAIN_LENGTH ? SSL3_RT_MAX_PLAIN_LENGTH : toread;
  ------------------
  |  |  177|     30|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (1665:24): [True: 30, False: 151]
  ------------------
 1666|       |
 1667|       |        /*
 1668|       |         * We incrementally allocate the buffer to guard against the peer
 1669|       |         * claiming a very large message size and then not sending it.
 1670|       |         */
 1671|    181|        if (!grow_init_buf(s, s->init_num + chunk + SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|    181|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1671:13): [True: 0, False: 181]
  ------------------
 1672|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_BUF_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1673|      0|            return 0;
 1674|      0|        }
 1675|       |
 1676|       |        /* init_msg location can change after grow_init_buf */
 1677|    181|        p = s->init_msg;
 1678|    181|        i = ssl->method->ssl_read_bytes(ssl, SSL3_RT_HANDSHAKE, NULL,
  ------------------
  |  |  221|    181|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1679|    181|            &p[s->init_num], chunk, 0, &readbytes);
 1680|    181|        if (i <= 0) {
  ------------------
  |  Branch (1680:13): [True: 40, False: 141]
  ------------------
 1681|     40|            s->rwstate = SSL_READING;
  ------------------
  |  |  957|     40|#define SSL_READING 3
  ------------------
 1682|     40|            *len = 0;
 1683|     40|            return 0;
 1684|     40|        }
 1685|    141|        s->init_num += readbytes;
 1686|    141|        toread -= readbytes;
 1687|    141|    }
 1688|       |
 1689|       |    /*
 1690|       |     * If receiving Finished, record MAC of prior handshake messages for
 1691|       |     * Finished verification.
 1692|       |     */
 1693|     93|    if (*(s->init_buf->data) == SSL3_MT_FINISHED && !ssl3_take_mac(s)) {
  ------------------
  |  |  324|    186|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (1693:9): [True: 0, False: 93]
  |  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|     93|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
 1706|       |    /* KeyUpdate and NewSessionTicket do not need to be added */
 1707|     93|    if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|    186|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|    186|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     93|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|     93|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 93, False: 0]
  |  |  ------------------
  |  |  274|     93|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     93|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|    186|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 93, False: 0]
  |  |  ------------------
  |  |  275|    186|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|     93|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|     93|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 93]
  |  |  ------------------
  ------------------
 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|     93|            && 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|     93|        if (s->s3.tmp.message_type != SSL3_MT_SERVER_HELLO
  ------------------
  |  |  314|    186|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (1710:13): [True: 0, False: 93]
  ------------------
 1711|     93|            || s->init_num < SERVER_HELLO_RANDOM_OFFSET + SSL3_RANDOM_SIZE
  ------------------
  |  | 1705|     93|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
  |  |  ------------------
  |  |  |  |  141|     93|#define SSL3_HM_HEADER_LENGTH 4
  |  |  ------------------
  ------------------
                          || s->init_num < SERVER_HELLO_RANDOM_OFFSET + SSL3_RANDOM_SIZE
  ------------------
  |  |  137|    186|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1711:16): [True: 8, False: 85]
  ------------------
 1712|     85|            || memcmp(hrrrandom,
  ------------------
  |  Branch (1712:16): [True: 84, False: 1]
  ------------------
 1713|     85|                   s->init_buf->data + SERVER_HELLO_RANDOM_OFFSET,
  ------------------
  |  | 1705|     85|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
  |  |  ------------------
  |  |  |  |  141|     85|#define SSL3_HM_HEADER_LENGTH 4
  |  |  ------------------
  ------------------
 1714|     85|                   SSL3_RANDOM_SIZE)
  ------------------
  |  |  137|     85|#define SSL3_RANDOM_SIZE 32
  ------------------
 1715|     92|                != 0) {
 1716|     92|            if (!ssl3_finish_mac(s, (unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (1716:17): [True: 0, False: 92]
  ------------------
 1717|     92|                    s->init_num + SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|     92|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1718|       |                /* SSLfatal() already called */
 1719|      0|                *len = 0;
 1720|      0|                return 0;
 1721|      0|            }
 1722|     92|        }
 1723|     93|    }
 1724|     93|    if (s->msg_callback)
  ------------------
  |  Branch (1724:9): [True: 0, False: 93]
  ------------------
 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|     93|    *len = s->init_num;
 1730|     93|    return 1;
 1731|     93|}
ssl_allow_compression:
 1790|  2.25k|{
 1791|  2.25k|    if (s->options & SSL_OP_NO_COMPRESSION)
  ------------------
  |  |  395|  2.25k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  351|  2.25k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1791:9): [True: 2.25k, False: 0]
  ------------------
 1792|  2.25k|        return 0;
 1793|      0|    return ssl_security(s, SSL_SECOP_COMPRESSION, 0, 0, NULL);
  ------------------
  |  | 2769|      0|#define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
 1794|  2.25k|}
ssl_version_cmp:
 1805|   759k|{
 1806|   759k|    int dtls = SSL_CONNECTION_IS_DTLS(s);
  ------------------
  |  |  266|   759k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   759k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   759k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
 1807|       |
 1808|   759k|    if (versiona == versionb)
  ------------------
  |  Branch (1808:9): [True: 360k, False: 399k]
  ------------------
 1809|   360k|        return 0;
 1810|   399k|    if (!dtls)
  ------------------
  |  Branch (1810:9): [True: 399k, False: 0]
  ------------------
 1811|   399k|        return versiona < versionb ? -1 : 1;
  ------------------
  |  Branch (1811:16): [True: 301k, False: 98.1k]
  ------------------
 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|   399k|}
ssl_set_version_bound:
 2059|  6.07k|{
 2060|  6.07k|    int valid_tls;
 2061|  6.07k|    int valid_dtls;
 2062|       |
 2063|  6.07k|    if (version == 0) {
  ------------------
  |  Branch (2063:9): [True: 2.96k, False: 3.11k]
  ------------------
 2064|  2.96k|        *bound = version;
 2065|  2.96k|        return 1;
 2066|  2.96k|    }
 2067|       |
 2068|  3.11k|    valid_tls = version > SSL3_VERSION && version <= TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   23|  6.22k|#define SSL3_VERSION 0x0300
  ------------------
                  valid_tls = version > SSL3_VERSION && version <= TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   54|  3.11k|#define TLS_MAX_VERSION_INTERNAL TLS1_3_VERSION
  |  |  ------------------
  |  |  |  |   27|  6.22k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  ------------------
  |  Branch (2068:17): [True: 3.11k, False: 0]
  |  Branch (2068:43): [True: 3.11k, False: 0]
  ------------------
 2069|  3.11k|    valid_dtls =
 2070|       |        /* We support client side pre-standardisation version of DTLS */
 2071|  3.11k|        (version == DTLS1_BAD_VER)
  ------------------
  |  |   30|  3.11k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (2071:9): [True: 0, False: 3.11k]
  ------------------
 2072|  3.11k|        || (DTLS_VERSION_LE(version, DTLS_MAX_VERSION_INTERNAL)
  ------------------
  |  |   65|  6.22k|#define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|  3.11k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  3.11k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 3.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|  3.11k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  3.11k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 3.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (65:33): [True: 0, False: 3.11k]
  |  |  ------------------
  ------------------
 2073|      0|            && DTLS_VERSION_GE(version, DTLS1_VERSION));
  ------------------
  |  |   63|      0|#define DTLS_VERSION_GE(v1, v2) (dtls_ver_ordinal(v1) <= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_GE(v1, v2) (dtls_ver_ordinal(v1) <= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (63:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2074|       |
 2075|  3.11k|    if (!valid_tls && !valid_dtls)
  ------------------
  |  Branch (2075:9): [True: 0, False: 3.11k]
  |  Branch (2075:23): [True: 0, False: 0]
  ------------------
 2076|      0|        return 0;
 2077|       |
 2078|       |    /*-
 2079|       |     * Restrict TLS methods to TLS protocol versions.
 2080|       |     * Restrict DTLS methods to DTLS protocol versions.
 2081|       |     * Note, DTLS version numbers are decreasing, use comparison macros.
 2082|       |     *
 2083|       |     * Note that for both lower-bounds we use explicit versions, not
 2084|       |     * (D)TLS_MIN_VERSION.  This is because we don't want to break user
 2085|       |     * configurations.  If the MIN (supported) version ever rises, the user's
 2086|       |     * "floor" remains valid even if no longer available.  We don't expect the
 2087|       |     * MAX ceiling to ever get lower, so making that variable makes sense.
 2088|       |     *
 2089|       |     * We ignore attempts to set bounds on version-inflexible methods,
 2090|       |     * returning success.
 2091|       |     */
 2092|  3.11k|    switch (method_version) {
 2093|      0|    default:
  ------------------
  |  Branch (2093:5): [True: 0, False: 3.11k]
  ------------------
 2094|      0|        break;
 2095|       |
 2096|  3.11k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  3.11k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2096:5): [True: 3.11k, False: 0]
  ------------------
 2097|  3.11k|        if (valid_tls)
  ------------------
  |  Branch (2097:13): [True: 3.11k, False: 0]
  ------------------
 2098|  3.11k|            *bound = version;
 2099|  3.11k|        break;
 2100|       |
 2101|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2101:5): [True: 0, False: 3.11k]
  ------------------
 2102|      0|        if (valid_dtls)
  ------------------
  |  Branch (2102:13): [True: 0, False: 0]
  ------------------
 2103|      0|            *bound = version;
 2104|      0|        break;
 2105|  3.11k|    }
 2106|  3.11k|    return 1;
 2107|  3.11k|}
ssl_choose_client_version:
 2313|     71|{
 2314|     71|    const version_info *vent;
 2315|     71|    const version_info *table;
 2316|     71|    int ret, ver_min, ver_max, real_max, origv;
 2317|     71|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|     71|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2318|       |
 2319|     71|    origv = s->version;
 2320|     71|    s->version = version;
 2321|       |
 2322|       |    /* This will overwrite s->version if the extension is present */
 2323|     71|    if (!tls_parse_extension(s, TLSEXT_IDX_supported_versions,
  ------------------
  |  Branch (2323:9): [True: 0, False: 71]
  ------------------
 2324|     71|            SSL_EXT_TLS1_2_SERVER_HELLO
  ------------------
  |  |  302|     71|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 2325|     71|                | SSL_EXT_TLS1_3_SERVER_HELLO,
  ------------------
  |  |  303|     71|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 2326|     71|            extensions,
 2327|     71|            NULL, 0)) {
 2328|      0|        s->version = origv;
 2329|      0|        return 0;
 2330|      0|    }
 2331|       |
 2332|     71|    if (s->hello_retry_request != SSL_HRR_NONE
  ------------------
  |  Branch (2332:9): [True: 0, False: 71]
  ------------------
 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|     71|    switch (ssl->method->version) {
 2340|      0|    default:
  ------------------
  |  Branch (2340:5): [True: 0, False: 71]
  ------------------
 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|     71|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|     71|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2358:5): [True: 71, False: 0]
  ------------------
 2359|     71|        table = tls_version_table;
 2360|     71|        break;
 2361|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2361:5): [True: 0, False: 71]
  ------------------
 2362|      0|        table = dtls_version_table;
 2363|      0|        break;
 2364|     71|    }
 2365|       |
 2366|     71|    ret = ssl_get_min_max_version(s, &ver_min, &ver_max, &real_max);
 2367|     71|    if (ret != 0) {
  ------------------
  |  Branch (2367:9): [True: 0, False: 71]
  ------------------
 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|     71|    if (ssl_version_cmp(s, s->version, ver_min) < 0
  ------------------
  |  Branch (2372:9): [True: 3, False: 68]
  ------------------
 2373|     68|        || ssl_version_cmp(s, s->version, ver_max) > 0) {
  ------------------
  |  Branch (2373:12): [True: 17, False: 51]
  ------------------
 2374|     20|        s->version = origv;
 2375|     20|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_UNSUPPORTED_PROTOCOL);
  ------------------
  |  |  155|     20|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|     20|    (ERR_new(),                                                  \
  |  |  |  |  158|     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__
  |  |  |  |  ------------------
  |  |  |  |  159|     20|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2376|     20|        return 0;
 2377|     20|    }
 2378|       |
 2379|     51|    if ((s->mode & SSL_MODE_SEND_FALLBACK_SCSV) == 0)
  ------------------
  |  |  553|     51|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (2379:9): [True: 51, False: 0]
  ------------------
 2380|     51|        real_max = ver_max;
 2381|       |
 2382|       |    /* Check for downgrades */
 2383|       |    /* TODO(DTLSv1.3): Update this code for DTLSv1.3 */
 2384|     51|    if (!SSL_CONNECTION_IS_DTLS(s) && real_max > s->version) {
  ------------------
  |  |  266|    102|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|     51|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|     51|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (2384:9): [True: 51, False: 0]
  |  Branch (2384:39): [True: 46, False: 5]
  ------------------
 2385|       |        /* Signal applies to all versions */
 2386|     46|        if (memcmp(tls11downgrade,
  ------------------
  |  Branch (2386:13): [True: 1, False: 45]
  ------------------
 2387|     46|                s->s3.server_random + SSL3_RANDOM_SIZE
  ------------------
  |  |  137|     46|#define SSL3_RANDOM_SIZE 32
  ------------------
 2388|     46|                    - sizeof(tls11downgrade),
 2389|     46|                sizeof(tls11downgrade))
 2390|     46|            == 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|     45|        if (real_max == TLS1_3_VERSION
  ------------------
  |  |   27|     90|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2397:13): [True: 45, False: 0]
  ------------------
 2398|     45|            && memcmp(tls12downgrade,
  ------------------
  |  Branch (2398:16): [True: 1, False: 44]
  ------------------
 2399|     45|                   s->s3.server_random + SSL3_RANDOM_SIZE
  ------------------
  |  |  137|     45|#define SSL3_RANDOM_SIZE 32
  ------------------
 2400|     45|                       - sizeof(tls12downgrade),
 2401|     45|                   sizeof(tls12downgrade))
 2402|     45|                == 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|     45|    }
 2409|       |
 2410|     95|    for (vent = table; vent->version != 0; ++vent) {
  ------------------
  |  Branch (2410:24): [True: 95, False: 0]
  ------------------
 2411|     95|        if (vent->cmeth == NULL || s->version != vent->version)
  ------------------
  |  Branch (2411:13): [True: 0, False: 95]
  |  Branch (2411:36): [True: 46, False: 49]
  ------------------
 2412|     46|            continue;
 2413|       |
 2414|     49|        ssl->method = vent->cmeth();
 2415|     49|        if (!ssl_set_record_protocol_version(s, s->version)) {
  ------------------
  |  Branch (2415:13): [True: 0, False: 49]
  ------------------
 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|     49|        return 1;
 2420|     49|    }
 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|     49|}
ssl_get_min_max_version:
 2451|  25.0k|{
 2452|  25.0k|    int version, tmp_real_max;
 2453|  25.0k|    int hole;
 2454|  25.0k|    const SSL_METHOD *method;
 2455|  25.0k|    const version_info *table;
 2456|  25.0k|    const version_info *vent;
 2457|  25.0k|    const SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  25.0k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2458|       |
 2459|  25.0k|    switch (ssl->method->version) {
 2460|      0|    default:
  ------------------
  |  Branch (2460:5): [True: 0, False: 25.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|  25.0k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  25.0k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2476:5): [True: 25.0k, False: 0]
  ------------------
 2477|  25.0k|        table = tls_version_table;
 2478|  25.0k|        break;
 2479|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2479:5): [True: 0, False: 25.0k]
  ------------------
 2480|      0|        table = dtls_version_table;
 2481|      0|        break;
 2482|  25.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|  25.0k|    *min_version = version = 0;
 2505|  25.0k|    hole = 1;
 2506|  25.0k|    if (real_max != NULL)
  ------------------
  |  Branch (2506:9): [True: 71, False: 25.0k]
  ------------------
 2507|     71|        *real_max = 0;
 2508|  25.0k|    tmp_real_max = 0;
 2509|   125k|    for (vent = table; vent->version != 0; ++vent) {
  ------------------
  |  Branch (2509:24): [True: 100k, False: 25.0k]
  ------------------
 2510|       |        /*
 2511|       |         * A table entry with a NULL client method is still a hole in the
 2512|       |         * "version capability" vector.
 2513|       |         */
 2514|   100k|        if (vent->cmeth == NULL) {
  ------------------
  |  Branch (2514:13): [True: 0, False: 100k]
  ------------------
 2515|      0|            hole = 1;
 2516|      0|            tmp_real_max = 0;
 2517|      0|            continue;
 2518|      0|        }
 2519|   100k|        method = vent->cmeth();
 2520|       |
 2521|   100k|        if (hole == 1 && tmp_real_max == 0)
  ------------------
  |  Branch (2521:13): [True: 50.6k, False: 49.7k]
  |  Branch (2521:26): [True: 25.0k, False: 25.5k]
  ------------------
 2522|  25.0k|            tmp_real_max = vent->version;
 2523|       |
 2524|   100k|        if (ssl_method_error(s, method) != 0) {
  ------------------
  |  Branch (2524:13): [True: 50.5k, False: 49.7k]
  ------------------
 2525|  50.5k|            hole = 1;
 2526|  50.5k|        } else if (!hole) {
  ------------------
  |  Branch (2526:20): [True: 24.6k, False: 25.0k]
  ------------------
 2527|  24.6k|            *min_version = method->version;
 2528|  25.0k|        } else {
 2529|  25.0k|            if (real_max != NULL && tmp_real_max != 0)
  ------------------
  |  Branch (2529:17): [True: 71, False: 25.0k]
  |  Branch (2529:37): [True: 71, False: 0]
  ------------------
 2530|     71|                *real_max = tmp_real_max;
 2531|  25.0k|            version = method->version;
 2532|  25.0k|            *min_version = version;
 2533|  25.0k|            hole = 0;
 2534|  25.0k|        }
 2535|   100k|    }
 2536|       |
 2537|  25.0k|    *max_version = version;
 2538|       |
 2539|       |    /* Fail if everything is disabled */
 2540|  25.0k|    if (version == 0)
  ------------------
  |  Branch (2540:9): [True: 9, False: 25.0k]
  ------------------
 2541|      9|        return SSL_R_NO_PROTOCOLS_AVAILABLE;
  ------------------
  |  |  208|      9|#define SSL_R_NO_PROTOCOLS_AVAILABLE 191
  ------------------
 2542|       |
 2543|  25.0k|    return 0;
 2544|  25.0k|}
ssl_set_client_hello_version:
 2555|  4.62k|{
 2556|  4.62k|    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|  4.62k|    if (!SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|  4.62k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 4.62k, False: 0]
  |  |  ------------------
  |  |  286|  4.62k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2563|      0|        return 0;
 2564|       |
 2565|  4.62k|    ret = ssl_get_min_max_version(s, &ver_min, &ver_max, NULL);
 2566|       |
 2567|  4.62k|    if (ret != 0)
  ------------------
  |  Branch (2567:9): [True: 0, False: 4.62k]
  ------------------
 2568|      0|        return ret;
 2569|       |
 2570|  4.62k|    s->version = ver_max;
 2571|       |
 2572|  4.62k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  4.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  4.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  4.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 4.62k]
  |  |  ------------------
  ------------------
 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|  4.62k|    } else if (ver_max > TLS1_2_VERSION) {
  ------------------
  |  |   26|  4.62k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (2584:16): [True: 4.51k, False: 114]
  ------------------
 2585|       |        /* TLS1.3 always uses TLS1.2 in the legacy_version field */
 2586|  4.51k|        ver_max = TLS1_2_VERSION;
  ------------------
  |  |   26|  4.51k|#define TLS1_2_VERSION 0x0303
  ------------------
 2587|  4.51k|    }
 2588|       |
 2589|  4.62k|    s->client_version = ver_max;
 2590|  4.62k|    return 0;
 2591|  4.62k|}
get_ca_names:
 2738|  2.17k|{
 2739|  2.17k|    const STACK_OF(X509_NAME) *ca_sk = NULL;
 2740|  2.17k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.17k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2741|       |
 2742|  2.17k|    if (s->server) {
  ------------------
  |  Branch (2742:9): [True: 0, False: 2.17k]
  ------------------
 2743|      0|        ca_sk = SSL_get_client_CA_list(ssl);
 2744|      0|        if (ca_sk != NULL && sk_X509_NAME_num(ca_sk) == 0)
  ------------------
  |  |   56|      0|#define sk_X509_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_sk_type(sk))
  ------------------
  |  Branch (2744:13): [True: 0, False: 0]
  |  Branch (2744:30): [True: 0, False: 0]
  ------------------
 2745|      0|            ca_sk = NULL;
 2746|      0|    }
 2747|       |
 2748|  2.17k|    if (ca_sk == NULL)
  ------------------
  |  Branch (2748:9): [True: 2.17k, False: 0]
  ------------------
 2749|  2.17k|        ca_sk = SSL_get0_CA_list(ssl);
 2750|       |
 2751|  2.17k|    return ca_sk;
 2752|  2.17k|}
statem_lib.c:grow_init_buf:
 1634|    181|{
 1635|       |
 1636|    181|    size_t msg_offset = (char *)s->init_msg - s->init_buf->data;
 1637|       |
 1638|    181|    if (!BUF_MEM_grow_clean(s->init_buf, size))
  ------------------
  |  Branch (1638:9): [True: 0, False: 181]
  ------------------
 1639|      0|        return 0;
 1640|       |
 1641|    181|    if (size < msg_offset)
  ------------------
  |  Branch (1641:9): [True: 0, False: 181]
  ------------------
 1642|      0|        return 0;
 1643|       |
 1644|    181|    s->init_msg = s->init_buf->data + msg_offset;
 1645|       |
 1646|    181|    return 1;
 1647|    181|}
statem_lib.c:ssl_method_error:
 1880|   100k|{
 1881|   100k|    int version = method->version;
 1882|       |
 1883|   100k|    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|  50.7k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|  50.7k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1883:10): [True: 100k, False: 0]
  |  Branch (1883:39): [True: 49.6k, False: 50.7k]
  |  Branch (1883:97): [True: 330, False: 50.3k]
  ------------------
 1884|  49.9k|        return SSL_R_VERSION_TOO_LOW;
  ------------------
  |  |  368|  49.9k|#define SSL_R_VERSION_TOO_LOW 396
  ------------------
 1885|       |
 1886|  50.3k|    if (s->max_proto_version != 0 && ssl_version_cmp(s, version, s->max_proto_version) > 0)
  ------------------
  |  Branch (1886:9): [True: 1.44k, False: 48.9k]
  |  Branch (1886:38): [True: 632, False: 813]
  ------------------
 1887|    632|        return SSL_R_VERSION_TOO_HIGH;
  ------------------
  |  |  367|    632|#define SSL_R_VERSION_TOO_HIGH 166
  ------------------
 1888|       |
 1889|  49.7k|    if ((s->options & method->mask) != 0)
  ------------------
  |  Branch (1889:9): [True: 0, False: 49.7k]
  ------------------
 1890|      0|        return SSL_R_UNSUPPORTED_PROTOCOL;
  ------------------
  |  |  362|      0|#define SSL_R_UNSUPPORTED_PROTOCOL 258
  ------------------
 1891|  49.7k|    if ((method->flags & SSL_METHOD_NO_SUITEB) != 0 && tls1_suiteb(s))
  ------------------
  |  | 2265|  49.7k|#define SSL_METHOD_NO_SUITEB (1U << 1)
  ------------------
                  if ((method->flags & SSL_METHOD_NO_SUITEB) != 0 && tls1_suiteb(s))
  ------------------
  |  | 2035|    250|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|    250|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 0, False: 250]
  |  |  ------------------
  ------------------
  |  Branch (1891:9): [True: 250, False: 49.5k]
  ------------------
 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|  49.7k|    return 0;
 1895|  49.7k|}

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

tls1_default_timeout:
   99|  3.13k|{
  100|       |    /*
  101|       |     * 2 hours, the 24 hours mentioned in the TLSv1 spec is way too long for
  102|       |     * http, the cache would over fill
  103|       |     */
  104|  3.13k|    return ossl_seconds2time(60 * 60 * 2);
  ------------------
  |  |   42|  3.13k|#define ossl_seconds2time(s) ossl_ticks2time((s) * OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|  3.13k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
  105|  3.13k|}
tls1_new:
  108|  2.32k|{
  109|  2.32k|    if (!ssl3_new(s))
  ------------------
  |  Branch (109:9): [True: 0, False: 2.32k]
  ------------------
  110|      0|        return 0;
  111|  2.32k|    if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (111:9): [True: 0, False: 2.32k]
  ------------------
  112|      0|        return 0;
  113|       |
  114|  2.32k|    return 1;
  115|  2.32k|}
tls1_free:
  118|  2.32k|{
  119|  2.32k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.32k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.32k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.32k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.32k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  2.32k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.32k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.32k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.32k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  120|       |
  121|  2.32k|    if (sc == NULL)
  ------------------
  |  Branch (121:9): [True: 0, False: 2.32k]
  ------------------
  122|      0|        return;
  123|       |
  124|  2.32k|    OPENSSL_free(sc->ext.session_ticket);
  ------------------
  |  |  132|  2.32k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  125|  2.32k|    ssl3_free(s);
  126|  2.32k|}
tls1_clear:
  129|  9.28k|{
  130|  9.28k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  9.28k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  9.28k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 9.28k]
  |  |  |  |  ------------------
  |  |  |  |   33|  9.28k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  9.28k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 9.28k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  9.28k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  9.28k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  131|       |
  132|  9.28k|    if (sc == NULL)
  ------------------
  |  Branch (132:9): [True: 0, False: 9.28k]
  ------------------
  133|      0|        return 0;
  134|       |
  135|  9.28k|    if (!ssl3_clear(s))
  ------------------
  |  Branch (135:9): [True: 0, False: 9.28k]
  ------------------
  136|      0|        return 0;
  137|       |
  138|  9.28k|    if (s->method->version == TLS_ANY_VERSION)
  ------------------
  |  |   40|  9.28k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (138:9): [True: 9.28k, False: 0]
  ------------------
  139|  9.28k|        sc->version = TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   54|  9.28k|#define TLS_MAX_VERSION_INTERNAL TLS1_3_VERSION
  |  |  ------------------
  |  |  |  |   27|  9.28k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  ------------------
  140|      0|    else
  141|      0|        sc->version = s->method->version;
  142|       |
  143|  9.28k|    return 1;
  144|  9.28k|}
ssl_load_groups:
  382|  3.13k|{
  383|  3.13k|    if (!OSSL_PROVIDER_do_all(ctx->libctx, discover_provider_groups, ctx))
  ------------------
  |  Branch (383:9): [True: 0, False: 3.13k]
  ------------------
  384|      0|        return 0;
  385|       |
  386|  3.13k|    return SSL_CTX_set1_groups_list(ctx, TLS_DEFAULT_GROUP_LIST);
  ------------------
  |  | 1531|  3.13k|    SSL_CTX_ctrl(ctx, SSL_CTRL_SET_GROUPS_LIST, 0, (char *)(s))
  |  |  ------------------
  |  |  |  | 1379|  3.13k|#define SSL_CTRL_SET_GROUPS_LIST 92
  |  |  ------------------
  ------------------
  387|  3.13k|}
ssl_load_sigalgs:
  696|  3.13k|{
  697|  3.13k|    size_t i;
  698|  3.13k|    SSL_CERT_LOOKUP lu;
  699|       |
  700|  3.13k|    if (!OSSL_PROVIDER_do_all(ctx->libctx, discover_provider_sigalgs, ctx))
  ------------------
  |  Branch (700:9): [True: 0, False: 3.13k]
  ------------------
  701|      0|        return 0;
  702|       |
  703|       |    /* now populate ctx->ssl_cert_info */
  704|  3.13k|    if (ctx->sigalg_list_len > 0) {
  ------------------
  |  Branch (704:9): [True: 3.03k, False: 95]
  ------------------
  705|  3.03k|        OPENSSL_free(ctx->ssl_cert_info);
  ------------------
  |  |  132|  3.03k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  706|  3.03k|        ctx->ssl_cert_info = OPENSSL_calloc(ctx->sigalg_list_len, sizeof(lu));
  ------------------
  |  |  113|  3.03k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  707|  3.03k|        if (ctx->ssl_cert_info == NULL)
  ------------------
  |  Branch (707:13): [True: 0, False: 3.03k]
  ------------------
  708|      0|            return 0;
  709|  15.1k|        for (i = 0; i < ctx->sigalg_list_len; i++) {
  ------------------
  |  Branch (709:21): [True: 12.1k, False: 3.03k]
  ------------------
  710|  12.1k|            const char *keytype = inferred_keytype(&ctx->sigalg_list[i]);
  711|  12.1k|            ctx->ssl_cert_info[i].pkey_nid = OBJ_txt2nid(keytype);
  712|  12.1k|            ctx->ssl_cert_info[i].amask = SSL_aANY;
  ------------------
  |  |  128|  12.1k|#define SSL_aANY 0x00000000U
  ------------------
  713|  12.1k|        }
  714|  3.03k|    }
  715|       |
  716|       |    /*
  717|       |     * For now, leave it at this: legacy sigalgs stay in their own
  718|       |     * data structures until "legacy cleanup" occurs.
  719|       |     */
  720|       |
  721|  3.13k|    return 1;
  722|  3.13k|}
tls1_group_id_lookup:
  738|  96.5k|{
  739|  96.5k|    size_t i;
  740|       |
  741|   886k|    for (i = 0; i < ctx->group_list_len; i++) {
  ------------------
  |  Branch (741:17): [True: 886k, False: 1]
  ------------------
  742|   886k|        if (ctx->group_list[i].group_id == group_id)
  ------------------
  |  Branch (742:13): [True: 96.5k, False: 789k]
  ------------------
  743|  96.5k|            return &ctx->group_list[i];
  744|   886k|    }
  745|       |
  746|      1|    return NULL;
  747|  96.5k|}
tls1_group_id2nid:
  760|  31.6k|{
  761|  31.6k|    size_t i;
  762|       |
  763|  31.6k|    if (group_id == 0)
  ------------------
  |  Branch (763:9): [True: 0, False: 31.6k]
  ------------------
  764|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  765|       |
  766|       |    /*
  767|       |     * Return well known Group NIDs - for backwards compatibility. This won't
  768|       |     * work for groups we don't know about.
  769|       |     */
  770|  1.13M|    for (i = 0; i < OSSL_NELEM(nid_to_group); i++) {
  ------------------
  |  |   14|  1.13M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (770:17): [True: 1.12M, False: 9.89k]
  ------------------
  771|  1.12M|        if (nid_to_group[i].group_id == group_id)
  ------------------
  |  Branch (771:13): [True: 21.7k, False: 1.10M]
  ------------------
  772|  21.7k|            return nid_to_group[i].nid;
  773|  1.12M|    }
  774|  9.89k|    if (!include_unknown)
  ------------------
  |  Branch (774:9): [True: 9.89k, False: 0]
  ------------------
  775|  9.89k|        return NID_undef;
  ------------------
  |  |   18|  9.89k|#define NID_undef                       0
  ------------------
  776|      0|    return TLSEXT_nid_unknown | (int)group_id;
  ------------------
  |  |  227|      0|#define TLSEXT_nid_unknown 0x1000000
  ------------------
  777|  9.89k|}
tls1_get_supported_groups:
  801|  9.14k|{
  802|  9.14k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  9.14k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  803|       |
  804|       |    /* For Suite B mode only include P-256, P-384 */
  805|  9.14k|    switch (tls1_suiteb(s)) {
  ------------------
  |  | 2035|  9.14k|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|  9.14k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  ------------------
  806|     20|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  584|     20|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (806:5): [True: 20, False: 9.12k]
  ------------------
  807|     20|        *pgroups = suiteb_curves;
  808|     20|        *pgroupslen = OSSL_NELEM(suiteb_curves);
  ------------------
  |  |   14|     20|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  809|     20|        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: 9.14k]
  ------------------
  812|      4|        *pgroups = suiteb_curves;
  813|      4|        *pgroupslen = 1;
  814|      4|        break;
  815|       |
  816|      7|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  582|      7|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (816:5): [True: 7, False: 9.13k]
  ------------------
  817|      7|        *pgroups = suiteb_curves + 1;
  818|      7|        *pgroupslen = 1;
  819|      7|        break;
  820|       |
  821|  9.11k|    default:
  ------------------
  |  Branch (821:5): [True: 9.11k, False: 31]
  ------------------
  822|  9.11k|        if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (822:13): [True: 0, False: 9.11k]
  ------------------
  823|      0|            *pgroups = sctx->ext.supportedgroups;
  824|      0|            *pgroupslen = sctx->ext.supportedgroups_len;
  825|  9.11k|        } else {
  826|  9.11k|            *pgroups = s->ext.supportedgroups;
  827|  9.11k|            *pgroupslen = s->ext.supportedgroups_len;
  828|  9.11k|        }
  829|  9.11k|        break;
  830|  9.14k|    }
  831|  9.14k|}
tls1_get_requested_keyshare_groups:
  848|  2.18k|{
  849|  2.18k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  2.18k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  850|       |
  851|  2.18k|    if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (851:9): [True: 0, False: 2.18k]
  ------------------
  852|      0|        *pgroups = sctx->ext.supportedgroups;
  853|      0|        *pgroupslen = sctx->ext.supportedgroups_len;
  854|  2.18k|    } else {
  855|  2.18k|        *pgroups = s->ext.keyshares;
  856|  2.18k|        *pgroupslen = s->ext.keyshares_len;
  857|  2.18k|    }
  858|  2.18k|}
tls_valid_group:
  877|  60.7k|{
  878|  60.7k|    const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|  60.7k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  879|  60.7k|        group_id);
  880|  60.7k|    int ret = 0;
  881|  60.7k|    int group_minversion, group_maxversion;
  882|       |
  883|  60.7k|    if (okfortls13 != NULL)
  ------------------
  |  Branch (883:9): [True: 21.4k, False: 39.2k]
  ------------------
  884|  21.4k|        *okfortls13 = 0;
  885|       |
  886|  60.7k|    if (ginfo == NULL)
  ------------------
  |  Branch (886:9): [True: 0, False: 60.7k]
  ------------------
  887|      0|        goto end;
  888|       |
  889|  60.7k|    group_minversion = SSL_CONNECTION_IS_DTLS(s) ? ginfo->mindtls : ginfo->mintls;
  ------------------
  |  |  266|  60.7k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  60.7k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  60.7k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 60.7k]
  |  |  ------------------
  ------------------
  890|  60.7k|    group_maxversion = SSL_CONNECTION_IS_DTLS(s) ? ginfo->maxdtls : ginfo->maxtls;
  ------------------
  |  |  266|  60.7k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  60.7k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  60.7k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 60.7k]
  |  |  ------------------
  ------------------
  891|       |
  892|  60.7k|    if (group_minversion < 0 || group_maxversion < 0)
  ------------------
  |  Branch (892:9): [True: 0, False: 60.7k]
  |  Branch (892:33): [True: 0, False: 60.7k]
  ------------------
  893|      0|        goto end;
  894|  60.7k|    if (group_maxversion == 0)
  ------------------
  |  Branch (894:9): [True: 60.7k, False: 0]
  ------------------
  895|  60.7k|        ret = 1;
  896|      0|    else
  897|      0|        ret = (ssl_version_cmp(s, minversion, group_maxversion) <= 0);
  898|  60.7k|    if (group_minversion > 0)
  ------------------
  |  Branch (898:9): [True: 60.7k, False: 0]
  ------------------
  899|  60.7k|        ret &= (ssl_version_cmp(s, maxversion, group_minversion) >= 0);
  900|       |
  901|  60.7k|    if (!SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  60.7k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  60.7k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  60.7k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (901:9): [True: 60.7k, False: 0]
  ------------------
  902|  60.7k|        if (ret && okfortls13 != NULL && maxversion == TLS1_3_VERSION)
  ------------------
  |  |   27|  21.2k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (902:13): [True: 60.2k, False: 480]
  |  Branch (902:20): [True: 21.2k, False: 38.9k]
  |  Branch (902:42): [True: 21.0k, False: 269]
  ------------------
  903|  21.0k|            *okfortls13 = (group_maxversion == 0)
  ------------------
  |  Branch (903:27): [True: 21.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|  60.7k|    }
  906|  60.7k|end:
  907|  60.7k|    if (giptr != NULL)
  ------------------
  |  Branch (907:9): [True: 56.5k, False: 4.16k]
  ------------------
  908|  56.5k|        *giptr = ginfo;
  909|  60.7k|    return ret;
  910|  60.7k|}
tls_group_allowed:
  914|  31.6k|{
  915|  31.6k|    const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|  31.6k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  916|  31.6k|        group);
  917|  31.6k|    unsigned char gtmp[2];
  918|       |
  919|  31.6k|    if (ginfo == NULL)
  ------------------
  |  Branch (919:9): [True: 1, False: 31.6k]
  ------------------
  920|      1|        return 0;
  921|       |
  922|  31.6k|    gtmp[0] = group >> 8;
  923|  31.6k|    gtmp[1] = group & 0xff;
  924|  31.6k|    return ssl_security(s, op, ginfo->secbits,
  925|  31.6k|        tls1_group_id2nid(ginfo->group_id, 0), (void *)gtmp);
  926|  31.6k|}
tls1_set_groups_list:
 1716|  3.62k|{
 1717|  3.62k|    size_t i = 0, j;
 1718|  3.62k|    int ret = 0, parse_ret = 0;
 1719|  3.62k|    gid_cb_st gcb;
 1720|       |
 1721|       |    /* Sanity check */
 1722|  3.62k|    if (ctx == NULL) {
  ------------------
  |  Branch (1722:9): [True: 0, False: 3.62k]
  ------------------
 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|  3.62k|    memset(&gcb, 0, sizeof(gcb));
 1728|  3.62k|    gcb.gidmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|  3.62k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1729|  3.62k|    gcb.tplmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|  3.62k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1730|  3.62k|    gcb.ksidmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|  3.62k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1731|  3.62k|    gcb.ctx = ctx;
 1732|       |
 1733|       |    /* Prepare initial chunks of memory for groups, tuples and keyshares groupIDs */
 1734|  3.62k|    gcb.gid_arr = OPENSSL_malloc_array(gcb.gidmax, sizeof(*gcb.gid_arr));
  ------------------
  |  |  111|  3.62k|    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|  3.62k|    if (gcb.gid_arr == NULL)
  ------------------
  |  Branch (1735:9): [True: 0, False: 3.62k]
  ------------------
 1736|      0|        goto end;
 1737|  3.62k|    gcb.tuplcnt_arr = OPENSSL_malloc_array(gcb.tplmax, sizeof(*gcb.tuplcnt_arr));
  ------------------
  |  |  111|  3.62k|    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|  3.62k|    if (gcb.tuplcnt_arr == NULL)
  ------------------
  |  Branch (1738:9): [True: 0, False: 3.62k]
  ------------------
 1739|      0|        goto end;
 1740|  3.62k|    gcb.tuplcnt_arr[0] = 0;
 1741|  3.62k|    gcb.ksid_arr = OPENSSL_malloc_array(gcb.ksidmax, sizeof(*gcb.ksid_arr));
  ------------------
  |  |  111|  3.62k|    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|  3.62k|    if (gcb.ksid_arr == NULL)
  ------------------
  |  Branch (1742:9): [True: 0, False: 3.62k]
  ------------------
 1743|      0|        goto end;
 1744|       |
 1745|  13.3k|    while (str[0] != '\0' && isspace((unsigned char)*str))
  ------------------
  |  Branch (1745:12): [True: 13.2k, False: 18]
  |  Branch (1745:30): [True: 9.68k, False: 3.60k]
  ------------------
 1746|  9.68k|        str++;
 1747|  3.62k|    if (str[0] == '\0')
  ------------------
  |  Branch (1747:9): [True: 18, False: 3.60k]
  ------------------
 1748|     18|        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|  3.60k|    parse_ret = CONF_parse_list(str, TUPLE_DELIMITER_CHARACTER, 1, tuple_cb, &gcb);
  ------------------
  |  | 1226|  3.60k|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
 1755|       |
 1756|  3.60k|    if (parse_ret == 0)
  ------------------
  |  Branch (1756:9): [True: 86, False: 3.52k]
  ------------------
 1757|     86|        goto end;
 1758|  3.52k|    if (parse_ret == -1) {
  ------------------
  |  Branch (1758:9): [True: 23, False: 3.49k]
  ------------------
 1759|     23|        ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  359|     23|    (ERR_new(),                                                  \
  |  |  360|     23|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|     23|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|     23|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   70|     23|#define ERR_LIB_SSL 20
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  311|     23|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|     23|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|     23|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1760|     23|            "Syntax error in '%s'", str);
 1761|     23|        goto end;
 1762|     23|    }
 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|  19.2k|    for (i = j = 0; j < gcb.tplcnt; j++) {
  ------------------
  |  Branch (1768:21): [True: 15.7k, False: 3.49k]
  ------------------
 1769|  15.7k|        if (gcb.tuplcnt_arr[j] == 0)
  ------------------
  |  Branch (1769:13): [True: 0, False: 15.7k]
  ------------------
 1770|      0|            continue;
 1771|       |        /* If there's a gap, move to first unfilled slot */
 1772|  15.7k|        if (j == i)
  ------------------
  |  Branch (1772:13): [True: 15.7k, False: 0]
  ------------------
 1773|  15.7k|            ++i;
 1774|      0|        else
 1775|      0|            gcb.tuplcnt_arr[i++] = gcb.tuplcnt_arr[j];
 1776|  15.7k|    }
 1777|  3.49k|    gcb.tplcnt = i;
 1778|       |
 1779|  3.49k|    if (gcb.ksidcnt > OPENSSL_CLIENT_MAX_KEY_SHARES) {
  ------------------
  |  |   28|  3.49k|#define OPENSSL_CLIENT_MAX_KEY_SHARES 4
  ------------------
  |  Branch (1779:9): [True: 1, False: 3.49k]
  ------------------
 1780|      1|        ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  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)
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   70|      1|#define ERR_LIB_SSL 20
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  311|      1|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      1|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      1|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1781|      1|            "To many keyshares requested in '%s' (max = %d)",
 1782|      1|            str, OPENSSL_CLIENT_MAX_KEY_SHARES);
  ------------------
  |  |   28|      1|#define OPENSSL_CLIENT_MAX_KEY_SHARES 4
  ------------------
 1783|      1|        goto end;
 1784|      1|    }
 1785|       |
 1786|       |    /*
 1787|       |     * For backward compatibility we let the rest of the code know that a key share
 1788|       |     * for the first valid group should be added if no "*" prefix was used anywhere
 1789|       |     */
 1790|  3.49k|    if (gcb.gidcnt > 0 && gcb.ksidcnt == 0) {
  ------------------
  |  Branch (1790:9): [True: 3.39k, False: 104]
  |  Branch (1790:27): [True: 255, False: 3.13k]
  ------------------
 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|    255|        gcb.ksidcnt = 1;
 1796|    255|        gcb.ksid_arr[0] = 0;
 1797|    255|    }
 1798|       |
 1799|  3.51k|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|  3.51k|    if (grpext == NULL || ksext == NULL || tplext == NULL || grpextlen == NULL || ksextlen == NULL || tplextlen == NULL) {
  ------------------
  |  Branch (1804:9): [True: 0, False: 3.51k]
  |  Branch (1804:27): [True: 0, False: 3.51k]
  |  Branch (1804:44): [True: 0, False: 3.51k]
  |  Branch (1804:62): [True: 0, False: 3.51k]
  |  Branch (1804:83): [True: 0, False: 3.51k]
  |  Branch (1804:103): [True: 0, False: 3.51k]
  ------------------
 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|  3.51k|    OPENSSL_free(*grpext);
  ------------------
  |  |  132|  3.51k|    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|  3.51k|    *grpext = gcb.gid_arr;
 1815|  3.51k|    *grpextlen = gcb.gidcnt;
 1816|  3.51k|    OPENSSL_free(*ksext);
  ------------------
  |  |  132|  3.51k|    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|  3.51k|    *ksext = gcb.ksid_arr;
 1818|  3.51k|    *ksextlen = gcb.ksidcnt;
 1819|  3.51k|    OPENSSL_free(*tplext);
  ------------------
  |  |  132|  3.51k|    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|  3.51k|    *tplext = gcb.tuplcnt_arr;
 1821|  3.51k|    *tplextlen = gcb.tplcnt;
 1822|       |
 1823|  3.51k|    return 1;
 1824|       |
 1825|    110|end:
 1826|    110|    OPENSSL_free(gcb.gid_arr);
  ------------------
  |  |  132|    110|    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|    110|    OPENSSL_free(gcb.tuplcnt_arr);
  ------------------
  |  |  132|    110|    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|    110|    OPENSSL_free(gcb.ksid_arr);
  ------------------
  |  |  132|    110|    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|    110|    return ret;
 1830|  3.51k|}
tls1_get_formatlist:
 1888|  2.04k|{
 1889|       |    /*
 1890|       |     * If we have a custom point format list use it otherwise use default
 1891|       |     */
 1892|  2.04k|    if (s->ext.ecpointformats) {
  ------------------
  |  Branch (1892:9): [True: 0, False: 2.04k]
  ------------------
 1893|      0|        *pformats = s->ext.ecpointformats;
 1894|      0|        *num_formats = s->ext.ecpointformats_len;
 1895|  2.04k|    } else if ((s->options & SSL_OP_LEGACY_EC_POINT_FORMATS) != 0) {
  ------------------
  |  |  456|  2.04k|#define SSL_OP_LEGACY_EC_POINT_FORMATS SSL_OP_BIT(36)
  |  |  ------------------
  |  |  |  |  351|  2.04k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1895:16): [True: 0, False: 2.04k]
  ------------------
 1896|      0|        *pformats = ecformats_all;
 1897|       |        /* For Suite B we don't support char2 fields */
 1898|      0|        if (tls1_suiteb(s))
  ------------------
  |  | 2035|      0|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1899|      0|            *num_formats = sizeof(ecformats_all) - 1;
 1900|      0|        else
 1901|      0|            *num_formats = sizeof(ecformats_all);
 1902|  2.04k|    } else {
 1903|  2.04k|        *pformats = ecformats_default;
 1904|  2.04k|        *num_formats = sizeof(ecformats_default);
 1905|  2.04k|    }
 1906|  2.04k|}
ssl_setup_sigalgs:
 2337|  3.13k|{
 2338|  3.13k|    size_t i, cache_idx, sigalgs_len, enabled;
 2339|  3.13k|    const SIGALG_LOOKUP *lu;
 2340|  3.13k|    SIGALG_LOOKUP *cache = NULL;
 2341|  3.13k|    uint16_t *tls12_sigalgs_list = NULL;
 2342|  3.13k|    EVP_PKEY *tmpkey = EVP_PKEY_new();
 2343|  3.13k|    int istls;
 2344|  3.13k|    int ret = 0;
 2345|       |
 2346|  3.13k|    if (ctx == NULL)
  ------------------
  |  Branch (2346:9): [True: 0, False: 3.13k]
  ------------------
 2347|      0|        goto err;
 2348|       |
 2349|  3.13k|    istls = !SSL_CTX_IS_DTLS(ctx);
  ------------------
  |  |  270|  3.13k|    (ctx->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.13k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
 2350|       |
 2351|  3.13k|    sigalgs_len = OSSL_NELEM(sigalg_lookup_tbl) + ctx->sigalg_list_len;
  ------------------
  |  |   14|  3.13k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2352|       |
 2353|  3.13k|    cache = OPENSSL_calloc(sigalgs_len, sizeof(const SIGALG_LOOKUP));
  ------------------
  |  |  113|  3.13k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2354|  3.13k|    if (cache == NULL || tmpkey == NULL)
  ------------------
  |  Branch (2354:9): [True: 0, False: 3.13k]
  |  Branch (2354:26): [True: 0, False: 3.13k]
  ------------------
 2355|      0|        goto err;
 2356|       |
 2357|  3.13k|    tls12_sigalgs_list = OPENSSL_calloc(sigalgs_len, sizeof(uint16_t));
  ------------------
  |  |  113|  3.13k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2358|  3.13k|    if (tls12_sigalgs_list == NULL)
  ------------------
  |  Branch (2358:9): [True: 0, False: 3.13k]
  ------------------
 2359|      0|        goto err;
 2360|       |
 2361|  3.13k|    ERR_set_mark();
 2362|       |    /* First fill cache and tls12_sigalgs list from legacy algorithm list */
 2363|  3.13k|    for (i = 0, lu = sigalg_lookup_tbl;
 2364|   100k|        i < OSSL_NELEM(sigalg_lookup_tbl); lu++, i++) {
  ------------------
  |  |   14|   100k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2364:9): [True: 97.0k, False: 3.13k]
  ------------------
 2365|  97.0k|        EVP_PKEY_CTX *pctx;
 2366|       |
 2367|  97.0k|        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|  97.0k|        if (lu->hash != NID_undef
  ------------------
  |  |   18|   194k|#define NID_undef                       0
  ------------------
  |  Branch (2377:13): [True: 90.7k, False: 6.26k]
  ------------------
 2378|  90.7k|            && ctx->ssl_digest_methods[lu->hash_idx] == NULL) {
  ------------------
  |  Branch (2378:16): [True: 17.9k, False: 72.8k]
  ------------------
 2379|  17.9k|            cache[i].available = 0;
 2380|  17.9k|            continue;
 2381|  17.9k|        }
 2382|       |
 2383|  79.1k|        if (!EVP_PKEY_set_type(tmpkey, lu->sig)) {
  ------------------
  |  Branch (2383:13): [True: 0, False: 79.1k]
  ------------------
 2384|      0|            cache[i].available = 0;
 2385|      0|            continue;
 2386|      0|        }
 2387|  79.1k|        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|  79.1k|        if (pctx == NULL)
  ------------------
  |  Branch (2389:13): [True: 190, False: 78.9k]
  ------------------
 2390|    190|            cache[i].available = 0;
 2391|  79.1k|        EVP_PKEY_CTX_free(pctx);
 2392|  79.1k|    }
 2393|       |
 2394|       |    /* Now complete cache and tls12_sigalgs list with provider sig information */
 2395|  3.13k|    cache_idx = OSSL_NELEM(sigalg_lookup_tbl);
  ------------------
  |  |   14|  3.13k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2396|  15.2k|    for (i = 0; i < ctx->sigalg_list_len; i++) {
  ------------------
  |  Branch (2396:17): [True: 12.1k, False: 3.13k]
  ------------------
 2397|  12.1k|        TLS_SIGALG_INFO si = ctx->sigalg_list[i];
 2398|  12.1k|        cache[cache_idx].name = si.name;
 2399|  12.1k|        cache[cache_idx].name12 = si.sigalg_name;
 2400|  12.1k|        cache[cache_idx].sigalg = si.code_point;
 2401|  12.1k|        tls12_sigalgs_list[cache_idx] = si.code_point;
 2402|  12.1k|        cache[cache_idx].hash = si.hash_name ? OBJ_txt2nid(si.hash_name) : NID_undef;
  ------------------
  |  |   18|  24.2k|#define NID_undef                       0
  ------------------
  |  Branch (2402:33): [True: 0, False: 12.1k]
  ------------------
 2403|  12.1k|        cache[cache_idx].hash_idx = ssl_get_md_idx(cache[cache_idx].hash);
 2404|  12.1k|        cache[cache_idx].sig = OBJ_txt2nid(si.sigalg_name);
 2405|  12.1k|        cache[cache_idx].sig_idx = (int)(i + SSL_PKEY_NUM);
  ------------------
  |  |  336|  12.1k|#define SSL_PKEY_NUM 9
  ------------------
 2406|  12.1k|        cache[cache_idx].sigandhash = OBJ_txt2nid(si.sigalg_name);
 2407|  12.1k|        cache[cache_idx].curve = NID_undef;
  ------------------
  |  |   18|  12.1k|#define NID_undef                       0
  ------------------
 2408|  12.1k|        cache[cache_idx].mintls = TLS1_3_VERSION;
  ------------------
  |  |   27|  12.1k|#define TLS1_3_VERSION 0x0304
  ------------------
 2409|  12.1k|        cache[cache_idx].maxtls = TLS1_3_VERSION;
  ------------------
  |  |   27|  12.1k|#define TLS1_3_VERSION 0x0304
  ------------------
 2410|  12.1k|        cache[cache_idx].mindtls = -1;
 2411|  12.1k|        cache[cache_idx].maxdtls = -1;
 2412|       |        /* Compatibility with TLS 1.3 is checked on load */
 2413|  12.1k|        cache[cache_idx].available = istls;
 2414|  12.1k|        cache[cache_idx].advertise = 0;
 2415|  12.1k|        cache_idx++;
 2416|  12.1k|    }
 2417|  3.13k|    ERR_pop_to_mark();
 2418|       |
 2419|  3.13k|    enabled = 0;
 2420|   109k|    for (i = 0; i < OSSL_NELEM(tls12_sigalgs); ++i) {
  ------------------
  |  |   14|   109k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2420:17): [True: 106k, False: 3.13k]
  ------------------
 2421|   106k|        SIGALG_LOOKUP *ent = cache;
 2422|   106k|        size_t j;
 2423|       |
 2424|  1.86M|        for (j = 0; j < sigalgs_len; ent++, j++) {
  ------------------
  |  Branch (2424:21): [True: 1.86M, False: 285]
  ------------------
 2425|  1.86M|            if (ent->sigalg != tls12_sigalgs[i])
  ------------------
  |  Branch (2425:17): [True: 1.75M, False: 106k]
  ------------------
 2426|  1.75M|                continue;
 2427|       |            /* Dedup by marking cache entry as default enabled. */
 2428|   106k|            if (ent->available && !ent->advertise) {
  ------------------
  |  Branch (2428:17): [True: 88.0k, False: 18.1k]
  |  Branch (2428:35): [True: 88.0k, False: 0]
  ------------------
 2429|  88.0k|                ent->advertise = 1;
 2430|  88.0k|                tls12_sigalgs_list[enabled++] = tls12_sigalgs[i];
 2431|  88.0k|            }
 2432|   106k|            break;
 2433|  1.86M|        }
 2434|   106k|    }
 2435|       |
 2436|       |    /* Append any provider sigalgs not yet handled */
 2437|  15.2k|    for (i = OSSL_NELEM(sigalg_lookup_tbl); i < sigalgs_len; ++i) {
  ------------------
  |  |   14|  3.13k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2437:45): [True: 12.1k, False: 3.13k]
  ------------------
 2438|  12.1k|        SIGALG_LOOKUP *ent = &cache[i];
 2439|       |
 2440|  12.1k|        if (ent->available && !ent->advertise)
  ------------------
  |  Branch (2440:13): [True: 12.1k, False: 0]
  |  Branch (2440:31): [True: 3.03k, False: 9.10k]
  ------------------
 2441|  3.03k|            tls12_sigalgs_list[enabled++] = ent->sigalg;
 2442|  12.1k|    }
 2443|       |
 2444|  3.13k|    ctx->sigalg_lookup_cache = cache;
 2445|  3.13k|    ctx->sigalg_lookup_cache_len = sigalgs_len;
 2446|  3.13k|    ctx->tls12_sigalgs = tls12_sigalgs_list;
 2447|  3.13k|    ctx->tls12_sigalgs_len = enabled;
 2448|  3.13k|    cache = NULL;
 2449|  3.13k|    tls12_sigalgs_list = NULL;
 2450|       |
 2451|  3.13k|    ret = 1;
 2452|  3.13k|err:
 2453|  3.13k|    OPENSSL_free(cache);
  ------------------
  |  |  132|  3.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__
  |  |  ------------------
  ------------------
 2454|  3.13k|    OPENSSL_free(tls12_sigalgs_list);
  ------------------
  |  |  132|  3.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__
  |  |  ------------------
  ------------------
 2455|  3.13k|    EVP_PKEY_free(tmpkey);
 2456|  3.13k|    return ret;
 2457|  3.13k|}
tls1_lookup_md:
 2557|  94.0k|{
 2558|  94.0k|    const EVP_MD *md;
 2559|       |
 2560|  94.0k|    if (lu == NULL)
  ------------------
  |  Branch (2560:9): [True: 0, False: 94.0k]
  ------------------
 2561|      0|        return 0;
 2562|       |    /* lu->hash == NID_undef means no associated digest */
 2563|  94.0k|    if (lu->hash == NID_undef) {
  ------------------
  |  |   18|  94.0k|#define NID_undef                       0
  ------------------
  |  Branch (2563:9): [True: 13.1k, False: 80.8k]
  ------------------
 2564|  13.1k|        md = NULL;
 2565|  80.8k|    } else {
 2566|  80.8k|        md = ssl_md(ctx, lu->hash_idx);
 2567|  80.8k|        if (md == NULL)
  ------------------
  |  Branch (2567:13): [True: 0, False: 80.8k]
  ------------------
 2568|      0|            return 0;
 2569|  80.8k|    }
 2570|  94.0k|    if (pmd)
  ------------------
  |  Branch (2570:9): [True: 94.0k, False: 0]
  ------------------
 2571|  94.0k|        *pmd = md;
 2572|  94.0k|    return 1;
 2573|  94.0k|}
tls12_get_psigalgs:
 2694|  11.3k|{
 2695|       |    /*
 2696|       |     * If Suite B mode use Suite B sigalgs only, ignore any other
 2697|       |     * preferences.
 2698|       |     */
 2699|  11.3k|    switch (tls1_suiteb(s)) {
  ------------------
  |  | 2035|  11.3k|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|  11.3k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 43, False: 11.2k]
  |  |  ------------------
  ------------------
 2700|     26|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  584|     26|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (2700:5): [True: 26, False: 11.2k]
  ------------------
 2701|     26|        *psigs = suiteb_sigalgs;
 2702|     26|        return OSSL_NELEM(suiteb_sigalgs);
  ------------------
  |  |   14|     26|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2703|       |
 2704|      6|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  580|      6|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (2704:5): [True: 6, False: 11.2k]
  ------------------
 2705|      6|        *psigs = suiteb_sigalgs;
 2706|      6|        return 1;
 2707|       |
 2708|     11|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  582|     11|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (2708:5): [True: 11, False: 11.2k]
  ------------------
 2709|     11|        *psigs = suiteb_sigalgs + 1;
 2710|     11|        return 1;
 2711|  11.3k|    }
 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|  11.2k|    if ((s->server == sent) && s->cert->client_sigalgs != NULL) {
  ------------------
  |  Branch (2717:9): [True: 0, False: 11.2k]
  |  Branch (2717:32): [True: 0, False: 0]
  ------------------
 2718|      0|        *psigs = s->cert->client_sigalgs;
 2719|      0|        return s->cert->client_sigalgslen;
 2720|  11.2k|    } else if (s->cert->conf_sigalgs) {
  ------------------
  |  Branch (2720:16): [True: 0, False: 11.2k]
  ------------------
 2721|      0|        *psigs = s->cert->conf_sigalgs;
 2722|      0|        return s->cert->conf_sigalgslen;
 2723|  11.2k|    } else {
 2724|  11.2k|        *psigs = SSL_CONNECTION_GET_CTX(s)->tls12_sigalgs;
  ------------------
  |  |   26|  11.2k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2725|  11.2k|        return SSL_CONNECTION_GET_CTX(s)->tls12_sigalgs_len;
  ------------------
  |  |   26|  11.2k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2726|  11.2k|    }
 2727|  11.2k|}
ssl_set_client_disabled:
 3028|  9.07k|{
 3029|  9.07k|    s->s3.tmp.mask_a = 0;
 3030|  9.07k|    s->s3.tmp.mask_k = 0;
 3031|  9.07k|    ssl_set_sig_mask(&s->s3.tmp.mask_a, s, SSL_SECOP_SIGALG_MASK);
  ------------------
  |  | 2767|  9.07k|#define SSL_SECOP_SIGALG_MASK (14 | SSL_SECOP_OTHER_SIGALG)
  |  |  ------------------
  |  |  |  | 2733|  9.07k|#define SSL_SECOP_OTHER_SIGALG (5 << 16)
  |  |  ------------------
  ------------------
 3032|  9.07k|    if (ssl_get_min_max_version(s, &s->s3.tmp.min_ver,
  ------------------
  |  Branch (3032:9): [True: 0, False: 9.07k]
  ------------------
 3033|  9.07k|            &s->s3.tmp.max_ver, NULL)
 3034|  9.07k|        != 0)
 3035|      0|        return 0;
 3036|  9.07k|#ifndef OPENSSL_NO_PSK
 3037|       |    /* with PSK there must be client callback set */
 3038|  9.07k|    if (!s->psk_client_callback) {
  ------------------
  |  Branch (3038:9): [True: 9.07k, False: 0]
  ------------------
 3039|  9.07k|        s->s3.tmp.mask_a |= SSL_aPSK;
  ------------------
  |  |  120|  9.07k|#define SSL_aPSK 0x00000010U
  ------------------
 3040|  9.07k|        s->s3.tmp.mask_k |= SSL_PSK;
  ------------------
  |  |  105|  9.07k|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   91|  9.07k|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   97|  9.07k|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   98|  9.07k|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   99|  9.07k|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
 3041|  9.07k|    }
 3042|  9.07k|#endif /* OPENSSL_NO_PSK */
 3043|  9.07k|#ifndef OPENSSL_NO_SRP
 3044|  9.07k|    if (!(s->srp_ctx.srp_Mask & SSL_kSRP)) {
  ------------------
  |  |   95|  9.07k|#define SSL_kSRP 0x00000020U
  ------------------
  |  Branch (3044:9): [True: 9.07k, False: 0]
  ------------------
 3045|  9.07k|        s->s3.tmp.mask_a |= SSL_aSRP;
  ------------------
  |  |  124|  9.07k|#define SSL_aSRP 0x00000040U
  ------------------
 3046|  9.07k|        s->s3.tmp.mask_k |= SSL_kSRP;
  ------------------
  |  |   95|  9.07k|#define SSL_kSRP 0x00000020U
  ------------------
 3047|  9.07k|    }
 3048|  9.07k|#endif
 3049|  9.07k|    return 1;
 3050|  9.07k|}
ssl_cipher_disabled:
 3063|   546k|{
 3064|   546k|    int minversion = SSL_CONNECTION_IS_DTLS(s) ? c->min_dtls : c->min_tls;
  ------------------
  |  |  266|   546k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   546k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   546k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 546k]
  |  |  ------------------
  ------------------
 3065|   546k|    int maxversion = SSL_CONNECTION_IS_DTLS(s) ? c->max_dtls : c->max_tls;
  ------------------
  |  |  266|   546k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   546k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   546k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 546k]
  |  |  ------------------
  ------------------
 3066|       |
 3067|   546k|    if (c->algorithm_mkey & s->s3.tmp.mask_k
  ------------------
  |  Branch (3067:9): [True: 265k, False: 281k]
  ------------------
 3068|   281k|        || c->algorithm_auth & s->s3.tmp.mask_a)
  ------------------
  |  Branch (3068:12): [True: 0, False: 281k]
  ------------------
 3069|   265k|        return 1;
 3070|   281k|    if (s->s3.tmp.max_ver == 0)
  ------------------
  |  Branch (3070:9): [True: 0, False: 281k]
  ------------------
 3071|      0|        return 1;
 3072|       |
 3073|   281k|    if (SSL_IS_QUIC_INT_HANDSHAKE(s))
  ------------------
  |  |  312|   281k|#define SSL_IS_QUIC_INT_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC_INTERNAL) != 0)
  |  |  ------------------
  |  |  |  |   24|   281k|#define TLS1_FLAGS_QUIC_INTERNAL 0x4000
  |  |  ------------------
  |  |  |  Branch (312:38): [True: 0, False: 281k]
  |  |  ------------------
  ------------------
 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|   281k|    if (minversion == TLS1_VERSION
  ------------------
  |  |   24|   562k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (3088:9): [True: 36.5k, False: 244k]
  ------------------
 3089|  36.5k|        && ecdhe
  ------------------
  |  Branch (3089:12): [True: 4, False: 36.5k]
  ------------------
 3090|      4|        && (c->algorithm_mkey & (SSL_kECDHE | SSL_kECDHEPSK)) != 0)
  ------------------
  |  |   89|      4|#define SSL_kECDHE 0x00000004U
  ------------------
                      && (c->algorithm_mkey & (SSL_kECDHE | SSL_kECDHEPSK)) != 0)
  ------------------
  |  |   98|      4|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  |  Branch (3090:12): [True: 3, False: 1]
  ------------------
 3091|      3|        minversion = SSL3_VERSION;
  ------------------
  |  |   23|      3|#define SSL3_VERSION 0x0300
  ------------------
 3092|       |
 3093|   281k|    if (ssl_version_cmp(s, minversion, s->s3.tmp.max_ver) > 0
  ------------------
  |  Branch (3093:9): [True: 1.00k, False: 280k]
  ------------------
 3094|   280k|        || ssl_version_cmp(s, maxversion, s->s3.tmp.min_ver) < 0)
  ------------------
  |  Branch (3094:12): [True: 487, False: 279k]
  ------------------
 3095|  1.48k|        return 1;
 3096|       |
 3097|   279k|    return !ssl_security(s, op, c->strength_bits, 0, (void *)c);
 3098|   281k|}
tls_use_ticket:
 3101|  2.22k|{
 3102|  2.22k|    if ((s->options & SSL_OP_NO_TICKET))
  ------------------
  |  |  384|  2.22k|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  351|  2.22k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (3102:9): [True: 2.22k, False: 0]
  ------------------
 3103|  2.22k|        return 0;
 3104|      0|    return ssl_security(s, SSL_SECOP_TICKET, 0, 0, NULL);
  ------------------
  |  | 2759|      0|#define SSL_SECOP_TICKET (10 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2728|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
 3105|  2.22k|}
ssl_set_sig_mask:
 3575|  9.07k|{
 3576|  9.07k|    const uint16_t *sigalgs;
 3577|  9.07k|    size_t i, sigalgslen;
 3578|  9.07k|    uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  112|  9.07k|#define SSL_aRSA 0x00000001U
  ------------------
                  uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  114|  9.07k|#define SSL_aDSS 0x00000002U
  ------------------
                  uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  118|  9.07k|#define SSL_aECDSA 0x00000008U
  ------------------
 3579|       |    /*
 3580|       |     * Go through all signature algorithms seeing if we support any
 3581|       |     * in disabled_mask.
 3582|       |     */
 3583|  9.07k|    sigalgslen = tls12_get_psigalgs(s, 1, &sigalgs);
 3584|   280k|    for (i = 0; i < sigalgslen; i++, sigalgs++) {
  ------------------
  |  Branch (3584:17): [True: 271k, False: 9.07k]
  ------------------
 3585|   271k|        const SIGALG_LOOKUP *lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s), *sigalgs);
  ------------------
  |  |   26|   271k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3586|   271k|        const SSL_CERT_LOOKUP *clu;
 3587|       |
 3588|   271k|        if (lu == NULL)
  ------------------
  |  Branch (3588:13): [True: 0, False: 271k]
  ------------------
 3589|      0|            continue;
 3590|       |
 3591|   271k|        clu = ssl_cert_lookup_by_idx(lu->sig_idx,
 3592|   271k|            SSL_CONNECTION_GET_CTX(s));
  ------------------
  |  |   26|   271k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3593|   271k|        if (clu == NULL)
  ------------------
  |  Branch (3593:13): [True: 0, False: 271k]
  ------------------
 3594|      0|            continue;
 3595|       |
 3596|       |        /* If algorithm is disabled see if we can enable it */
 3597|   271k|        if ((clu->amask & disabled_mask) != 0
  ------------------
  |  Branch (3597:13): [True: 27.8k, False: 243k]
  ------------------
 3598|  27.8k|            && tls12_sigalg_allowed(s, op, lu))
  ------------------
  |  Branch (3598:16): [True: 27.1k, False: 714]
  ------------------
 3599|  27.1k|            disabled_mask &= ~clu->amask;
 3600|   271k|    }
 3601|  9.07k|    *pmask_a |= disabled_mask;
 3602|  9.07k|}
tls12_copy_sigalgs:
 3606|  2.22k|{
 3607|  2.22k|    size_t i;
 3608|  2.22k|    int rv = 0;
 3609|       |
 3610|  68.7k|    for (i = 0; i < psiglen; i++, psig++) {
  ------------------
  |  Branch (3610:17): [True: 66.4k, False: 2.22k]
  ------------------
 3611|  66.4k|        const SIGALG_LOOKUP *lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s), *psig);
  ------------------
  |  |   26|  66.4k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3612|       |
 3613|  66.4k|        if (lu == NULL || !tls_sigalg_compat(s, lu))
  ------------------
  |  Branch (3613:13): [True: 0, False: 66.4k]
  |  Branch (3613:27): [True: 7.17k, False: 59.3k]
  ------------------
 3614|  7.17k|            continue;
 3615|  59.3k|        if (!WPACKET_put_bytes_u16(pkt, *psig))
  ------------------
  |  |  911|  59.3k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (3615:13): [True: 0, False: 59.3k]
  ------------------
 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|  59.3k|        if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  |  273|  4.44k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  4.44k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  2.22k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  2.22k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 2.22k, False: 0]
  |  |  ------------------
  |  |  274|  2.22k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  2.22k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  4.44k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 2.22k, False: 0]
  |  |  ------------------
  |  |  275|  4.44k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  2.22k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  2.22k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 2.22k]
  |  |  ------------------
  ------------------
                      if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  |   63|      0|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|      0|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
                      if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  | 2348|      0|#define NID_sha1                64
  ------------------
                      if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  | 3306|      0|#define NID_sha224              675
  ------------------
  |  Branch (3621:13): [True: 2.22k, False: 57.0k]
  |  Branch (3621:57): [True: 0, False: 0]
  |  Branch (3621:84): [True: 0, False: 0]
  |  Branch (3621:108): [True: 0, False: 0]
  ------------------
 3622|  2.22k|            rv = 1;
 3623|  59.3k|    }
 3624|  2.22k|    if (rv == 0)
  ------------------
  |  Branch (3624:9): [True: 0, False: 2.22k]
  ------------------
 3625|       |        ERR_raise(ERR_LIB_SSL, SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3626|  2.22k|    return rv;
 3627|  2.22k|}
t1_lib.c:discover_provider_groups:
  372|  3.96k|{
  373|  3.96k|    struct provider_ctx_data_st pgd;
  374|       |
  375|  3.96k|    pgd.ctx = vctx;
  376|  3.96k|    pgd.provider = provider;
  377|  3.96k|    return OSSL_PROVIDER_get_capabilities(provider, "TLS-GROUP",
  378|  3.96k|        add_provider_groups, &pgd);
  379|  3.96k|}
t1_lib.c:add_provider_groups:
  234|  84.5k|{
  235|  84.5k|    struct provider_ctx_data_st *pgd = data;
  236|  84.5k|    SSL_CTX *ctx = pgd->ctx;
  237|  84.5k|    const OSSL_PARAM *p;
  238|  84.5k|    TLS_GROUP_INFO *ginf = NULL;
  239|  84.5k|    EVP_KEYMGMT *keymgmt;
  240|  84.5k|    unsigned int gid;
  241|  84.5k|    unsigned int is_kem = 0;
  242|  84.5k|    int ret = 0;
  243|       |
  244|  84.5k|    if (ctx->group_list_max_len == ctx->group_list_len) {
  ------------------
  |  Branch (244:9): [True: 9.20k, False: 75.3k]
  ------------------
  245|  9.20k|        TLS_GROUP_INFO *tmp = NULL;
  246|       |
  247|  9.20k|        if (ctx->group_list_max_len == 0)
  ------------------
  |  Branch (247:13): [True: 3.13k, False: 6.07k]
  ------------------
  248|  3.13k|            tmp = OPENSSL_malloc_array(TLS_GROUP_LIST_MALLOC_BLOCK_SIZE,
  ------------------
  |  |  111|  3.13k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  249|  9.20k|                sizeof(TLS_GROUP_INFO));
  250|  6.07k|        else
  251|  6.07k|            tmp = OPENSSL_realloc_array(ctx->group_list,
  ------------------
  |  |  125|  6.07k|    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|  9.20k|                ctx->group_list_max_len
  253|  9.20k|                    + TLS_GROUP_LIST_MALLOC_BLOCK_SIZE,
  254|  9.20k|                sizeof(TLS_GROUP_INFO));
  255|  9.20k|        if (tmp == NULL)
  ------------------
  |  Branch (255:13): [True: 0, False: 9.20k]
  ------------------
  256|      0|            return 0;
  257|  9.20k|        ctx->group_list = tmp;
  258|  9.20k|        memset(tmp + ctx->group_list_max_len,
  259|  9.20k|            0,
  260|  9.20k|            sizeof(TLS_GROUP_INFO) * TLS_GROUP_LIST_MALLOC_BLOCK_SIZE);
  ------------------
  |  |  231|  9.20k|#define TLS_GROUP_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  261|  9.20k|        ctx->group_list_max_len += TLS_GROUP_LIST_MALLOC_BLOCK_SIZE;
  ------------------
  |  |  231|  9.20k|#define TLS_GROUP_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  262|  9.20k|    }
  263|       |
  264|  84.5k|    ginf = &ctx->group_list[ctx->group_list_len];
  265|       |
  266|  84.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_NAME);
  ------------------
  |  |  153|  84.5k|# define OSSL_CAPABILITY_TLS_GROUP_NAME "tls-group-name"
  ------------------
  267|  84.5k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  84.5k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (267:9): [True: 0, False: 84.5k]
  |  Branch (267:22): [True: 0, False: 84.5k]
  ------------------
  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|  84.5k|    ginf->tlsname = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  84.5k|    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|  84.5k|    if (ginf->tlsname == NULL)
  ------------------
  |  Branch (272:9): [True: 0, False: 84.5k]
  ------------------
  273|      0|        goto err;
  274|       |
  275|  84.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL);
  ------------------
  |  |  154|  84.5k|# define OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL "tls-group-name-internal"
  ------------------
  276|  84.5k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  84.5k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (276:9): [True: 0, False: 84.5k]
  |  Branch (276:22): [True: 0, False: 84.5k]
  ------------------
  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|  84.5k|    ginf->realname = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  84.5k|    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|  84.5k|    if (ginf->realname == NULL)
  ------------------
  |  Branch (281:9): [True: 0, False: 84.5k]
  ------------------
  282|      0|        goto err;
  283|       |
  284|  84.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_ID);
  ------------------
  |  |  147|  84.5k|# define OSSL_CAPABILITY_TLS_GROUP_ID "tls-group-id"
  ------------------
  285|  84.5k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &gid) || gid > UINT16_MAX) {
  ------------------
  |  Branch (285:9): [True: 0, False: 84.5k]
  |  Branch (285:22): [True: 0, False: 84.5k]
  |  Branch (285:55): [True: 0, False: 84.5k]
  ------------------
  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|  84.5k|    ginf->group_id = (uint16_t)gid;
  290|       |
  291|  84.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_ALG);
  ------------------
  |  |  146|  84.5k|# define OSSL_CAPABILITY_TLS_GROUP_ALG "tls-group-alg"
  ------------------
  292|  84.5k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  84.5k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (292:9): [True: 0, False: 84.5k]
  |  Branch (292:22): [True: 0, False: 84.5k]
  ------------------
  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|  84.5k|    ginf->algorithm = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  84.5k|    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|  84.5k|    if (ginf->algorithm == NULL)
  ------------------
  |  Branch (297:9): [True: 0, False: 84.5k]
  ------------------
  298|      0|        goto err;
  299|       |
  300|  84.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS);
  ------------------
  |  |  155|  84.5k|# define OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS "tls-group-sec-bits"
  ------------------
  301|  84.5k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &ginf->secbits)) {
  ------------------
  |  Branch (301:9): [True: 0, False: 84.5k]
  |  Branch (301:22): [True: 0, False: 84.5k]
  ------------------
  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|  84.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_IS_KEM);
  ------------------
  |  |  148|  84.5k|# define OSSL_CAPABILITY_TLS_GROUP_IS_KEM "tls-group-is-kem"
  ------------------
  307|  84.5k|    if (p != NULL && (!OSSL_PARAM_get_uint(p, &is_kem) || is_kem > 1)) {
  ------------------
  |  Branch (307:9): [True: 84.5k, False: 0]
  |  Branch (307:23): [True: 0, False: 84.5k]
  |  Branch (307:59): [True: 0, False: 84.5k]
  ------------------
  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|  84.5k|    ginf->is_kem = 1 & is_kem;
  312|       |
  313|  84.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MIN_TLS);
  ------------------
  |  |  152|  84.5k|# define OSSL_CAPABILITY_TLS_GROUP_MIN_TLS "tls-min-tls"
  ------------------
  314|  84.5k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->mintls)) {
  ------------------
  |  Branch (314:9): [True: 0, False: 84.5k]
  |  Branch (314:22): [True: 0, False: 84.5k]
  ------------------
  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|  84.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MAX_TLS);
  ------------------
  |  |  150|  84.5k|# define OSSL_CAPABILITY_TLS_GROUP_MAX_TLS "tls-max-tls"
  ------------------
  320|  84.5k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->maxtls)) {
  ------------------
  |  Branch (320:9): [True: 0, False: 84.5k]
  |  Branch (320:22): [True: 0, False: 84.5k]
  ------------------
  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|  84.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS);
  ------------------
  |  |  151|  84.5k|# define OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS "tls-min-dtls"
  ------------------
  326|  84.5k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->mindtls)) {
  ------------------
  |  Branch (326:9): [True: 0, False: 84.5k]
  |  Branch (326:22): [True: 0, False: 84.5k]
  ------------------
  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|  84.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS);
  ------------------
  |  |  149|  84.5k|# define OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS "tls-max-dtls"
  ------------------
  332|  84.5k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->maxdtls)) {
  ------------------
  |  Branch (332:9): [True: 0, False: 84.5k]
  |  Branch (332:22): [True: 0, False: 84.5k]
  ------------------
  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|  84.5k|    if (ginf->group_id >= OSSL_TLS_GROUP_ID_ffdhe2048
  ------------------
  |  |   55|   169k|#define OSSL_TLS_GROUP_ID_ffdhe2048 0x0100
  ------------------
  |  Branch (337:9): [True: 37.5k, False: 46.9k]
  ------------------
  338|  37.5k|        && ginf->group_id <= OSSL_TLS_GROUP_ID_ffdhe8192) {
  ------------------
  |  |   59|  37.5k|#define OSSL_TLS_GROUP_ID_ffdhe8192 0x0104
  ------------------
  |  Branch (338:12): [True: 15.6k, False: 21.9k]
  ------------------
  339|  15.6k|        if (ginf->mintls > TLS1_2_VERSION)
  ------------------
  |  |   26|  15.6k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (339:13): [True: 15.6k, False: 0]
  ------------------
  340|  15.6k|            ginf->mintls = TLS1_VERSION;
  ------------------
  |  |   24|  15.6k|#define TLS1_VERSION 0x0301
  ------------------
  341|  15.6k|        if (DTLS_VERSION_GT(ginf->mindtls, DTLS1_2_VERSION))
  ------------------
  |  |   62|  15.6k|#define DTLS_VERSION_GT(v1, v2) (dtls_ver_ordinal(v1) < dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|  15.6k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  15.6k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 15.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_GT(v1, v2) (dtls_ver_ordinal(v1) < dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|  15.6k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  15.6k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 15.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:33): [True: 15.6k, False: 0]
  |  |  ------------------
  ------------------
  342|  15.6k|            ginf->mindtls = DTLS1_VERSION;
  ------------------
  |  |   28|  15.6k|#define DTLS1_VERSION 0xFEFF
  ------------------
  343|  15.6k|    }
  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|  84.5k|    ret = 1;
  352|  84.5k|    ERR_set_mark();
  353|  84.5k|    keymgmt = EVP_KEYMGMT_fetch(ctx->libctx, ginf->algorithm, ctx->propq);
  354|  84.5k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (354:9): [True: 81.9k, False: 2.56k]
  ------------------
  355|       |        /* We have successfully fetched the algorithm, we can use the group. */
  356|  81.9k|        ctx->group_list_len++;
  357|  81.9k|        ginf = NULL;
  358|  81.9k|        EVP_KEYMGMT_free(keymgmt);
  359|  81.9k|    }
  360|  84.5k|    ERR_pop_to_mark();
  361|  84.5k|err:
  362|  84.5k|    if (ginf != NULL) {
  ------------------
  |  Branch (362:9): [True: 2.56k, False: 81.9k]
  ------------------
  363|  2.56k|        OPENSSL_free(ginf->tlsname);
  ------------------
  |  |  132|  2.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__
  |  |  ------------------
  ------------------
  364|  2.56k|        OPENSSL_free(ginf->realname);
  ------------------
  |  |  132|  2.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__
  |  |  ------------------
  ------------------
  365|  2.56k|        OPENSSL_free(ginf->algorithm);
  ------------------
  |  |  132|  2.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__
  |  |  ------------------
  ------------------
  366|       |        ginf->algorithm = ginf->tlsname = ginf->realname = NULL;
  367|  2.56k|    }
  368|  84.5k|    return ret;
  369|  84.5k|}
t1_lib.c:discover_provider_sigalgs:
  681|  3.96k|{
  682|  3.96k|    struct provider_ctx_data_st pgd;
  683|       |
  684|  3.96k|    pgd.ctx = vctx;
  685|  3.96k|    pgd.provider = provider;
  686|  3.96k|    OSSL_PROVIDER_get_capabilities(provider, "TLS-SIGALG",
  687|  3.96k|        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.96k|    return 1;
  693|  3.96k|}
t1_lib.c:add_provider_sigalgs:
  401|  12.5k|{
  402|  12.5k|    struct provider_ctx_data_st *pgd = data;
  403|  12.5k|    SSL_CTX *ctx = pgd->ctx;
  404|  12.5k|    OSSL_PROVIDER *provider = pgd->provider;
  405|  12.5k|    const OSSL_PARAM *p;
  406|  12.5k|    TLS_SIGALG_INFO *sinf = NULL;
  407|  12.5k|    EVP_KEYMGMT *keymgmt;
  408|  12.5k|    const char *keytype;
  409|  12.5k|    unsigned int code_point = 0;
  410|  12.5k|    int ret = 0;
  411|       |
  412|  12.5k|    if (ctx->sigalg_list_max_len == ctx->sigalg_list_len) {
  ------------------
  |  Branch (412:9): [True: 3.13k, False: 9.39k]
  ------------------
  413|  3.13k|        TLS_SIGALG_INFO *tmp = NULL;
  414|       |
  415|  3.13k|        if (ctx->sigalg_list_max_len == 0)
  ------------------
  |  Branch (415:13): [True: 3.13k, False: 0]
  ------------------
  416|  3.13k|            tmp = OPENSSL_malloc_array(TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE,
  ------------------
  |  |  111|  3.13k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  417|  3.13k|                sizeof(TLS_SIGALG_INFO));
  418|      0|        else
  419|      0|            tmp = OPENSSL_realloc_array(ctx->sigalg_list,
  ------------------
  |  |  125|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  420|  3.13k|                ctx->sigalg_list_max_len
  421|  3.13k|                    + TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE,
  422|  3.13k|                sizeof(TLS_SIGALG_INFO));
  423|  3.13k|        if (tmp == NULL)
  ------------------
  |  Branch (423:13): [True: 0, False: 3.13k]
  ------------------
  424|      0|            return 0;
  425|  3.13k|        ctx->sigalg_list = tmp;
  426|  3.13k|        memset(tmp + ctx->sigalg_list_max_len, 0,
  427|  3.13k|            sizeof(TLS_SIGALG_INFO) * TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE);
  ------------------
  |  |  398|  3.13k|#define TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  428|  3.13k|        ctx->sigalg_list_max_len += TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE;
  ------------------
  |  |  398|  3.13k|#define TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  429|  3.13k|    }
  430|       |
  431|  12.5k|    sinf = &ctx->sigalg_list[ctx->sigalg_list_len];
  432|       |
  433|       |    /* First, mandatory parameters */
  434|  12.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_NAME);
  ------------------
  |  |  166|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_NAME "tls-sigalg-name"
  ------------------
  435|  12.5k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  12.5k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (435:9): [True: 0, False: 12.5k]
  |  Branch (435:22): [True: 0, False: 12.5k]
  ------------------
  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|  12.5k|    OPENSSL_free(sinf->sigalg_name);
  ------------------
  |  |  132|  12.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__
  |  |  ------------------
  ------------------
  440|  12.5k|    sinf->sigalg_name = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  12.5k|    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|  12.5k|    if (sinf->sigalg_name == NULL)
  ------------------
  |  Branch (441:9): [True: 0, False: 12.5k]
  ------------------
  442|      0|        goto err;
  443|       |
  444|  12.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME);
  ------------------
  |  |  159|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME "tls-sigalg-iana-name"
  ------------------
  445|  12.5k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  12.5k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (445:9): [True: 0, False: 12.5k]
  |  Branch (445:22): [True: 0, False: 12.5k]
  ------------------
  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|  12.5k|    OPENSSL_free(sinf->name);
  ------------------
  |  |  132|  12.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__
  |  |  ------------------
  ------------------
  450|  12.5k|    sinf->name = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  12.5k|    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|  12.5k|    if (sinf->name == NULL)
  ------------------
  |  Branch (451:9): [True: 0, False: 12.5k]
  ------------------
  452|      0|        goto err;
  453|       |
  454|  12.5k|    p = OSSL_PARAM_locate_const(params,
  455|  12.5k|        OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT);
  ------------------
  |  |  156|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT "tls-sigalg-code-point"
  ------------------
  456|  12.5k|    if (p == NULL
  ------------------
  |  Branch (456:9): [True: 0, False: 12.5k]
  ------------------
  457|  12.5k|        || !OSSL_PARAM_get_uint(p, &code_point)
  ------------------
  |  Branch (457:12): [True: 0, False: 12.5k]
  ------------------
  458|  12.5k|        || code_point > UINT16_MAX) {
  ------------------
  |  Branch (458:12): [True: 0, False: 12.5k]
  ------------------
  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|  12.5k|    sinf->code_point = (uint16_t)code_point;
  463|       |
  464|  12.5k|    p = OSSL_PARAM_locate_const(params,
  465|  12.5k|        OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS);
  ------------------
  |  |  168|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS "tls-sigalg-sec-bits"
  ------------------
  466|  12.5k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &sinf->secbits)) {
  ------------------
  |  Branch (466:9): [True: 0, False: 12.5k]
  |  Branch (466:22): [True: 0, False: 12.5k]
  ------------------
  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|  12.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_OID);
  ------------------
  |  |  167|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_OID "tls-sigalg-oid"
  ------------------
  473|  12.5k|    if (p == NULL) {
  ------------------
  |  Branch (473:9): [True: 0, False: 12.5k]
  ------------------
  474|      0|        sinf->sigalg_oid = NULL;
  475|  12.5k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  12.5k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (475:16): [True: 0, False: 12.5k]
  ------------------
  476|      0|        goto err;
  477|  12.5k|    } else {
  478|  12.5k|        OPENSSL_free(sinf->sigalg_oid);
  ------------------
  |  |  132|  12.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__
  |  |  ------------------
  ------------------
  479|  12.5k|        sinf->sigalg_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  12.5k|    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|  12.5k|        if (sinf->sigalg_oid == NULL)
  ------------------
  |  Branch (480:13): [True: 0, False: 12.5k]
  ------------------
  481|      0|            goto err;
  482|  12.5k|    }
  483|       |
  484|  12.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME);
  ------------------
  |  |  169|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME "tls-sigalg-sig-name"
  ------------------
  485|  12.5k|    if (p == NULL) {
  ------------------
  |  Branch (485:9): [True: 12.5k, False: 0]
  ------------------
  486|  12.5k|        sinf->sig_name = NULL;
  487|  12.5k|    } 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|  12.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_SIG_OID);
  ------------------
  |  |  170|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_SIG_OID "tls-sigalg-sig-oid"
  ------------------
  497|  12.5k|    if (p == NULL) {
  ------------------
  |  Branch (497:9): [True: 12.5k, False: 0]
  ------------------
  498|  12.5k|        sinf->sig_oid = NULL;
  499|  12.5k|    } 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|  12.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME);
  ------------------
  |  |  157|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME "tls-sigalg-hash-name"
  ------------------
  509|  12.5k|    if (p == NULL) {
  ------------------
  |  Branch (509:9): [True: 12.5k, False: 0]
  ------------------
  510|  12.5k|        sinf->hash_name = NULL;
  511|  12.5k|    } 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|  12.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_HASH_OID);
  ------------------
  |  |  158|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_HASH_OID "tls-sigalg-hash-oid"
  ------------------
  521|  12.5k|    if (p == NULL) {
  ------------------
  |  Branch (521:9): [True: 12.5k, False: 0]
  ------------------
  522|  12.5k|        sinf->hash_oid = NULL;
  523|  12.5k|    } 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|  12.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE);
  ------------------
  |  |  160|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE "tls-sigalg-keytype"
  ------------------
  533|  12.5k|    if (p == NULL) {
  ------------------
  |  Branch (533:9): [True: 12.5k, False: 0]
  ------------------
  534|  12.5k|        sinf->keytype = NULL;
  535|  12.5k|    } 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|  12.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID);
  ------------------
  |  |  161|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID "tls-sigalg-keytype-oid"
  ------------------
  545|  12.5k|    if (p == NULL) {
  ------------------
  |  Branch (545:9): [True: 12.5k, False: 0]
  ------------------
  546|  12.5k|        sinf->keytype_oid = NULL;
  547|  12.5k|    } 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|  12.5k|    sinf->mindtls = sinf->maxdtls = -1;
  558|  12.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS);
  ------------------
  |  |  164|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS "tls-min-dtls"
  ------------------
  559|  12.5k|    if (p != NULL && !OSSL_PARAM_get_int(p, &sinf->mindtls)) {
  ------------------
  |  Branch (559:9): [True: 12.5k, False: 0]
  |  Branch (559:22): [True: 0, False: 12.5k]
  ------------------
  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|  12.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS);
  ------------------
  |  |  162|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS "tls-max-dtls"
  ------------------
  564|  12.5k|    if (p != NULL && !OSSL_PARAM_get_int(p, &sinf->maxdtls)) {
  ------------------
  |  Branch (564:9): [True: 12.5k, False: 0]
  |  Branch (564:22): [True: 0, False: 12.5k]
  ------------------
  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|  12.5k|    if ((sinf->maxdtls != 0) && (sinf->maxdtls != -1) && ((sinf->maxdtls > sinf->mindtls))) {
  ------------------
  |  Branch (569:9): [True: 12.5k, False: 0]
  |  Branch (569:33): [True: 0, False: 12.5k]
  |  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|  12.5k|    sinf->mindtls = sinf->maxdtls = -1;
  575|       |
  576|       |    /* The remaining parameters below are mandatory again */
  577|  12.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS);
  ------------------
  |  |  165|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS "tls-min-tls"
  ------------------
  578|  12.5k|    if (p == NULL || !OSSL_PARAM_get_int(p, &sinf->mintls)) {
  ------------------
  |  Branch (578:9): [True: 0, False: 12.5k]
  |  Branch (578:22): [True: 0, False: 12.5k]
  ------------------
  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|  12.5k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS);
  ------------------
  |  |  163|  12.5k|# define OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS "tls-max-tls"
  ------------------
  583|  12.5k|    if (p == NULL || !OSSL_PARAM_get_int(p, &sinf->maxtls)) {
  ------------------
  |  Branch (583:9): [True: 0, False: 12.5k]
  |  Branch (583:22): [True: 0, False: 12.5k]
  ------------------
  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|  12.5k|    if ((sinf->maxtls != 0) && (sinf->maxtls != -1) && ((sinf->maxtls < sinf->mintls))) {
  ------------------
  |  Branch (587:9): [True: 0, False: 12.5k]
  |  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|  12.5k|    if ((sinf->mintls != 0) && (sinf->mintls != -1) && ((sinf->mintls > TLS1_3_VERSION)))
  ------------------
  |  |   27|  12.5k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (591:9): [True: 12.5k, False: 0]
  |  Branch (591:32): [True: 12.5k, False: 0]
  |  Branch (591:56): [True: 0, False: 12.5k]
  ------------------
  592|      0|        sinf->mintls = sinf->maxtls = -1;
  593|  12.5k|    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: 12.5k]
  |  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|  12.5k|    if (sinf->mintls == -1 && sinf->mindtls == -1) {
  ------------------
  |  Branch (597:9): [True: 0, False: 12.5k]
  |  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|  12.5k|    ret = 1;
  609|  12.5k|    ERR_set_mark();
  610|  12.5k|    keytype = inferred_keytype(sinf);
  611|  12.5k|    keymgmt = EVP_KEYMGMT_fetch(ctx->libctx, keytype, ctx->propq);
  612|  12.5k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (612:9): [True: 12.1k, False: 380]
  ------------------
  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|  12.1k|        if (EVP_KEYMGMT_get0_provider(keymgmt) == provider) {
  ------------------
  |  Branch (625:13): [True: 12.1k, 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|  12.1k|            OBJ_create(sinf->sigalg_oid, sinf->sigalg_name, NULL);
  634|       |            /* sanity check: Without successful registration don't use alg */
  635|  12.1k|            if ((OBJ_txt2nid(sinf->sigalg_name) == NID_undef) || (OBJ_nid2obj(OBJ_txt2nid(sinf->sigalg_name)) == NULL)) {
  ------------------
  |  |   18|  12.1k|#define NID_undef                       0
  ------------------
  |  Branch (635:17): [True: 0, False: 12.1k]
  |  Branch (635:66): [True: 0, False: 12.1k]
  ------------------
  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|  12.1k|            if (sinf->sig_name != NULL)
  ------------------
  |  Branch (639:17): [True: 0, False: 12.1k]
  ------------------
  640|      0|                OBJ_create(sinf->sig_oid, sinf->sig_name, NULL);
  641|  12.1k|            if (sinf->keytype != NULL)
  ------------------
  |  Branch (641:17): [True: 0, False: 12.1k]
  ------------------
  642|      0|                OBJ_create(sinf->keytype_oid, sinf->keytype, NULL);
  643|  12.1k|            if (sinf->hash_name != NULL)
  ------------------
  |  Branch (643:17): [True: 0, False: 12.1k]
  ------------------
  644|      0|                OBJ_create(sinf->hash_oid, sinf->hash_name, NULL);
  645|  12.1k|            OBJ_add_sigid(OBJ_txt2nid(sinf->sigalg_name),
  646|  12.1k|                (sinf->hash_name != NULL
  ------------------
  |  Branch (646:18): [True: 0, False: 12.1k]
  ------------------
  647|  12.1k|                        ? OBJ_txt2nid(sinf->hash_name)
  648|  12.1k|                        : NID_undef),
  ------------------
  |  |   18|  12.1k|#define NID_undef                       0
  ------------------
  649|  12.1k|                OBJ_txt2nid(keytype));
  650|  12.1k|            ctx->sigalg_list_len++;
  651|  12.1k|            sinf = NULL;
  652|  12.1k|        }
  653|  12.1k|        EVP_KEYMGMT_free(keymgmt);
  654|  12.1k|    }
  655|  12.5k|    ERR_pop_to_mark();
  656|  12.5k|err:
  657|  12.5k|    if (sinf != NULL) {
  ------------------
  |  Branch (657:9): [True: 380, False: 12.1k]
  ------------------
  658|    380|        OPENSSL_free(sinf->name);
  ------------------
  |  |  132|    380|    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|    380|        sinf->name = NULL;
  660|    380|        OPENSSL_free(sinf->sigalg_name);
  ------------------
  |  |  132|    380|    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|    380|        sinf->sigalg_name = NULL;
  662|    380|        OPENSSL_free(sinf->sigalg_oid);
  ------------------
  |  |  132|    380|    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|    380|        sinf->sigalg_oid = NULL;
  664|    380|        OPENSSL_free(sinf->sig_name);
  ------------------
  |  |  132|    380|    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|    380|        sinf->sig_name = NULL;
  666|    380|        OPENSSL_free(sinf->sig_oid);
  ------------------
  |  |  132|    380|    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|    380|        sinf->sig_oid = NULL;
  668|    380|        OPENSSL_free(sinf->hash_name);
  ------------------
  |  |  132|    380|    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|    380|        sinf->hash_name = NULL;
  670|    380|        OPENSSL_free(sinf->hash_oid);
  ------------------
  |  |  132|    380|    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|    380|        sinf->hash_oid = NULL;
  672|    380|        OPENSSL_free(sinf->keytype);
  ------------------
  |  |  132|    380|    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|    380|        sinf->keytype = NULL;
  674|    380|        OPENSSL_free(sinf->keytype_oid);
  ------------------
  |  |  132|    380|    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|    380|    }
  677|  12.5k|    return ret;
  678|  12.5k|}
t1_lib.c:inferred_keytype:
  390|  24.6k|{
  391|  24.6k|    return (sinf->keytype != NULL
  ------------------
  |  Branch (391:13): [True: 0, False: 24.6k]
  ------------------
  392|  24.6k|            ? sinf->keytype
  393|  24.6k|            : (sinf->sig_name != NULL
  ------------------
  |  Branch (393:16): [True: 0, False: 24.6k]
  ------------------
  394|  24.6k|                      ? sinf->sig_name
  395|  24.6k|                      : sinf->sigalg_name));
  396|  24.6k|}
t1_lib.c:tuple_cb:
 1668|  18.0k|{
 1669|  18.0k|    gid_cb_st *garg = arg;
 1670|  18.0k|    int retval = 1; /* We assume success */
 1671|  18.0k|    char *restored_tuple_string;
 1672|       |
 1673|       |    /* Sanity checks */
 1674|  18.0k|    if (garg == NULL || tuple == NULL || len <= 0) {
  ------------------
  |  Branch (1674:9): [True: 0, False: 18.0k]
  |  Branch (1674:25): [True: 2, False: 18.0k]
  |  Branch (1674:42): [True: 0, False: 18.0k]
  ------------------
 1675|      2|        ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_CONFIG_VALUE);
  ------------------
  |  |  357|      2|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      2|    (ERR_new(),                                                  \
  |  |  |  |  360|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      2|        ERR_set_error)
  |  |  ------------------
  ------------------
 1676|      2|        return 0;
 1677|      2|    }
 1678|       |
 1679|  18.0k|    if (garg->inner && !garg->first && !close_tuple(garg))
  ------------------
  |  Branch (1679:9): [True: 1.89k, False: 16.1k]
  |  Branch (1679:24): [True: 1.51k, False: 379]
  |  Branch (1679:40): [True: 0, False: 1.51k]
  ------------------
 1680|      0|        return 0;
 1681|  18.0k|    garg->first = 0;
 1682|       |
 1683|       |    /* Convert to \0-terminated string */
 1684|  18.0k|    restored_tuple_string = OPENSSL_malloc(len + 1 /* \0 */);
  ------------------
  |  |  107|  18.0k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1685|  18.0k|    if (restored_tuple_string == NULL)
  ------------------
  |  Branch (1685:9): [True: 0, False: 18.0k]
  ------------------
 1686|      0|        return 0;
 1687|  18.0k|    memcpy(restored_tuple_string, tuple, len);
 1688|  18.0k|    restored_tuple_string[len] = '\0';
 1689|       |
 1690|       |    /* Analyze group list of this tuple */
 1691|  18.0k|    retval = CONF_parse_list(restored_tuple_string, GROUP_DELIMITER_CHARACTER, 1, gid_cb, arg);
  ------------------
  |  | 1230|  18.0k|#define GROUP_DELIMITER_CHARACTER ':'
  ------------------
 1692|       |
 1693|       |    /* We don't need the \o-terminated string anymore */
 1694|  18.0k|    OPENSSL_free(restored_tuple_string);
  ------------------
  |  |  132|  18.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1695|       |
 1696|  18.0k|    if (!garg->inner && !close_tuple(garg))
  ------------------
  |  Branch (1696:9): [True: 16.1k, False: 1.89k]
  |  Branch (1696:25): [True: 0, False: 16.1k]
  ------------------
 1697|      0|        return 0;
 1698|  18.0k|    return retval;
 1699|  18.0k|}
t1_lib.c:close_tuple:
 1639|  17.6k|{
 1640|  17.6k|    size_t gidcnt = garg->tuplcnt_arr[garg->tplcnt];
 1641|       |
 1642|  17.6k|    if (gidcnt > 0 && garg->want_keyshare > 0) {
  ------------------
  |  Branch (1642:9): [True: 16.0k, False: 1.63k]
  |  Branch (1642:23): [True: 103, False: 15.9k]
  ------------------
 1643|    103|        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|    103|        garg->ksid_arr[garg->ksidcnt++] = gid;
 1650|    103|    }
 1651|       |    /* Reset keyshare state for the next tuple */
 1652|  17.6k|    garg->want_keyshare = 0;
 1653|       |
 1654|  17.6k|    if (gidcnt == 0)
  ------------------
  |  Branch (1654:9): [True: 1.63k, False: 16.0k]
  ------------------
 1655|  1.63k|        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|  16.0k|    if (!grow_tuples(garg))
  ------------------
  |  Branch (1658:9): [True: 0, False: 16.0k]
  ------------------
 1659|      0|        return 0;
 1660|       |
 1661|       |    /* Promote closed tuple and initialise the new active tuple slot */
 1662|  16.0k|    garg->tuplcnt_arr[++garg->tplcnt] = 0;
 1663|  16.0k|    return 1;
 1664|  16.0k|}
t1_lib.c:grow_tuples:
 1613|  16.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|  16.0k|    if (garg->tplcnt + 1 >= garg->tplmax) {
  ------------------
  |  Branch (1618:9): [True: 0, False: 16.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|  16.0k|    return 1;
 1629|  16.0k|}
t1_lib.c:gid_cb:
 1292|  40.6k|{
 1293|  40.6k|    gid_cb_st *garg = arg;
 1294|  40.6k|    size_t i, j, k;
 1295|  40.6k|    uint16_t gid = 0;
 1296|  40.6k|    int found_group = 0;
 1297|  40.6k|    char etmp[GROUP_NAME_BUFFER_LENGTH];
 1298|  40.6k|    int retval = 1; /* We assume success */
 1299|  40.6k|    const char *current_prefix;
 1300|  40.6k|    int ignore_unknown = 0;
 1301|  40.6k|    int add_keyshare = 0;
 1302|  40.6k|    int remove_group = 0;
 1303|  40.6k|    size_t restored_prefix_index = 0;
 1304|  40.6k|    char *restored_default_group_string;
 1305|  40.6k|    int continue_while_loop = 1;
 1306|       |
 1307|       |    /* Sanity checks */
 1308|  40.6k|    if (garg == NULL || elem == NULL || len <= 0) {
  ------------------
  |  Branch (1308:9): [True: 0, False: 40.6k]
  |  Branch (1308:25): [True: 12, False: 40.6k]
  |  Branch (1308:41): [True: 0, False: 40.6k]
  ------------------
 1309|     12|        ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_CONFIG_VALUE);
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
 1310|     12|        return 0;
 1311|     12|    }
 1312|       |
 1313|       |    /* Check the possible prefixes (remark: Leading and trailing spaces already cleared) */
 1314|  87.3k|    while (continue_while_loop && len > 0
  ------------------
  |  Branch (1314:12): [True: 87.3k, False: 33]
  |  Branch (1314:35): [True: 87.3k, False: 2]
  ------------------
 1315|  87.3k|        && ((current_prefix = strchr(prefixes, elem[0])) != NULL
  ------------------
  |  Branch (1315:13): [True: 46.6k, False: 40.6k]
  ------------------
 1316|  47.1k|            || OPENSSL_strncasecmp(current_prefix = (char *)DEFAULT_GROUPNAME_FIRST_CHARACTER, elem, 1) == 0)) {
  ------------------
  |  Branch (1316:16): [True: 414, False: 40.2k]
  ------------------
 1317|       |
 1318|  47.1k|        switch (*current_prefix) {
 1319|      0|        case TUPLE_DELIMITER_CHARACTER:
  ------------------
  |  | 1226|      0|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
  |  Branch (1319:9): [True: 0, False: 47.1k]
  ------------------
 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: 47.1k]
  ------------------
 1324|      0|            return -1; /* Not a valid prefix for a single group name-> syntax error */
 1325|      0|            break;
 1326|  7.37k|        case KEY_SHARE_INDICATOR_CHARACTER:
  ------------------
  |  | 1238|  7.37k|#define KEY_SHARE_INDICATOR_CHARACTER '*'
  ------------------
  |  Branch (1326:9): [True: 7.37k, False: 39.7k]
  ------------------
 1327|  7.37k|            if (add_keyshare)
  ------------------
  |  Branch (1327:17): [True: 2, False: 7.36k]
  ------------------
 1328|      2|                return -1; /* Only single key share prefix allowed -> syntax error */
 1329|  7.36k|            add_keyshare = 1;
 1330|  7.36k|            ++elem;
 1331|  7.36k|            --len;
 1332|  7.36k|            break;
 1333|    426|        case REMOVE_GROUP_INDICATOR_CHARACTER:
  ------------------
  |  | 1242|    426|#define REMOVE_GROUP_INDICATOR_CHARACTER '-'
  ------------------
  |  Branch (1333:9): [True: 426, False: 46.6k]
  ------------------
 1334|    426|            if (remove_group)
  ------------------
  |  Branch (1334:17): [True: 1, False: 425]
  ------------------
 1335|      1|                return -1; /* Only single remove group prefix allowed -> syntax error */
 1336|    425|            remove_group = 1;
 1337|    425|            ++elem;
 1338|    425|            --len;
 1339|    425|            break;
 1340|  38.9k|        case IGNORE_UNKNOWN_GROUP_CHARACTER:
  ------------------
  |  | 1234|  38.9k|#define IGNORE_UNKNOWN_GROUP_CHARACTER '?'
  ------------------
  |  Branch (1340:9): [True: 38.9k, False: 8.21k]
  ------------------
 1341|  38.9k|            if (ignore_unknown)
  ------------------
  |  Branch (1341:17): [True: 1, False: 38.8k]
  ------------------
 1342|      1|                return -1; /* Only single ? allowed -> syntax error */
 1343|  38.8k|            ignore_unknown = 1;
 1344|  38.8k|            ++elem;
 1345|  38.8k|            --len;
 1346|  38.8k|            break;
 1347|    414|        default:
  ------------------
  |  Branch (1347:9): [True: 414, False: 46.6k]
  ------------------
 1348|       |            /*
 1349|       |             * Check whether a DEFAULT[_XYZ] 'pseudo group' (= a built-in
 1350|       |             * list of groups) should be added
 1351|       |             */
 1352|    480|            for (i = 0; i < OSSL_NELEM(default_group_strings); i++) {
  ------------------
  |  |   14|    480|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1352:25): [True: 447, False: 33]
  ------------------
 1353|    447|                if ((size_t)len == (strlen(default_group_strings[i].list_name))
  ------------------
  |  Branch (1353:21): [True: 386, False: 61]
  ------------------
 1354|    386|                    && OPENSSL_strncasecmp(default_group_strings[i].list_name, elem, len) == 0) {
  ------------------
  |  Branch (1354:24): [True: 381, False: 5]
  ------------------
 1355|    381|                    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|    381|                    if (ignore_unknown || remove_group)
  ------------------
  |  Branch (1365:25): [True: 1, False: 380]
  |  Branch (1365:43): [True: 1, False: 379]
  ------------------
 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|    379|                    restored_default_group_string = OPENSSL_malloc(1 /* max prefix length */ + strlen(default_group_strings[i].group_string) + 1 /* \0 */);
  ------------------
  |  |  107|    379|    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|    379|                    if (restored_default_group_string == NULL)
  ------------------
  |  Branch (1373:25): [True: 0, False: 379]
  ------------------
 1374|      0|                        return 0;
 1375|    379|                    if (add_keyshare
  ------------------
  |  Branch (1375:25): [True: 1, False: 378]
  ------------------
 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|    379|                    memcpy(restored_default_group_string + restored_prefix_index,
 1382|    379|                        default_group_strings[i].group_string,
 1383|    379|                        strlen(default_group_strings[i].group_string));
 1384|    379|                    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|    379|                    saved_first = garg->first;
 1391|    379|                    garg->inner = garg->first = 1;
 1392|    379|                    retval = CONF_parse_list(restored_default_group_string,
 1393|    379|                        TUPLE_DELIMITER_CHARACTER, 1, tuple_cb, garg);
  ------------------
  |  | 1226|    379|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
 1394|    379|                    garg->inner = 0;
 1395|    379|                    garg->first = saved_first;
 1396|       |                    /* We don't need the \0-terminated string anymore */
 1397|    379|                    OPENSSL_free(restored_default_group_string);
  ------------------
  |  |  132|    379|    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|    379|                    return retval;
 1400|    379|                }
 1401|    447|            }
 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|     33|            continue_while_loop = 0;
 1408|     33|            break;
 1409|  47.1k|        }
 1410|  47.1k|    }
 1411|       |
 1412|  40.2k|    if (len == 0)
  ------------------
  |  Branch (1412:9): [True: 2, False: 40.2k]
  ------------------
 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|  40.2k|    if (garg->gidcnt == garg->gidmax) {
  ------------------
  |  Branch (1416:9): [True: 0, False: 40.2k]
  ------------------
 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|  40.2k|    if (garg->ksidcnt == garg->ksidmax) {
  ------------------
  |  Branch (1428:9): [True: 0, False: 40.2k]
  ------------------
 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|  40.2k|    if (len > (int)(sizeof(etmp) - 1))
  ------------------
  |  Branch (1439:9): [True: 15, False: 40.2k]
  ------------------
 1440|     15|        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|  40.2k|    memcpy(etmp, elem, len);
 1449|  40.2k|    etmp[len] = 0;
 1450|       |
 1451|       |    /* Get the groupID */
 1452|  40.2k|    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|  40.2k|    if (gid == 0) {
  ------------------
  |  Branch (1457:9): [True: 1.38k, False: 38.8k]
  ------------------
 1458|       |        /* Is it one of the GOST groups ? */
 1459|  11.1k|        for (i = 0; i < OSSL_NELEM(name2id_arr); i++) {
  ------------------
  |  |   14|  11.1k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1459:21): [True: 9.71k, False: 1.38k]
  ------------------
 1460|  9.71k|            if (OPENSSL_strcasecmp(etmp, name2id_arr[i].group_name) == 0) {
  ------------------
  |  Branch (1460:17): [True: 0, False: 9.71k]
  ------------------
 1461|      0|                gid = name2id_arr[i].groupID;
 1462|      0|                break;
 1463|      0|            }
 1464|  9.71k|        }
 1465|  1.38k|        if (gid == 0) { /* still not found */
  ------------------
  |  Branch (1465:13): [True: 1.38k, False: 0]
  ------------------
 1466|       |            /* If unknown, next known tuple element gets a keyshare */
 1467|  1.38k|            if (add_keyshare && !remove_group && garg->want_keyshare == 0)
  ------------------
  |  Branch (1467:17): [True: 398, False: 990]
  |  Branch (1467:33): [True: 397, False: 1]
  |  Branch (1467:50): [True: 351, False: 46]
  ------------------
 1468|    351|                garg->want_keyshare = 1;
 1469|       |            /* Unknown group - ignore if ignore_unknown; trigger error otherwise */
 1470|  1.38k|            retval = ignore_unknown;
 1471|  1.38k|            goto done;
 1472|  1.38k|        }
 1473|  1.38k|    }
 1474|       |
 1475|       |    /* Make sure that at least one provider is supporting this groupID */
 1476|  38.8k|    found_group = 0;
 1477|   401k|    for (j = 0; j < garg->ctx->group_list_len; j++)
  ------------------
  |  Branch (1477:17): [True: 401k, False: 0]
  ------------------
 1478|   401k|        if (garg->ctx->group_list[j].group_id == gid) {
  ------------------
  |  Branch (1478:13): [True: 38.8k, False: 363k]
  ------------------
 1479|  38.8k|            found_group = 1;
 1480|  38.8k|            break;
 1481|  38.8k|        }
 1482|       |
 1483|       |    /*
 1484|       |     * No provider supports this group - ignore if
 1485|       |     * ignore_unknown; trigger error otherwise
 1486|       |     */
 1487|  38.8k|    if (found_group == 0) {
  ------------------
  |  Branch (1487:9): [True: 0, False: 38.8k]
  ------------------
 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|  38.8k|    if (remove_group) {
  ------------------
  |  Branch (1495:9): [True: 394, False: 38.4k]
  ------------------
 1496|    394|        size_t n = 0; /* tuple size */
 1497|    394|        size_t tpl_start_idx = 0; /* Index of 1st group in tuple of removed group */
 1498|    394|        size_t ks_check_idx = 0; /* Index after last known retained keyshare */
 1499|       |
 1500|    394|        j = 0; /* tuple index */
 1501|    394|        k = 0; /* keyshare index */
 1502|    394|        n = garg->tuplcnt_arr[j];
 1503|       |
 1504|  2.92k|        for (i = 0; i < garg->gidcnt; ++i) {
  ------------------
  |  Branch (1504:21): [True: 2.78k, False: 138]
  ------------------
 1505|  2.78k|            if (garg->gid_arr[i] == gid)
  ------------------
  |  Branch (1505:17): [True: 256, False: 2.52k]
  ------------------
 1506|    256|                break;
 1507|       |            /* Skip keyshare slots associated with groups prior to that removed */
 1508|  2.52k|            if (k < garg->ksidcnt && garg->gid_arr[i] == garg->ksid_arr[k]) {
  ------------------
  |  Branch (1508:17): [True: 1.67k, False: 851]
  |  Branch (1508:38): [True: 581, False: 1.09k]
  ------------------
 1509|    581|                ++k;
 1510|       |                /* Skip each retained keyshare as we go */
 1511|    581|                ks_check_idx = i + 1;
 1512|    581|            }
 1513|  2.52k|            if (--n == 0) {
  ------------------
  |  Branch (1513:17): [True: 961, False: 1.56k]
  ------------------
 1514|    961|                if (j < garg->tplcnt)
  ------------------
  |  Branch (1514:21): [True: 915, False: 46]
  ------------------
 1515|    915|                    n = garg->tuplcnt_arr[++j];
 1516|    961|                tpl_start_idx = i + 1;
 1517|    961|            }
 1518|  2.52k|        }
 1519|       |
 1520|       |        /* Nothing to remove? */
 1521|    394|        if (i >= garg->gidcnt)
  ------------------
  |  Branch (1521:13): [True: 138, False: 256]
  ------------------
 1522|    138|            goto done;
 1523|       |
 1524|    256|        garg->gidcnt--;
 1525|    256|        garg->tuplcnt_arr[j]--;
 1526|    256|        memmove(garg->gid_arr + i, garg->gid_arr + i + 1,
 1527|    256|            (garg->gidcnt - i) * sizeof(gid));
 1528|       |
 1529|       |        /* Handle keyshare removal */
 1530|    256|        if (k < garg->ksidcnt && garg->ksid_arr[k] == gid) {
  ------------------
  |  Branch (1530:13): [True: 138, False: 118]
  |  Branch (1530:34): [True: 85, False: 53]
  ------------------
 1531|     85|            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|     85|            drop_ks = ks_check_idx > tpl_start_idx || j >= garg->tplcnt;
  ------------------
  |  Branch (1547:23): [True: 1, False: 84]
  |  Branch (1547:55): [True: 20, False: 64]
  ------------------
 1548|       |
 1549|     85|            if (!drop_ks) {
  ------------------
  |  Branch (1549:17): [True: 64, False: 21]
  ------------------
 1550|     64|                size_t end; /* End index of affected tuple */
 1551|       |
 1552|       |                /* Removing the first keyshare of an already completed tuple */
 1553|     73|                for (end = tpl_start_idx + garg->tuplcnt_arr[j]; i < end; ++i) {
  ------------------
  |  Branch (1553:66): [True: 21, False: 52]
  ------------------
 1554|       |                    /* Any other keyshares for the same tuple? */
 1555|     21|                    if (k + 1 < garg->ksidcnt
  ------------------
  |  Branch (1555:25): [True: 12, False: 9]
  ------------------
 1556|     12|                        && garg->gid_arr[i] == garg->ksid_arr[k + 1])
  ------------------
  |  Branch (1556:28): [True: 12, False: 0]
  ------------------
 1557|     12|                        break;
 1558|     21|                }
 1559|       |                /* Float keyshare to first group when no others found */
 1560|     64|                if (i >= end)
  ------------------
  |  Branch (1560:21): [True: 52, False: 12]
  ------------------
 1561|     52|                    garg->ksid_arr[k] = garg->gid_arr[tpl_start_idx];
 1562|     12|                else
 1563|     12|                    drop_ks = 1;
 1564|     64|            }
 1565|     85|            if (drop_ks) {
  ------------------
  |  Branch (1565:17): [True: 33, False: 52]
  ------------------
 1566|     33|                garg->ksidcnt--;
 1567|     33|                memmove(garg->ksid_arr + k, garg->ksid_arr + k + 1,
 1568|     33|                    (garg->ksidcnt - k) * sizeof(gid));
 1569|     33|            }
 1570|     85|        }
 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|    256|        if (garg->tuplcnt_arr[j] == 0 && j < garg->tplcnt) {
  ------------------
  |  Branch (1577:13): [True: 133, False: 123]
  |  Branch (1577:42): [True: 75, False: 58]
  ------------------
 1578|     75|            garg->tplcnt--;
 1579|     75|            memmove(garg->tuplcnt_arr + j, garg->tuplcnt_arr + j + 1,
 1580|     75|                (garg->tplcnt - j) * sizeof(size_t));
 1581|     75|        }
 1582|  38.4k|    } else { /* Processing addition of a single new group */
 1583|       |
 1584|       |        /* Check for duplicates */
 1585|   229k|        for (i = 0; i < garg->gidcnt; i++)
  ------------------
  |  Branch (1585:21): [True: 194k, False: 35.0k]
  ------------------
 1586|   194k|            if (garg->gid_arr[i] == gid) {
  ------------------
  |  Branch (1586:17): [True: 3.40k, False: 191k]
  ------------------
 1587|       |                /* Duplicate group anywhere in the list of groups - ignore */
 1588|  3.40k|                goto done;
 1589|  3.40k|            }
 1590|       |
 1591|       |        /* Add the current group to the 'flat' list of groups */
 1592|  35.0k|        garg->gid_arr[garg->gidcnt++] = gid;
 1593|       |        /* and update the book keeping for the number of groups in current tuple */
 1594|  35.0k|        garg->tuplcnt_arr[garg->tplcnt]++;
 1595|       |
 1596|       |        /* We want to add a key share for the current group */
 1597|  35.0k|        if (add_keyshare) {
  ------------------
  |  Branch (1597:13): [True: 6.40k, False: 28.6k]
  ------------------
 1598|  6.40k|            garg->ksid_arr[garg->ksidcnt++] = gid;
 1599|  6.40k|            garg->want_keyshare = -1;
 1600|  6.40k|        }
 1601|  35.0k|    }
 1602|       |
 1603|  40.2k|done:
 1604|  40.2k|    return retval;
 1605|  38.8k|}
t1_lib.c:tls1_group_name2id:
  725|  40.2k|{
  726|  40.2k|    size_t i;
  727|       |
  728|   412k|    for (i = 0; i < ctx->group_list_len; i++) {
  ------------------
  |  Branch (728:17): [True: 411k, False: 1.38k]
  ------------------
  729|   411k|        if (OPENSSL_strcasecmp(ctx->group_list[i].tlsname, name) == 0
  ------------------
  |  Branch (729:13): [True: 37.8k, False: 373k]
  ------------------
  730|   373k|            || OPENSSL_strcasecmp(ctx->group_list[i].realname, name) == 0)
  ------------------
  |  Branch (730:16): [True: 967, False: 372k]
  ------------------
  731|  38.8k|            return ctx->group_list[i].group_id;
  732|   411k|    }
  733|       |
  734|  1.38k|    return 0;
  735|  40.2k|}
t1_lib.c:tls1_lookup_sigalg:
 2549|   337k|{
 2550|   337k|    const SIGALG_LOOKUP *lu = tls1_find_sigalg(ctx, sigalg);
 2551|       |
 2552|   337k|    return (lu != NULL && lu->available) ? lu : NULL;
  ------------------
  |  Branch (2552:13): [True: 337k, False: 0]
  |  Branch (2552:27): [True: 337k, False: 0]
  ------------------
 2553|   337k|}
t1_lib.c:tls_sigalg_compat:
 2813|  66.4k|{
 2814|  66.4k|    int minversion, maxversion;
 2815|  66.4k|    int minproto, maxproto;
 2816|       |
 2817|  66.4k|    if (!lu->available)
  ------------------
  |  Branch (2817:9): [True: 0, False: 66.4k]
  ------------------
 2818|      0|        return 0;
 2819|       |
 2820|  66.4k|    if (SSL_CONNECTION_IS_DTLS(sc)) {
  ------------------
  |  |  266|  66.4k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  66.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  66.4k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 66.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|  66.4k|    } else {
 2830|  66.4k|        if (sc->ssl.method->version == TLS_ANY_VERSION) {
  ------------------
  |  |   40|  66.4k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2830:13): [True: 66.4k, False: 0]
  ------------------
 2831|  66.4k|            minproto = sc->min_proto_version;
 2832|  66.4k|            maxproto = sc->max_proto_version;
 2833|  66.4k|        } else {
 2834|      0|            maxproto = minproto = sc->version;
 2835|      0|        }
 2836|  66.4k|        minversion = lu->mintls;
 2837|  66.4k|        maxversion = lu->maxtls;
 2838|  66.4k|    }
 2839|  66.4k|    if (minversion == -1 || maxversion == -1
  ------------------
  |  Branch (2839:9): [True: 0, False: 66.4k]
  |  Branch (2839:29): [True: 0, False: 66.4k]
  ------------------
 2840|  66.4k|        || (minversion != 0 && maxproto != 0
  ------------------
  |  Branch (2840:13): [True: 66.4k, False: 0]
  |  Branch (2840:32): [True: 1.26k, False: 65.2k]
  ------------------
 2841|  1.26k|            && ssl_version_cmp(sc, minversion, maxproto) > 0)
  ------------------
  |  Branch (2841:16): [True: 266, False: 997]
  ------------------
 2842|  66.2k|        || (maxversion != 0 && minproto != 0
  ------------------
  |  Branch (2842:13): [True: 28.6k, False: 37.5k]
  |  Branch (2842:32): [True: 28.6k, False: 0]
  ------------------
 2843|  28.6k|            && ssl_version_cmp(sc, maxversion, minproto) < 0)
  ------------------
  |  Branch (2843:16): [True: 27, False: 28.6k]
  ------------------
 2844|  66.2k|        || !tls12_sigalg_allowed(sc, SSL_SECOP_SIGALG_SUPPORTED, lu))
  ------------------
  |  | 2761|  66.2k|#define SSL_SECOP_SIGALG_SUPPORTED (11 | SSL_SECOP_OTHER_SIGALG)
  |  |  ------------------
  |  |  |  | 2733|  66.2k|#define SSL_SECOP_OTHER_SIGALG (5 << 16)
  |  |  ------------------
  ------------------
  |  Branch (2844:12): [True: 6.88k, False: 59.3k]
  ------------------
 2845|  7.17k|        return 0;
 2846|  59.3k|    return 1;
 2847|  66.4k|}
t1_lib.c:sigalg_security_bits:
 2765|  94.0k|{
 2766|  94.0k|    const EVP_MD *md = NULL;
 2767|  94.0k|    int secbits = 0;
 2768|       |
 2769|  94.0k|    if (!tls1_lookup_md(ctx, lu, &md))
  ------------------
  |  Branch (2769:9): [True: 0, False: 94.0k]
  ------------------
 2770|      0|        return 0;
 2771|  94.0k|    if (md != NULL) {
  ------------------
  |  Branch (2771:9): [True: 80.8k, False: 13.1k]
  ------------------
 2772|  80.8k|        int md_type = EVP_MD_get_type(md);
 2773|       |
 2774|       |        /* Security bits: half digest bits */
 2775|  80.8k|        secbits = EVP_MD_get_size(md) * 4;
 2776|  80.8k|        if (secbits <= 0)
  ------------------
  |  Branch (2776:13): [True: 0, False: 80.8k]
  ------------------
 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|  80.8k|        if (md_type == NID_sha1)
  ------------------
  |  | 2348|  80.8k|#define NID_sha1                64
  ------------------
  |  Branch (2788:13): [True: 6.74k, False: 74.1k]
  ------------------
 2789|  6.74k|            secbits = 64;
 2790|  74.1k|        else if (md_type == NID_md5_sha1)
  ------------------
  |  | 1247|  74.1k|#define NID_md5_sha1            114
  ------------------
  |  Branch (2790:18): [True: 0, False: 74.1k]
  ------------------
 2791|      0|            secbits = 67;
 2792|  74.1k|        else if (md_type == NID_md5)
  ------------------
  |  | 1242|  74.1k|#define NID_md5         4
  ------------------
  |  Branch (2792:18): [True: 0, False: 74.1k]
  ------------------
 2793|      0|            secbits = 39;
 2794|  80.8k|    } else {
 2795|       |        /* Values from https://tools.ietf.org/html/rfc8032#section-8.5 */
 2796|  13.1k|        if (lu->sigalg == TLSEXT_SIGALG_ed25519)
  ------------------
  |  |   43|  13.1k|#define TLSEXT_SIGALG_ed25519 0x0807
  ------------------
  |  Branch (2796:13): [True: 2.21k, False: 10.9k]
  ------------------
 2797|  2.21k|            secbits = 128;
 2798|  10.9k|        else if (lu->sigalg == TLSEXT_SIGALG_ed448)
  ------------------
  |  |   44|  10.9k|#define TLSEXT_SIGALG_ed448 0x0808
  ------------------
  |  Branch (2798:18): [True: 2.21k, False: 8.71k]
  ------------------
 2799|  2.21k|            secbits = 224;
 2800|  13.1k|    }
 2801|       |    /*
 2802|       |     * For provider-based sigalgs we have secbits information available
 2803|       |     * in the (provider-loaded) sigalg_list structure
 2804|       |     */
 2805|  94.0k|    if ((secbits == 0) && (lu->sig_idx >= SSL_PKEY_NUM)
  ------------------
  |  |  336|  8.71k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2805:9): [True: 8.71k, False: 85.2k]
  |  Branch (2805:27): [True: 8.71k, False: 0]
  ------------------
 2806|  8.71k|        && ((lu->sig_idx - SSL_PKEY_NUM) < (int)ctx->sigalg_list_len)) {
  ------------------
  |  |  336|  8.71k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2806:12): [True: 8.71k, False: 0]
  ------------------
 2807|  8.71k|        secbits = ctx->sigalg_list[lu->sig_idx - SSL_PKEY_NUM].secbits;
  ------------------
  |  |  336|  8.71k|#define SSL_PKEY_NUM 9
  ------------------
 2808|  8.71k|    }
 2809|  94.0k|    return secbits;
 2810|  94.0k|}
t1_lib.c:tls12_sigalg_allowed:
 3498|  94.0k|{
 3499|  94.0k|    unsigned char sigalgstr[2];
 3500|  94.0k|    int secbits;
 3501|       |
 3502|  94.0k|    if (lu == NULL || !lu->available)
  ------------------
  |  Branch (3502:9): [True: 0, False: 94.0k]
  |  Branch (3502:23): [True: 0, False: 94.0k]
  ------------------
 3503|      0|        return 0;
 3504|       |    /* DSA is not allowed in TLS 1.3 */
 3505|  94.0k|    if (SSL_CONNECTION_IS_TLS13(s) && lu->sig == EVP_PKEY_DSA)
  ------------------
  |  |  273|   188k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|   188k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  94.0k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  94.0k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 94.0k, False: 0]
  |  |  ------------------
  |  |  274|  94.0k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  94.0k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|   188k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 94.0k, False: 0]
  |  |  ------------------
  |  |  275|   188k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  94.0k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  94.0k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 94.0k]
  |  |  ------------------
  ------------------
                  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|  94.0k|    if (!s->server && !SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|   188k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  94.0k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  94.0k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (3511:9): [True: 94.0k, False: 0]
  |  Branch (3511:23): [True: 94.0k, False: 0]
  ------------------
 3512|  94.0k|        && s->s3.tmp.min_ver >= TLS1_3_VERSION
  ------------------
  |  |   27|   188k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3512:12): [True: 147, False: 93.9k]
  ------------------
 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|  94.0k|    if (ssl_cert_is_disabled(SSL_CONNECTION_GET_CTX(s), lu->sig_idx))
  ------------------
  |  |   26|  94.0k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (3519:9): [True: 0, False: 94.0k]
  ------------------
 3520|      0|        return 0;
 3521|       |
 3522|  94.0k|    if (lu->sig == NID_id_GostR3410_2012_256
  ------------------
  |  | 4794|   188k|#define NID_id_GostR3410_2012_256               979
  ------------------
  |  Branch (3522:9): [True: 0, False: 94.0k]
  ------------------
 3523|  94.0k|        || lu->sig == NID_id_GostR3410_2012_512
  ------------------
  |  | 4799|   188k|#define NID_id_GostR3410_2012_512               980
  ------------------
  |  Branch (3523:12): [True: 0, False: 94.0k]
  ------------------
 3524|  94.0k|        || lu->sig == NID_id_GostR3410_2001) {
  ------------------
  |  | 4583|  94.0k|#define NID_id_GostR3410_2001           811
  ------------------
  |  Branch (3524:12): [True: 0, False: 94.0k]
  ------------------
 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|  94.0k|    secbits = sigalg_security_bits(SSL_CONNECTION_GET_CTX(s), lu);
  ------------------
  |  |   26|  94.0k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3563|  94.0k|    sigalgstr[0] = (lu->sigalg >> 8) & 0xff;
 3564|  94.0k|    sigalgstr[1] = lu->sigalg & 0xff;
 3565|  94.0k|    return ssl_security(s, op, secbits, lu->hash, (void *)sigalgstr);
 3566|  94.0k|}
t1_lib.c:tls1_find_sigalg:
 2537|   337k|{
 2538|   337k|    const SIGALG_LOOKUP *lu = ctx->sigalg_lookup_cache;
 2539|       |
 2540|  5.46M|    for (size_t i = 0; i < ctx->sigalg_lookup_cache_len; lu++, i++)
  ------------------
  |  Branch (2540:24): [True: 5.46M, False: 0]
  ------------------
 2541|  5.46M|        if (lu->sigalg == sigalg)
  ------------------
  |  Branch (2541:13): [True: 337k, False: 5.12M]
  ------------------
 2542|   337k|            return lu;
 2543|      0|    return NULL;
 2544|   337k|}

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

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

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

_Z18fuzz_get_first_tlvP9fuzz_dataP3tlv:
   32|  13.2k|{
   33|       |  /* Reset the cursor. */
   34|  13.2k|  fuzz->state.data_pos = 0;
   35|  13.2k|  return fuzz_get_tlv_comn(fuzz, tlv);
   36|  13.2k|}
_Z17fuzz_get_next_tlvP9fuzz_dataP3tlv:
   43|  76.7k|{
   44|       |  /* Advance the cursor by the full length of the previous TLV. */
   45|  76.7k|  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|  76.7k|  if(fuzz->state.data_pos + sizeof(TLV_RAW) > fuzz->state.data_len) {
  ------------------
  |  Branch (48:6): [True: 11.0k, False: 65.6k]
  ------------------
   49|       |    /* No more TLVs to parse */
   50|  11.0k|    return TLV_RC_NO_MORE_TLVS;
  ------------------
  |  |  267|  11.0k|#define TLV_RC_NO_MORE_TLVS             1
  ------------------
   51|  11.0k|  }
   52|       |
   53|  65.6k|  return fuzz_get_tlv_comn(fuzz, tlv);
   54|  76.7k|}
_Z17fuzz_get_tlv_comnP9fuzz_dataP3tlv:
   61|  78.9k|{
   62|  78.9k|  int rc = 0;
   63|  78.9k|  size_t data_offset;
   64|  78.9k|  TLV_RAW *raw;
   65|       |
   66|       |  /* Start by casting the data stream to a TLV. */
   67|  78.9k|  raw = (TLV_RAW *)&fuzz->state.data[fuzz->state.data_pos];
   68|  78.9k|  data_offset = fuzz->state.data_pos + sizeof(TLV_RAW);
   69|       |
   70|       |  /* Set the TLV values. */
   71|  78.9k|  tlv->type = to_u16(raw->raw_type);
   72|  78.9k|  tlv->length = to_u32(raw->raw_length);
   73|  78.9k|  tlv->value = &fuzz->state.data[data_offset];
   74|       |
   75|  78.9k|  FV_PRINTF(fuzz, "TLV: type %x length %u\n", tlv->type, tlv->length);
  ------------------
  |  |  530|  78.9k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 78.9k]
  |  |  ------------------
  |  |  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|  78.9k|  uint64_t check_length = data_offset;
   80|  78.9k|  check_length += tlv->length;
   81|       |
   82|  78.9k|  uint64_t remaining_len = fuzz->state.data_len;
   83|  78.9k|  FV_PRINTF(fuzz, "Check length of data: %" PRIu64 " \n", check_length);
  ------------------
  |  |  530|  78.9k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 78.9k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   84|  78.9k|  FV_PRINTF(fuzz, "Remaining length of data: %" PRIu64 " \n", remaining_len);
  ------------------
  |  |  530|  78.9k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 78.9k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   85|       |
   86|       |  /* Sanity check that the TLV length is ok. */
   87|  78.9k|  if(check_length > remaining_len) {
  ------------------
  |  Branch (87:6): [True: 525, False: 78.4k]
  ------------------
   88|    525|    FV_PRINTF(fuzz, "Returning TLV_RC_SIZE_ERROR\n");
  ------------------
  |  |  530|    525|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 525]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   89|    525|    rc = TLV_RC_SIZE_ERROR;
  ------------------
  |  |  268|    525|#define TLV_RC_SIZE_ERROR               2
  ------------------
   90|    525|  }
   91|       |
   92|  78.9k|  return rc;
   93|  78.9k|}
_Z14fuzz_parse_tlvP9fuzz_dataP3tlv:
   99|  77.0k|{
  100|  77.0k|  int rc;
  101|  77.0k|  char *tmp = NULL;
  102|  77.0k|  uint32_t tmp_u32;
  103|  77.0k|  curl_slist *new_list;
  104|       |
  105|  77.0k|  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|    413|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE0, 0);
  ------------------
  |  |  513|    413|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 413, False: 76.6k]
  |  |  ------------------
  |  |  514|    413|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    413|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    413|          break
  ------------------
  109|    927|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE1, 1);
  ------------------
  |  |  513|    927|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 927, False: 76.1k]
  |  |  ------------------
  |  |  514|    927|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    927|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    927|          break
  ------------------
  110|    215|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE2, 2);
  ------------------
  |  |  513|    215|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 215, False: 76.8k]
  |  |  ------------------
  |  |  514|    215|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    215|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    215|          break
  ------------------
  111|    194|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE3, 3);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 76.8k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  112|    204|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE4, 4);
  ------------------
  |  |  513|    204|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 204, False: 76.8k]
  |  |  ------------------
  |  |  514|    204|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    204|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    204|          break
  ------------------
  113|    194|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE5, 5);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 76.8k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  114|    201|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE6, 6);
  ------------------
  |  |  513|    201|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 201, False: 76.8k]
  |  |  ------------------
  |  |  514|    201|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    201|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    201|          break
  ------------------
  115|    195|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE7, 7);
  ------------------
  |  |  513|    195|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 195, False: 76.8k]
  |  |  ------------------
  |  |  514|    195|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    195|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    195|          break
  ------------------
  116|    194|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE8, 8);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 76.8k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  117|    194|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE9, 9);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 76.8k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  118|    280|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE10, 10);
  ------------------
  |  |  513|    280|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 280, False: 76.7k]
  |  |  ------------------
  |  |  514|    280|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    280|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    280|          break
  ------------------
  119|       |
  120|    194|    FRESPONSETLV(&fuzz->sockman[1], TLV_TYPE_SECOND_RESPONSE0, 0);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 76.8k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  121|    194|    FRESPONSETLV(&fuzz->sockman[1], TLV_TYPE_SECOND_RESPONSE1, 1);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 76.8k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  122|       |
  123|     36|    case TLV_TYPE_UPLOAD1:
  ------------------
  |  |   36|     36|#define TLV_TYPE_UPLOAD1                        8
  ------------------
  |  Branch (123:5): [True: 36, False: 77.0k]
  ------------------
  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|     36|      FCHECK_OPTION_UNSET(fuzz, CURLOPT_UPLOAD);
  ------------------
  |  |  503|     36|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  ------------------
  |  |  |  |  490|     36|        {                                                                     \
  |  |  |  |  491|     36|          if (!(COND))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (491:15): [True: 1, False: 35]
  |  |  |  |  ------------------
  |  |  |  |  492|     36|          {                                                                   \
  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  496|     36|        }
  |  |  ------------------
  ------------------
  128|       |
  129|     35|      fuzz->upload1_data = tlv->value;
  130|     35|      fuzz->upload1_data_len = tlv->length;
  131|       |
  132|     35|      FSET_OPTION(fuzz, CURLOPT_UPLOAD, 1L);
  ------------------
  |  |  499|     35|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  ------------------
  |  |  |  |  480|     35|        {                                                                     \
  |  |  |  |  481|     35|          int _func_rc = (FUNC);                                              \
  |  |  |  |  482|     35|          if (_func_rc)                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (482:15): [True: 0, False: 35]
  |  |  |  |  ------------------
  |  |  |  |  483|     35|          {                                                                   \
  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  487|     35|        }
  |  |  ------------------
  |  |  500|     35|        (FUZZP)->options[OPTNAME % 1000] = 1
  ------------------
  133|     35|      FSET_OPTION(fuzz,
  ------------------
  |  |  499|     35|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  ------------------
  |  |  |  |  480|     35|        {                                                                     \
  |  |  |  |  481|     35|          int _func_rc = (FUNC);                                              \
  |  |  |  |  482|     35|          if (_func_rc)                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (482:15): [True: 0, False: 35]
  |  |  |  |  ------------------
  |  |  |  |  483|     35|          {                                                                   \
  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  487|     35|        }
  |  |  ------------------
  |  |  500|     35|        (FUZZP)->options[OPTNAME % 1000] = 1
  ------------------
  134|     35|                  CURLOPT_INFILESIZE_LARGE,
  135|     35|                  (curl_off_t)fuzz->upload1_data_len);
  136|     35|      break;
  137|       |
  138|  48.8k|    case TLV_TYPE_HEADER:
  ------------------
  |  |   34|  48.8k|#define TLV_TYPE_HEADER                         6
  ------------------
  |  Branch (138:5): [True: 48.8k, False: 28.1k]
  ------------------
  139|       |      /* Limit the number of headers that can be added to a message to prevent
  140|       |         timeouts. */
  141|  48.8k|      if(fuzz->header_list_count >= TLV_MAX_NUM_CURLOPT_HEADER) {
  ------------------
  |  |  301|  48.8k|#define TLV_MAX_NUM_CURLOPT_HEADER      2000
  ------------------
  |  Branch (141:10): [True: 1, False: 48.8k]
  ------------------
  142|      1|        rc = 255;
  143|      1|        goto EXIT_LABEL;
  144|      1|      }
  145|       |
  146|  48.8k|      tmp = fuzz_tlv_to_string(tlv);
  147|  48.8k|      if (tmp == NULL) {
  ------------------
  |  Branch (147:11): [True: 0, False: 48.8k]
  ------------------
  148|       |        // keep on despite allocation failure
  149|      0|        break;
  150|      0|      }
  151|  48.8k|      new_list = curl_slist_append(fuzz->header_list, tmp);
  152|  48.8k|      if (new_list == NULL) {
  ------------------
  |  Branch (152:11): [True: 0, False: 48.8k]
  ------------------
  153|      0|        break;
  154|      0|      }
  155|  48.8k|      fuzz->header_list = new_list;
  156|  48.8k|      fuzz->header_list_count++;
  157|  48.8k|      break;
  158|       |
  159|    429|    case TLV_TYPE_MAIL_RECIPIENT:
  ------------------
  |  |   39|    429|#define TLV_TYPE_MAIL_RECIPIENT                 11
  ------------------
  |  Branch (159:5): [True: 429, False: 76.6k]
  ------------------
  160|       |      /* Limit the number of headers that can be added to a message to prevent
  161|       |         timeouts. */
  162|    429|      if(fuzz->header_list_count >= TLV_MAX_NUM_CURLOPT_HEADER) {
  ------------------
  |  |  301|    429|#define TLV_MAX_NUM_CURLOPT_HEADER      2000
  ------------------
  |  Branch (162:10): [True: 1, False: 428]
  ------------------
  163|      1|        rc = 255;
  164|      1|        goto EXIT_LABEL;
  165|      1|      }
  166|    428|      tmp = fuzz_tlv_to_string(tlv);
  167|    428|      if (tmp == NULL) {
  ------------------
  |  Branch (167:11): [True: 0, False: 428]
  ------------------
  168|       |        // keep on despite allocation failure
  169|      0|        break;
  170|      0|      }
  171|    428|      new_list = curl_slist_append(fuzz->mail_recipients_list, tmp);
  172|    428|      if (new_list != NULL) {
  ------------------
  |  Branch (172:11): [True: 428, False: 0]
  ------------------
  173|    428|        fuzz->mail_recipients_list = new_list;
  174|    428|        fuzz->header_list_count++;
  175|    428|      }
  176|    428|      break;
  177|       |
  178|  2.45k|    case TLV_TYPE_MIME_PART:
  ------------------
  |  |   41|  2.45k|#define TLV_TYPE_MIME_PART                      13
  ------------------
  |  Branch (178:5): [True: 2.45k, False: 74.5k]
  ------------------
  179|  2.45k|      if(fuzz->mime == NULL) {
  ------------------
  |  Branch (179:10): [True: 176, False: 2.27k]
  ------------------
  180|    176|        fuzz->mime = curl_mime_init(fuzz->easy);
  181|    176|      }
  182|       |
  183|  2.45k|      fuzz->part = curl_mime_addpart(fuzz->mime);
  184|       |
  185|       |      /* This TLV may have sub TLVs. */
  186|  2.45k|      fuzz_add_mime_part(tlv, fuzz->part);
  187|       |
  188|  2.45k|      break;
  189|       |
  190|     31|    case TLV_TYPE_POSTFIELDS:
  ------------------
  |  |   33|     31|#define TLV_TYPE_POSTFIELDS                     5
  ------------------
  |  Branch (190:5): [True: 31, False: 77.0k]
  ------------------
  191|     31|      FCHECK_OPTION_UNSET(fuzz, CURLOPT_POSTFIELDS);
  ------------------
  |  |  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|        }
  |  |  ------------------
  ------------------
  192|     30|      fuzz->postfields = fuzz_tlv_to_string(tlv);
  193|     30|      FSET_OPTION(fuzz, CURLOPT_POSTFIELDS, fuzz->postfields);
  ------------------
  |  |  499|     30|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  ------------------
  |  |  |  |  480|     30|        {                                                                     \
  |  |  |  |  481|     30|          int _func_rc = (FUNC);                                              \
  |  |  |  |  482|     30|          if (_func_rc)                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (482:15): [True: 0, False: 30]
  |  |  |  |  ------------------
  |  |  |  |  483|     30|          {                                                                   \
  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  487|     30|        }
  |  |  ------------------
  |  |  500|     30|        (FUZZP)->options[OPTNAME % 1000] = 1
  ------------------
  194|     30|      break;
  195|       |
  196|     31|    case TLV_TYPE_HTTPPOSTBODY:
  ------------------
  |  |   80|     31|#define TLV_TYPE_HTTPPOSTBODY                   52
  ------------------
  |  Branch (196:5): [True: 31, False: 77.0k]
  ------------------
  197|     31|      FCHECK_OPTION_UNSET(fuzz, CURLOPT_HTTPPOST);
  ------------------
  |  |  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|        }
  |  |  ------------------
  ------------------
  198|     30|      fuzz_setup_http_post(fuzz, tlv);
  199|     30|      FSET_OPTION(fuzz, CURLOPT_HTTPPOST, fuzz->httppost);
  ------------------
  |  |  499|     30|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  ------------------
  |  |  |  |  480|     30|        {                                                                     \
  |  |  |  |  481|     30|          int _func_rc = (FUNC);                                              \
  |  |  |  |  482|     30|          if (_func_rc)                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (482:15): [True: 0, False: 30]
  |  |  |  |  ------------------
  |  |  |  |  483|     30|          {                                                                   \
  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  487|     30|        }
  |  |  ------------------
  |  |  500|     30|        (FUZZP)->options[OPTNAME % 1000] = 1
  ------------------
  200|     30|      break;
  201|       |
  202|       |    /* Define a set of u32 options. */
  203|    241|    FU32TLV(fuzz, TLV_TYPE_HTTPAUTH, CURLOPT_HTTPAUTH);
  ------------------
  |  |  519|     82|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 82, False: 76.9k]
  |  |  ------------------
  |  |  520|     82|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 80]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     82|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     80|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     80|        {                                                                     \
  |  |  |  |  |  |  491|     80|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 79]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     80|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     80|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     79|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     79|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     79|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     79|        {                                                                     \
  |  |  |  |  |  |  481|     79|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     79|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 78]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     79|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|     79|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     78|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     78|          break
  ------------------
  204|    123|    FU32TLV(fuzz, TLV_TYPE_OPTHEADER, CURLOPT_HEADER);
  ------------------
  |  |  519|     44|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 44, False: 76.9k]
  |  |  ------------------
  |  |  520|     44|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 40]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     44|          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
  ------------------
  205|     28|    FU32TLV(fuzz, TLV_TYPE_NOBODY, CURLOPT_NOBODY);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  206|     97|    FU32TLV(fuzz, TLV_TYPE_FOLLOWLOCATION, CURLOPT_FOLLOWLOCATION);
  ------------------
  |  |  519|     34|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 34, False: 77.0k]
  |  |  ------------------
  |  |  520|     34|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 32]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     34|          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: 27, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     31|          {                                                                   \
  |  |  |  |  |  |  484|     27|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     27|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     27|          }                                                                   \
  |  |  |  |  |  |  487|     31|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  207|     22|    FU32TLV(fuzz, TLV_TYPE_WILDCARDMATCH, CURLOPT_WILDCARDMATCH);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  208|    127|    FU32TLV(fuzz, TLV_TYPE_RTSP_REQUEST, CURLOPT_RTSP_REQUEST);
  ------------------
  |  |  519|     44|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 44, False: 76.9k]
  |  |  ------------------
  |  |  520|     44|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 42]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     44|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     42|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     42|        {                                                                     \
  |  |  |  |  |  |  491|     42|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 41]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     42|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     42|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     41|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     41|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     41|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     41|        {                                                                     \
  |  |  |  |  |  |  481|     41|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     41|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 29, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     41|          {                                                                   \
  |  |  |  |  |  |  484|     29|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     29|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     29|          }                                                                   \
  |  |  |  |  |  |  487|     41|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     12|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     12|          break
  ------------------
  209|    210|    FU32TLV(fuzz, TLV_TYPE_RTSP_CLIENT_CSEQ, CURLOPT_RTSP_CLIENT_CSEQ);
  ------------------
  |  |  519|     75|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 75, False: 76.9k]
  |  |  ------------------
  |  |  520|     75|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 68]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     75|          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
  ------------------
  210|    142|    FU32TLV(fuzz, TLV_TYPE_HTTP_VERSION, CURLOPT_HTTP_VERSION);
  ------------------
  |  |  519|     49|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 49, False: 76.9k]
  |  |  ------------------
  |  |  520|     49|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 47]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     49|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     47|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     47|        {                                                                     \
  |  |  |  |  |  |  491|     47|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 46]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     47|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     47|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     46|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     46|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     46|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     46|        {                                                                     \
  |  |  |  |  |  |  481|     46|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     46|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 28, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     46|          {                                                                   \
  |  |  |  |  |  |  484|     28|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     28|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     28|          }                                                                   \
  |  |  |  |  |  |  487|     46|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     18|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     18|          break
  ------------------
  211|    127|    FU32TLV(fuzz, TLV_TYPE_NETRC, CURLOPT_NETRC);
  ------------------
  |  |  519|     46|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 46, False: 76.9k]
  |  |  ------------------
  |  |  520|     46|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 41]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     46|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     41|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     41|        {                                                                     \
  |  |  |  |  |  |  491|     41|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 40]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     41|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     41|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     40|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     40|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     40|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     40|        {                                                                     \
  |  |  |  |  |  |  481|     40|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     40|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 31, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     40|          {                                                                   \
  |  |  |  |  |  |  484|     31|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     31|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     31|          }                                                                   \
  |  |  |  |  |  |  487|     40|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      9|          break
  ------------------
  212|     34|    FU32TLV(fuzz, TLV_TYPE_WS_OPTIONS, CURLOPT_WS_OPTIONS);
  ------------------
  |  |  519|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 13, False: 77.0k]
  |  |  ------------------
  |  |  520|     13|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 11]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     13|          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
  ------------------
  213|    117|    FU32TLV(fuzz, TLV_TYPE_CONNECT_ONLY, CURLOPT_CONNECT_ONLY);
  ------------------
  |  |  519|     42|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 42, False: 77.0k]
  |  |  ------------------
  |  |  520|     42|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 38]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     42|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     38|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     38|        {                                                                     \
  |  |  |  |  |  |  491|     38|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 37]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     38|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     38|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     37|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     37|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     37|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     37|        {                                                                     \
  |  |  |  |  |  |  481|     37|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     37|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 33, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     37|          {                                                                   \
  |  |  |  |  |  |  484|     33|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     33|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     33|          }                                                                   \
  |  |  |  |  |  |  487|     37|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  214|     41|    FU32TLV(fuzz, TLV_TYPE_POST, CURLOPT_POST);
  ------------------
  |  |  519|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 16, False: 77.0k]
  |  |  ------------------
  |  |  520|     16|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 13]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     16|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     13|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     13|        {                                                                     \
  |  |  |  |  |  |  491|     13|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     13|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     13|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     12|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     12|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     12|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     12|        {                                                                     \
  |  |  |  |  |  |  481|     12|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     12|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     12|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     12|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     12|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     12|          break
  ------------------
  215|    297|    FU32TLV(fuzz, TLV_TYPE_PROXYTYPE, CURLOPT_PROXYTYPE);
  ------------------
  |  |  519|    104|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 104, False: 76.9k]
  |  |  ------------------
  |  |  520|    104|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 97]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|    104|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     97|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     97|        {                                                                     \
  |  |  |  |  |  |  491|     97|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 96]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     97|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     97|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     96|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     96|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     96|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     96|        {                                                                     \
  |  |  |  |  |  |  481|     96|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     96|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 35, False: 61]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     96|          {                                                                   \
  |  |  |  |  |  |  484|     35|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     35|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     35|          }                                                                   \
  |  |  |  |  |  |  487|     96|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     61|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     61|          break
  ------------------
  216|    152|    FU32TLV(fuzz, TLV_TYPE_PORT, CURLOPT_PORT);
  ------------------
  |  |  519|     53|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 53, False: 76.9k]
  |  |  ------------------
  |  |  520|     53|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 50]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     53|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     50|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     50|        {                                                                     \
  |  |  |  |  |  |  491|     50|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 49]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     50|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     50|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     49|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     49|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     49|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     49|        {                                                                     \
  |  |  |  |  |  |  481|     49|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     49|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 32, False: 17]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     49|          {                                                                   \
  |  |  |  |  |  |  484|     32|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     32|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     32|          }                                                                   \
  |  |  |  |  |  |  487|     49|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     17|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     17|          break
  ------------------
  217|    102|    FU32TLV(fuzz, TLV_TYPE_LOW_SPEED_LIMIT, CURLOPT_LOW_SPEED_LIMIT);
  ------------------
  |  |  519|     41|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 41, False: 77.0k]
  |  |  ------------------
  |  |  520|     41|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 10, False: 31]
  |  |  ------------------
  |  |  521|     10|            rc = 255;                                                         \
  |  |  522|     10|            goto EXIT_LABEL;                                                  \
  |  |  523|     10|          }                                                                   \
  |  |  524|     41|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     31|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     31|        {                                                                     \
  |  |  |  |  |  |  491|     31|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     31|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     31|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     30|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     30|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     30|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     30|        {                                                                     \
  |  |  |  |  |  |  481|     30|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     30|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     30|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     30|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     30|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     30|          break
  ------------------
  218|    151|    FU32TLV(fuzz, TLV_TYPE_LOW_SPEED_TIME, CURLOPT_LOW_SPEED_TIME);
  ------------------
  |  |  519|     52|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 52, False: 76.9k]
  |  |  ------------------
  |  |  520|     52|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 50]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     52|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     50|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     50|        {                                                                     \
  |  |  |  |  |  |  491|     50|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 49]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     50|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     50|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     49|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     49|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     49|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     49|        {                                                                     \
  |  |  |  |  |  |  481|     49|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     49|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 49]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     49|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     49|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     49|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     49|          break
  ------------------
  219|    203|    FU32TLV(fuzz, TLV_TYPE_RESUME_FROM, CURLOPT_RESUME_FROM);
  ------------------
  |  |  519|     70|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 70, False: 76.9k]
  |  |  ------------------
  |  |  520|     70|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 67]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     70|          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
  ------------------
  220|     24|    FU32TLV(fuzz, TLV_TYPE_TIMEVALUE, CURLOPT_TIMEVALUE);
  ------------------
  |  |  519|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 13, False: 77.0k]
  |  |  ------------------
  |  |  520|     13|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 6]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     13|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  221|     84|    FU32TLV(fuzz, TLV_TYPE_NOPROGRESS, CURLOPT_NOPROGRESS);
  ------------------
  |  |  519|     29|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 29, False: 77.0k]
  |  |  ------------------
  |  |  520|     29|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 28]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     29|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     28|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     28|        {                                                                     \
  |  |  |  |  |  |  491|     28|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 27]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     28|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     28|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     27|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     27|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     27|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     27|        {                                                                     \
  |  |  |  |  |  |  481|     27|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     27|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 27]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     27|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     27|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     27|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     27|          break
  ------------------
  222|     13|    FU32TLV(fuzz, TLV_TYPE_FAILONERROR, CURLOPT_FAILONERROR);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  223|     20|    FU32TLV(fuzz, TLV_TYPE_DIRLISTONLY, CURLOPT_DIRLISTONLY);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  224|     12|    FU32TLV(fuzz, TLV_TYPE_APPEND, CURLOPT_APPEND);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 77.0k]
  |  |  ------------------
  |  |  520|      7|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 3]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  225|     11|    FU32TLV(fuzz, TLV_TYPE_TRANSFERTEXT, CURLOPT_TRANSFERTEXT);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  226|     18|    FU32TLV(fuzz, TLV_TYPE_AUTOREFERER, CURLOPT_AUTOREFERER);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 77.0k]
  |  |  ------------------
  |  |  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|    196|    FU32TLV(fuzz, TLV_TYPE_PROXYPORT, CURLOPT_PROXYPORT);
  ------------------
  |  |  519|     67|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 67, False: 76.9k]
  |  |  ------------------
  |  |  520|     67|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 65]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     67|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     65|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     65|        {                                                                     \
  |  |  |  |  |  |  491|     65|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 64]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     65|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     65|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     64|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     64|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     64|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     64|        {                                                                     \
  |  |  |  |  |  |  481|     64|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     64|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 30, False: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     64|          {                                                                   \
  |  |  |  |  |  |  484|     30|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     30|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     30|          }                                                                   \
  |  |  |  |  |  |  487|     64|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     34|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     34|          break
  ------------------
  228|       |    // too easy for API misuse FU32TLV(fuzz, TLV_TYPE_POSTFIELDSIZE, CURLOPT_POSTFIELDSIZE);
  229|     19|    FU32TLV(fuzz, TLV_TYPE_HTTPPROXYTUNNEL, CURLOPT_HTTPPROXYTUNNEL);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 77.0k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 5]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  230|    108|    FU32TLV(fuzz, TLV_TYPE_SSL_VERIFYPEER, CURLOPT_SSL_VERIFYPEER);
  ------------------
  |  |  519|     41|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 41, False: 77.0k]
  |  |  ------------------
  |  |  520|     41|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 34]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     41|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     34|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     34|        {                                                                     \
  |  |  |  |  |  |  491|     34|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     34|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     34|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     33|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     33|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     33|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     33|        {                                                                     \
  |  |  |  |  |  |  481|     33|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     33|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     33|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     33|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     33|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     33|          break
  ------------------
  231|    171|    FU32TLV(fuzz, TLV_TYPE_MAXREDIRS, CURLOPT_MAXREDIRS);
  ------------------
  |  |  519|     60|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 60, False: 76.9k]
  |  |  ------------------
  |  |  520|     60|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 56]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     60|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     56|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     56|        {                                                                     \
  |  |  |  |  |  |  491|     56|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 55]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     56|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     56|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     55|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     55|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     55|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     55|        {                                                                     \
  |  |  |  |  |  |  481|     55|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     55|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 55]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     55|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     55|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     55|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     55|          break
  ------------------
  232|     16|    FU32TLV(fuzz, TLV_TYPE_FILETIME, CURLOPT_FILETIME);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  233|    180|    FU32TLV(fuzz, TLV_TYPE_MAXCONNECTS, CURLOPT_MAXCONNECTS);
  ------------------
  |  |  519|     63|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 63, False: 76.9k]
  |  |  ------------------
  |  |  520|     63|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 59]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     63|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     59|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     59|        {                                                                     \
  |  |  |  |  |  |  491|     59|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 58]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     59|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     59|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     58|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     58|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     58|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     58|        {                                                                     \
  |  |  |  |  |  |  481|     58|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     58|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 58]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     58|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     58|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     58|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     58|          break
  ------------------
  234|     19|    FU32TLV(fuzz, TLV_TYPE_FRESH_CONNECT, CURLOPT_FRESH_CONNECT);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 77.0k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 6]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  235|     31|    FU32TLV(fuzz, TLV_TYPE_FORBID_REUSE, CURLOPT_FORBID_REUSE);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 77.0k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 10]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     10|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     10|        {                                                                     \
  |  |  |  |  |  |  491|     10|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     10|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     10|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      9|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      9|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      9|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      9|        {                                                                     \
  |  |  |  |  |  |  481|      9|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      9|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      9|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      9|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      9|          break
  ------------------
  236|    333|    FU32TLV(fuzz, TLV_TYPE_CONNECTTIMEOUT, CURLOPT_CONNECTTIMEOUT);
  ------------------
  |  |  519|    116|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 116, False: 76.9k]
  |  |  ------------------
  |  |  520|    116|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 109]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|    116|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    109|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    109|        {                                                                     \
  |  |  |  |  |  |  491|    109|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 108]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    109|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    109|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    108|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    108|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    108|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    108|        {                                                                     \
  |  |  |  |  |  |  481|    108|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    108|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 108]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    108|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    108|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    108|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    108|          break
  ------------------
  237|     17|    FU32TLV(fuzz, TLV_TYPE_HTTPGET, CURLOPT_HTTPGET);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  238|     30|    FU32TLV(fuzz, TLV_TYPE_SSL_VERIFYHOST, CURLOPT_SSL_VERIFYHOST);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 77.0k]
  |  |  ------------------
  |  |  520|     11|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 10]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     11|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     10|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     10|        {                                                                     \
  |  |  |  |  |  |  491|     10|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     10|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     10|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      9|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      9|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      9|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      9|        {                                                                     \
  |  |  |  |  |  |  481|      9|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      9|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      9|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      9|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      9|          break
  ------------------
  239|     17|    FU32TLV(fuzz, TLV_TYPE_FTP_USE_EPSV, CURLOPT_FTP_USE_EPSV);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  240|     20|    FU32TLV(fuzz, TLV_TYPE_SSLENGINE_DEFAULT, CURLOPT_SSLENGINE_DEFAULT);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  241|    248|    FU32TLV(fuzz, TLV_TYPE_DNS_CACHE_TIMEOUT, CURLOPT_DNS_CACHE_TIMEOUT);
  ------------------
  |  |  519|     85|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 85, False: 76.9k]
  |  |  ------------------
  |  |  520|     85|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 82]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     85|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     82|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     82|        {                                                                     \
  |  |  |  |  |  |  491|     82|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 81]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     82|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     82|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     81|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     81|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     81|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     81|        {                                                                     \
  |  |  |  |  |  |  481|     81|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     81|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 81]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     81|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     81|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     81|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     81|          break
  ------------------
  242|     13|    FU32TLV(fuzz, TLV_TYPE_COOKIESESSION, CURLOPT_COOKIESESSION);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  243|    175|    FU32TLV(fuzz, TLV_TYPE_BUFFERSIZE, CURLOPT_BUFFERSIZE);
  ------------------
  |  |  519|     60|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 60, False: 76.9k]
  |  |  ------------------
  |  |  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: 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
  ------------------
  244|     57|    FU32TLV(fuzz, TLV_TYPE_NOSIGNAL, CURLOPT_NOSIGNAL);
  ------------------
  |  |  519|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 20, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  245|     26|    FU32TLV(fuzz, TLV_TYPE_UNRESTRICTED_AUTH, CURLOPT_UNRESTRICTED_AUTH);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  246|      9|    FU32TLV(fuzz, TLV_TYPE_FTP_USE_EPRT, CURLOPT_FTP_USE_EPRT);
  ------------------
  |  |  519|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 4, False: 77.0k]
  |  |  ------------------
  |  |  520|      4|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 3]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      4|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  247|     80|    FU32TLV(fuzz, TLV_TYPE_FTP_CREATE_MISSING_DIRS, CURLOPT_FTP_CREATE_MISSING_DIRS);
  ------------------
  |  |  519|     29|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 29, False: 77.0k]
  |  |  ------------------
  |  |  520|     29|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 26]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     29|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     26|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     26|        {                                                                     \
  |  |  |  |  |  |  491|     26|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 25]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     26|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     26|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     25|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     25|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     25|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     25|        {                                                                     \
  |  |  |  |  |  |  481|     25|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     25|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 21, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     25|          {                                                                   \
  |  |  |  |  |  |  484|     21|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     21|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     21|          }                                                                   \
  |  |  |  |  |  |  487|     25|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  248|     91|    FU32TLV(fuzz, TLV_TYPE_MAXFILESIZE, CURLOPT_MAXFILESIZE);
  ------------------
  |  |  519|     32|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 32, False: 77.0k]
  |  |  ------------------
  |  |  520|     32|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 30]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     32|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     30|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     30|        {                                                                     \
  |  |  |  |  |  |  491|     30|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 29]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     30|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     30|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     29|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     29|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     29|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     29|        {                                                                     \
  |  |  |  |  |  |  481|     29|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     29|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 29]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     29|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     29|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     29|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     29|          break
  ------------------
  249|     17|    FU32TLV(fuzz, TLV_TYPE_TCP_NODELAY, CURLOPT_TCP_NODELAY);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  250|     17|    FU32TLV(fuzz, TLV_TYPE_IGNORE_CONTENT_LENGTH, CURLOPT_IGNORE_CONTENT_LENGTH);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 77.0k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 9, False: 3]
  |  |  ------------------
  |  |  521|      9|            rc = 255;                                                         \
  |  |  522|      9|            goto EXIT_LABEL;                                                  \
  |  |  523|      9|          }                                                                   \
  |  |  524|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  251|     17|    FU32TLV(fuzz, TLV_TYPE_FTP_SKIP_PASV_IP, CURLOPT_FTP_SKIP_PASV_IP);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 77.0k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 9, False: 3]
  |  |  ------------------
  |  |  521|      9|            rc = 255;                                                         \
  |  |  522|      9|            goto EXIT_LABEL;                                                  \
  |  |  523|      9|          }                                                                   \
  |  |  524|     12|          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|    144|    FU32TLV(fuzz, TLV_TYPE_LOCALPORT, CURLOPT_LOCALPORT);
  ------------------
  |  |  519|     49|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 49, False: 76.9k]
  |  |  ------------------
  |  |  520|     49|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 48]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     49|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     48|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     48|        {                                                                     \
  |  |  |  |  |  |  491|     48|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     48|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     48|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     47|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     47|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     47|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     47|        {                                                                     \
  |  |  |  |  |  |  481|     47|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     47|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 15, False: 32]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     47|          {                                                                   \
  |  |  |  |  |  |  484|     15|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     15|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     15|          }                                                                   \
  |  |  |  |  |  |  487|     47|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     32|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     32|          break
  ------------------
  253|    199|    FU32TLV(fuzz, TLV_TYPE_LOCALPORTRANGE, CURLOPT_LOCALPORTRANGE);
  ------------------
  |  |  519|     68|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 68, False: 76.9k]
  |  |  ------------------
  |  |  520|     68|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 66]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     68|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     66|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     66|        {                                                                     \
  |  |  |  |  |  |  491|     66|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 65]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     66|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     66|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     65|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     65|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     65|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     65|        {                                                                     \
  |  |  |  |  |  |  481|     65|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     65|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 31, False: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     65|          {                                                                   \
  |  |  |  |  |  |  484|     31|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     31|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     31|          }                                                                   \
  |  |  |  |  |  |  487|     65|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     34|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     34|          break
  ------------------
  254|     13|    FU32TLV(fuzz, TLV_TYPE_SSL_SESSIONID_CACHE, CURLOPT_SSL_SESSIONID_CACHE);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  255|    129|    FU32TLV(fuzz, TLV_TYPE_FTP_SSL_CCC, CURLOPT_FTP_SSL_CCC);
  ------------------
  |  |  519|     48|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 48, False: 76.9k]
  |  |  ------------------
  |  |  520|     48|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 41]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     48|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     41|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     41|        {                                                                     \
  |  |  |  |  |  |  491|     41|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 40]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     41|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     41|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     40|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     40|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     40|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     40|        {                                                                     \
  |  |  |  |  |  |  481|     40|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     40|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 35, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     40|          {                                                                   \
  |  |  |  |  |  |  484|     35|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     35|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     35|          }                                                                   \
  |  |  |  |  |  |  487|     40|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  256|    330|    FU32TLV(fuzz, TLV_TYPE_CONNECTTIMEOUT_MS, CURLOPT_CONNECTTIMEOUT_MS);
  ------------------
  |  |  519|    111|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 111, False: 76.9k]
  |  |  ------------------
  |  |  520|    111|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 110]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|    111|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    110|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    110|        {                                                                     \
  |  |  |  |  |  |  491|    110|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 109]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    110|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    110|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    109|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    109|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    109|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    109|        {                                                                     \
  |  |  |  |  |  |  481|    109|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    109|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 109]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    109|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    109|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    109|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    109|          break
  ------------------
  257|     13|    FU32TLV(fuzz, TLV_TYPE_HTTP_TRANSFER_DECODING, CURLOPT_HTTP_TRANSFER_DECODING);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 77.0k]
  |  |  ------------------
  |  |  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|     12|    FU32TLV(fuzz, TLV_TYPE_HTTP_CONTENT_DECODING, CURLOPT_HTTP_CONTENT_DECODING);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  259|    135|    FU32TLV(fuzz, TLV_TYPE_NEW_FILE_PERMS, CURLOPT_NEW_FILE_PERMS);
  ------------------
  |  |  519|     48|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 48, False: 76.9k]
  |  |  ------------------
  |  |  520|     48|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 44]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     48|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     44|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     44|        {                                                                     \
  |  |  |  |  |  |  491|     44|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 43]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     44|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     44|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     43|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     43|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     43|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     43|        {                                                                     \
  |  |  |  |  |  |  481|     43|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     43|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 38, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     43|          {                                                                   \
  |  |  |  |  |  |  484|     38|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     38|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     38|          }                                                                   \
  |  |  |  |  |  |  487|     43|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  260|      4|    FU32TLV(fuzz, TLV_TYPE_NEW_DIRECTORY_PERMS, CURLOPT_NEW_DIRECTORY_PERMS);
  ------------------
  |  |  519|      2|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 2, False: 77.0k]
  |  |  ------------------
  |  |  520|      2|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 1]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      2|          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|     22|    FU32TLV(fuzz, TLV_TYPE_PROXY_TRANSFER_MODE, CURLOPT_PROXY_TRANSFER_MODE);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  262|    420|    FU32TLV(fuzz, TLV_TYPE_ADDRESS_SCOPE, CURLOPT_ADDRESS_SCOPE);
  ------------------
  |  |  519|    143|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 143, False: 76.8k]
  |  |  ------------------
  |  |  520|    143|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 139]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|    143|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    139|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    139|        {                                                                     \
  |  |  |  |  |  |  491|    139|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 138]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    139|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    139|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    138|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    138|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    138|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    138|        {                                                                     \
  |  |  |  |  |  |  481|    138|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    138|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 138]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    138|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    138|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    138|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    138|          break
  ------------------
  263|     20|    FU32TLV(fuzz, TLV_TYPE_CERTINFO, CURLOPT_CERTINFO);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  264|    172|    FU32TLV(fuzz, TLV_TYPE_TFTP_BLKSIZE, CURLOPT_TFTP_BLKSIZE);
  ------------------
  |  |  519|     59|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 59, False: 76.9k]
  |  |  ------------------
  |  |  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: 77.0k]
  |  |  ------------------
  |  |  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|     19|    FU32TLV(fuzz, TLV_TYPE_FTP_USE_PRET, CURLOPT_FTP_USE_PRET);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 77.0k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 4]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  267|    194|    FU32TLV(fuzz, TLV_TYPE_RTSP_SERVER_CSEQ, CURLOPT_RTSP_SERVER_CSEQ);
  ------------------
  |  |  519|     69|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 69, False: 76.9k]
  |  |  ------------------
  |  |  520|     69|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 63]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     69|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     63|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     63|        {                                                                     \
  |  |  |  |  |  |  491|     63|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 62]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     63|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     63|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     62|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     62|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     62|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     62|        {                                                                     \
  |  |  |  |  |  |  481|     62|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     62|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 62]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     62|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     62|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     62|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     62|          break
  ------------------
  268|     32|    FU32TLV(fuzz, TLV_TYPE_TRANSFER_ENCODING, CURLOPT_TRANSFER_ENCODING);
  ------------------
  |  |  519|     15|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 15, False: 77.0k]
  |  |  ------------------
  |  |  520|     15|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 9]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     15|          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
  ------------------
  269|    103|    FU32TLV(fuzz, TLV_TYPE_ACCEPTTIMEOUT_MS, CURLOPT_ACCEPTTIMEOUT_MS);
  ------------------
  |  |  519|     36|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 36, False: 77.0k]
  |  |  ------------------
  |  |  520|     36|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 34]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     36|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     34|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     34|        {                                                                     \
  |  |  |  |  |  |  491|     34|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     34|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     34|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     33|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     33|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     33|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     33|        {                                                                     \
  |  |  |  |  |  |  481|     33|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     33|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     33|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     33|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     33|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     33|          break
  ------------------
  270|    145|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPALIVE, CURLOPT_TCP_KEEPALIVE);
  ------------------
  |  |  519|     50|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 50, False: 76.9k]
  |  |  ------------------
  |  |  520|     50|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 48]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     50|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     48|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     48|        {                                                                     \
  |  |  |  |  |  |  491|     48|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     48|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     48|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     47|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     47|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     47|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     47|        {                                                                     \
  |  |  |  |  |  |  481|     47|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     47|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     47|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     47|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     47|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     47|          break
  ------------------
  271|    199|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPIDLE, CURLOPT_TCP_KEEPIDLE);
  ------------------
  |  |  519|     68|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 68, False: 76.9k]
  |  |  ------------------
  |  |  520|     68|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 66]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     68|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     66|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     66|        {                                                                     \
  |  |  |  |  |  |  491|     66|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 65]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     66|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     66|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     65|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     65|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     65|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     65|        {                                                                     \
  |  |  |  |  |  |  481|     65|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     65|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 65]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     65|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     65|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     65|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     65|          break
  ------------------
  272|    258|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPINTVL, CURLOPT_TCP_KEEPINTVL);
  ------------------
  |  |  519|     87|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 87, False: 76.9k]
  |  |  ------------------
  |  |  520|     87|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 86]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     87|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     86|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     86|        {                                                                     \
  |  |  |  |  |  |  491|     86|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 85]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     86|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     86|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     85|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     85|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     85|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     85|        {                                                                     \
  |  |  |  |  |  |  481|     85|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     85|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 85]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     85|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     85|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     85|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     85|          break
  ------------------
  273|     21|    FU32TLV(fuzz, TLV_TYPE_SASL_IR, CURLOPT_SASL_IR);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 77.0k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 6]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  274|    214|    FU32TLV(fuzz, TLV_TYPE_SSL_ENABLE_ALPN, CURLOPT_SSL_ENABLE_ALPN);
  ------------------
  |  |  519|     73|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 73, False: 76.9k]
  |  |  ------------------
  |  |  520|     73|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 71]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     73|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     71|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     71|        {                                                                     \
  |  |  |  |  |  |  491|     71|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 70]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     71|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     71|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     70|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     70|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     70|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     70|        {                                                                     \
  |  |  |  |  |  |  481|     70|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     70|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 70]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     70|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     70|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     70|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     70|          break
  ------------------
  275|    164|    FU32TLV(fuzz, TLV_TYPE_EXPECT_100_TIMEOUT_MS, CURLOPT_EXPECT_100_TIMEOUT_MS);
  ------------------
  |  |  519|     59|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 59, False: 76.9k]
  |  |  ------------------
  |  |  520|     59|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 53]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     59|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     53|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     53|        {                                                                     \
  |  |  |  |  |  |  491|     53|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 52]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     53|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     53|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     52|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     52|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     52|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     52|        {                                                                     \
  |  |  |  |  |  |  481|     52|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     52|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 52]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     52|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     52|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     52|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     52|          break
  ------------------
  276|     25|    FU32TLV(fuzz, TLV_TYPE_SSL_VERIFYSTATUS, CURLOPT_SSL_VERIFYSTATUS);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 77.0k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 8]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      8|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      8|        {                                                                     \
  |  |  |  |  |  |  491|      8|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      8|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      8|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      7|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      7|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      7|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      7|        {                                                                     \
  |  |  |  |  |  |  481|      7|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      7|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      7|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      7|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      7|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      7|          break
  ------------------
  277|      4|    FU32TLV(fuzz, TLV_TYPE_SSL_FALSESTART, CURLOPT_SSL_FALSESTART);
  ------------------
  |  |  519|      2|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 2, False: 77.0k]
  |  |  ------------------
  |  |  520|      2|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 1]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      2|          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|     24|    FU32TLV(fuzz, TLV_TYPE_PATH_AS_IS, CURLOPT_PATH_AS_IS);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 77.0k]
  |  |  ------------------
  |  |  520|     11|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 7]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     11|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      6|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  279|     15|    FU32TLV(fuzz, TLV_TYPE_PIPEWAIT, CURLOPT_PIPEWAIT);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 77.0k]
  |  |  ------------------
  |  |  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|    126|    FU32TLV(fuzz, TLV_TYPE_STREAM_WEIGHT, CURLOPT_STREAM_WEIGHT);
  ------------------
  |  |  519|     49|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 49, False: 76.9k]
  |  |  ------------------
  |  |  520|     49|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 10, False: 39]
  |  |  ------------------
  |  |  521|     10|            rc = 255;                                                         \
  |  |  522|     10|            goto EXIT_LABEL;                                                  \
  |  |  523|     10|          }                                                                   \
  |  |  524|     49|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     39|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     39|        {                                                                     \
  |  |  |  |  |  |  491|     39|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 38]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     39|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     39|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     38|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     38|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     38|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     38|        {                                                                     \
  |  |  |  |  |  |  481|     38|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     38|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 38]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     38|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     38|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     38|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     38|          break
  ------------------
  281|     11|    FU32TLV(fuzz, TLV_TYPE_TFTP_NO_OPTIONS, CURLOPT_TFTP_NO_OPTIONS);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  282|     19|    FU32TLV(fuzz, TLV_TYPE_TCP_FASTOPEN, CURLOPT_TCP_FASTOPEN);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  283|     15|    FU32TLV(fuzz, TLV_TYPE_KEEP_SENDING_ON_ERROR, CURLOPT_KEEP_SENDING_ON_ERROR);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  284|     32|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSL_VERIFYPEER, CURLOPT_PROXY_SSL_VERIFYPEER);
  ------------------
  |  |  519|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 13, False: 77.0k]
  |  |  ------------------
  |  |  520|     13|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 10]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     13|          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
  ------------------
  285|     29|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSL_VERIFYHOST, CURLOPT_PROXY_SSL_VERIFYHOST);
  ------------------
  |  |  519|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 14, False: 77.0k]
  |  |  ------------------
  |  |  520|     14|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 8]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     14|          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
  ------------------
  286|     16|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSL_OPTIONS, CURLOPT_PROXY_SSL_OPTIONS);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 77.0k]
  |  |  ------------------
  |  |  520|      7|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 5]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  287|     31|    FU32TLV(fuzz, TLV_TYPE_SUPPRESS_CONNECT_HEADERS, CURLOPT_SUPPRESS_CONNECT_HEADERS);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 77.0k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 10]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     12|          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
  ------------------
  288|     85|    FU32TLV(fuzz, TLV_TYPE_SOCKS5_AUTH, CURLOPT_SOCKS5_AUTH);
  ------------------
  |  |  519|     30|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 30, False: 77.0k]
  |  |  ------------------
  |  |  520|     30|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 28]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     30|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     28|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     28|        {                                                                     \
  |  |  |  |  |  |  491|     28|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 27]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     28|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     28|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     27|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     27|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     27|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     27|        {                                                                     \
  |  |  |  |  |  |  481|     27|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     27|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 25, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     27|          {                                                                   \
  |  |  |  |  |  |  484|     25|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     25|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     25|          }                                                                   \
  |  |  |  |  |  |  487|     27|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  289|      5|    FU32TLV(fuzz, TLV_TYPE_SSH_COMPRESSION, CURLOPT_SSH_COMPRESSION);
  ------------------
  |  |  519|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 3, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  290|     43|    FU32TLV(fuzz, TLV_TYPE_HAPPY_EYEBALLS_TIMEOUT_MS, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS);
  ------------------
  |  |  519|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 16, False: 77.0k]
  |  |  ------------------
  |  |  520|     16|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 14]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     16|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     14|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     14|        {                                                                     \
  |  |  |  |  |  |  491|     14|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     14|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     14|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     13|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     13|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     13|        {                                                                     \
  |  |  |  |  |  |  481|     13|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     13|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 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
  ------------------
  291|     12|    FU32TLV(fuzz, TLV_TYPE_HAPROXYPROTOCOL, CURLOPT_HAPROXYPROTOCOL);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  292|     43|    FU32TLV(fuzz, TLV_TYPE_DNS_SHUFFLE_ADDRESSES, CURLOPT_DNS_SHUFFLE_ADDRESSES);
  ------------------
  |  |  519|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 16, False: 77.0k]
  |  |  ------------------
  |  |  520|     16|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 14]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     16|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     14|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     14|        {                                                                     \
  |  |  |  |  |  |  491|     14|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     14|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     14|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     13|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     13|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     13|        {                                                                     \
  |  |  |  |  |  |  481|     13|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     13|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 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
  ------------------
  293|     31|    FU32TLV(fuzz, TLV_TYPE_DISALLOW_USERNAME_IN_URL, CURLOPT_DISALLOW_USERNAME_IN_URL);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 77.0k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 10]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     12|          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
  ------------------
  294|    198|    FU32TLV(fuzz, TLV_TYPE_UPLOAD_BUFFERSIZE, CURLOPT_UPLOAD_BUFFERSIZE);
  ------------------
  |  |  519|     71|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 71, False: 76.9k]
  |  |  ------------------
  |  |  520|     71|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 64]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     71|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     64|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     64|        {                                                                     \
  |  |  |  |  |  |  491|     64|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 63]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     64|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     64|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     63|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     63|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     63|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     63|        {                                                                     \
  |  |  |  |  |  |  481|     63|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     63|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 63]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     63|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     63|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     63|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     63|          break
  ------------------
  295|     82|    FU32TLV(fuzz, TLV_TYPE_UPKEEP_INTERVAL_MS, CURLOPT_UPKEEP_INTERVAL_MS);
  ------------------
  |  |  519|     29|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 29, False: 77.0k]
  |  |  ------------------
  |  |  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|     11|    FU32TLV(fuzz, TLV_TYPE_HTTP09_ALLOWED, CURLOPT_HTTP09_ALLOWED);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  297|    122|    FU32TLV(fuzz, TLV_TYPE_ALTSVC_CTRL, CURLOPT_ALTSVC_CTRL);
  ------------------
  |  |  519|     45|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 45, False: 76.9k]
  |  |  ------------------
  |  |  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: 1, False: 37]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     38|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|     38|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     37|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     37|          break
  ------------------
  298|    151|    FU32TLV(fuzz, TLV_TYPE_MAXAGE_CONN, CURLOPT_MAXAGE_CONN);
  ------------------
  |  |  519|     54|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 54, False: 76.9k]
  |  |  ------------------
  |  |  520|     54|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 49]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     54|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     49|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     49|        {                                                                     \
  |  |  |  |  |  |  491|     49|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 48]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     49|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     49|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     48|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     48|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     48|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     48|        {                                                                     \
  |  |  |  |  |  |  481|     48|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     48|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 48]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     48|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     48|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     48|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     48|          break
  ------------------
  299|     16|    FU32TLV(fuzz, TLV_TYPE_MAIL_RCPT_ALLOWFAILS, CURLOPT_MAIL_RCPT_ALLOWFAILS);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  300|     30|    FU32TLV(fuzz, TLV_TYPE_HSTS_CTRL, CURLOPT_HSTS_CTRL);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 77.0k]
  |  |  ------------------
  |  |  520|     11|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 10]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     11|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     10|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     10|        {                                                                     \
  |  |  |  |  |  |  491|     10|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     10|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     10|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      9|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      9|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      9|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      9|        {                                                                     \
  |  |  |  |  |  |  481|      9|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      9|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      9|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      9|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      9|          break
  ------------------
  301|     11|    FU32TLV(fuzz, TLV_TYPE_DOH_SSL_VERIFYPEER, CURLOPT_DOH_SSL_VERIFYPEER);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  302|     19|    FU32TLV(fuzz, TLV_TYPE_DOH_SSL_VERIFYHOST, CURLOPT_DOH_SSL_VERIFYHOST);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 77.0k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 5]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  303|     18|    FU32TLV(fuzz, TLV_TYPE_DOH_SSL_VERIFYSTATUS, CURLOPT_DOH_SSL_VERIFYSTATUS);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  304|    148|    FU32TLV(fuzz, TLV_TYPE_MAXLIFETIME_CONN, CURLOPT_MAXLIFETIME_CONN);
  ------------------
  |  |  519|     59|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 59, False: 76.9k]
  |  |  ------------------
  |  |  520|     59|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 14, False: 45]
  |  |  ------------------
  |  |  521|     14|            rc = 255;                                                         \
  |  |  522|     14|            goto EXIT_LABEL;                                                  \
  |  |  523|     14|          }                                                                   \
  |  |  524|     59|          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: 0, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     44|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     44|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     44|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     44|          break
  ------------------
  305|     35|    FU32TLV(fuzz, TLV_TYPE_MIME_OPTIONS, CURLOPT_MIME_OPTIONS);
  ------------------
  |  |  519|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 20, False: 77.0k]
  |  |  ------------------
  |  |  520|     20|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 12, False: 8]
  |  |  ------------------
  |  |  521|     12|            rc = 255;                                                         \
  |  |  522|     12|            goto EXIT_LABEL;                                                  \
  |  |  523|     12|          }                                                                   \
  |  |  524|     20|          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
  ------------------
  306|    172|    FU32TLV(fuzz, TLV_TYPE_CA_CACHE_TIMEOUT, CURLOPT_CA_CACHE_TIMEOUT);
  ------------------
  |  |  519|     59|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 59, False: 76.9k]
  |  |  ------------------
  |  |  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
  ------------------
  307|     44|    FU32TLV(fuzz, TLV_TYPE_QUICK_EXIT, CURLOPT_QUICK_EXIT);
  ------------------
  |  |  519|     19|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 19, False: 77.0k]
  |  |  ------------------
  |  |  520|     19|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 13]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     19|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     13|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     13|        {                                                                     \
  |  |  |  |  |  |  491|     13|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     13|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     13|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     12|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     12|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     12|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     12|        {                                                                     \
  |  |  |  |  |  |  481|     12|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     12|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     12|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     12|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     12|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     12|          break
  ------------------
  308|     89|    FU32TLV(fuzz, TLV_TYPE_SERVER_RESPONSE_TIMEOUT_MS, CURLOPT_SERVER_RESPONSE_TIMEOUT_MS);
  ------------------
  |  |  519|     32|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 32, False: 77.0k]
  |  |  ------------------
  |  |  520|     32|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 29]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     32|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     29|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     29|        {                                                                     \
  |  |  |  |  |  |  491|     29|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 28]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     29|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     29|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     28|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     28|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     28|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     28|        {                                                                     \
  |  |  |  |  |  |  481|     28|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     28|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 28]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     28|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     28|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     28|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     28|          break
  ------------------
  309|    176|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPCNT, CURLOPT_TCP_KEEPCNT);
  ------------------
  |  |  519|     65|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 65, False: 76.9k]
  |  |  ------------------
  |  |  520|     65|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 9, False: 56]
  |  |  ------------------
  |  |  521|      9|            rc = 255;                                                         \
  |  |  522|      9|            goto EXIT_LABEL;                                                  \
  |  |  523|      9|          }                                                                   \
  |  |  524|     65|          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
  ------------------
  310|    345|    FU32TLV(fuzz, TLV_TYPE_SSLVERSION, CURLOPT_SSLVERSION);
  ------------------
  |  |  519|    120|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 120, False: 76.9k]
  |  |  ------------------
  |  |  520|    120|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 113]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|    120|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    113|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    113|        {                                                                     \
  |  |  |  |  |  |  491|    113|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 112]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    113|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    113|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    112|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    112|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    112|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    112|        {                                                                     \
  |  |  |  |  |  |  481|    112|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    112|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 19, False: 93]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    112|          {                                                                   \
  |  |  |  |  |  |  484|     19|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     19|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     19|          }                                                                   \
  |  |  |  |  |  |  487|    112|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     93|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     93|          break
  ------------------
  311|    144|    FU32TLV(fuzz, TLV_TYPE_TIMECONDITION, CURLOPT_TIMECONDITION);
  ------------------
  |  |  519|     49|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 49, False: 76.9k]
  |  |  ------------------
  |  |  520|     49|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 48]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     49|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     48|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     48|        {                                                                     \
  |  |  |  |  |  |  491|     48|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     48|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     48|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     47|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     47|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     47|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     47|        {                                                                     \
  |  |  |  |  |  |  481|     47|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     47|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 39, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     47|          {                                                                   \
  |  |  |  |  |  |  484|     39|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     39|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     39|          }                                                                   \
  |  |  |  |  |  |  487|     47|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      8|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      8|          break
  ------------------
  312|    219|    FU32TLV(fuzz, TLV_TYPE_PROXYAUTH, CURLOPT_PROXYAUTH);
  ------------------
  |  |  519|     74|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 74, False: 76.9k]
  |  |  ------------------
  |  |  520|     74|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 73]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     74|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     73|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     73|        {                                                                     \
  |  |  |  |  |  |  491|     73|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 72]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     73|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     73|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     72|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     72|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     72|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     72|        {                                                                     \
  |  |  |  |  |  |  481|     72|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     72|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 71]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     72|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|     72|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     71|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     71|          break
  ------------------
  313|    133|    FU32TLV(fuzz, TLV_TYPE_IPRESOLVE, CURLOPT_IPRESOLVE);
  ------------------
  |  |  519|     46|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 46, False: 76.9k]
  |  |  ------------------
  |  |  520|     46|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 44]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     46|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     44|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     44|        {                                                                     \
  |  |  |  |  |  |  491|     44|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 43]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     44|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     44|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     43|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     43|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     43|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     43|        {                                                                     \
  |  |  |  |  |  |  481|     43|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     43|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 31, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     43|          {                                                                   \
  |  |  |  |  |  |  484|     31|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     31|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     31|          }                                                                   \
  |  |  |  |  |  |  487|     43|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     12|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     12|          break
  ------------------
  314|    128|    FU32TLV(fuzz, TLV_TYPE_USE_SSL, CURLOPT_USE_SSL);
  ------------------
  |  |  519|     47|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 47, False: 76.9k]
  |  |  ------------------
  |  |  520|     47|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 41]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     47|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     41|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     41|        {                                                                     \
  |  |  |  |  |  |  491|     41|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 40]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     41|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     41|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     40|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     40|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     40|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     40|        {                                                                     \
  |  |  |  |  |  |  481|     40|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     40|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 36, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     40|          {                                                                   \
  |  |  |  |  |  |  484|     36|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     36|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     36|          }                                                                   \
  |  |  |  |  |  |  487|     40|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  315|    116|    FU32TLV(fuzz, TLV_TYPE_FTPSSLAUTH, CURLOPT_FTPSSLAUTH);
  ------------------
  |  |  519|     43|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 43, False: 76.9k]
  |  |  ------------------
  |  |  520|     43|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 37]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     43|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     37|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     37|        {                                                                     \
  |  |  |  |  |  |  491|     37|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 36]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     37|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     37|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     36|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     36|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     36|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     36|        {                                                                     \
  |  |  |  |  |  |  481|     36|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     36|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 33, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     36|          {                                                                   \
  |  |  |  |  |  |  484|     33|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     33|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     33|          }                                                                   \
  |  |  |  |  |  |  487|     36|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  316|    126|    FU32TLV(fuzz, TLV_TYPE_FTP_FILEMETHOD, CURLOPT_FTP_FILEMETHOD);
  ------------------
  |  |  519|     47|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 47, False: 76.9k]
  |  |  ------------------
  |  |  520|     47|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 40]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     47|          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: 37, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     39|          {                                                                   \
  |  |  |  |  |  |  484|     37|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     37|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     37|          }                                                                   \
  |  |  |  |  |  |  487|     39|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  317|      8|    FU32TLV(fuzz, TLV_TYPE_SSH_AUTH_TYPES, CURLOPT_SSH_AUTH_TYPES);
  ------------------
  |  |  519|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 4, False: 77.0k]
  |  |  ------------------
  |  |  520|      4|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 2]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      4|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      2|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      2|        {                                                                     \
  |  |  |  |  |  |  491|      2|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      2|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      2|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 2, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      2|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      2|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  318|     92|    FU32TLV(fuzz, TLV_TYPE_POSTREDIR, CURLOPT_POSTREDIR);
  ------------------
  |  |  519|     33|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 33, False: 77.0k]
  |  |  ------------------
  |  |  520|     33|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 30]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     33|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     30|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     30|        {                                                                     \
  |  |  |  |  |  |  491|     30|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 29]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     30|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     30|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     29|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     29|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     29|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     29|        {                                                                     \
  |  |  |  |  |  |  481|     29|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     29|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 29]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     29|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     29|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     29|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     29|          break
  ------------------
  319|      5|    FU32TLV(fuzz, TLV_TYPE_GSSAPI_DELEGATION, CURLOPT_GSSAPI_DELEGATION);
  ------------------
  |  |  519|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 3, False: 77.0k]
  |  |  ------------------
  |  |  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|     19|    FU32TLV(fuzz, TLV_TYPE_SSL_OPTIONS, CURLOPT_SSL_OPTIONS);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 77.0k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 5]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  321|    646|    FU32TLV(fuzz, TLV_TYPE_HEADEROPT, CURLOPT_HEADEROPT);
  ------------------
  |  |  519|    217|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 217, False: 76.8k]
  |  |  ------------------
  |  |  520|    217|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 215]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|    217|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    215|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    215|        {                                                                     \
  |  |  |  |  |  |  491|    215|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 214]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    215|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    215|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    214|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    214|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    214|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    214|        {                                                                     \
  |  |  |  |  |  |  481|    214|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    214|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 214]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    214|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    214|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    214|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    214|          break
  ------------------
  322|     68|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSLVERSION, CURLOPT_PROXY_SSLVERSION);
  ------------------
  |  |  519|     25|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 25, False: 77.0k]
  |  |  ------------------
  |  |  520|     25|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 22]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     25|          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: 13, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     21|          {                                                                   \
  |  |  |  |  |  |  484|     13|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     13|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     13|          }                                                                   \
  |  |  |  |  |  |  487|     21|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      8|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      8|          break
  ------------------
  323|    194|    FU32TLV(fuzz, TLV_TYPE_RESUME_FROM_LARGE, CURLOPT_RESUME_FROM_LARGE);
  ------------------
  |  |  519|     67|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 67, False: 76.9k]
  |  |  ------------------
  |  |  520|     67|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 64]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     67|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     64|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     64|        {                                                                     \
  |  |  |  |  |  |  491|     64|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 63]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     64|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     64|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     63|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     63|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     63|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     63|        {                                                                     \
  |  |  |  |  |  |  481|     63|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     63|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 63]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     63|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     63|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     63|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     63|          break
  ------------------
  324|    120|    FU32TLV(fuzz, TLV_TYPE_MAXFILESIZE_LARGE, CURLOPT_MAXFILESIZE_LARGE);
  ------------------
  |  |  519|     43|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 43, False: 76.9k]
  |  |  ------------------
  |  |  520|     43|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 39]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     43|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     39|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     39|        {                                                                     \
  |  |  |  |  |  |  491|     39|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 38]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     39|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     39|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     38|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     38|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     38|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     38|        {                                                                     \
  |  |  |  |  |  |  481|     38|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     38|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 38]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     38|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     38|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     38|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     38|          break
  ------------------
  325|       |    // too easy for API misuse FU32TLV(fuzz, TLV_TYPE_POSTFIELDSIZE_LARGE, CURLOPT_POSTFIELDSIZE_LARGE);
  326|    247|    FU32TLV(fuzz, TLV_TYPE_MAX_SEND_SPEED_LARGE, CURLOPT_MAX_SEND_SPEED_LARGE);
  ------------------
  |  |  519|     84|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 84, False: 76.9k]
  |  |  ------------------
  |  |  520|     84|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 82]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     84|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     82|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     82|        {                                                                     \
  |  |  |  |  |  |  491|     82|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 81]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     82|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     82|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     81|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     81|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     81|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     81|        {                                                                     \
  |  |  |  |  |  |  481|     81|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     81|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 81]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     81|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     81|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     81|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     81|          break
  ------------------
  327|    216|    FU32TLV(fuzz, TLV_TYPE_MAX_RECV_SPEED_LARGE, CURLOPT_MAX_RECV_SPEED_LARGE);
  ------------------
  |  |  519|     79|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 79, False: 76.9k]
  |  |  ------------------
  |  |  520|     79|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 10, False: 69]
  |  |  ------------------
  |  |  521|     10|            rc = 255;                                                         \
  |  |  522|     10|            goto EXIT_LABEL;                                                  \
  |  |  523|     10|          }                                                                   \
  |  |  524|     79|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     69|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     69|        {                                                                     \
  |  |  |  |  |  |  491|     69|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 68]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     69|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     69|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     68|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     68|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     68|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     68|        {                                                                     \
  |  |  |  |  |  |  481|     68|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     68|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 68]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     68|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     68|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     68|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     68|          break
  ------------------
  328|     15|    FU32TLV(fuzz, TLV_TYPE_TIMEVALUE_LARGE, CURLOPT_TIMEVALUE_LARGE);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  329|       |
  330|       |    /* Define a set of singleton TLVs - they can only have their value set once
  331|       |       and all follow the same pattern. */
  332|  13.7k|    FSINGLETONTLV(fuzz, TLV_TYPE_URL, CURLOPT_URL);
  ------------------
  |  |  506|  6.89k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 6.89k, False: 70.1k]
  |  |  ------------------
  |  |  507|  6.89k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  6.89k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  6.89k|        {                                                                     \
  |  |  |  |  |  |  491|  6.89k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  6.89k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  6.89k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  6.89k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  6.89k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  6.89k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  6.89k|        {                                                                     \
  |  |  |  |  |  |  481|  6.89k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  6.89k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  6.89k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  6.89k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  6.89k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  6.89k|          break
  ------------------
  333|    731|    FSINGLETONTLV(fuzz, TLV_TYPE_DOH_URL, CURLOPT_DOH_URL);
  ------------------
  |  |  506|    366|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 366, False: 76.6k]
  |  |  ------------------
  |  |  507|    366|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    366|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    366|        {                                                                     \
  |  |  |  |  |  |  491|    366|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 365]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    366|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    366|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    365|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    365|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    365|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    365|        {                                                                     \
  |  |  |  |  |  |  481|    365|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    365|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 365]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    365|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    365|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    365|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    365|          break
  ------------------
  334|     53|    FSINGLETONTLV(fuzz, TLV_TYPE_USERNAME, CURLOPT_USERNAME);
  ------------------
  |  |  506|     27|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 27, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  335|    217|    FSINGLETONTLV(fuzz, TLV_TYPE_PASSWORD, CURLOPT_PASSWORD);
  ------------------
  |  |  506|    109|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 109, False: 76.9k]
  |  |  ------------------
  |  |  507|    109|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    109|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    109|        {                                                                     \
  |  |  |  |  |  |  491|    109|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 108]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    109|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    109|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    108|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    108|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    108|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    108|        {                                                                     \
  |  |  |  |  |  |  481|    108|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    108|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 108]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    108|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    108|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    108|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    108|          break
  ------------------
  336|     47|    FSINGLETONTLV(fuzz, TLV_TYPE_COOKIE, CURLOPT_COOKIE);
  ------------------
  |  |  506|     24|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 24, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  337|     41|    FSINGLETONTLV(fuzz, TLV_TYPE_RANGE, CURLOPT_RANGE);
  ------------------
  |  |  506|     21|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 21, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  338|     13|    FSINGLETONTLV(fuzz, TLV_TYPE_CUSTOMREQUEST, CURLOPT_CUSTOMREQUEST);
  ------------------
  |  |  506|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 7, False: 77.0k]
  |  |  ------------------
  |  |  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|     31|    FSINGLETONTLV(fuzz, TLV_TYPE_MAIL_FROM, CURLOPT_MAIL_FROM);
  ------------------
  |  |  506|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 16, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  340|     39|    FSINGLETONTLV(fuzz, TLV_TYPE_ACCEPTENCODING, CURLOPT_ACCEPT_ENCODING);
  ------------------
  |  |  506|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 20, False: 77.0k]
  |  |  ------------------
  |  |  507|     20|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     20|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     20|        {                                                                     \
  |  |  |  |  |  |  491|     20|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 19]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     20|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     20|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     19|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     19|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     19|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     19|        {                                                                     \
  |  |  |  |  |  |  481|     19|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     19|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 19]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     19|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     19|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     19|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     19|          break
  ------------------
  341|     25|    FSINGLETONTLV(fuzz, TLV_TYPE_RTSP_SESSION_ID, CURLOPT_RTSP_SESSION_ID);
  ------------------
  |  |  506|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 13, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  342|     15|    FSINGLETONTLV(fuzz, TLV_TYPE_RTSP_STREAM_URI, CURLOPT_RTSP_STREAM_URI);
  ------------------
  |  |  506|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 8, False: 77.0k]
  |  |  ------------------
  |  |  507|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      8|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      8|        {                                                                     \
  |  |  |  |  |  |  491|      8|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      8|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      8|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      7|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      7|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      7|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      7|        {                                                                     \
  |  |  |  |  |  |  481|      7|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      7|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      7|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      7|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      7|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      7|          break
  ------------------
  343|     23|    FSINGLETONTLV(fuzz, TLV_TYPE_RTSP_TRANSPORT, CURLOPT_RTSP_TRANSPORT);
  ------------------
  |  |  506|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 12, False: 77.0k]
  |  |  ------------------
  |  |  507|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     12|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     12|        {                                                                     \
  |  |  |  |  |  |  491|     12|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     12|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     12|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     11|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     11|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     11|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     11|        {                                                                     \
  |  |  |  |  |  |  481|     11|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     11|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     11|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     11|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     11|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     11|          break
  ------------------
  344|      9|    FSINGLETONTLV(fuzz, TLV_TYPE_MAIL_AUTH, CURLOPT_MAIL_AUTH);
  ------------------
  |  |  506|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 5, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  345|     23|    FSINGLETONTLV(fuzz, TLV_TYPE_LOGIN_OPTIONS, CURLOPT_LOGIN_OPTIONS);
  ------------------
  |  |  506|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 12, False: 77.0k]
  |  |  ------------------
  |  |  507|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     12|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     12|        {                                                                     \
  |  |  |  |  |  |  491|     12|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     12|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     12|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     11|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     11|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     11|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     11|        {                                                                     \
  |  |  |  |  |  |  481|     11|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     11|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     11|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     11|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     11|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     11|          break
  ------------------
  346|     37|    FSINGLETONTLV(fuzz, TLV_TYPE_XOAUTH2_BEARER, CURLOPT_XOAUTH2_BEARER);
  ------------------
  |  |  506|     19|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 19, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  347|    167|    FSINGLETONTLV(fuzz, TLV_TYPE_USERPWD, CURLOPT_USERPWD);
  ------------------
  |  |  506|     84|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 84, False: 76.9k]
  |  |  ------------------
  |  |  507|     84|          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|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     83|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     83|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  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
  |  |  ------------------
  |  |  510|     83|          break
  ------------------
  348|     29|    FSINGLETONTLV(fuzz, TLV_TYPE_USERAGENT, CURLOPT_USERAGENT);
  ------------------
  |  |  506|     15|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 15, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  349|      8|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_HOST_PUBLIC_KEY_SHA256, CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256);
  ------------------
  |  |  506|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 4, False: 77.0k]
  |  |  ------------------
  |  |  507|      4|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      4|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 4, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      4|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      4|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      4|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  350|  4.51k|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY, CURLOPT_PROXY);
  ------------------
  |  |  506|  2.26k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 2.26k, False: 74.7k]
  |  |  ------------------
  |  |  507|  2.26k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  2.26k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  2.26k|        {                                                                     \
  |  |  |  |  |  |  491|  2.26k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  2.26k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  2.26k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  2.25k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  2.25k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  2.25k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  2.25k|        {                                                                     \
  |  |  |  |  |  |  481|  2.25k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  2.25k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  2.25k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  2.25k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  2.25k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  2.25k|          break
  ------------------
  351|    287|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXYUSERPWD, CURLOPT_PROXYUSERPWD);
  ------------------
  |  |  506|    144|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 144, False: 76.8k]
  |  |  ------------------
  |  |  507|    144|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    144|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    144|        {                                                                     \
  |  |  |  |  |  |  491|    144|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 143]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    144|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    144|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    143|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    143|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    143|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    143|        {                                                                     \
  |  |  |  |  |  |  481|    143|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    143|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 2, False: 141]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    143|          {                                                                   \
  |  |  |  |  |  |  484|      2|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      2|          }                                                                   \
  |  |  |  |  |  |  487|    143|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    141|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    141|          break
  ------------------
  352|     21|    FSINGLETONTLV(fuzz, TLV_TYPE_REFERER, CURLOPT_REFERER);
  ------------------
  |  |  506|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 11, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  353|     25|    FSINGLETONTLV(fuzz, TLV_TYPE_FTPPORT, CURLOPT_FTPPORT);
  ------------------
  |  |  506|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 13, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  354|     41|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLCERT, CURLOPT_SSLCERT);
  ------------------
  |  |  506|     21|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 21, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  355|     51|    FSINGLETONTLV(fuzz, TLV_TYPE_KEYPASSWD, CURLOPT_KEYPASSWD);
  ------------------
  |  |  506|     26|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 26, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  356|    507|    FSINGLETONTLV(fuzz, TLV_TYPE_INTERFACE, CURLOPT_INTERFACE);
  ------------------
  |  |  506|    254|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 254, False: 76.7k]
  |  |  ------------------
  |  |  507|    254|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    254|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    254|        {                                                                     \
  |  |  |  |  |  |  491|    254|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 253]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    254|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    254|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    253|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    253|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    253|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    253|        {                                                                     \
  |  |  |  |  |  |  481|    253|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    253|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 6, False: 247]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    253|          {                                                                   \
  |  |  |  |  |  |  484|      6|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      6|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      6|          }                                                                   \
  |  |  |  |  |  |  487|    253|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    247|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    247|          break
  ------------------
  357|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_KRBLEVEL, CURLOPT_KRBLEVEL);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 77.0k]
  |  |  ------------------
  |  |  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|    369|    FSINGLETONTLV(fuzz, TLV_TYPE_CAINFO, CURLOPT_CAINFO);
  ------------------
  |  |  506|    185|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 185, False: 76.8k]
  |  |  ------------------
  |  |  507|    185|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    185|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    185|        {                                                                     \
  |  |  |  |  |  |  491|    185|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 184]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    185|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    185|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    184|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    184|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    184|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    184|        {                                                                     \
  |  |  |  |  |  |  481|    184|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    184|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 184]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    184|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    184|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    184|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    184|          break
  ------------------
  359|  1.62k|    FSINGLETONTLV(fuzz, TLV_TYPE_SSL_CIPHER_LIST, CURLOPT_SSL_CIPHER_LIST);
  ------------------
  |  |  506|    811|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 811, False: 76.2k]
  |  |  ------------------
  |  |  507|    811|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    811|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    811|        {                                                                     \
  |  |  |  |  |  |  491|    811|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 810]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    811|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    811|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    810|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    810|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    810|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    810|        {                                                                     \
  |  |  |  |  |  |  481|    810|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    810|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 810]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    810|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    810|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    810|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    810|          break
  ------------------
  360|     47|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLCERTTYPE, CURLOPT_SSLCERTTYPE);
  ------------------
  |  |  506|     24|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 24, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  361|     25|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLKEY, CURLOPT_SSLKEY);
  ------------------
  |  |  506|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 13, False: 77.0k]
  |  |  ------------------
  |  |  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|     39|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLKEYTYPE, CURLOPT_SSLKEYTYPE);
  ------------------
  |  |  506|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 20, False: 77.0k]
  |  |  ------------------
  |  |  507|     20|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     20|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     20|        {                                                                     \
  |  |  |  |  |  |  491|     20|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 19]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     20|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     20|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     19|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     19|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     19|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     19|        {                                                                     \
  |  |  |  |  |  |  481|     19|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     19|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 19]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     19|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     19|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     19|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     19|          break
  ------------------
  363|  1.54k|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLENGINE, CURLOPT_SSLENGINE);
  ------------------
  |  |  506|    773|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 773, False: 76.2k]
  |  |  ------------------
  |  |  507|    773|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    773|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    773|        {                                                                     \
  |  |  |  |  |  |  491|    773|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 772]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    773|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    773|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    772|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    772|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    772|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    772|        {                                                                     \
  |  |  |  |  |  |  481|    772|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    772|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 88, False: 684]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    772|          {                                                                   \
  |  |  |  |  |  |  484|     88|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     88|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     88|          }                                                                   \
  |  |  |  |  |  |  487|    772|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    684|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    684|          break
  ------------------
  364|    299|    FSINGLETONTLV(fuzz, TLV_TYPE_CAPATH, CURLOPT_CAPATH);
  ------------------
  |  |  506|    150|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 150, False: 76.8k]
  |  |  ------------------
  |  |  507|    150|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    150|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    150|        {                                                                     \
  |  |  |  |  |  |  491|    150|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 149]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    150|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    150|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    149|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    149|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    149|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    149|        {                                                                     \
  |  |  |  |  |  |  481|    149|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    149|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 149]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    149|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    149|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    149|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    149|          break
  ------------------
  365|    165|    FSINGLETONTLV(fuzz, TLV_TYPE_FTP_ACCOUNT, CURLOPT_FTP_ACCOUNT);
  ------------------
  |  |  506|     83|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 83, False: 76.9k]
  |  |  ------------------
  |  |  507|     83|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     83|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     83|        {                                                                     \
  |  |  |  |  |  |  491|     83|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 82]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     83|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     83|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     82|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     82|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     82|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     82|        {                                                                     \
  |  |  |  |  |  |  481|     82|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     82|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 82]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     82|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     82|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     82|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     82|          break
  ------------------
  366|  3.63k|    FSINGLETONTLV(fuzz, TLV_TYPE_COOKIELIST, CURLOPT_COOKIELIST);
  ------------------
  |  |  506|  1.82k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1.82k, False: 75.2k]
  |  |  ------------------
  |  |  507|  1.82k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  1.82k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  1.82k|        {                                                                     \
  |  |  |  |  |  |  491|  1.82k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 1.81k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  1.82k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  1.82k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  1.81k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  1.81k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  1.81k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  1.81k|        {                                                                     \
  |  |  |  |  |  |  481|  1.81k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  1.81k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 1.81k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  1.81k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  1.81k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  1.81k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  1.81k|          break
  ------------------
  367|     15|    FSINGLETONTLV(fuzz, TLV_TYPE_FTP_ALTERNATIVE_TO_USER, CURLOPT_FTP_ALTERNATIVE_TO_USER);
  ------------------
  |  |  506|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 8, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  368|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_PUBLIC_KEYFILE, CURLOPT_SSH_PUBLIC_KEYFILE);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 77.0k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  369|      4|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_PRIVATE_KEYFILE, CURLOPT_SSH_PRIVATE_KEYFILE);
  ------------------
  |  |  506|      2|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 2, False: 77.0k]
  |  |  ------------------
  |  |  507|      2|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      2|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      2|        {                                                                     \
  |  |  |  |  |  |  491|      2|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      2|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      2|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      2|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 2, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      2|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      2|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  370|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_HOST_PUBLIC_KEY_MD5, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 77.0k]
  |  |  ------------------
  |  |  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|     31|    FSINGLETONTLV(fuzz, TLV_TYPE_ISSUERCERT, CURLOPT_ISSUERCERT);
  ------------------
  |  |  506|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 16, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  372|      9|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXYUSERNAME, CURLOPT_PROXYUSERNAME);
  ------------------
  |  |  506|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 5, False: 77.0k]
  |  |  ------------------
  |  |  507|      5|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      4|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      4|          break
  ------------------
  373|     39|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXYPASSWORD, CURLOPT_PROXYPASSWORD);
  ------------------
  |  |  506|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 20, False: 77.0k]
  |  |  ------------------
  |  |  507|     20|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     20|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     20|        {                                                                     \
  |  |  |  |  |  |  491|     20|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 19]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     20|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     20|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     19|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     19|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     19|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     19|        {                                                                     \
  |  |  |  |  |  |  481|     19|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     19|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 19]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     19|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     19|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     19|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     19|          break
  ------------------
  374|    507|    FSINGLETONTLV(fuzz, TLV_TYPE_NOPROXY, CURLOPT_NOPROXY);
  ------------------
  |  |  506|    254|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 254, False: 76.7k]
  |  |  ------------------
  |  |  507|    254|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    254|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    254|        {                                                                     \
  |  |  |  |  |  |  491|    254|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 253]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    254|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    254|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    253|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    253|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    253|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    253|        {                                                                     \
  |  |  |  |  |  |  481|    253|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    253|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 253]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    253|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    253|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    253|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    253|          break
  ------------------
  375|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_KNOWNHOSTS, CURLOPT_SSH_KNOWNHOSTS);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 77.0k]
  |  |  ------------------
  |  |  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: 77.0k]
  |  |  ------------------
  |  |  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|      6|    FSINGLETONTLV(fuzz, TLV_TYPE_TLSAUTH_PASSWORD, CURLOPT_TLSAUTH_PASSWORD);
  ------------------
  |  |  506|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 3, False: 77.0k]
  |  |  ------------------
  |  |  507|      3|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      3|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 3, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      3|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      3|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      3|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  378|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_TLSAUTH_TYPE, CURLOPT_TLSAUTH_TYPE);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 77.0k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  379|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_SERVERS, CURLOPT_DNS_SERVERS);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  380|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_INTERFACE, CURLOPT_DNS_INTERFACE);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 77.0k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  381|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_LOCAL_IP4, CURLOPT_DNS_LOCAL_IP4);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 77.0k]
  |  |  ------------------
  |  |  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: 77.0k]
  |  |  ------------------
  |  |  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|     31|    FSINGLETONTLV(fuzz, TLV_TYPE_PINNEDPUBLICKEY, CURLOPT_PINNEDPUBLICKEY);
  ------------------
  |  |  506|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 16, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  384|     33|    FSINGLETONTLV(fuzz, TLV_TYPE_UNIX_SOCKET_PATH, CURLOPT_UNIX_SOCKET_PATH);
  ------------------
  |  |  506|     17|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 17, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  385|     39|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SERVICE_NAME, CURLOPT_PROXY_SERVICE_NAME);
  ------------------
  |  |  506|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 20, False: 77.0k]
  |  |  ------------------
  |  |  507|     20|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     20|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     20|        {                                                                     \
  |  |  |  |  |  |  491|     20|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 19]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     20|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     20|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     19|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     19|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     19|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     19|        {                                                                     \
  |  |  |  |  |  |  481|     19|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     19|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 19]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     19|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     19|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     19|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     19|          break
  ------------------
  386|     43|    FSINGLETONTLV(fuzz, TLV_TYPE_SERVICE_NAME, CURLOPT_SERVICE_NAME);
  ------------------
  |  |  506|     22|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 22, False: 77.0k]
  |  |  ------------------
  |  |  507|     22|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     22|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     22|        {                                                                     \
  |  |  |  |  |  |  491|     22|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 21]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     22|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     22|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     21|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     21|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     21|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     21|        {                                                                     \
  |  |  |  |  |  |  481|     21|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     21|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 21]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     21|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     21|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     21|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     21|          break
  ------------------
  387|    145|    FSINGLETONTLV(fuzz, TLV_TYPE_DEFAULT_PROTOCOL, CURLOPT_DEFAULT_PROTOCOL);
  ------------------
  |  |  506|     73|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 73, False: 76.9k]
  |  |  ------------------
  |  |  507|     73|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     73|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     73|        {                                                                     \
  |  |  |  |  |  |  491|     73|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 72]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     73|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     73|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     72|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     72|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     72|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     72|        {                                                                     \
  |  |  |  |  |  |  481|     72|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     72|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 72]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     72|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     72|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     72|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     72|          break
  ------------------
  388|     21|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_CAINFO, CURLOPT_PROXY_CAINFO);
  ------------------
  |  |  506|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 11, False: 77.0k]
  |  |  ------------------
  |  |  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|     35|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_CAPATH, CURLOPT_PROXY_CAPATH);
  ------------------
  |  |  506|     18|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 18, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  390|      4|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLSAUTH_USERNAME, CURLOPT_PROXY_TLSAUTH_USERNAME);
  ------------------
  |  |  506|      2|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 2, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  391|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLSAUTH_PASSWORD, CURLOPT_PROXY_TLSAUTH_PASSWORD);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 77.0k]
  |  |  ------------------
  |  |  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: 77.0k]
  |  |  ------------------
  |  |  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|     31|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLCERT, CURLOPT_PROXY_SSLCERT);
  ------------------
  |  |  506|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 16, False: 77.0k]
  |  |  ------------------
  |  |  507|     16|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     16|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     16|        {                                                                     \
  |  |  |  |  |  |  491|     16|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     16|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     16|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     15|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     15|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     15|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     15|        {                                                                     \
  |  |  |  |  |  |  481|     15|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     15|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     15|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     15|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     15|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     15|          break
  ------------------
  394|     21|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLCERTTYPE, CURLOPT_PROXY_SSLCERTTYPE);
  ------------------
  |  |  506|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 11, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  395|     31|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLKEY, CURLOPT_PROXY_SSLKEY);
  ------------------
  |  |  506|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 16, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  396|     17|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLKEYTYPE, CURLOPT_PROXY_SSLKEYTYPE);
  ------------------
  |  |  506|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 9, False: 77.0k]
  |  |  ------------------
  |  |  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|     37|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_KEYPASSWD, CURLOPT_PROXY_KEYPASSWD);
  ------------------
  |  |  506|     19|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 19, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  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: 77.0k]
  |  |  ------------------
  |  |  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|     27|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_CRLFILE, CURLOPT_PROXY_CRLFILE);
  ------------------
  |  |  506|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 14, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  400|    833|    FSINGLETONTLV(fuzz, TLV_TYPE_PRE_PROXY, CURLOPT_PRE_PROXY);
  ------------------
  |  |  506|    417|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 417, False: 76.6k]
  |  |  ------------------
  |  |  507|    417|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    417|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    417|        {                                                                     \
  |  |  |  |  |  |  491|    417|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 416]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    417|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    417|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    416|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    416|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    416|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    416|        {                                                                     \
  |  |  |  |  |  |  481|    416|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    416|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 416]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    416|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    416|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    416|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    416|          break
  ------------------
  401|     51|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_PINNEDPUBLICKEY, CURLOPT_PROXY_PINNEDPUBLICKEY);
  ------------------
  |  |  506|     26|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 26, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  402|     47|    FSINGLETONTLV(fuzz, TLV_TYPE_ABSTRACT_UNIX_SOCKET, CURLOPT_ABSTRACT_UNIX_SOCKET);
  ------------------
  |  |  506|     24|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 24, False: 77.0k]
  |  |  ------------------
  |  |  507|     24|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     24|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     24|        {                                                                     \
  |  |  |  |  |  |  491|     24|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     24|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     24|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     23|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     23|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     23|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     23|        {                                                                     \
  |  |  |  |  |  |  481|     23|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     23|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     23|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     23|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     23|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     23|          break
  ------------------
  403|     43|    FSINGLETONTLV(fuzz, TLV_TYPE_REQUEST_TARGET, CURLOPT_REQUEST_TARGET);
  ------------------
  |  |  506|     22|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 22, False: 77.0k]
  |  |  ------------------
  |  |  507|     22|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     22|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     22|        {                                                                     \
  |  |  |  |  |  |  491|     22|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 21]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     22|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     22|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     21|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     21|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     21|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     21|        {                                                                     \
  |  |  |  |  |  |  481|     21|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     21|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 21]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     21|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     21|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     21|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     21|          break
  ------------------
  404|    255|    FSINGLETONTLV(fuzz, TLV_TYPE_TLS13_CIPHERS, CURLOPT_TLS13_CIPHERS);
  ------------------
  |  |  506|    128|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 128, False: 76.9k]
  |  |  ------------------
  |  |  507|    128|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    128|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    128|        {                                                                     \
  |  |  |  |  |  |  491|    128|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 127]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    128|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    128|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    127|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    127|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    127|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    127|        {                                                                     \
  |  |  |  |  |  |  481|    127|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    127|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 127]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    127|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    127|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    127|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    127|          break
  ------------------
  405|     35|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLS13_CIPHERS, CURLOPT_PROXY_TLS13_CIPHERS);
  ------------------
  |  |  506|     18|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 18, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  406|     59|    FSINGLETONTLV(fuzz, TLV_TYPE_SASL_AUTHZID, CURLOPT_SASL_AUTHZID);
  ------------------
  |  |  506|     30|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 30, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  407|     27|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_ISSUERCERT, CURLOPT_PROXY_ISSUERCERT);
  ------------------
  |  |  506|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 14, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  408|  1.03k|    FSINGLETONTLV(fuzz, TLV_TYPE_SSL_EC_CURVES, CURLOPT_SSL_EC_CURVES);
  ------------------
  |  |  506|    516|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 516, False: 76.5k]
  |  |  ------------------
  |  |  507|    516|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    516|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    516|        {                                                                     \
  |  |  |  |  |  |  491|    516|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 515]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    516|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    516|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    515|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    515|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    515|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    515|        {                                                                     \
  |  |  |  |  |  |  481|    515|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    515|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 515]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    515|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    515|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    515|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    515|          break
  ------------------
  409|  2.24k|    FSINGLETONTLV(fuzz, TLV_TYPE_AWS_SIGV4, CURLOPT_AWS_SIGV4);
  ------------------
  |  |  506|  1.12k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1.12k, False: 75.9k]
  |  |  ------------------
  |  |  507|  1.12k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  1.12k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  1.12k|        {                                                                     \
  |  |  |  |  |  |  491|  1.12k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 2, False: 1.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  1.12k|          {                                                                   \
  |  |  |  |  |  |  493|      2|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      2|          }                                                                   \
  |  |  |  |  |  |  496|  1.12k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  1.12k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  1.12k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  1.12k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  1.12k|        {                                                                     \
  |  |  |  |  |  |  481|  1.12k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  1.12k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 1.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  1.12k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  1.12k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  1.12k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  1.12k|          break
  ------------------
  410|     75|    FSINGLETONTLV(fuzz, TLV_TYPE_REDIR_PROTOCOLS_STR, CURLOPT_REDIR_PROTOCOLS_STR);
  ------------------
  |  |  506|     38|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 38, False: 77.0k]
  |  |  ------------------
  |  |  507|     38|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     38|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     38|        {                                                                     \
  |  |  |  |  |  |  491|     38|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 37]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     38|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     38|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     37|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     37|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     37|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     37|        {                                                                     \
  |  |  |  |  |  |  481|     37|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     37|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 28, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     37|          {                                                                   \
  |  |  |  |  |  |  484|     28|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     28|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     28|          }                                                                   \
  |  |  |  |  |  |  487|     37|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      9|          break
  ------------------
  411|     19|    FSINGLETONTLV(fuzz, TLV_TYPE_HAPROXY_CLIENT_IP, CURLOPT_HAPROXY_CLIENT_IP);
  ------------------
  |  |  506|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 10, False: 77.0k]
  |  |  ------------------
  |  |  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
  ------------------
  412|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_ECH, CURLOPT_ECH);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 77.0k]
  |  |  ------------------
  |  |  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|     38|    default:
  ------------------
  |  Branch (413:5): [True: 38, False: 77.0k]
  ------------------
  414|       |      /* The fuzzer generates lots of unknown TLVs - we don't want these in the
  415|       |         corpus so we reject any unknown TLVs. */
  416|     38|      rc = 127;
  417|     38|      goto EXIT_LABEL;
  418|      0|      break;
  419|  77.0k|  }
  420|       |
  421|  75.5k|  rc = 0;
  422|       |
  423|  77.0k|EXIT_LABEL:
  424|       |
  425|  77.0k|  fuzz_free((void **)&tmp);
  426|       |
  427|  77.0k|  return rc;
  428|  75.5k|}
_Z18fuzz_tlv_to_stringP3tlv:
  434|  66.7k|{
  435|  66.7k|  char *tlvstr;
  436|       |
  437|       |  /* Allocate enough space, plus a null terminator */
  438|  66.7k|  tlvstr = (char *)malloc(tlv->length + 1);
  439|       |
  440|  66.7k|  if(tlvstr != NULL) {
  ------------------
  |  Branch (440:6): [True: 66.7k, False: 0]
  ------------------
  441|  66.7k|    memcpy(tlvstr, tlv->value, tlv->length);
  442|  66.7k|    tlvstr[tlv->length] = 0;
  443|  66.7k|  }
  444|       |
  445|  66.7k|  return tlvstr;
  446|  66.7k|}
_Z20fuzz_setup_http_postP9fuzz_dataP3tlv:
  450|     30|{
  451|     30|  if (fuzz->httppost == NULL) {
  ------------------
  |  Branch (451:7): [True: 30, False: 0]
  ------------------
  452|     30|    struct curl_httppost *post = NULL;
  453|     30|    struct curl_httppost *last = NULL;
  454|       |
  455|     30|    fuzz->post_body = fuzz_tlv_to_string(tlv);
  456|     30|    if (fuzz->post_body == NULL) {
  ------------------
  |  Branch (456:9): [True: 0, False: 30]
  ------------------
  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|     30|    curl_formadd(&post, &last,
  465|     30|                 CURLFORM_COPYNAME, FUZZ_HTTPPOST_NAME,
  ------------------
  |  |  277|     30|#define FUZZ_HTTPPOST_NAME              "test"
  ------------------
  466|     30|                 CURLFORM_PTRCONTENTS, fuzz->post_body,
  467|     30|                 CURLFORM_CONTENTLEN, (curl_off_t) strlen(fuzz->post_body),
  468|     30|                 CURLFORM_END);
  469|       |
  470|     30|    fuzz->last_post_part = last;
  471|     30|    fuzz->httppost = post;
  472|     30|  }
  473|       |
  474|     30|  return;
  475|     30|}
_Z18fuzz_add_mime_partP3tlvP13curl_mimepart:
  481|  2.45k|{
  482|  2.45k|  FUZZ_DATA part_fuzz;
  483|  2.45k|  TLV tlv;
  484|  2.45k|  int rc = 0;
  485|  2.45k|  int tlv_rc;
  486|       |
  487|  2.45k|  memset(&part_fuzz, 0, sizeof(FUZZ_DATA));
  488|       |
  489|  2.45k|  if(src_tlv->length < sizeof(TLV_RAW)) {
  ------------------
  |  Branch (489:6): [True: 1.68k, False: 763]
  ------------------
  490|       |    /* Not enough data for a single TLV - don't continue */
  491|  1.68k|    goto EXIT_LABEL;
  492|  1.68k|  }
  493|       |
  494|       |  /* Set up the state parser */
  495|    763|  part_fuzz.state.data = src_tlv->value;
  496|    763|  part_fuzz.state.data_len = src_tlv->length;
  497|       |
  498|    763|  for(tlv_rc = fuzz_get_first_tlv(&part_fuzz, &tlv);
  499|  1.92k|      tlv_rc == 0;
  ------------------
  |  Branch (499:7): [True: 1.36k, False: 561]
  ------------------
  500|  1.36k|      tlv_rc = fuzz_get_next_tlv(&part_fuzz, &tlv)) {
  501|       |
  502|       |    /* Have the TLV in hand. Parse the TLV. */
  503|  1.36k|    rc = fuzz_parse_mime_tlv(part, &tlv);
  504|       |
  505|  1.36k|    if(rc != 0) {
  ------------------
  |  Branch (505:8): [True: 202, False: 1.16k]
  ------------------
  506|       |      /* Failed to parse the TLV. Can't continue. */
  507|    202|      goto EXIT_LABEL;
  508|    202|    }
  509|  1.36k|  }
  510|       |
  511|    561|  if(tlv_rc != TLV_RC_NO_MORE_TLVS) {
  ------------------
  |  |  267|    561|#define TLV_RC_NO_MORE_TLVS             1
  ------------------
  |  Branch (511:6): [True: 287, False: 274]
  ------------------
  512|       |    /* A TLV call failed. Can't continue. */
  513|    287|    goto EXIT_LABEL;
  514|    287|  }
  515|       |
  516|  2.45k|EXIT_LABEL:
  517|       |
  518|  2.45k|  return rc;
  519|    561|}
_Z19fuzz_parse_mime_tlvP13curl_mimepartP3tlv:
  525|  1.36k|{
  526|  1.36k|  int rc;
  527|  1.36k|  char *tmp;
  528|       |
  529|  1.36k|  switch(tlv->type) {
  530|    292|    case TLV_TYPE_MIME_PART_NAME:
  ------------------
  |  |   42|    292|#define TLV_TYPE_MIME_PART_NAME                 14
  ------------------
  |  Branch (530:5): [True: 292, False: 1.07k]
  ------------------
  531|    292|      tmp = fuzz_tlv_to_string(tlv);
  532|    292|      curl_mime_name(part, tmp);
  533|    292|      fuzz_free((void **)&tmp);
  534|    292|      break;
  535|       |
  536|    873|    case TLV_TYPE_MIME_PART_DATA:
  ------------------
  |  |   43|    873|#define TLV_TYPE_MIME_PART_DATA                 15
  ------------------
  |  Branch (536:5): [True: 873, False: 494]
  ------------------
  537|    873|      curl_mime_data(part, (const char *)tlv->value, tlv->length);
  538|    873|      break;
  539|       |
  540|    202|    default:
  ------------------
  |  Branch (540:5): [True: 202, False: 1.16k]
  ------------------
  541|       |      /* The fuzzer generates lots of unknown TLVs - we don't want these in the
  542|       |         corpus so we reject any unknown TLVs. */
  543|    202|      rc = 255;
  544|    202|      goto EXIT_LABEL;
  545|      0|      break;
  546|  1.36k|  }
  547|       |
  548|  1.16k|  rc = 0;
  549|       |
  550|  1.36k|EXIT_LABEL:
  551|       |
  552|  1.36k|  return rc;
  553|  1.16k|}

