Botan 2.13.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
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
25 SymmetricKey Credentials_Manager::psk(const std::string&,
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
89 Private_Key* Credentials_Manager::private_key_for(const X509_Certificate&,
90 const std::string&,
91 const std::string&)
92 {
93 return nullptr;
94 }
95
96 std::vector<Certificate_Store*>
97 Credentials_Manager::trusted_certificate_authorities(
98 const std::string&,
99 const std::string&)
100 {
101 return std::vector<Certificate_Store*>();
102 }
103
104 }
Botan::Credentials_Manager::find_cert_chain
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)
Definition: credentials_manager.cpp:62
Botan::OctetString
Definition: symkey.h:19
Botan::BigInt
Definition: bigint.h:24
Botan::Credentials_Manager::srp_identifier
virtual std::string srp_identifier(const std::string &type, const std::string &context)
Definition: credentials_manager.cpp:38
Botan::Private_Key
Definition: pk_keys.h:181
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:44
Botan::Credentials_Manager::psk_identity_hint
virtual std::string psk_identity_hint(const std::string &type, const std::string &context)
Definition: credentials_manager.cpp:12
Botan::Internal_Error
Definition: exceptn.h:341
type
MechanismType type
Definition: p11_mechanism.cpp:44
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:71
Botan::X509_Certificate
Definition: x509cert.h:40
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:18
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:51
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:25
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:97
Botan::Credentials_Manager::attempt_srp
virtual bool attempt_srp(const std::string &type, const std::string &context)
Definition: credentials_manager.cpp:32
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:79
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:89