_ZN9sdbusplus5error3xyz15openbmc_project9sdbusplus5Error7details26register_InvalidEnumStringEv:
   79|     10|{
   80|     10|    ::sdbusplus::sdbuspp::register_event_helper<InvalidEnumString>::hook();
   81|     10|}
_ZN9sdbusplus5error3xyz15openbmc_project9sdbusplus5Error7details28register_UnpackPropertyErrorEv:
  158|     10|{
  159|     10|    ::sdbusplus::sdbuspp::register_event_helper<UnpackPropertyError>::hook();
  160|     10|}
event.cpp:_ZN9sdbusplus5error3xyz15openbmc_project9sdbusplus5ErrorL10loadErrorsEv:
  170|      2|{
  171|      2|    sd_bus_error_add_map(errors);
  172|      2|}

LLVMFuzzerTestOneInput:
   25|  1.26k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   26|  1.26k|    std::string pem(reinterpret_cast<const char*>(data), size);
   27|  1.26k|    try {
   28|  1.26k|        auto cert = phosphor::certs::parseCert(pem);
   29|  1.26k|        if (cert) {
  ------------------
  |  Branch (29:13): [True: 126, False: 1.14k]
  ------------------
   30|       |            // Validate start date
   31|    126|            phosphor::certs::validateCertificateStartDate(*cert);
   32|       |
   33|       |            // Validate in SSL context
   34|    126|            phosphor::certs::validateCertificateInSSLContext(*cert);
   35|       |
   36|       |            // Validate against an empty store.
   37|       |            // Since validateCertificateAgainstStore allows trust chain errors,
   38|       |            // this should not throw for typical untrusted certs, but will
   39|       |            // exercise the verification logic.
   40|    126|            std::unique_ptr<X509_STORE, decltype(&::X509_STORE_free)> x509Store(
   41|    126|                X509_STORE_new(), &X509_STORE_free);
   42|    126|            if (x509Store) {
  ------------------
  |  Branch (42:17): [True: 32, False: 94]
  ------------------
   43|     32|                phosphor::certs::validateCertificateAgainstStore(*x509Store, *cert);
   44|     32|            }
   45|    126|        }
   46|  1.26k|    } catch (const std::exception& e) {
   47|       |        // Catch expected exceptions to prevent the fuzzer from treating them as crashes.
   48|  1.23k|    } catch (...) {
   49|       |        // Catch any other unexpected exceptions.
   50|      0|    }
   51|  1.26k|    return 0;
   52|  1.26k|}

_ZN3lg27detailsorITpTkNS0_9log_flagsEJNS0_15flag_signed_valENS0_17flag_unsigned_valENS0_8flag_strEETpTkNS0_9log_flagsEJNS0_13flag_floatingEEEEDaNS0_8log_flagIJDpT_EEENS6_IJDpT0_EEE:
   47|  1.24k|{
   48|  1.24k|    return details::log_flag<As..., Bs...>{};
   49|  1.24k|}
_ZN3lg27detailsorITpTkNS0_9log_flagsEJNS0_15flag_signed_valENS0_17flag_unsigned_valEETpTkNS0_9log_flagsEJNS0_8flag_strEEEEDaNS0_8log_flagIJDpT_EEENS5_IJDpT0_EEE:
   47|  1.24k|{
   48|  1.24k|    return details::log_flag<As..., Bs...>{};
   49|  1.24k|}
_ZN3lg27detailsorITpTkNS0_9log_flagsEJNS0_15flag_signed_valEETpTkNS0_9log_flagsEJNS0_17flag_unsigned_valEEEEDaNS0_8log_flagIJDpT_EEENS4_IJDpT0_EEE:
   47|  1.24k|{
   48|  1.24k|    return details::log_flag<As..., Bs...>{};
   49|  1.24k|}
