~ubuntu-branches/debian/sid/botan/sid

« back to all changes in this revision

Viewing changes to src/lib/tls/tls_magic.h

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2018-03-01 22:23:25 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20180301222325-7p7vc45gu3hta34d
Tags: 2.4.0-2
* Don't remove .doctrees from the manual if it doesn't exist.
* Don't specify parallel to debhelper.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
namespace Botan {
 
12
 
 
13
namespace TLS {
 
14
 
 
15
/**
 
16
* Protocol Constants for SSL/TLS
 
17
*/
 
18
enum Size_Limits {
 
19
   TLS_HEADER_SIZE    = 5,
 
20
   DTLS_HEADER_SIZE   = TLS_HEADER_SIZE + 8,
 
21
 
 
22
   MAX_PLAINTEXT_SIZE = 16*1024,
 
23
   MAX_COMPRESSED_SIZE = MAX_PLAINTEXT_SIZE + 1024,
 
24
   MAX_CIPHERTEXT_SIZE = MAX_COMPRESSED_SIZE + 1024,
 
25
};
 
26
 
 
27
enum Connection_Side { CLIENT = 1, SERVER = 2 };
 
28
 
 
29
enum Record_Type {
 
30
   CHANGE_CIPHER_SPEC = 20,
 
31
   ALERT              = 21,
 
32
   HANDSHAKE          = 22,
 
33
   APPLICATION_DATA   = 23,
 
34
 
 
35
   NO_RECORD          = 256
 
36
};
 
37
 
 
38
enum Handshake_Type {
 
39
   HELLO_REQUEST        = 0,
 
40
   CLIENT_HELLO         = 1,
 
41
   SERVER_HELLO         = 2,
 
42
   HELLO_VERIFY_REQUEST = 3,
 
43
   NEW_SESSION_TICKET   = 4, // RFC 5077
 
44
   CERTIFICATE          = 11,
 
45
   SERVER_KEX           = 12,
 
46
   CERTIFICATE_REQUEST  = 13,
 
47
   SERVER_HELLO_DONE    = 14,
 
48
   CERTIFICATE_VERIFY   = 15,
 
49
   CLIENT_KEX           = 16,
 
50
   FINISHED             = 20,
 
51
 
 
52
   CERTIFICATE_URL      = 21,
 
53
   CERTIFICATE_STATUS   = 22,
 
54
 
 
55
   HANDSHAKE_CCS        = 254, // Not a wire value
 
56
   HANDSHAKE_NONE       = 255  // Null value
 
57
};
 
58
 
 
59
const char* handshake_type_to_string(Handshake_Type t);
 
60
 
 
61
enum Compression_Method {
 
62
   NO_COMPRESSION       = 0x00,
 
63
   DEFLATE_COMPRESSION  = 0x01
 
64
};
 
65
 
 
66
}
 
67
 
 
68
}
 
69
 
 
70
#endif