Botan 2.19.1
Crypto and TLS for C&
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/pkix_types.h>
10
11namespace Botan {
12
13std::string Credentials_Manager::psk_identity_hint(const std::string&,
14 const std::string&)
15 {
16 return "";
17 }
18
19std::string Credentials_Manager::psk_identity(const std::string&,
20 const std::string&,
21 const std::string&)
22 {
23 return "";
24 }
25
27 const std::string&,
28 const std::string& identity)
29 {
30 throw Internal_Error("No PSK set for identity " + identity);
31 }
32
33bool Credentials_Manager::attempt_srp(const std::string&,
34 const std::string&)
35 {
36 return false;
37 }
38
39std::string Credentials_Manager::srp_identifier(const std::string&,
40 const std::string&)
41 {
42 return "";
43 }
44
45std::string Credentials_Manager::srp_password(const std::string&,
46 const std::string&,
47 const std::string&)
48 {
49 return "";
50 }
51
52bool 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
63std::vector<X509_Certificate> Credentials_Manager::find_cert_chain(
64 const std::vector<std::string>& key_types,
65 const std::vector<X509_DN>&,
66 const std::string& type,
67 const std::string& context)
68 {
69 return cert_chain(key_types, type, context);
70 }
71
72std::vector<X509_Certificate> Credentials_Manager::cert_chain(
73 const std::vector<std::string>&,
74 const std::string&,
75 const std::string&)
76 {
77 return std::vector<X509_Certificate>();
78 }
79
80std::vector<X509_Certificate> Credentials_Manager::cert_chain_single_type(
81 const std::string& cert_key_type,
82 const std::string& type,
83 const std::string& context)
84 {
85 std::vector<std::string> cert_types;
86 cert_types.push_back(cert_key_type);
87 return find_cert_chain(cert_types, std::vector<X509_DN>(), type, context);
88 }
89
91 const std::string&,
92 const std::string&)
93 {
94 return nullptr;
95 }
96
97std::vector<Certificate_Store*>
99 const std::string&,
100 const std::string&)
101 {
102 return std::vector<Certificate_Store*>();
103 }
104
105}
virtual Private_Key * private_key_for(const X509_Certificate &cert, 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)
std::vector< X509_Certificate > cert_chain_single_type(const std::string &cert_key_type, const std::string &type, const std::string &context)
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 std::string psk_identity_hint(const std::string &type, const std::string &context)
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)
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)
virtual SymmetricKey psk(const std::string &type, const std::string &context, const std::string &identity)
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)
Definition: alg_id.cpp:13
MechanismType type