Botan  2.6.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::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  {
68  return cert_chain(key_types, type, context);
69  }
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  {
76  return std::vector<X509_Certificate>();
77  }
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  {
84  std::vector<std::string> cert_types;
85  cert_types.push_back(cert_key_type);
86  return find_cert_chain(cert_types, std::vector<X509_DN>(), type, context);
87  }
88 
90  const std::string&,
91  const std::string&)
92  {
93  return nullptr;
94  }
95 
96 std::vector<Certificate_Store*>
98  const std::string&,
99  const std::string&)
100  {
101  return std::vector<Certificate_Store*>();
102  }
103 
104 }
virtual std::vector< X509_Certificate > find_cert_chain(const std::vector< std::string > &cert_key_types, const std::vector< X509_DN > &acceptable_CAs, const std::string &type, const std::string &context)
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)