• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

randombit / botan / 16271721753

14 Jul 2025 11:26AM UTC coverage: 90.622% (-0.003%) from 90.625%
16271721753

push

github

web-flow
Merge pull request #4989 from randombit/jack/fix-more-named-parameters

Fix more readability-named-parameter warnings from clang-tidy

99624 of 109934 relevant lines covered (90.62%)

12378967.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/lib/tls/asio/asio_context.cpp
1
/*
2
 * TLS Context
3
 * (C) 2024 Jack Lloyd
4
 *     2024 René Meusel, Rohde & Schwarz Cybersecurity
5
 *
6
 * Botan is released under the Simplified BSD License (see license.txt)
7
 */
8

9
#include <botan/asio_context.h>
10

11
#if defined(BOTAN_HAS_HAS_DEFAULT_TLS_CONTEXT)
12
   #include <botan/auto_rng.h>
13
   #include <botan/certstor_system.h>
14
   #include <botan/tls_session_manager_memory.h>
15
#endif
16

17
namespace Botan::TLS {
18

19
#if defined(BOTAN_HAS_HAS_DEFAULT_TLS_CONTEXT)
20

21
namespace {
22

23
/**
24
 * A Credentials_Manager that provides the system's certificate store as trust
25
 * store, if available. Otherwise it defaults to "no trusted certificates".
26
 */
27
class Default_Credentials_Manager : public Credentials_Manager {
×
28
   public:
29
      Default_Credentials_Manager() {
×
30
         try {
×
31
            m_cert_store = std::make_unique<System_Certificate_Store>();
×
32
         } catch(const Not_Implemented&) {
×
33
            // This platform does not provide an adapter for the system's trust store.
34
         }
×
35
      }
×
36

37
      std::vector<Certificate_Store*> trusted_certificate_authorities(const std::string& /*type*/,
×
38
                                                                      const std::string& /*context*/) override {
39
         if(m_cert_store) {
×
40
            return {m_cert_store.get()};
×
41
         } else {
42
            return {};
×
43
         }
44
      }
45

46
   private:
47
      std::unique_ptr<Certificate_Store> m_cert_store;
48
};
49

50
}  // namespace
51

52
Context::Context(Server_Information server_info) :
×
53
      m_credentials_manager(std::make_shared<Default_Credentials_Manager>()),
×
54
      m_rng(std::make_shared<AutoSeeded_RNG>()),
×
55
      m_session_manager(std::make_shared<Session_Manager_In_Memory>(m_rng)),
×
56
      m_policy(std::make_shared<Default_Policy>()),
×
57
      m_server_info(std::move(server_info)) {}
×
58

59
#endif
60

61
}  // namespace Botan::TLS
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc