proxygen
SSLSessionCacheUtils.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 <folly/FBString.h>
19 #include <folly/Optional.h>
21 
22 #include <openssl/ssl.h>
23 
24 namespace wangle {
25 
26 // Service identity access on the session.
28 bool setSessionServiceIdentity(SSL_SESSION* sess, const std::string& str);
29 
30 // Helpers to convert SSLSessionCacheData to/from SSL_SESSION
32 SSL_SESSION* getSessionFromCacheData(const SSLSessionCacheData& data);
33 
34 // Does a clone of just the session data and service identity
35 // Internal links to SSL structs are not kept
36 SSL_SESSION* cloneSSLSession(SSL_SESSION* toClone);
37 
38 }
bool setSessionServiceIdentity(SSL_SESSION *session, const std::string &str)
folly::Optional< std::string > getSessionServiceIdentity(SSL_SESSION *session)
folly::Optional< SSLSessionCacheData > getCacheDataForSession(SSL_SESSION *sess)
SSL_SESSION * getSessionFromCacheData(const SSLSessionCacheData &data)
SSL_SESSION * cloneSSLSession(SSL_SESSION *toClone)
const char * string
Definition: Conv.cpp:212
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43