Botan
3.7.1
Crypto and TLS for C&
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
c
d
f
i
m
n
r
s
t
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
f
h
i
m
n
o
p
r
s
t
u
v
w
Enumerations
b
c
d
e
k
m
n
o
p
s
t
x
Enumerator
_
a
b
c
d
e
f
h
k
l
m
n
p
q
r
s
t
u
w
x
Related Symbols
b
c
d
e
f
k
o
p
s
t
x
Files
File List
File Members
All
_
a
b
c
d
e
f
i
k
m
n
o
p
q
s
t
u
w
x
y
z
Functions
b
c
Variables
Typedefs
b
c
e
p
t
Enumerations
Enumerator
b
c
d
e
k
n
Macros
_
a
b
c
f
m
n
q
s
t
w
src
lib
tls
tls_magic.h
Go to the documentation of this file.
1
/*
2
* SSL/TLS Protocol Constants
3
* (C) 2004-2010 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
6
*/
7
8
#ifndef BOTAN_TLS_PROTOCOL_MAGIC_H_
9
#define BOTAN_TLS_PROTOCOL_MAGIC_H_
10
11
#include <vector>
12
13
#include <botan/types.h>
14
15
//BOTAN_FUTURE_INTERNAL_HEADER(tls_magic.h)
16
17
namespace
Botan::TLS
{
18
19
/**
20
* Protocol Constants for SSL/TLS
21
*
22
* TODO: this should not be an enum
23
*/
24
enum
Size_Limits
:
size_t
{
25
TLS_HEADER_SIZE
= 5,
26
DTLS_HEADER_SIZE
=
TLS_HEADER_SIZE
+ 8,
27
28
// The "TLSInnerPlaintext" length, i.e. the maximum amount of plaintext
29
// application data that can be transmitted in a single TLS record.
30
MAX_PLAINTEXT_SIZE
= 16 * 1024,
31
32
MAX_COMPRESSED_SIZE
=
MAX_PLAINTEXT_SIZE
+ 1024,
33
MAX_CIPHERTEXT_SIZE
=
MAX_COMPRESSED_SIZE
+ 1024,
34
35
// RFC 8446 5.2:
36
// This limit is derived from the maximum TLSInnerPlaintext length of 2^14
37
// octets + 1 octet for ContentType + the maximum AEAD expansion of 255
38
// octets.
39
MAX_AEAD_EXPANSION_SIZE_TLS13
= 255,
40
MAX_CIPHERTEXT_SIZE_TLS13
=
MAX_PLAINTEXT_SIZE
+
MAX_AEAD_EXPANSION_SIZE_TLS13
+ 1
41
};
24
enum
Size_Limits
:
size_t
{
…
};
42
43
enum class
Connection_Side
{
44
Client
= 1,
45
Server
= 2,
46
47
CLIENT
BOTAN_DEPRECATED
(
"Use Connection_Side::Client"
) =
Client
,
48
SERVER
BOTAN_DEPRECATED
(
"Use Connection_Side::Server"
) =
Server
,
49
};
43
enum class
Connection_Side
{
…
};
50
51
enum class
Handshake_Type
{
52
HelloRequest
= 0,
53
ClientHello
= 1,
54
ServerHello
= 2,
55
HelloVerifyRequest
= 3,
56
NewSessionTicket
= 4,
// RFC 5077
57
58
EndOfEarlyData
= 5,
// RFC 8446 (TLS 1.3)
59
EncryptedExtensions
= 8,
// RFC 8446 (TLS 1.3)
60
61
Certificate
= 11,
62
ServerKeyExchange
= 12,
63
CertificateRequest
= 13,
64
ServerHelloDone
= 14,
65
CertificateVerify
= 15,
66
ClientKeyExchange
= 16,
67
Finished
= 20,
68
69
CertificateUrl
= 21,
70
CertificateStatus
= 22,
71
72
KeyUpdate
= 24,
// RFC 8446 (TLS 1.3)
73
74
HelloRetryRequest
= 253,
// Not a wire value (HRR appears as an ordinary Server Hello)
75
HandshakeCCS
= 254,
// Not a wire value (TLS 1.3 uses this value for 'message_hash' -- RFC 8446 4.4.1)
76
None
= 255
// Null value
77
};
51
enum class
Handshake_Type
{
…
};
78
79
BOTAN_TEST_API
const
char
*
handshake_type_to_string
(
Handshake_Type
t);
80
81
using
Transcript_Hash
= std::vector<uint8_t>;
82
83
}
// namespace Botan::TLS
84
85
#endif
BOTAN_DEPRECATED
#define BOTAN_DEPRECATED(msg)
Definition
api.h:59
BOTAN_TEST_API
#define BOTAN_TEST_API
Definition
api.h:39
Botan::TLS::Client
Definition
tls_client.h:28
Botan::TLS::Finished
Definition
tls_messages.h:831
Botan::TLS::Server
Definition
tls_server.h:26
Botan::TLS
Definition
asio_context.cpp:17
Botan::TLS::handshake_type_to_string
const char * handshake_type_to_string(Handshake_Type type)
Definition
tls_handshake_state.cpp:23
Botan::TLS::Handshake_Type
Handshake_Type
Definition
tls_magic.h:51
Botan::TLS::Handshake_Type::HelloRequest
@ HelloRequest
Botan::TLS::Handshake_Type::HelloRetryRequest
@ HelloRetryRequest
Botan::TLS::Handshake_Type::CertificateUrl
@ CertificateUrl
Botan::TLS::Handshake_Type::ClientHello
@ ClientHello
Botan::TLS::Handshake_Type::ServerHelloDone
@ ServerHelloDone
Botan::TLS::Handshake_Type::CertificateStatus
@ CertificateStatus
Botan::TLS::Handshake_Type::HandshakeCCS
@ HandshakeCCS
Botan::TLS::Handshake_Type::CertificateVerify
@ CertificateVerify
Botan::TLS::Handshake_Type::KeyUpdate
@ KeyUpdate
Botan::TLS::Handshake_Type::ClientKeyExchange
@ ClientKeyExchange
Botan::TLS::Handshake_Type::EndOfEarlyData
@ EndOfEarlyData
Botan::TLS::Handshake_Type::HelloVerifyRequest
@ HelloVerifyRequest
Botan::TLS::Handshake_Type::CertificateRequest
@ CertificateRequest
Botan::TLS::Handshake_Type::NewSessionTicket
@ NewSessionTicket
Botan::TLS::Handshake_Type::ServerHello
@ ServerHello
Botan::TLS::Handshake_Type::Certificate
@ Certificate
Botan::TLS::Handshake_Type::ServerKeyExchange
@ ServerKeyExchange
Botan::TLS::Handshake_Type::EncryptedExtensions
@ EncryptedExtensions
Botan::TLS::Transcript_Hash
std::vector< uint8_t > Transcript_Hash
Definition
tls_magic.h:81
Botan::TLS::Connection_Side
Connection_Side
Definition
tls_magic.h:43
Botan::TLS::Connection_Side::SERVER
@ SERVER
Botan::TLS::Connection_Side::Client
@ Client
Botan::TLS::Connection_Side::Server
@ Server
Botan::TLS::Connection_Side::CLIENT
@ CLIENT
Botan::TLS::Size_Limits
Size_Limits
Definition
tls_magic.h:24
Botan::TLS::MAX_CIPHERTEXT_SIZE
@ MAX_CIPHERTEXT_SIZE
Definition
tls_magic.h:33
Botan::TLS::MAX_PLAINTEXT_SIZE
@ MAX_PLAINTEXT_SIZE
Definition
tls_magic.h:30
Botan::TLS::MAX_CIPHERTEXT_SIZE_TLS13
@ MAX_CIPHERTEXT_SIZE_TLS13
Definition
tls_magic.h:40
Botan::TLS::MAX_AEAD_EXPANSION_SIZE_TLS13
@ MAX_AEAD_EXPANSION_SIZE_TLS13
Definition
tls_magic.h:39
Botan::TLS::TLS_HEADER_SIZE
@ TLS_HEADER_SIZE
Definition
tls_magic.h:25
Botan::TLS::MAX_COMPRESSED_SIZE
@ MAX_COMPRESSED_SIZE
Definition
tls_magic.h:32
Botan::TLS::DTLS_HEADER_SIZE
@ DTLS_HEADER_SIZE
Definition
tls_magic.h:26
Botan::TLS::AlertType::None
@ None
Generated by
1.12.0