proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
ServerSSLContext.h
Go to the documentation of this file.
1
/*
2
* Copyright 2017-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
#pragma once
17
18
#include <memory>
19
#include <string>
20
21
#include <
folly/io/async/SSLContext.h
>
22
23
namespace
folly
{
24
25
class
EventBase;
26
class
SocketAddress;
27
28
}
29
30
namespace
wangle
{
31
32
struct
SSLCacheOptions;
33
struct
SSLContextConfig;
34
class
SSLStats;
35
class
TLSTicketKeyManager;
36
struct
TLSTicketKeySeeds;
37
class
SSLSessionCacheManager;
38
class
SSLCacheProvider;
39
40
// A SSL Context that owns a session cache and ticket key manager.
41
// It is used for server side SSL connections.
42
class
ServerSSLContext
:
public
folly::SSLContext
{
43
public
:
44
explicit
ServerSSLContext
(
SSLVersion
version
= TLSv1);
45
46
virtual
~
ServerSSLContext
()
override
=
default
;
47
48
void
setupTicketManager(
49
const
TLSTicketKeySeeds
* ticketSeeds,
50
const
SSLContextConfig
& ctxConfig,
51
SSLStats
* stats);
52
53
void
setupSessionCache(
54
const
SSLContextConfig
& ctxConfig,
55
const
SSLCacheOptions
& cacheOptions,
56
const
std::shared_ptr<SSLCacheProvider>& externalCache,
57
const
std::string
& sessionIdContext,
58
SSLStats
* stats);
59
60
// Get the ticket key manager that this context manages.
61
TLSTicketKeyManager
*
getTicketManager
() {
62
return
ticketManager_.get();
63
}
64
65
// Get the session cache manager that this context manages.
66
SSLSessionCacheManager
*
getSessionCacheManager
() {
67
return
sessionCacheManager_.get();
68
}
69
70
private
:
71
std::unique_ptr<TLSTicketKeyManager>
ticketManager_
;
72
std::unique_ptr<SSLSessionCacheManager>
sessionCacheManager_
;
73
};
74
75
}
SSLContext.h
wangle::ServerSSLContext::getTicketManager
TLSTicketKeyManager * getTicketManager()
Definition:
ServerSSLContext.h:61
wangle::SSLCacheOptions
Definition:
SSLCacheOptions.h:23
folly::SSLContext::SSLVersion
SSLVersion
Definition:
SSLContext.h:91
folly
—— Concurrent Priority Queue Implementation ——
Definition:
AtomicBitSet.h:29
wangle::TLSTicketKeySeeds
Definition:
TLSTicketKeySeeds.h:24
wangle
Definition:
Acceptor.cpp:49
folly::SSLContext
Definition:
SSLContext.h:89
version
ProtocolVersion version
Definition:
ClientProtocol.cpp:1005
wangle::SSLSessionCacheManager
Definition:
SSLSessionCacheManager.h:136
string
const char * string
Definition:
Conv.cpp:212
wangle::ServerSSLContext
Definition:
ServerSSLContext.h:42
wangle::SSLStats
Definition:
SSLStats.h:22
wangle::SSLContextConfig
Definition:
SSLContextConfig.h:38
wangle::TLSTicketKeyManager
Definition:
TLSTicketKeyManager.h:24
wangle::ServerSSLContext::ticketManager_
std::unique_ptr< TLSTicketKeyManager > ticketManager_
Definition:
ServerSSLContext.h:71
wangle::ServerSSLContext::getSessionCacheManager
SSLSessionCacheManager * getSessionCacheManager()
Definition:
ServerSSLContext.h:66
wangle::ServerSSLContext::sessionCacheManager_
std::unique_ptr< SSLSessionCacheManager > sessionCacheManager_
Definition:
ServerSSLContext.h:72
proxygen
wangle
wangle
ssl
ServerSSLContext.h
Generated by
1.8.11