aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/credentials_manager.cpp
blob: dc349d1608134f25cf3bef527c812421a3ca0c67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* Credentials Manager
* (C) 2011,2012 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/

#include <botan/credentials_manager.h>
#include <botan/pkix_types.h>

namespace Botan {

std::string Credentials_Manager::psk_identity_hint(const std::string& /*unused*/,
                                                   const std::string& /*unused*/)
   {
   return "";
   }

std::string Credentials_Manager::psk_identity(const std::string& /*unused*/,
                                              const std::string& /*unused*/,
                                              const std::string& /*unused*/)
   {
   return "";
   }

SymmetricKey Credentials_Manager::psk(const std::string& /*unused*/,
                                      const std::string& /*unused*/,
                                      const std::string& identity)
   {
   throw Internal_Error("No PSK set for identity " + identity);
   }

std::vector<X509_Certificate> Credentials_Manager::find_cert_chain(
   const std::vector<std::string>& key_types,
   const std::vector<X509_DN>& /*unused*/,
   const std::string& type,
   const std::string& context)
   {
   return cert_chain(key_types, type, context);
   }

std::vector<X509_Certificate> Credentials_Manager::cert_chain(
   const std::vector<std::string>& /*unused*/,
   const std::string& /*unused*/,
   const std::string& /*unused*/)
   {
   return std::vector<X509_Certificate>();
   }

std::vector<X509_Certificate> Credentials_Manager::cert_chain_single_type(
   const std::string& cert_key_type,
   const std::string& type,
   const std::string& context)
   {
   std::vector<std::string> cert_types;
   cert_types.push_back(cert_key_type);
   return find_cert_chain(cert_types, std::vector<X509_DN>(), type, context);
   }

Private_Key* Credentials_Manager::private_key_for(const X509_Certificate& /*unused*/,
                                                  const std::string& /*unused*/,
                                                  const std::string& /*unused*/)
   {
   return nullptr;
   }

std::vector<Certificate_Store*>
Credentials_Manager::trusted_certificate_authorities(
   const std::string& /*unused*/,
   const std::string& /*unused*/)
   {
   return std::vector<Certificate_Store*>();
   }

}