_ZN3lg27detailsorITpTkNS0_9log_flagsEJNS0_8flag_hexEETpTkNS0_9log_flagsEJNS0_8flag_binEEEEDaNS0_8log_flagIJDpT_EEENS4_IJDpT0_EEE:
   47|     69|{
   48|     69|    return details::log_flag<As..., Bs...>{};
   49|     69|}
_ZN3lg27detailsorITpTkNS0_9log_flagsEJNS0_8flag_hexENS0_8flag_binEETpTkNS0_9log_flagsEJNS0_8flag_decEEEEDaNS0_8log_flagIJDpT_EEENS5_IJDpT0_EEE:
   47|     37|{
   48|     37|    return details::log_flag<As..., Bs...>{};
   49|     37|}

_ZN3lg27details6do_logENS_5levelERKNSt3__115source_locationEPKcz:
  269|  1.26k|{
  270|  1.26k|    using namespace std::string_literals;
  271|       |
  272|  1.26k|    std::vector<std::string> strings{static_locs};
  273|       |
  274|  1.26k|    std::string message{m};
  275|       |
  276|       |    // Assign all the static fields.
  277|  1.26k|    strings[pos_fmtmsg] = "LOG2_FMTMSG="s + m;
  278|  1.26k|    strings[pos_prio] = "PRIORITY="s + std::to_string(static_cast<uint64_t>(l));
  279|  1.26k|    strings[pos_file] = "CODE_FILE="s + s.file_name();
  280|  1.26k|    strings[pos_line] = "CODE_LINE="s + std::to_string(s.line());
  281|  1.26k|    strings[pos_func] = "CODE_FUNC="s + s.function_name();
  282|       |
  283|       |    // Handle all the va_list args.
  284|  1.26k|    std::va_list args;
  285|  1.26k|    va_start(args, m);
  286|  2.51k|    while (true)
  ------------------
  |  Branch (286:12): [True: 2.51k, Folded]
  ------------------
  287|  2.51k|    {
  288|       |        // Get the header out.
  289|  2.51k|        auto h_ptr = va_arg(args, const char*);
  290|  2.51k|        if (h_ptr == nullptr)
  ------------------
  |  Branch (290:13): [True: 1.26k, False: 1.24k]
  ------------------
  291|  1.26k|        {
  292|  1.26k|            break;
  293|  1.26k|        }
  294|  1.24k|        std::string h{h_ptr};
  295|       |
  296|       |        // Get the format flag.
  297|  1.24k|        auto f = va_arg(args, uint64_t);
  298|       |
  299|       |        // Handle the value depending on which type format flag it has.
  300|  1.24k|        std::string value = {};
  301|  1.24k|        switch (f & (signed_val | unsigned_val | str | floating).value)
  ------------------
  |  Branch (301:17): [True: 1.24k, False: 0]
  ------------------
  302|  1.24k|        {
  303|     32|            case signed_val.value:
  ------------------
  |  Branch (303:13): [True: 32, False: 1.21k]
  ------------------
  304|     32|            {
  305|     32|                auto v = va_arg(args, int64_t);
  306|     32|                value = value_to_string(f, v);
  307|     32|                break;
  308|      0|            }
  309|       |
  310|     37|            case unsigned_val.value:
  ------------------
  |  Branch (310:13): [True: 37, False: 1.20k]
  ------------------
  311|     37|            {
  312|     37|                auto v = va_arg(args, uint64_t);
  313|     37|                value = value_to_string(f, v);
  314|     37|                break;
  315|      0|            }
  316|       |
  317|  1.17k|            case str.value:
  ------------------
  |  Branch (317:13): [True: 1.17k, False: 69]
  ------------------
  318|  1.17k|            {
  319|  1.17k|                value = va_arg(args, const char*);
  320|  1.17k|                break;
  321|      0|            }
  322|       |
  323|      0|            case floating.value:
  ------------------
  |  Branch (323:13): [True: 0, False: 1.24k]
  ------------------
  324|      0|            {
  325|      0|                auto v = va_arg(args, double);
  326|      0|                value = value_to_string(f, v);
  327|      0|                break;
  328|      0|            }
  329|  1.24k|        }
  330|       |
  331|       |        // Create the field for this value.
  332|  1.24k|        strings.emplace_back(h + '=' + value);
  333|       |
  334|       |        // Check for {HEADER} in the message and replace with value.
  335|  1.24k|        auto h_brace = '{' + h + '}';
  336|  1.24k|        if (auto start = message.find(h_brace); start != std::string::npos)
  ------------------
  |  Branch (336:49): [True: 1.24k, False: 0]
  ------------------
  337|  1.24k|        {
  338|  1.24k|            message.replace(start, h_brace.size(), value);
  339|  1.24k|        }
  340|  1.24k|    }
  341|  1.26k|    va_end(args);
  342|       |
  343|       |    // Add the final message into the strings array.
  344|  1.26k|    strings[pos_msg] = "MESSAGE="s + message.data();
  345|       |
  346|       |    // Transform strings -> iovec.
  347|  1.26k|    std::vector<iovec> iov{};
  348|  1.26k|    std::ranges::transform(strings, std::back_inserter(iov), [](auto& s) {
  349|  1.26k|        return iovec{s.data(), s.length()};
  350|  1.26k|    });
  351|       |
  352|       |    // Output the iovec.
  353|  1.26k|    if (send_debug_to_journal() || l != level::debug)
  ------------------
  |  Branch (353:9): [True: 0, False: 1.26k]
  |  Branch (353:36): [True: 1.26k, False: 0]
  ------------------
  354|  1.26k|    {
  355|  1.26k|        sd_journal_sendv(iov.data(), strings.size());
  356|  1.26k|    }
  357|  1.26k|    extra_output_method()(l, s, message);
  358|  1.26k|}
