Botan 3.6.1
Crypto and TLS for C&
|
#include <tls_alert.h>
Public Types | |
typedef AlertType | Type |
Public Member Functions | |
Alert () | |
Alert (const secure_vector< uint8_t > &buf) | |
Alert (Type type_code, bool fatal=false) | |
bool | is_fatal () const |
bool | is_valid () const |
std::vector< uint8_t > | serialize () const |
Type | type () const |
std::string | type_string () const |
SSL/TLS Alert Message
Definition at line 69 of file tls_alert.h.
Definition at line 71 of file tls_alert.h.
|
explicit |
Deserialize an Alert message
buf | the serialized alert |
Definition at line 14 of file tls_alert.cpp.
|
inline |
Create a new Alert
type_code | the type of alert |
fatal | specifies if this is a fatal alert |
Definition at line 124 of file tls_alert.h.
|
inline |
Definition at line 126 of file tls_alert.h.
|
inline |
Return true if this alert is fatal. A fatal alert causes the connection to be immediately disconnected. Otherwise, the alert is a warning and the connection remains valid.
Note: RFC 8446 6. In TLS 1.3, the severity is implicit in the type of alert being sent, and the "level" field can safely be ignored. Everything is considered fatal except for UserCanceled and CloseNotify (RFC 8446 6.1)
Definition at line 92 of file tls_alert.h.
Referenced by Botan::TLS::Channel_Impl_12::send_alert(), and serialize().
|
inline |
Definition at line 77 of file tls_alert.h.
Referenced by Botan::TLS::Channel_Impl_12::send_alert(), and Botan::TLS::Channel_Impl_13::send_alert().
std::vector< uint8_t > Botan::TLS::Alert::serialize | ( | ) | const |
Serialize an alert
Definition at line 32 of file tls_alert.cpp.
References is_fatal(), and type().
Referenced by Botan::TLS::Channel_Impl_12::send_alert(), and Botan::TLS::Channel_Impl_13::send_alert().
|
inline |
Returns the type of the alert as an enum
Definition at line 99 of file tls_alert.h.
Referenced by Botan::TLS::Channel_Impl_12::send_alert(), serialize(), and type_string().
std::string Botan::TLS::Alert::type_string | ( | ) | const |
Returns the type of the alert as a string
Definition at line 118 of file tls_alert.cpp.
References type().