Botan: Botan::Certificate_Req Class Reference

Botan 1.10.17

Public Member Functions | List of all members
Botan::Certificate_Req Class Reference

`#include <tls_messages.h>`

Inheritance diagram for Botan::Certificate_Req:

## Public Member Functions
std::vector< X509_DN > | acceptable_CAs () const
std::vector< Certificate_Type > | acceptable_types () const
| Certificate_Req (Record_Writer &, HandshakeHash &, const std::vector< X509_Certificate > &)
| Certificate_Req (const MemoryRegion< byte > &buf)
void | send (Record_Writer &, HandshakeHash &) const
Handshake_Type | type () const

## Detailed Description

Certificate Request Message

Definition at line 136 of file tls_messages.h.

## Constructor & Destructor Documentation

## ◆ Certificate_Req() [1/2]

Botan::Certificate_Req::Certificate_Req | ( | Record_Writer & | writer,
|  | HandshakeHash & | hash,
|  | const std::vector< X509_Certificate > & | certs
| ) |  |

Create a new Certificate Request message

Definition at line 20 of file cert_req.cpp.

References Botan::DSS_CERT, Botan::RSA_CERT, and Botan::HandshakeMessage::send().

23 {
24 for(size_t i = 0; i != certs.size(); ++i)
25 names.push_back(certs[i].subject_dn());
26
27 // FIXME: should be able to choose what to ask for
28 types.push_back(RSA_CERT);
29 types.push_back(DSS_CERT);
30
31 send(writer, hash);
32 }
Botan::HandshakeMessage::send
void send(Record_Writer &, HandshakeHash &) const
Definition: hello.cpp:16
Botan::RSA_CERT
Definition: tls_magic.h:93
Botan::DSS_CERT
Definition: tls_magic.h:94

## ◆ Certificate_Req() [2/2]

Botan::Certificate_Req::Certificate_Req | ( | const MemoryRegion< byte > & | buf | ) |
| inline

Definition at line 151 of file tls_messages.h.

151 { deserialize(buf); }

## Member Function Documentation

## ◆ acceptable_CAs()

std::vector<X509_DN> Botan::Certificate_Req::acceptable_CAs | ( |  | ) | const
| inline

Definition at line 142 of file tls_messages.h.

142 { return names; }

## ◆ acceptable_types()

std::vector<Certificate_Type> Botan::Certificate_Req::acceptable_types | ( |  | ) | const
| inline

Definition at line 141 of file tls_messages.h.

141 { return types; }

## ◆ send()

void Botan::HandshakeMessage::send | ( | Record_Writer & | writer,
|  | HandshakeHash & | hash
| ) |  | const
| inherited

Definition at line 16 of file hello.cpp.

References Botan::Record_Writer::flush(), Botan::HANDSHAKE, Botan::Record_Writer::send(), Botan::MemoryRegion< T >::size(), Botan::HandshakeMessage::type(), and Botan::HandshakeHash::update().

Referenced by Botan::Certificate::Certificate(), Certificate_Req(), Botan::Finished::Finished(), Botan::Hello_Request::Hello_Request(), and Botan::Server_Hello_Done::Server_Hello_Done().

17 {
18 SecureVector<byte> buf = serialize();
19 SecureVector<byte> send_buf(4);
20
21 const size_t buf_size = buf.size();
22
23 send_buf[0] = type();
24
25 for(size_t i = 1; i != 4; ++i)
26 send_buf[i] = get_byte<u32bit>(i, buf_size);
27
28 send_buf += buf;
29
30 hash.update(send_buf);
31
32 writer.send(HANDSHAKE, &send_buf[0], send_buf.size());
33 writer.flush();
34 }
Botan::HANDSHAKE
Definition: tls_magic.h:36
Botan::HandshakeMessage::type
virtual Handshake_Type type() const =0

## ◆ type()

Handshake_Type Botan::Certificate_Req::type | ( |  | ) | const
| inlinevirtual

Implements Botan::HandshakeMessage.

Definition at line 139 of file tls_messages.h.

References Botan::CERTIFICATE_REQUEST.

139 { return CERTIFICATE_REQUEST; }
Botan::CERTIFICATE_REQUEST
Definition: tls_magic.h:47

The documentation for this class was generated from the following files:

- src/ssl/tls_messages.h
- src/ssl/cert_req.cpp