8#include <botan/tls_messages.h>
10#include <botan/credentials_manager.h>
11#include <botan/tls_callbacks.h>
12#include <botan/tls_exceptn.h>
13#include <botan/internal/tls_reader.h>
28 throw TLS_Exception(Alert::UnexpectedMessage,
"Received a Certificate_Request message from a client");
41 "Certificate_Request message did not provide a signature_algorithms extension");
53 std::set<Extension_Code> allowed_extensions = {
63 throw TLS_Exception(Alert::IllegalParameter,
"Certificate Request contained an extension that is not allowed");
92 m_extensions.
add(std::make_unique<Signature_Algorithms_Cert>(std::move(cert_signing_prefs.value())));
96 m_extensions.
add(std::make_unique<Certificate_Authorities>(std::move(
acceptable_CAs)));
110 std::vector<X509_DN> client_auth_CAs;
111 for(
const auto store : trusted_CAs) {
112 const auto subjects = store->all_subjects();
113 client_auth_CAs.insert(client_auth_CAs.end(), subjects.begin(), subjects.end());
144 return sig_schemes_cert->supported_schemes();
151 std::vector<uint8_t> buf;
#define BOTAN_ASSERT_NOMSG(expr)
virtual std::vector< Certificate_Store * > trusted_certificate_authorities(const std::string &type, const std::string &context)
virtual void tls_modify_extensions(Extensions &extn, Connection_Side which_side, Handshake_Type which_message)
const std::vector< Signature_Scheme > & signature_schemes() const
std::vector< uint8_t > serialize() const override
Handshake_Type type() const override
const std::vector< Signature_Scheme > & certificate_signature_schemes() const
static std::optional< Certificate_Request_13 > maybe_create(const Client_Hello_13 &sni_hostname, Credentials_Manager &cred_mgr, Callbacks &callbacks, const Policy &policy)
std::vector< X509_DN > acceptable_CAs() const
Certificate_Request_13(const std::vector< uint8_t > &buf, Connection_Side side)
std::string sni_hostname() const
bool contains_implemented_extensions_other_than(const std::set< Extension_Code > &allowed_extensions) const
std::vector< uint8_t > serialize(Connection_Side whoami) const
void deserialize(TLS_Data_Reader &reader, Connection_Side from, Handshake_Type message_type)
void add(std::unique_ptr< Extension > extn)
virtual bool request_client_certificate_authentication() const
virtual std::optional< std::vector< Signature_Scheme > > acceptable_certificate_signature_schemes() const
virtual std::vector< Signature_Scheme > acceptable_signature_schemes() const
std::vector< uint8_t > get_tls_length_value(size_t len_bytes)
void append_tls_length_value(std::vector< uint8_t, Alloc > &buf, const T *vals, size_t vals_size, size_t tag_size)
@ CertSignatureAlgorithms
@ CertificateStatusRequest