proxygen
ThreadSafeSSLSessionCache.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 
20 
21 #include <folly/SharedMutex.h>
22 
23 namespace wangle {
24 
31  public:
33  std::unique_ptr<SSLSessionCallbacks> delegate) :
34  delegate_(std::move(delegate)) {}
35 
36  // From SSLSessionCallbacks
37  void setSSLSession(
38  const std::string& identity, SSLSessionPtr session) noexcept override;
40  const std::string& identity) const noexcept override;
41  bool removeSSLSession(const std::string& identity) noexcept override;
42  bool supportsPersistence() const noexcept override;
43  size_t size() const override;
44 
45  private:
46  std::unique_ptr<SSLSessionCallbacks> delegate_;
48 };
49 
50 }
SSLSessionPtr getSSLSession(const std::string &identity) const noexceptoverride
void setSSLSession(const std::string &identity, SSLSessionPtr session) noexceptoverride
bool supportsPersistence() const noexceptoverride
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
STL namespace.
ThreadSafeSSLSessionCache(std::unique_ptr< SSLSessionCallbacks > delegate)
requires E e noexcept(noexcept(s.error(std::move(e))))
std::unique_ptr< SSL_SESSION, SessionDestructor > SSLSessionPtr
Definition: SSLSession.h:32
bool removeSSLSession(const std::string &identity) noexceptoverride
std::unique_ptr< SSLSessionCallbacks > delegate_
const char * string
Definition: Conv.cpp:212