This repository has been archived by the owner on Oct 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtls_alert.rflx
45 lines (40 loc) · 1.72 KB
/
tls_alert.rflx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package TLS_Alert is
-- RFC 8446
type Alert_Level is (WARNING => 1, FATAL => 2) with Size => 8;
type Alert_Description is
(CLOSE_NOTIFY => 0,
UNEXPECTED_MESSAGE => 10,
BAD_RECORD_MAC => 20,
RECORD_OVERFLOW => 22,
HANDSHAKE_FAILURE => 40,
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,
PROTOCOL_VERSION => 70,
INSUFFICIENT_SECURITY => 71,
INTERNAL_ERROR => 80,
INAPPROPRIATE_FALLBACK => 86,
USER_CANCELED => 90,
MISSING_EXTENSION => 109,
UNSUPPORTED_EXTENSION => 110,
UNRECOGNIZED_NAME => 112,
BAD_CERTIFICATE_STATUS_RESPONSE => 113,
UNKNOWN_PSK_IDENTITY => 115,
CERTIFICATE_REQUIRED => 116,
NO_APPLICATION_PROTOCOL => 120)
with Size => 8;
type Alert is
message
Level : Alert_Level;
Description : Alert_Description
if (Level = WARNING and (Description = CLOSE_NOTIFY or Description = USER_CANCELED))
or (Level = FATAL and Description /= CLOSE_NOTIFY and Description /= USER_CANCELED);
end message;
end TLS_Alert;