TianoCore EDK2 master
Loading...
Searching...
No Matches
Tls1.h
Go to the documentation of this file.
1
10#ifndef __TLS_1_H__
11#define __TLS_1_H__
12
13#pragma pack(1)
14
18#define TLS_RSA_WITH_NULL_MD5 {0x00, 0x01}
19#define TLS_RSA_WITH_NULL_SHA {0x00, 0x02}
20#define TLS_RSA_WITH_RC4_128_MD5 {0x00, 0x04}
21#define TLS_RSA_WITH_RC4_128_SHA {0x00, 0x05}
22#define TLS_RSA_WITH_IDEA_CBC_SHA {0x00, 0x07}
23#define TLS_RSA_WITH_DES_CBC_SHA {0x00, 0x09}
24#define TLS_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x0A}
25#define TLS_DH_DSS_WITH_DES_CBC_SHA {0x00, 0x0C}
26#define TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA {0x00, 0x0D}
27#define TLS_DH_RSA_WITH_DES_CBC_SHA {0x00, 0x0F}
28#define TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x10}
29#define TLS_DHE_DSS_WITH_DES_CBC_SHA {0x00, 0x12}
30#define TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA {0x00, 0x13}
31#define TLS_DHE_RSA_WITH_DES_CBC_SHA {0x00, 0x15}
32#define TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x16}
33#define TLS_RSA_WITH_AES_128_CBC_SHA {0x00, 0x2F}
34#define TLS_DH_DSS_WITH_AES_128_CBC_SHA {0x00, 0x30}
35#define TLS_DH_RSA_WITH_AES_128_CBC_SHA {0x00, 0x31}
36#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA {0x00, 0x32}
37#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA {0x00, 0x33}
38#define TLS_RSA_WITH_AES_256_CBC_SHA {0x00, 0x35}
39#define TLS_DH_DSS_WITH_AES_256_CBC_SHA {0x00, 0x36}
40#define TLS_DH_RSA_WITH_AES_256_CBC_SHA {0x00, 0x37}
41#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA {0x00, 0x38}
42#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA {0x00, 0x39}
43#define TLS_RSA_WITH_NULL_SHA256 {0x00, 0x3B}
44#define TLS_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x3C}
45#define TLS_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x3D}
46#define TLS_DH_DSS_WITH_AES_128_CBC_SHA256 {0x00, 0x3E}
47#define TLS_DH_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x3F}
48#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 {0x00, 0x40}
49#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x67}
50#define TLS_DH_DSS_WITH_AES_256_CBC_SHA256 {0x00, 0x68}
51#define TLS_DH_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x69}
52#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 {0x00, 0x6A}
53#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x6B}
54#define TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 {0x00, 0x9F}
55#define TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 {0xC0, 0x2B}
56#define TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 {0xC0, 0x2C}
57#define TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 {0xC0, 0x30}
58
62#define TLS10_PROTOCOL_VERSION_MAJOR 0x03
63#define TLS10_PROTOCOL_VERSION_MINOR 0x01
64#define TLS11_PROTOCOL_VERSION_MAJOR 0x03
65#define TLS11_PROTOCOL_VERSION_MINOR 0x02
66#define TLS12_PROTOCOL_VERSION_MAJOR 0x03
67#define TLS12_PROTOCOL_VERSION_MINOR 0x03
68
72typedef enum {
73 TlsContentTypeChangeCipherSpec = 20,
74 TlsContentTypeAlert = 21,
75 TlsContentTypeHandshake = 22,
76 TlsContentTypeApplicationData = 23,
78
82typedef struct {
83 UINT8 ContentType;
84 EFI_TLS_VERSION Version;
85 UINT16 Length;
87
88#define TLS_RECORD_HEADER_LENGTH 5
89
90//
91// The length (in bytes) of the TLSPlaintext records payload MUST NOT exceed 2^14.
92// Refers to section 6.2 of RFC5246.
93//
94#define TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH 16384
95
96//
97// The length (in bytes) of the TLSCiphertext records payload MUST NOT exceed 2^14 + 2048.
98// Refers to section 6.2 of RFC5246.
99//
100#define TLS_CIPHERTEXT_RECORD_MAX_PAYLOAD_LENGTH 18432
101
105typedef enum {
106 TlsHashAlgoNone = 0,
107 TlsHashAlgoMd5 = 1,
108 TlsHashAlgoSha1 = 2,
109 TlsHashAlgoSha224 = 3,
110 TlsHashAlgoSha256 = 4,
111 TlsHashAlgoSha384 = 5,
112 TlsHashAlgoSha512 = 6,
114
118typedef enum {
119 TlsSignatureAlgoAnonymous = 0,
120 TlsSignatureAlgoRsa = 1,
121 TlsSignatureAlgoDsa = 2,
122 TlsSignatureAlgoEcdsa = 3,
124
128typedef enum {
129 TlsEcNamedCurveSecp256r1 = 23,
130 TlsEcNamedCurveSecp384r1 = 24,
131 TlsEcNamedCurveSecp521r1 = 25,
132 TlsEcNamedCurveX25519 = 29,
133 TlsEcNamedCurveX448 = 30,
135
136#pragma pack()
137
138#endif
TLS_HASH_ALGO
Definition: Tls1.h:105
TLS_CONTENT_TYPE
Definition: Tls1.h:72
TLS_SIGNATURE_ALGO
Definition: Tls1.h:118
TLS_EC_NAMED_CURVE
Definition: Tls1.h:128