#include <tls_extensions.h>
Used to indicate SRTP algorithms for DTLS (RFC 5764)
Definition at line 328 of file tls_extensions.h.
◆ SRTP_Protection_Profiles() [1/3]
Botan::TLS::SRTP_Protection_Profiles::SRTP_Protection_Profiles |
( |
const std::vector< uint16_t > & |
pp | ) |
|
|
inlineexplicit |
◆ SRTP_Protection_Profiles() [2/3]
Botan::TLS::SRTP_Protection_Profiles::SRTP_Protection_Profiles |
( |
uint16_t |
pp | ) |
|
|
inlineexplicit |
◆ SRTP_Protection_Profiles() [3/3]
Botan::TLS::SRTP_Protection_Profiles::SRTP_Protection_Profiles |
( |
TLS_Data_Reader & |
reader, |
|
|
uint16_t |
extension_size |
|
) |
| |
Definition at line 463 of file tls_extensions.cpp.
464 : m_pp(reader.get_range<uint16_t>(2, 0, 65535))
465 {
466 const std::vector<uint8_t> mki = reader.get_range<uint8_t>(1, 0, 255);
467
468 if(m_pp.size() * 2 + mki.size() + 3 != extension_size)
469 throw Decoding_Error("Bad encoding for SRTP protection extension");
470
471 if(!mki.empty())
472 throw Decoding_Error("Unhandled non-empty MKI for SRTP protection extension");
473 }
References Botan::TLS::TLS_Data_Reader::get_range().
◆ empty()
bool Botan::TLS::SRTP_Protection_Profiles::empty |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ profiles()
const std::vector< uint16_t > & Botan::TLS::SRTP_Protection_Profiles::profiles |
( |
| ) |
const |
|
inline |
◆ serialize()
std::vector< uint8_t > Botan::TLS::SRTP_Protection_Profiles::serialize |
( |
Connection_Side |
whoami | ) |
const |
|
overridevirtual |
- Returns
- serialized binary for the extension
Implements Botan::TLS::Extension.
Definition at line 475 of file tls_extensions.cpp.
476 {
477 std::vector<uint8_t> buf;
478
479 const uint16_t pp_len = static_cast<uint16_t>(m_pp.size() * 2);
482
483 for(uint16_t pp : m_pp)
484 {
487 }
488
489 buf.push_back(0);
490
491 return buf;
492 }
constexpr uint8_t get_byte(size_t byte_num, T input)
References Botan::get_byte().
◆ static_type()
◆ type()
The documentation for this class was generated from the following files: