proxygen
CookieCipher.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #pragma once
10 
11 #include <fizz/protocol/Factory.h>
12 #include <fizz/record/Types.h>
13 
14 namespace fizz {
15 namespace server {
16 
17 struct CookieState {
21 
23 
25 };
26 
32 class CookieCipher {
33  public:
34  virtual ~CookieCipher() = default;
35 
36  virtual folly::Optional<CookieState> decrypt(Buf) const = 0;
37 };
38 
48  Buf cookie);
49 
55  const Factory& factory,
56  const std::vector<ProtocolVersion>& supportedVersions,
57  const std::vector<std::vector<CipherSuite>>& supportedCiphers,
58  const std::vector<NamedGroup>& supportedGroups,
59  const ClientHello& chlo,
60  Buf appToken);
61 } // namespace server
62 } // namespace fizz
Buf getStatelessHelloRetryRequest(ProtocolVersion version, CipherSuite cipher, folly::Optional< NamedGroup > group, Buf cookie)
static const std::string chlo
StringPiece cookie
CookieState getCookieState(const Factory &factory, const std::vector< ProtocolVersion > &supportedVersions, const std::vector< std::vector< CipherSuite >> &supportedCiphers, const std::vector< NamedGroup > &supportedGroups, const ClientHello &chlo, Buf appToken)
CipherSuite
Definition: Types.h:153
ProtocolVersion
Definition: Types.h:24
Definition: Actions.h:16
ProtocolVersion version
Definition: CookieCipher.h:18
std::unique_ptr< folly::IOBuf > Buf
Definition: Types.h:22
folly::Optional< NamedGroup > group
Definition: CookieCipher.h:20