Alert.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * Alert.h
8  *
9  ****/
10 
11 #pragma once
12 
13 #include <WString.h>
14 
15 namespace Ssl
16 {
20 #define SSL_ALERT_CODE_MAP(XX) \
21  XX(CLOSE_NOTIFY, 0) \
22  XX(UNEXPECTED_MESSAGE, 10) \
23  XX(BAD_RECORD_MAC, 20) \
24  XX(RECORD_OVERFLOW, 22) \
25  XX(DECOMPRESSION_FAILURE, 30) \
26  XX(HANDSHAKE_FAILURE, 40) \
27  XX(BAD_CERTIFICATE, 42) \
28  XX(UNSUPPORTED_CERTIFICATE, 43) \
29  XX(CERTIFICATE_REVOKED, 44) \
30  XX(CERTIFICATE_EXPIRED, 45) \
31  XX(CERTIFICATE_UNKNOWN, 46) \
32  XX(ILLEGAL_PARAMETER, 47) \
33  XX(UNKNOWN_CA, 48) \
34  XX(ACCESS_DENIED, 49) \
35  XX(DECODE_ERROR, 50) \
36  XX(DECRYPT_ERROR, 51) \
37  XX(INVALID_VERSION, 70) \
38  XX(INSUFFICIENT_SECURITY, 71) \
39  XX(INTERNAL_ERROR, 80) \
40  XX(USER_CANCELLED, 90) \
41  XX(NO_RENEGOTIATION, 100) \
42  XX(UNSUPPORTED_EXTENSION, 110) \
43  XX(NO_APPLICATION_PROTOCOL, 120)
44 
49 enum class Alert {
50  Invalid = -1,
51 #define XX(tag, code) tag = code,
53 #undef XX
54 };
55 
57 
58 } // namespace Ssl
#define SSL_ALERT_CODE_MAP(XX)
Map of standard Alert codes.
Definition: Alert.h:20
The String class.
Definition: WString.h:137
Definition: Alert.h:16
Alert
Alert codes defined by the standard.
Definition: Alert.h:49
@ Invalid
Not an alert code.
XX(tag, code)
String getAlertString(Alert alert)