10#ifndef BOTAN_TLS_PROTOCOL_VERSION_H_
11#define BOTAN_TLS_PROTOCOL_VERSION_H_
13#include <botan/types.h>
45#if defined(BOTAN_HAS_TLS_13)
74 Protocol_Version(static_cast<uint16_t>((static_cast<uint16_t>(major) << 8) | minor)) {}
84 bool known_version()
const;
89 uint8_t
major_version()
const {
return static_cast<uint8_t
>(m_version >> 8); }
94 uint8_t
minor_version()
const {
return static_cast<uint8_t
>(m_version & 0xFF); }
108 std::string to_string()
const;
113 bool is_datagram_protocol()
const;
118 bool is_pre_tls_13()
const;
123 bool is_tls_13_or_later()
const;
Protocol_Version(uint8_t major, uint8_t minor)
static Protocol_Version latest_dtls_version()
bool operator==(const Protocol_Version &other) const
uint8_t major_version() const
bool operator!=(const Protocol_Version &other) const
static Protocol_Version latest_tls_version()
bool operator>=(const Protocol_Version &other) const
uint16_t version_code() const
bool operator<=(const Protocol_Version &other) const
Protocol_Version(uint16_t code)
bool operator<(const Protocol_Version &other) const
uint8_t minor_version() const
Protocol_Version(Version_Code named_version)
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)
@ TLS_V11
TLSv1.1 (no longer supported)
@ DTLS_V13
DTLSv1.3 (not supported yet)
bool operator>(const ASN1_Time &, const ASN1_Time &)