Coverage Report

Created: 2020-10-17 06:46

/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
10
namespace Botan {
11
12
std::string Credentials_Manager::psk_identity_hint(const std::string&,
13
                                                   const std::string&)
14
0
   {
15
0
   return "";
16
0
   }
17
18
std::string Credentials_Manager::psk_identity(const std::string&,
19
                                              const std::string&,
20
                                              const std::string&)
21
0
   {
22
0
   return "";
23
0
   }
24
25
SymmetricKey Credentials_Manager::psk(const std::string&,
26
                                      const std::string&,
27
                                      const std::string& identity)
28
0
   {
29
0
   throw Internal_Error("No PSK set for identity " + identity);
30
0
   }
31
32
bool Credentials_Manager::attempt_srp(const std::string&,
33
                                      const std::string&)
34
25.7k
   {
35
25.7k
   return false;
36
25.7k
   }
37
38
std::string Credentials_Manager::srp_identifier(const std::string&,
39
                                                const std::string&)
40
5.92k
   {
41
5.92k
   return "";
42
5.92k
   }
43
44
std::string Credentials_Manager::srp_password(const std::string&,
45
                                              const std::string&,
46
                                              const std::string&)
47
0
   {
48
0
   return "";
49
0
   }
50
51
bool Credentials_Manager::srp_verifier(const std::string&,
52
                                       const std::string&,
53
                                       const std::string&,
54
                                       std::string&,
55
                                       BigInt&,
56
                                       std::vector<uint8_t>&,
57
                                       bool)
58
0
   {
59
0
   return false;
60
0
   }
61
62
std::vector<X509_Certificate> Credentials_Manager::find_cert_chain(
63
   const std::vector<std::string>& key_types,
64
   const std::vector<X509_DN>&,
65
   const std::string& type,
66
   const std::string& context)
67
77.2k
   {
68
77.2k
   return cert_chain(key_types, type, context);
69
77.2k
   }
70
71
std::vector<X509_Certificate> Credentials_Manager::cert_chain(
72
   const std::vector<std::string>&,
73
   const std::string&,
74
   const std::string&)
75
7
   {
76
7
   return std::vector<X509_Certificate>();
77
7
   }
78
79
std::vector<X509_Certificate> Credentials_Manager::cert_chain_single_type(
80
   const std::string& cert_key_type,
81
   const std::string& type,
82
   const std::string& context)
83
77.2k
   {
84
77.2k
   std::vector<std::string> cert_types;
85
77.2k
   cert_types.push_back(cert_key_type);
86
77.2k
   return find_cert_chain(cert_types, std::vector<X509_DN>(), type, context);
87
77.2k
   }
88
89
Private_Key* Credentials_Manager::private_key_for(const X509_Certificate&,
90
                                                  const std::string&,
91
                                                  const std::string&)
92
0
   {
93
0
   return nullptr;
94
0
   }
95
96
std::vector<Certificate_Store*>
97
Credentials_Manager::trusted_certificate_authorities(
98
   const std::string&,
99
   const std::string&)
100
25.8k
   {
101
25.8k
   return std::vector<Certificate_Store*>();
102
25.8k
   }
103
104
}