Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Botan::TLS::Certificate_Status Class Referencefinal

`#include <tls_messages.h>`

Inheritance diagram for Botan::TLS::Certificate_Status:

## Public Member Functions
| Certificate_Status (const std::vector< uint8_t > &buf)
| Certificate_Status (Handshake_IO &io, Handshake_Hash &hash, std::shared_ptr< const OCSP::Response > response)
std::shared_ptr< const OCSP::Response > | response () const
Handshake_Type | type () const override
std::string | type_string () const

## Detailed Description

Certificate Status (RFC 6066)

Definition at line 454 of file tls_messages.h.

## Constructor & Destructor Documentation

Botan::TLS::Certificate_Status::Certificate_Status | ( | const std::vector< uint8_t > & | buf | ) |

Definition at line 20 of file msg_cert_status.cpp.

References Botan::make_uint32().

21 {
22 if(buf.size() < 5)
23 throw Decoding_Error("Invalid Certificate_Status message: too small");
24
25 if(buf[0] != 1)
26 throw Decoding_Error("Unexpected Certificate_Status message: unexpected message type");
27
28 size_t len = make_uint32(0, buf[1], buf[2], buf[3]);
29
30 // Verify the redundant length field...
31 if(buf.size() != len + 4)
32 throw Decoding_Error("Invalid Certificate_Status: invalid length field");
33
34 m_response = std::make_shared<OCSP::Response>(buf.data() + 4, buf.size() - 4);
35 }
Botan::make_uint32
uint32_t make_uint32(uint8_t i0, uint8_t i1, uint8_t i2, uint8_t i3)
Definition: loadstor.h:73

Botan::TLS::Certificate_Status::Certificate_Status | ( | Handshake_IO & | io,
|  | Handshake_Hash & | hash,
|  | std::shared_ptr< const OCSP::Response > | response
| ) |  |

Definition at line 37 of file msg_cert_status.cpp.

References Botan::TLS::Handshake_IO::send(), and Botan::TLS::Handshake_Hash::update().

39 :
40 m_response(ocsp)
41 {
42 hash.update(io.send(*this));
43 }
hash
MechanismType hash
Definition: p11_mechanism.cpp:63

## Member Function Documentation

std::shared_ptr<const OCSP::Response> Botan::TLS::Certificate_Status::response | ( |  | ) | const
| inline

Definition at line 459 of file tls_messages.h.

459 { return m_response; }

Handshake_Type Botan::TLS::Certificate_Status::type | ( |  | ) | const
| inline override virtual

Returns
  the message type

Implements Botan::TLS::Handshake_Message.

Definition at line 457 of file tls_messages.h.

References Botan::TLS::CERTIFICATE_STATUS.

457 { return CERTIFICATE_STATUS; }
Botan::TLS::CERTIFICATE_STATUS
Definition: tls_magic.h:53

std::string Botan::TLS::Handshake_Message::type_string | ( |  | ) | const
| inherited

Returns
  string representation of this message type

Definition at line 17 of file tls_handshake_state.cpp.

References Botan::TLS::handshake_type_to_string(), and Botan::TLS::Handshake_Message::type().

18 {
19 return handshake_type_to_string(type());
20 }
Botan::TLS::Handshake_Message::type
virtual Handshake_Type type() const =0
Botan::TLS::handshake_type_to_string
const char * handshake_type_to_string(Handshake_Type type)
Definition: tls_handshake_state.cpp:22

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

- src/lib/tls/tls_messages.h
- src/lib/tls/msg_cert_status.cpp