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::New_Session_Ticket Class Referencefinal

`#include <tls_messages.h>`

Inheritance diagram for Botan::TLS::New_Session_Ticket:

## Public Member Functions
| New_Session_Ticket (Handshake_IO &io, Handshake_Hash &hash, const std::vector< uint8_t > &ticket, uint32_t lifetime)
| New_Session_Ticket (Handshake_IO &io, Handshake_Hash &hash)
| New_Session_Ticket (const std::vector< uint8_t > &buf)
const std::vector< uint8_t > & | ticket () const
uint32_t | ticket_lifetime_hint () const
Handshake_Type | type () const override
std::string | type_string () const

## Detailed Description

New Session Ticket Message

Definition at line 663 of file tls_messages.h.

## Constructor & Destructor Documentation

Botan::TLS::New_Session_Ticket::New_Session_Ticket | ( | Handshake_IO & | io,
|  | Handshake_Hash & | hash,
|  | const std::vector< uint8_t > & | ticket,
|  | uint32_t | lifetime
| ) |  |

Definition at line 19 of file msg_session_ticket.cpp.

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

22 :
23 m_ticket_lifetime_hint(lifetime),
24 m_ticket(ticket)
25 {
26 hash.update(io.send(*this));
27 }
Botan::TLS::New_Session_Ticket::ticket
const std::vector< uint8_t > & ticket() const
Definition: tls_messages.h:669
hash
MechanismType hash
Definition: p11_mechanism.cpp:63

Botan::TLS::New_Session_Ticket::New_Session_Ticket | ( | Handshake_IO & | io,
|  | Handshake_Hash & | hash
| ) |  |

Definition at line 29 of file msg_session_ticket.cpp.

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

31 {
32 hash.update(io.send(*this));
33 }
hash
MechanismType hash
Definition: p11_mechanism.cpp:63

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

Definition at line 35 of file msg_session_ticket.cpp.

References Botan::TLS::TLS_Data_Reader::get_range(), and Botan::TLS::TLS_Data_Reader::get_uint32_t().

36 {
37 if(buf.size() < 6)
38 throw Decoding_Error("Session ticket message too short to be valid");
39
40 TLS_Data_Reader reader("SessionTicket", buf);
41
42 m_ticket_lifetime_hint = reader.get_uint32_t();
43 m_ticket = reader.get_range<uint8_t>(2, 0, 65535);
44 }

## Member Function Documentation

const std::vector<uint8_t>& Botan::TLS::New_Session_Ticket::ticket | ( |  | ) | const
| inline

Definition at line 669 of file tls_messages.h.

Referenced by Botan::TLS::Handshake_State::session_ticket().

669 { return m_ticket; }

uint32_t Botan::TLS::New_Session_Ticket::ticket_lifetime_hint | ( |  | ) | const
| inline

Definition at line 668 of file tls_messages.h.

668 { return m_ticket_lifetime_hint; }

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

Returns
  the message type

Implements Botan::TLS::Handshake_Message.

Definition at line 666 of file tls_messages.h.

References Botan::TLS::NEW_SESSION_TICKET.

666 { return NEW_SESSION_TICKET; }
Botan::TLS::NEW_SESSION_TICKET
Definition: tls_magic.h:43

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_session_ticket.cpp