Botan 2.19.3
Crypto and TLS for C&
|
#include <tls_alert.h>
Public Types | |
enum | Type { CLOSE_NOTIFY = 0 , UNEXPECTED_MESSAGE = 10 , BAD_RECORD_MAC = 20 , DECRYPTION_FAILED = 21 , RECORD_OVERFLOW = 22 , DECOMPRESSION_FAILURE = 30 , HANDSHAKE_FAILURE = 40 , NO_CERTIFICATE = 41 , BAD_CERTIFICATE = 42 , UNSUPPORTED_CERTIFICATE = 43 , CERTIFICATE_REVOKED = 44 , CERTIFICATE_EXPIRED = 45 , CERTIFICATE_UNKNOWN = 46 , ILLEGAL_PARAMETER = 47 , UNKNOWN_CA = 48 , ACCESS_DENIED = 49 , DECODE_ERROR = 50 , DECRYPT_ERROR = 51 , EXPORT_RESTRICTION = 60 , PROTOCOL_VERSION = 70 , INSUFFICIENT_SECURITY = 71 , INTERNAL_ERROR = 80 , INAPPROPRIATE_FALLBACK = 86 , USER_CANCELED = 90 , NO_RENEGOTIATION = 100 , UNSUPPORTED_EXTENSION = 110 , CERTIFICATE_UNOBTAINABLE = 111 , UNRECOGNIZED_NAME = 112 , BAD_CERTIFICATE_STATUS_RESPONSE = 113 , BAD_CERTIFICATE_HASH_VALUE = 114 , UNKNOWN_PSK_IDENTITY = 115 , CERTIFICATE_REQUIRED = 116 , NO_APPLICATION_PROTOCOL = 120 , NULL_ALERT = 256 } |
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 21 of file tls_alert.h.
Type codes for TLS alerts
Definition at line 27 of file tls_alert.h.
|
explicit |
Deserialize an Alert message
buf | the serialized alert |
Definition at line 15 of file tls_alert.cpp.
References ILLEGAL_PARAMETER.
|
inline |
Create a new Alert
type_code | the type of alert |
fatal | specifies if this is a fatal alert |
Definition at line 103 of file tls_alert.h.
|
inline |
Definition at line 106 of file tls_alert.h.
|
inline |
Definition at line 75 of file tls_alert.h.
Referenced by Botan::TLS::Channel::send_alert(), and serialize().
|
inline |
Definition at line 70 of file tls_alert.h.
Referenced by Botan::TLS::Channel::send_alert().
std::vector< uint8_t > Botan::TLS::Alert::serialize | ( | ) | const |
Serialize an alert
Definition at line 31 of file tls_alert.cpp.
References is_fatal(), and type().
Referenced by Botan::TLS::Channel::send_alert().
|
inline |
Definition at line 80 of file tls_alert.h.
Referenced by Botan::TLS::Channel::send_alert(), serialize(), Botan::TLS::Stream< StreamLayer, ChannelT >::StreamCore::tls_alert(), and type_string().
std::string Botan::TLS::Alert::type_string | ( | ) | const |
Definition at line 39 of file tls_alert.cpp.
References ACCESS_DENIED, BAD_CERTIFICATE, BAD_CERTIFICATE_HASH_VALUE, BAD_CERTIFICATE_STATUS_RESPONSE, BAD_RECORD_MAC, CERTIFICATE_EXPIRED, CERTIFICATE_REQUIRED, CERTIFICATE_REVOKED, CERTIFICATE_UNKNOWN, CERTIFICATE_UNOBTAINABLE, CLOSE_NOTIFY, DECODE_ERROR, DECOMPRESSION_FAILURE, DECRYPT_ERROR, DECRYPTION_FAILED, EXPORT_RESTRICTION, HANDSHAKE_FAILURE, ILLEGAL_PARAMETER, INAPPROPRIATE_FALLBACK, INSUFFICIENT_SECURITY, INTERNAL_ERROR, NO_APPLICATION_PROTOCOL, NO_CERTIFICATE, NO_RENEGOTIATION, NULL_ALERT, PROTOCOL_VERSION, RECORD_OVERFLOW, type(), UNEXPECTED_MESSAGE, UNKNOWN_CA, UNKNOWN_PSK_IDENTITY, UNRECOGNIZED_NAME, UNSUPPORTED_CERTIFICATE, UNSUPPORTED_EXTENSION, and USER_CANCELED.
Referenced by Botan::TLS::BotanAlertCategory::message().