Botan  2.4.0
Crypto and TLS for C++11
credentials_manager.cpp
Go to the documentation of this file.
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  {
15  return "";
16  }
17 
18 std::string Credentials_Manager::psk_identity(const std::string&,
19  const std::string&,
20  const std::string&)
21  {
22  return "";
23  }
24 
26  const std::string&,
27  const std::string& identity)
28  {
29  throw Internal_Error("No PSK set for identity " + identity);
30  }
31 
32 bool Credentials_Manager::attempt_srp(const std::string&,
33  const std::string&)
34  {
35  return false;
36  }
37 
38 std::string Credentials_Manager::srp_identifier(const std::string&,
39  const std::string&)
40  {
41  return "";
42  }
43 
44 std::string Credentials_Manager::srp_password(const std::string&,
45  const std::string&,
46  const std::string&)
47  {
48  return "";
49  }
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  {
59  return false;
60  }
61 
62 std::vector<X509_Certificate> Credentials_Manager::cert_chain(
63  const std::vector<std::string>&,
64  const std::string&,
65  const std::string&)
66  {
67  return std::vector<X509_Certificate>();
68  }
69 
70 std::vector<X509_Certificate> Credentials_Manager::cert_chain_single_type(
71  const std::string& cert_key_type,
72  const std::string& type,
73  const std::string& context)
74  {
75  std::vector<std::string> cert_types;
76  cert_types.push_back(cert_key_type);
77  return cert_chain(cert_types, type, context);
78  }
79 
81  const std::string&,
82  const std::string&)
83  {
84  return nullptr;
85  }
86 
87 std::vector<Certificate_Store*>
89  const std::string&,
90  const std::string&)
91  {
92  return std::vector<Certificate_Store*>();
93  }
94 
95 }
virtual std::string srp_identifier(const std::string &type, const std::string &context)
virtual std::string srp_password(const std::string &type, const std::string &context, const std::string &identifier)
virtual std::string psk_identity_hint(const std::string &type, const std::string &context)
MechanismType type
virtual std::vector< X509_Certificate > cert_chain(const std::vector< std::string > &cert_key_types, const std::string &type, const std::string &context)
virtual std::string psk_identity(const std::string &type, const std::string &context, const std::string &identity_hint)
virtual bool srp_verifier(const std::string &type, const std::string &context, const std::string &identifier, std::string &group_name, BigInt &verifier, std::vector< uint8_t > &salt, bool generate_fake_on_unknown)
Definition: alg_id.cpp:13
virtual SymmetricKey psk(const std::string &type, const std::string &context, const std::string &identity)
virtual std::vector< Certificate_Store * > trusted_certificate_authorities(const std::string &type, const std::string &context)
virtual bool attempt_srp(const std::string &type, const std::string &context)
std::vector< X509_Certificate > cert_chain_single_type(const std::string &cert_key_type, const std::string &type, const std::string &context)
virtual Private_Key * private_key_for(const X509_Certificate &cert, const std::string &type, const std::string &context)