lg2_logger.cpp:_ZN3lg27detailsL15value_to_stringEml:
  106|     32|{
  107|       |    // If hex or bin was requested just use the unsigned formatting
  108|       |    // rules. (What should a negative binary number look like otherwise?)
  109|     32|    if (f & (hex | bin).value)
  ------------------
  |  Branch (109:9): [True: 0, False: 32]
  ------------------
  110|      0|    {
  111|      0|        return value_to_string(f, static_cast<uint64_t>(v));
  112|      0|    }
  113|     32|    return std::to_string(v);
  114|     32|}
lg2_logger.cpp:_ZN3lg27detailsL15value_to_stringEmm:
   23|     37|{
   24|     37|    switch (f & (hex | bin | dec).value)
   25|     37|    {
   26|       |        // For binary, use bitset<>::to_string.
   27|       |        // Treat values without a field-length format flag as 64 bit.
   28|      0|        case bin.value:
  ------------------
  |  Branch (28:9): [True: 0, False: 37]
  ------------------
   29|      0|        {
   30|      0|            switch (f & (field8 | field16 | field32 | field64).value)
   31|      0|            {
   32|      0|                case field8.value:
  ------------------
  |  Branch (32:17): [True: 0, False: 0]
  ------------------
   33|      0|                {
   34|      0|                    return "0b" + std::bitset<8>(v).to_string();
   35|      0|                }
   36|      0|                case field16.value:
  ------------------
  |  Branch (36:17): [True: 0, False: 0]
  ------------------
   37|      0|                {
   38|      0|                    return "0b" + std::bitset<16>(v).to_string();
   39|      0|                }
   40|      0|                case field32.value:
  ------------------
  |  Branch (40:17): [True: 0, False: 0]
  ------------------
   41|      0|                {
   42|      0|                    return "0b" + std::bitset<32>(v).to_string();
   43|      0|                }
   44|      0|                case field64.value:
  ------------------
  |  Branch (44:17): [True: 0, False: 0]
  ------------------
   45|      0|                default:
  ------------------
  |  Branch (45:17): [True: 0, False: 0]
  ------------------
   46|      0|                {
   47|      0|                    return "0b" + std::bitset<64>(v).to_string();
   48|      0|                }
   49|      0|            }
   50|      0|        }
   51|       |
   52|       |        // For hex, use the appropriate sprintf.
   53|      0|        case hex.value:
  ------------------
  |  Branch (53:9): [True: 0, False: 37]
  ------------------
   54|      0|        {
   55|      0|            char value[19];
   56|      0|            const char* format = nullptr;
   57|       |
   58|      0|            switch (f & (field8 | field16 | field32 | field64).value)
   59|      0|            {
   60|      0|                case field8.value:
  ------------------
  |  Branch (60:17): [True: 0, False: 0]
  ------------------
   61|      0|                {
   62|      0|                    format = "0x%02" PRIx64;
   63|      0|                    break;
   64|      0|                }
   65|       |
   66|      0|                case field16.value:
  ------------------
  |  Branch (66:17): [True: 0, False: 0]
  ------------------
   67|      0|                {
   68|      0|                    format = "0x%04" PRIx64;
   69|      0|                    break;
   70|      0|                }
   71|       |
   72|      0|                case field32.value:
  ------------------
  |  Branch (72:17): [True: 0, False: 0]
  ------------------
   73|      0|                {
   74|      0|                    format = "0x%08" PRIx64;
   75|      0|                    break;
   76|      0|                }
   77|       |
   78|      0|                case field64.value:
  ------------------
  |  Branch (78:17): [True: 0, False: 0]
  ------------------
   79|      0|                {
   80|      0|                    format = "0x%016" PRIx64;
   81|      0|                    break;
   82|      0|                }
   83|       |
   84|      0|                default:
  ------------------
  |  Branch (84:17): [True: 0, False: 0]
  ------------------
   85|      0|                {
   86|      0|                    format = "0x%" PRIx64;
   87|      0|                    break;
   88|      0|                }
   89|      0|            }
   90|       |
   91|      0|            snprintf(value, sizeof(value), format, v);
   92|      0|            return value;
   93|      0|        }
   94|       |
   95|       |        // For dec, use the simple to_string.
   96|      0|        case dec.value:
  ------------------
  |  Branch (96:9): [True: 0, False: 37]
  ------------------
   97|     37|        default:
  ------------------
  |  Branch (97:9): [True: 37, False: 0]
  ------------------
   98|     37|        {
   99|     37|            return std::to_string(v);
  100|      0|        }
  101|     37|    }
  102|     37|}
