proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
TLSDefinitions.h
Go to the documentation of this file.
1
/*
2
* Copyright 2016-present Facebook, Inc.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#pragma once
18
19
#include <
folly/io/Cursor.h
>
20
#include <
folly/io/IOBuf.h
>
21
#include <map>
22
#include <vector>
23
24
namespace
folly
{
25
namespace
ssl {
26
27
// http://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml
28
enum class
TLSExtension
:
uint16_t
{
29
SERVER_NAME
= 0,
30
MAX_FRAGMENT_LENGTH
= 1,
31
CLIENT_CERTIFICATE_URL
= 2,
32
TRUSTED_CA_KEYS
= 3,
33
TRUNCATED_HMAC
= 4,
34
STATUS_REQUEST
= 5,
35
USER_MAPPING
= 6,
36
CLIENT_AUTHZ
= 7,
37
SERVER_AUTHZ
= 8,
38
CERT_TYPE
= 9,
39
SUPPORTED_GROUPS
= 10,
40
EC_POINT_FORMATS
= 11,
41
SRP
= 12,
42
SIGNATURE_ALGORITHMS
= 13,
43
USE_SRTP
= 14,
44
HEARTBEAT
= 15,
45
APPLICATION_LAYER_PROTOCOL_NEGOTIATION
= 16,
46
STATUS_REQUEST_V2
= 17,
47
SIGNED_CERTIFICATE_TIMESTAMP
= 18,
48
CLIENT_CERTIFICATE_TYPE
= 19,
49
SERVER_CERTIFICATE_TYPE
= 20,
50
PADDING
= 21,
51
ENCRYPT_THEN_MAC
= 22,
52
EXTENDED_MASTER_SECRET
= 23,
53
SESSION_TICKET
= 35,
54
SUPPORTED_VERSIONS
= 43,
55
// Facebook-specific, not IANA assigned yet
56
TLS_CACHED_INFO_FB
= 60001,
57
// End Facebook-specific
58
RENEGOTIATION_INFO
= 65281
59
};
60
61
// http://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-18
62
enum class
HashAlgorithm
:
uint8_t
{
63
NONE
= 0,
64
MD5
= 1,
65
SHA1
= 2,
66
SHA224
= 3,
67
SHA256
= 4,
68
SHA384
= 5,
69
SHA512
= 6
70
};
71
72
// http://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-16
73
enum class
SignatureAlgorithm
:
uint8_t
{
74
ANONYMOUS
= 0,
75
RSA
= 1,
76
DSA
= 2,
77
ECDSA
= 3
78
};
79
80
struct
ClientHelloInfo
{
81
folly::IOBufQueue
clientHelloBuf_
;
82
uint8_t
clientHelloMajorVersion_
;
83
uint8_t
clientHelloMinorVersion_
;
84
std::vector<uint16_t>
clientHelloCipherSuites_
;
85
std::vector<uint8_t>
clientHelloCompressionMethods_
;
86
std::vector<TLSExtension>
clientHelloExtensions_
;
87
std::vector<std::pair<HashAlgorithm, SignatureAlgorithm>>
clientHelloSigAlgs_
;
88
std::vector<uint16_t>
clientHelloSupportedVersions_
;
89
};
90
91
}
// namespace ssl
92
}
// namespace folly
folly::ssl::HashAlgorithm::SHA224
folly::ssl::TLSExtension::STATUS_REQUEST
folly::ssl::TLSExtension::TRUNCATED_HMAC
folly::ssl::TLSExtension::USE_SRTP
folly::ssl::HashAlgorithm::SHA512
folly::ssl::TLSExtension::SRP
IOBuf.h
folly::ssl::TLSExtension::SIGNED_CERTIFICATE_TIMESTAMP
folly::ssl::HashAlgorithm::SHA1
folly::ssl::TLSExtension::MAX_FRAGMENT_LENGTH
folly::ssl::TLSExtension::USER_MAPPING
folly::ssl::SignatureAlgorithm::ANONYMOUS
folly::ssl::TLSExtension::EC_POINT_FORMATS
folly::ssl::TLSExtension::SERVER_CERTIFICATE_TYPE
folly::ssl::TLSExtension::STATUS_REQUEST_V2
folly::ssl::ClientHelloInfo::clientHelloSigAlgs_
std::vector< std::pair< HashAlgorithm, SignatureAlgorithm > > clientHelloSigAlgs_
Definition:
TLSDefinitions.h:87
folly
—— Concurrent Priority Queue Implementation ——
Definition:
AtomicBitSet.h:29
folly::ssl::HashAlgorithm
HashAlgorithm
Definition:
TLSDefinitions.h:62
folly::ssl::TLSExtension::PADDING
Cursor.h
folly::ssl::TLSExtension::CERT_TYPE
folly::ssl::TLSExtension::CLIENT_CERTIFICATE_URL
folly::ssl::ClientHelloInfo
Definition:
TLSDefinitions.h:80
folly::ssl::TLSExtension::ENCRYPT_THEN_MAC
folly::ssl::HashAlgorithm::SHA384
folly::ssl::TLSExtension
TLSExtension
Definition:
TLSDefinitions.h:28
folly::ssl::TLSExtension::SUPPORTED_GROUPS
folly::ssl::SignatureAlgorithm
SignatureAlgorithm
Definition:
TLSDefinitions.h:73
folly::ssl::TLSExtension::SERVER_AUTHZ
folly::ssl::TLSExtension::APPLICATION_LAYER_PROTOCOL_NEGOTIATION
folly::ssl::TLSExtension::TLS_CACHED_INFO_FB
folly::ssl::ClientHelloInfo::clientHelloSupportedVersions_
std::vector< uint16_t > clientHelloSupportedVersions_
Definition:
TLSDefinitions.h:88
folly::ssl::HashAlgorithm::SHA256
folly::ssl::TLSExtension::SESSION_TICKET
folly::ssl::TLSExtension::CLIENT_CERTIFICATE_TYPE
folly::ssl::SignatureAlgorithm::RSA
folly::ssl::TLSExtension::RENEGOTIATION_INFO
folly::ssl::TLSExtension::SUPPORTED_VERSIONS
uint8_t
uint8_t
Definition:
ConstexprMathBenchmark.cpp:178
folly::ssl::TLSExtension::HEARTBEAT
folly::ssl::ClientHelloInfo::clientHelloBuf_
folly::IOBufQueue clientHelloBuf_
Definition:
TLSDefinitions.h:81
folly::IOBufQueue
Definition:
IOBufQueue.h:35
folly::ssl::HashAlgorithm::MD5
folly::ssl::ClientHelloInfo::clientHelloCompressionMethods_
std::vector< uint8_t > clientHelloCompressionMethods_
Definition:
TLSDefinitions.h:85
folly::ssl::TLSExtension::TRUSTED_CA_KEYS
folly::ssl::TLSExtension::SERVER_NAME
folly::ssl::ClientHelloInfo::clientHelloMajorVersion_
uint8_t clientHelloMajorVersion_
Definition:
TLSDefinitions.h:82
folly::ssl::HashAlgorithm::NONE
folly::ssl::ClientHelloInfo::clientHelloMinorVersion_
uint8_t clientHelloMinorVersion_
Definition:
TLSDefinitions.h:83
folly::ssl::TLSExtension::SIGNATURE_ALGORITHMS
folly::ssl::SignatureAlgorithm::ECDSA
uint16_t
uint16_t
Definition:
ConstexprMathBenchmark.cpp:182
folly::ssl::SignatureAlgorithm::DSA
folly::ssl::TLSExtension::EXTENDED_MASTER_SECRET
folly::ssl::ClientHelloInfo::clientHelloExtensions_
std::vector< TLSExtension > clientHelloExtensions_
Definition:
TLSDefinitions.h:86
folly::ssl::TLSExtension::CLIENT_AUTHZ
folly::ssl::ClientHelloInfo::clientHelloCipherSuites_
std::vector< uint16_t > clientHelloCipherSuites_
Definition:
TLSDefinitions.h:84
proxygen
folly
folly
io
async
ssl
TLSDefinitions.h
Generated by
1.8.11