8#include <botan/tls_alert.h>
9#include <botan/tls_exceptn.h>
19 ") for TLS alert message");
21 if(buf[0] == 1) m_fatal =
false;
22 else if(buf[0] == 2) m_fatal =
true;
26 const uint8_t dc = buf[1];
28 m_type_code =
static_cast<Type>(dc);
33 return std::vector<uint8_t>({
34 static_cast<uint8_t
>(
is_fatal() ? 2 : 1),
35 static_cast<uint8_t
>(
type())
44 return "close_notify";
46 return "unexpected_message";
48 return "bad_record_mac";
50 return "decryption_failed";
52 return "record_overflow";
54 return "decompression_failure";
56 return "handshake_failure";
58 return "no_certificate";
60 return "bad_certificate";
62 return "unsupported_certificate";
64 return "certificate_revoked";
66 return "certificate_expired";
68 return "certificate_unknown";
70 return "illegal_parameter";
74 return "access_denied";
76 return "decode_error";
78 return "decrypt_error";
80 return "export_restriction";
82 return "protocol_version";
84 return "insufficient_security";
86 return "internal_error";
88 return "inappropriate_fallback";
90 return "user_canceled";
92 return "no_renegotiation";
95 return "unsupported_extension";
97 return "certificate_unobtainable";
99 return "unrecognized_name";
101 return "bad_certificate_status_response";
103 return "bad_certificate_hash_value";
105 return "unknown_psk_identity";
107 return "certificate_required";
109 return "no_application_protocol";
@ BAD_CERTIFICATE_STATUS_RESPONSE
@ UNSUPPORTED_CERTIFICATE
@ BAD_CERTIFICATE_HASH_VALUE
@ NO_APPLICATION_PROTOCOL
@ CERTIFICATE_UNOBTAINABLE
std::vector< uint8_t > serialize() const
std::string type_string() const
std::string to_string(const BER_Object &obj)
std::vector< T, secure_allocator< T > > secure_vector