lg2_logger.cpp:_ZZN3lg27details6do_logENS_5levelERKNSt3__115source_locationEPKczENK3$_0clINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEDaRT_:
  348|  8.85k|    std::ranges::transform(strings, std::back_inserter(iov), [](auto& s) {
  349|  8.85k|        return iovec{s.data(), s.length()};
  350|  8.85k|    });
lg2_logger.cpp:_ZN3lg27detailsL21send_debug_to_journalEv:
  262|  1.26k|{
  263|  1.26k|    static const bool send = nullptr != getenv("DEBUG_INVOCATION");
  264|  1.26k|    return send;
  265|  1.26k|}
lg2_logger.cpp:_ZN3lg27detailsL19extra_output_methodEv:
  251|  1.26k|{
  252|  1.26k|    static const auto method =
  253|  1.26k|        (isatty(fileno(stderr)) || nullptr != getenv("LG2_FORCE_STDERR"))
  ------------------
  |  Branch (253:10): [True: 1.26k, False: 1]
  |  Branch (253:36): [True: 0, False: 1]
  ------------------
  254|  1.26k|            ? cerr_extra_output
  255|  1.26k|            : noop_extra_output;
  256|  1.26k|    return method;
  257|  1.26k|}
lg2_logger.cpp:_ZN3lg27detailsL17noop_extra_outputENS_5levelERKNSt3__115source_locationERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  135|  1.26k|{}

