Botan 2.19.3
Crypto and TLS for C&
|
#include <credentials_manager.h>
Public Member Functions | |
virtual bool | attempt_srp (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) |
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 > | 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 Private_Key * | private_key_for (const X509_Certificate &cert, 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::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 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 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 | ~Credentials_Manager ()=default |
Interface for a credentials manager.
A type is a fairly static value that represents the general nature of the transaction occurring. Currently used values are "tls-client" and "tls-server". Context represents a hostname, email address, username, or other identifier.
Definition at line 30 of file credentials_manager.h.
|
virtualdefault |
|
virtual |
type | specifies the type of operation occurring |
context | specifies a context relative to type. |
Definition at line 33 of file credentials_manager.cpp.
|
virtual |
Return a cert chain we can use, ordered from leaf to root, or else an empty vector.
This virtual function is deprecated, and will be removed in a future release. Use (and override) find_cert_chain instead.
It is assumed that the caller can get the private key of the leaf with private_key_for
cert_key_types | specifies the key types desired ("RSA", "DSA", "ECDSA", etc), or empty if there is no preference by the caller. |
type | specifies the type of operation occurring |
context | specifies a context relative to type. |
Definition at line 72 of file credentials_manager.cpp.
Referenced by find_cert_chain().
std::vector< X509_Certificate > Botan::Credentials_Manager::cert_chain_single_type | ( | const std::string & | cert_key_type, |
const std::string & | type, | ||
const std::string & | context | ||
) |
Return a cert chain we can use, ordered from leaf to root, or else an empty vector.
It is assumed that the caller can get the private key of the leaf with private_key_for
cert_key_type | specifies the type of key requested ("RSA", "DSA", "ECDSA", etc) |
type | specifies the type of operation occurring |
context | specifies a context relative to type. |
Definition at line 80 of file credentials_manager.cpp.
References find_cert_chain(), and type.
|
virtual |
Return a cert chain we can use, ordered from leaf to root, or else an empty vector.
It is assumed that the caller can get the private key of the leaf with private_key_for
cert_key_types | specifies the key types desired ("RSA", "DSA", "ECDSA", etc), or empty if there is no preference by the caller. |
acceptable_CAs | the CAs the requestor will accept (possibly empty) |
type | specifies the type of operation occurring |
context | specifies a context relative to type. |
Definition at line 63 of file credentials_manager.cpp.
References cert_chain(), and type.
Referenced by cert_chain_single_type().
|
virtual |
Definition at line 90 of file credentials_manager.cpp.
|
virtual |
type | specifies the type of operation occurring |
context | specifies a context relative to type. |
identity | is a PSK identity previously returned by psk_identity for the same type and context. |
Definition at line 26 of file credentials_manager.cpp.
Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), and Botan::TLS::Client_Key_Exchange::Client_Key_Exchange().
|
virtual |
type | specifies the type of operation occurring |
context | specifies a context relative to type. |
identity_hint | was passed by the server (but may be empty) |
Definition at line 19 of file credentials_manager.cpp.
Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange().
|
virtual |
type | specifies the type of operation occurring |
context | specifies a context relative to type. |
Definition at line 13 of file credentials_manager.cpp.
Referenced by Botan::TLS::Server_Key_Exchange::Server_Key_Exchange().
|
virtual |
type | specifies the type of operation occurring |
context | specifies a context relative to type. |
Definition at line 39 of file credentials_manager.cpp.
Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange().
|
virtual |
type | specifies the type of operation occurring |
context | specifies a context relative to type. |
identifier | specifies what identifier we want the password for. This will be a value previously returned by srp_identifier. |
Definition at line 45 of file credentials_manager.cpp.
Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange().
|
virtual |
Retrieve SRP verifier parameters
Definition at line 52 of file credentials_manager.cpp.
Referenced by Botan::TLS::Server_Key_Exchange::Server_Key_Exchange().
|
virtual |
Return a list of the certificates of CAs that we trust in this type/context.
type | specifies the type of operation occurring |
context | specifies a context relative to type. For instance for type "tls-client", context specifies the servers name. |
Definition at line 98 of file credentials_manager.cpp.