|
Botan
1.11.4
|
#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, 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, NULL_ALERT = 256, HEARTBEAT_PAYLOAD = 257 } |
Public Member Functions | |
| Alert (const std::vector< byte > &buf) | |
| Alert (Type type_code, bool fatal=false) | |
| Alert () | |
| bool | is_fatal () const |
| bool | is_valid () const |
| std::vector< byte > | 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.
| Botan::TLS::Alert::Alert | ( | const std::vector< byte > & | buf | ) |
Deserialize an Alert message
| buf | the serialized alert |
Definition at line 15 of file tls_alert.cpp.
References Botan::ASN1::to_string().
|
inline |
Create a new Alert
| type_code | the type of alert |
| fatal | specifies if this is a fatal alert |
Definition at line 100 of file tls_alert.h.
|
inline |
Definition at line 103 of file tls_alert.h.
|
inline |
Definition at line 72 of file tls_alert.h.
Referenced by Botan::TLS::Channel::send_alert(), and serialize().
|
inline |
Definition at line 67 of file tls_alert.h.
Referenced by Botan::TLS::Channel::send_alert().
| std::vector< byte > 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 77 of file tls_alert.h.
Referenced by Botan::TLS::Channel::send_alert(), serialize(), 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_REVOKED, CERTIFICATE_UNKNOWN, CERTIFICATE_UNOBTAINABLE, CLOSE_NOTIFY, DECODE_ERROR, DECOMPRESSION_FAILURE, DECRYPT_ERROR, DECRYPTION_FAILED, EXPORT_RESTRICTION, HANDSHAKE_FAILURE, HEARTBEAT_PAYLOAD, ILLEGAL_PARAMETER, INSUFFICIENT_SECURITY, INTERNAL_ERROR, NO_CERTIFICATE, NO_RENEGOTIATION, NULL_ALERT, PROTOCOL_VERSION, RECORD_OVERFLOW, Botan::ASN1::to_string(), type(), UNEXPECTED_MESSAGE, UNKNOWN_CA, UNKNOWN_PSK_IDENTITY, UNRECOGNIZED_NAME, UNSUPPORTED_CERTIFICATE, UNSUPPORTED_EXTENSION, and USER_CANCELED.
1.8.3.1