_ZN9sdbusplus7sdbuspp21register_event_helperINS_5error3xyz15openbmc_project9sdbusplus5Error17InvalidEnumStringEE4hookEv:
   20|     10|    {
   21|     10|        register_event(T::errName, throw_event);
   22|     10|    }
_ZN9sdbusplus7sdbuspp21register_event_helperINS_5error3xyz15openbmc_project9sdbusplus5Error19UnpackPropertyErrorEE4hookEv:
   20|     10|    {
   21|     10|        register_event(T::errName, throw_event);
   22|     10|    }

_ZN9sdbusplus6server11transaction7details11TransactionC2Ev:
   25|      1|    Transaction() : time(std::time(nullptr)), thread(std::this_thread::get_id())
   26|      1|    {}

_ZN9sdbusplus7sdbuspp14register_eventERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPFvRKN8nlohmann16json_abi_v3_12_010basic_jsonINS1_3mapENS1_6vectorES7_blmdS5_NSB_14adl_serializerENSE_IhNS5_IhEEEEvEERKNS1_15source_locationEE:
  215|     20|{
  216|     20|    sdbusplus::exception::get_event_hooks().emplace(event, throw_hook);
  217|     20|}
exception.cpp:_ZN9sdbusplus9exceptionL15get_event_hooksEv:
  140|     20|{
  141|     20|    static std::unordered_map<std::string, sdbusplus::sdbuspp::register_hook>
  142|     20|        event_hooks;
  143|     20|    return event_hooks;
  144|     20|}

_ZN9sdbusplus6server11transaction6get_idEv:
   18|  1.23k|{
   19|       |    // If the transaction id has not been initialized, generate one.
   20|  1.23k|    if (!details::id)
  ------------------
  |  Branch (20:9): [True: 1, False: 1.23k]
  ------------------
   21|      1|    {
   22|      1|        details::Transaction t;
   23|      1|        details::id = std::hash<details::Transaction>{}(t);
   24|      1|    }
   25|  1.23k|    return details::id;
   26|  1.23k|}
_ZNKSt3__14hashIN9sdbusplus6server11transaction7details11TransactionEEclERKS5_:
   90|      1|{
   91|      1|    auto hash1 = std::hash<std::time_t>{}(t.time);
   92|      1|    auto hash2 = std::hash<std::thread::id>{}(t.thread);
   93|       |
   94|       |    // boost::hash_combine() algorithm.
   95|      1|    return static_cast<size_t>(
   96|      1|        hash1 ^ (hash2 + 0x9e3779b9 + (hash1 << 6) + (hash1 >> 2)));
   97|      1|}

_ZN8phosphor5certs28validateCertificateStartDateER7x509_st:
  124|    126|{
  125|    126|    int days = 0;
  126|    126|    int secs = 0;
  127|       |
  128|    126|    ASN1TimePtr epoch(ASN1_TIME_new(), ASN1_STRING_free);
  129|       |    // Set time to 00:00am GMT, Jan 1 1970; format: YYYYMMDDHHMMSSZ
  130|    126|    ASN1_TIME_set_string(epoch.get(), "19700101000000Z");
  131|       |
  132|    126|    const ASN1_TIME* notBefore = X509_get0_notBefore(&cert);
  133|    126|    ASN1_TIME_diff(&days, &secs, epoch.get(), notBefore);
  134|       |
  135|    126|    if (days < 0 || secs < 0)
  ------------------
  |  Branch (135:9): [True: 29, False: 97]
  |  Branch (135:21): [True: 28, False: 69]
  ------------------
  136|     57|    {
  137|     57|        lg2::error("Certificate valid date starts before the Unix Epoch");
  138|     57|        elog<InvalidCertificate>(
  139|     57|            Reason("NotBefore should after 19700101000000Z"));
  140|     57|    }
  141|    126|}
