Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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 #include <botan/x509path.h>
10
11 namespace Botan {
12
13 std::string Credentials_Manager::psk_identity_hint(const std::string&,
14 const std::string&)
15 {
16 return "";
17 }
18
19 std::string Credentials_Manager::psk_identity(const std::string&,
20 const std::string&,
21 const std::string&)
22 {
23 return "";
24 }
25
26 SymmetricKey Credentials_Manager::psk(const std::string&,
27 const std::string&,
28 const std::string& identity)
29 {
30 throw Internal_Error("No PSK set for identity " + identity);
31 }
32
33 bool Credentials_Manager::attempt_srp(const std::string&,
34 const std::string&)
35 {
36 return false;
37 }
38
39 std::string Credentials_Manager::srp_identifier(const std::string&,
40 const std::string&)
41 {
42 return "";
43 }
44
45 std::string Credentials_Manager::srp_password(const std::string&,
46 const std::string&,
47 const std::string&)
48 {
49 return "";
50 }
51
52 bool Credentials_Manager::srp_verifier(const std::string&,
53 const std::string&,
54 const std::string&,
55 std::string&,
56 BigInt&,
57 std::vector<uint8_t>&,
58 bool)
59 {
60 return false;
61 }
62
63 std::vector<X509_Certificate> Credentials_Manager::cert_chain(
64 const std::vector<std::string>&,
65 const std::string&,
66 const std::string&)
67 {
68 return std::vector<X509_Certificate>();
69 }
70
71 std::vector<X509_Certificate> Credentials_Manager::cert_chain_single_type(
72 const std::string& cert_key_type,
73 const std::string& type,
74 const std::string& context)
75 {
76 std::vector<std::string> cert_types;
77 cert_types.push_back(cert_key_type);
78 return cert_chain(cert_types, type, context);
79 }
80
81 Private_Key* Credentials_Manager::private_key_for(const X509_Certificate&,
82 const std::string&,
83 const std::string&)
84 {
85 return nullptr;
86 }
87
88 std::vector<Certificate_Store*>
89 Credentials_Manager::trusted_certificate_authorities(
90 const std::string&,
91 const std::string&)
92 {
93 return std::vector<Certificate_Store*>();
94 }
95
96 }
Botan::OctetString
Definition: symkey.h:19
Botan::BigInt
Definition: bigint.h:23
Botan::Credentials_Manager::srp_identifier
virtual std::string srp_identifier(const std::string &type, const std::string &context)
Definition: credentials_manager.cpp:39
Botan::Private_Key
Definition: pk_keys.h:166
Botan::Credentials_Manager::srp_password
virtual std::string srp_password(const std::string &type, const std::string &context, const std::string &identifier)
Definition: credentials_manager.cpp:45
Botan::Credentials_Manager::psk_identity_hint
virtual std::string psk_identity_hint(const std::string &type, const std::string &context)
Definition: credentials_manager.cpp:13
Botan::Internal_Error
Definition: exceptn.h:88
type
MechanismType type
Definition: p11_mechanism.cpp:43
Botan::Credentials_Manager::cert_chain
virtual std::vector< X509_Certificate > cert_chain(const std::vector< std::string > &cert_key_types, const std::string &type, const std::string &context)
Definition: credentials_manager.cpp:63
Botan::X509_Certificate
Definition: x509cert.h:36
Botan::Credentials_Manager::psk_identity
virtual std::string psk_identity(const std::string &type, const std::string &context, const std::string &identity_hint)
Definition: credentials_manager.cpp:19
Botan::Credentials_Manager::srp_verifier
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: credentials_manager.cpp:52
Botan
Definition: alg_id.cpp:13
Botan::Credentials_Manager::psk
virtual SymmetricKey psk(const std::string &type, const std::string &context, const std::string &identity)
Definition: credentials_manager.cpp:26
Botan::Credentials_Manager::trusted_certificate_authorities
virtual std::vector< Certificate_Store * > trusted_certificate_authorities(const std::string &type, const std::string &context)
Definition: credentials_manager.cpp:89
Botan::Credentials_Manager::attempt_srp
virtual bool attempt_srp(const std::string &type, const std::string &context)
Definition: credentials_manager.cpp:33
Botan::Credentials_Manager::cert_chain_single_type
std::vector< X509_Certificate > cert_chain_single_type(const std::string &cert_key_type, const std::string &type, const std::string &context)
Definition: credentials_manager.cpp:71
Botan::Credentials_Manager::private_key_for
virtual Private_Key * private_key_for(const X509_Certificate &cert, const std::string &type, const std::string &context)
Definition: credentials_manager.cpp:81