Coverage Report

Created: 2021-10-13 08:49

/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&,
14
                                                   const std::string&)
15
0
   {
16
0
   return "";
17
0
   }
18
19
std::string Credentials_Manager::psk_identity(const std::string&,
20
                                              const std::string&,
21
                                              const std::string&)
22
0
   {
23
0
   return "";
24
0
   }
25
26
SymmetricKey Credentials_Manager::psk(const std::string&,
27
                                      const std::string&,
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>&,
36
   const std::string& type,
37
   const std::string& context)
38
56.7k
   {
39
56.7k
   return cert_chain(key_types, type, context);
40
56.7k
   }
41
42
std::vector<X509_Certificate> Credentials_Manager::cert_chain(
43
   const std::vector<std::string>&,
44
   const std::string&,
45
   const std::string&)
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
56.7k
   {
55
56.7k
   std::vector<std::string> cert_types;
56
56.7k
   cert_types.push_back(cert_key_type);
57
56.7k
   return find_cert_chain(cert_types, std::vector<X509_DN>(), type, context);
58
56.7k
   }
59
60
Private_Key* Credentials_Manager::private_key_for(const X509_Certificate&,
61
                                                  const std::string&,
62
                                                  const std::string&)
63
0
   {
64
0
   return nullptr;
65
0
   }
66
67
std::vector<Certificate_Store*>
68
Credentials_Manager::trusted_certificate_authorities(
69
   const std::string&,
70
   const std::string&)
71
18.5k
   {
72
18.5k
   return std::vector<Certificate_Store*>();
73
18.5k
   }
74
75
}