_ZN8phosphor5certs31validateCertificateAgainstStoreER13x509_store_stR7x509_st:
  144|     32|{
  145|     32|    int errCode = X509_V_OK;
  146|     32|    X509StoreCtxPtr storeCtx(X509_STORE_CTX_new(), ::X509_STORE_CTX_free);
  147|     32|    if (!storeCtx)
  ------------------
  |  Branch (147:9): [True: 0, False: 32]
  ------------------
  148|      0|    {
  149|      0|        lg2::error("Error occurred during X509_STORE_CTX_new call");
  150|      0|        elog<InternalFailure>();
  151|      0|    }
  152|       |
  153|     32|    errCode = X509_STORE_CTX_init(storeCtx.get(), &x509Store, &cert, nullptr);
  154|     32|    if (errCode != 1)
  ------------------
  |  Branch (154:9): [True: 0, False: 32]
  ------------------
  155|      0|    {
  156|      0|        lg2::error("Error occurred during X509_STORE_CTX_init call");
  157|      0|        elog<InternalFailure>();
  158|      0|    }
  159|       |
  160|       |    // Set time to current time.
  161|     32|    auto locTime = time(nullptr);
  162|       |
  163|     32|    X509_STORE_CTX_set_time(storeCtx.get(), X509_V_FLAG_USE_CHECK_TIME,
  164|     32|                            locTime);
  165|       |
  166|     32|    errCode = X509_verify_cert(storeCtx.get());
  167|     32|    if (errCode == 1)
  ------------------
  |  Branch (167:9): [True: 0, False: 32]
  ------------------
  168|      0|    {
  169|      0|        errCode = X509_V_OK;
  170|      0|    }
  171|     32|    else if (errCode == 0)
  ------------------
  |  Branch (171:14): [True: 32, False: 0]
  ------------------
  172|     32|    {
  173|     32|        errCode = X509_STORE_CTX_get_error(storeCtx.get());
  174|     32|        lg2::info(
  175|     32|            "Error occurred during X509_verify_cert call, checking for known "
  176|     32|            "error, ERRCODE:{ERRCODE}, ERROR_STR:{ERROR_STR}",
  177|     32|            "ERRCODE", errCode, "ERROR_STR",
  178|     32|            X509_verify_cert_error_string(errCode));
  179|     32|    }
  180|      0|    else
  181|      0|    {
  182|      0|        lg2::error("Error occurred during X509_verify_cert call");
  183|      0|        elog<InternalFailure>();
  184|      0|    }
  185|       |
  186|       |    // Allow certificate upload, for "certificate is not yet valid" and
  187|       |    // trust chain related errors.
  188|       |    // If ALLOW_EXPIRED is defined, allow expired certificate so that it
  189|       |    // could be replaced
  190|     32|    bool isOK = (errCode == X509_V_OK) ||
  ------------------
  |  Branch (190:17): [True: 0, False: 32]
  ------------------
  191|     32|                (errCode == X509_V_ERR_CERT_NOT_YET_VALID) ||
  ------------------
  |  Branch (191:17): [True: 0, False: 32]
  ------------------
  192|     32|                isTrustChainError(errCode) ||
  ------------------
  |  Branch (192:17): [True: 32, False: 0]
  ------------------
  193|      0|                (allowExpired && errCode == X509_V_ERR_CERT_HAS_EXPIRED);
  ------------------
  |  Branch (193:18): [True: 0, Folded]
  |  Branch (193:34): [True: 0, False: 0]
  ------------------
  194|       |
  195|     32|    if (!isOK)
  ------------------
  |  Branch (195:9): [True: 0, False: 32]
  ------------------
  196|      0|    {
  197|      0|        if (errCode == X509_V_ERR_CERT_HAS_EXPIRED)
  ------------------
  |  Branch (197:13): [True: 0, False: 0]
  ------------------
  198|      0|        {
  199|      0|            lg2::error("Expired certificate ");
  200|      0|            elog<InvalidCertificate>(Reason("Expired Certificate"));
  201|      0|        }
  202|       |        // Logging general error here.
  203|      0|        lg2::error(
  204|      0|            "Certificate validation failed, ERRCODE:{ERRCODE}, ERROR_STR:{ERROR_STR}",
  205|      0|            "ERRCODE", errCode, "ERROR_STR",
  206|      0|            X509_verify_cert_error_string(errCode));
  207|      0|        elog<InvalidCertificate>(Reason("Certificate validation failed"));
  208|      0|    }
  209|     32|}
