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 | Static Public Member Functions | List of all members
Botan::TLS::Renegotiation_Extension Class Referencefinal

`#include <tls_extensions.h>`

Inheritance diagram for Botan::TLS::Renegotiation_Extension:

## Public Member Functions
bool | empty () const override
| Renegotiation_Extension ()=default
| Renegotiation_Extension (const std::vector< uint8_t > &bits)
| Renegotiation_Extension (TLS_Data_Reader &reader, uint16_t extension_size)
const std::vector< uint8_t > & | renegotiation_info () const
std::vector< uint8_t > | serialize () const override
Handshake_Extension_Type | type () const override

## Static Public Member Functions
static Handshake_Extension_Type | static_type ()

## Detailed Description

Renegotiation Indication Extension (RFC 5746)

Definition at line 128 of file tls_extensions.h.

## Constructor & Destructor Documentation

Botan::TLS::Renegotiation_Extension::Renegotiation_Extension | ( |  | ) |
| default

Botan::TLS::Renegotiation_Extension::Renegotiation_Extension | ( | const std::vector< uint8_t > & | bits | ) |
| inline explicit

Definition at line 138 of file tls_extensions.h.

138 :
139 m_reneg_data(bits) {}

Botan::TLS::Renegotiation_Extension::Renegotiation_Extension | ( | TLS_Data_Reader & | reader,
|  | uint16_t | extension_size
| ) |  |

Definition at line 210 of file tls_extensions.cpp.

211 : m_reneg_data(reader.get_range<uint8_t>(1, 0, 255))
212 {
213 if(m_reneg_data.size() + 1 != extension_size)
214 throw Decoding_Error("Bad encoding for secure renegotiation extn");
215 }

## Member Function Documentation

bool Botan::TLS::Renegotiation_Extension::empty | ( |  | ) | const
| inline override virtual

Returns
  if we should encode this extension or not

Implements Botan::TLS::Extension.

Definition at line 149 of file tls_extensions.h.

149 { return false; } // always send this

const std::vector<uint8_t>& Botan::TLS::Renegotiation_Extension::renegotiation_info | ( |  | ) | const
| inline

Definition at line 144 of file tls_extensions.h.

145 { return m_reneg_data; }

std::vector< uint8_t > Botan::TLS::Renegotiation_Extension::serialize | ( |  | ) | const
| override virtual

Returns
  serialized binary for the extension

Implements Botan::TLS::Extension.

Definition at line 217 of file tls_extensions.cpp.

References Botan::TLS::append_tls_length_value().

218 {
219 std::vector<uint8_t> buf;
220 append_tls_length_value(buf, m_reneg_data, 1);
221 return buf;
222 }
Botan::TLS::append_tls_length_value
void append_tls_length_value(std::vector< uint8_t, Alloc > &buf, const T *vals, size_t vals_size, size_t tag_size)
Definition: tls_reader.h:185

static Handshake_Extension_Type Botan::TLS::Renegotiation_Extension::static_type | ( |  | ) |
| inline static

Definition at line 131 of file tls_extensions.h.

References Botan::TLS::TLSEXT_SAFE_RENEGOTIATION.

Referenced by type().

132 { return TLSEXT_SAFE_RENEGOTIATION; }
Botan::TLS::TLSEXT_SAFE_RENEGOTIATION
Definition: tls_extensions.h:44

Handshake_Extension_Type Botan::TLS::Renegotiation_Extension::type | ( |  | ) | const
| inline override virtual

Returns
  code number of the extension

Implements Botan::TLS::Extension.

Definition at line 134 of file tls_extensions.h.

References static_type().

134 { return static_type(); }
Botan::TLS::Renegotiation_Extension::static_type
static Handshake_Extension_Type static_type()
Definition: tls_extensions.h:131

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

- src/lib/tls/tls_extensions.h
- src/lib/tls/tls_extensions.cpp