Coverage Report

Created: 2022-05-14 06:06

/src/botan/src/lib/tls/credentials_manager.cpp
Line
Count
Source (jump to first uncovered line)
1
/*
2
* Credentials Manager
3
* (C) 2011,2012 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
6
*/
7
8
#include <botan/credentials_manager.h>
9
#include <botan/pkix_types.h>
10
11
namespace Botan {
12
13
std::string Credentials_Manager::psk_identity_hint(const std::string& /*unused*/,
14
                                                   const std::string& /*unused*/)
15
0
   {
16
0
   return "";
17
0
   }
18
19
std::string Credentials_Manager::psk_identity(const std::string& /*unused*/,
20
                                              const std::string& /*unused*/,
21
                                              const std::string& /*unused*/)
22
0
   {
23
0
   return "";
24
0
   }
25
26
SymmetricKey Credentials_Manager::psk(const std::string& /*unused*/,
27
                                      const std::string& /*unused*/,
28
                                      const std::string& identity)
29
0
   {
30
0
   throw Internal_Error("No PSK set for identity " + identity);
31
0
   }
32
33
std::vector<X509_Certificate> Credentials_Manager::find_cert_chain(
34
   const std::vector<std::string>& key_types,
35
   const std::vector<X509_DN>& /*unused*/,
36
   const std::string& type,
37
   const std::string& context)
38
62.8k
   {
39
62.8k
   return cert_chain(key_types, type, context);
40
62.8k
   }
41
42
std::vector<X509_Certificate> Credentials_Manager::cert_chain(
43
   const std::vector<std::string>& /*unused*/,
44
   const std::string& /*unused*/,
45
   const std::string& /*unused*/)
46
0
   {
47
0
   return std::vector<X509_Certificate>();
48
0
   }
49
50
std::vector<X509_Certificate> Credentials_Manager::cert_chain_single_type(
51
   const std::string& cert_key_type,
52
   const std::string& type,
53
   const std::string& context)
54
62.8k
   {
55
62.8k
   std::vector<std::string> cert_types;
56
62.8k
   cert_types.push_back(cert_key_type);
57
62.8k
   return find_cert_chain(cert_types, std::vector<X509_DN>(), type, context);
58
62.8k
   }
59
60
Private_Key* Credentials_Manager::private_key_for(const X509_Certificate& /*unused*/,
61
                                                  const std::string& /*unused*/,
62
                                                  const std::string& /*unused*/)
63
0
   {
64
0
   return nullptr;
65
0
   }
66
67
std::vector<Certificate_Store*>
68
Credentials_Manager::trusted_certificate_authorities(
69
   const std::string& /*unused*/,
70
   const std::string& /*unused*/)
71
20.6k
   {
72
20.6k
   return std::vector<Certificate_Store*>();
73
20.6k
   }
74
75
}