_ZN8phosphor5certs31validateCertificateInSSLContextER7x509_st:
  212|     69|{
  213|     69|    const SSL_METHOD* method = TLS_method();
  214|     69|    SSLCtxPtr ctx(SSL_CTX_new(method), SSL_CTX_free);
  215|     69|    if (SSL_CTX_use_certificate(ctx.get(), &cert) != 1)
  ------------------
  |  Branch (215:9): [True: 37, False: 32]
  ------------------
  216|     37|    {
  217|     37|        lg2::error("Certificate is not usable, ERRCODE:{ERRCODE}", "ERRCODE",
  218|     37|                   ERR_get_error());
  219|     37|        elog<InvalidCertificate>(Reason("Certificate is not usable"));
  220|     37|    }
  221|     69|}
_ZN8phosphor5certs9parseCertERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  237|  1.26k|{
  238|  1.26k|    if (pem.size() > INT_MAX)
  ------------------
  |  Branch (238:9): [True: 0, False: 1.26k]
  ------------------
  239|      0|    {
  240|      0|        lg2::error("Error occurred during parseCert: PEM is too long");
  241|      0|        elog<InvalidCertificate>(Reason("Invalid PEM: too long"));
  242|      0|    }
  243|  1.26k|    X509Ptr cert(X509_new(), ::X509_free);
  244|  1.26k|    if (!cert)
  ------------------
  |  Branch (244:9): [True: 0, False: 1.26k]
  ------------------
  245|      0|    {
  246|      0|        lg2::error("Error occurred during X509_new call, ERRCODE:{ERRCODE}",
  247|      0|                   "ERRCODE", ERR_get_error());
  248|      0|        elog<InternalFailure>();
  249|      0|    }
  250|       |
  251|  1.26k|    BIOMemPtr bioCert(BIO_new_mem_buf(pem.data(), static_cast<int>(pem.size())),
  252|  1.26k|                      ::BIO_free);
  253|  1.26k|    X509* x509 = cert.get();
  254|  1.26k|    if (!PEM_read_bio_X509(bioCert.get(), &x509, nullptr, nullptr))
  ------------------
  |  Branch (254:9): [True: 1.14k, False: 126]
  ------------------
  255|  1.14k|    {
  256|  1.14k|        lg2::error("Error occurred during PEM_read_bio_X509 call, PEM:{PEM}",
  257|  1.14k|                   "PEM", pem);
  258|  1.14k|        elog<InternalFailure>();
  259|  1.14k|    }
  260|  1.26k|    return cert;
  261|  1.26k|}
x509_utils.cpp:_ZN8phosphor5certs12_GLOBAL__N_117isTrustChainErrorEi:
   47|     32|{
   48|     32|    return error == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT ||
  ------------------
  |  Branch (48:12): [True: 3, False: 29]
  ------------------
   49|     29|           error == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN ||
  ------------------
  |  Branch (49:12): [True: 0, False: 29]
  ------------------
   50|     29|           error == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY ||
  ------------------
  |  Branch (50:12): [True: 29, False: 0]
  ------------------
   51|      0|           error == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT ||
  ------------------
  |  Branch (51:12): [True: 0, False: 0]
  ------------------
   52|      0|           error == X509_V_ERR_CERT_UNTRUSTED ||
  ------------------
  |  Branch (52:12): [True: 0, False: 0]
  ------------------
   53|      0|           error == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE;
  ------------------
  |  Branch (53:12): [True: 0, False: 0]
  ------------------
   54|     32|}

