proxygen
TicketCodec.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/record/Types.h>
14 
15 namespace fizz {
16 namespace server {
18  None = 0,
19  X509 = 1,
20  IdentityOnly = 2
21 };
22 }
23 
25 
26 namespace server {
27 
29  CertificateStorage storage,
30  const std::shared_ptr<const Cert>& cert,
31  folly::io::Appender& appender);
32 
33 std::shared_ptr<const Cert> readClientCertificate(folly::io::Cursor& cursor);
34 
35 template <CertificateStorage Storage>
36 struct TicketCodec {
41  static constexpr folly::StringPiece Label{"Fizz Ticket Codec v2"};
42 
44 
45  static ResumptionState decode(Buf encoded, const FizzServerContext* context);
46 };
47 } // namespace server
48 } // namespace fizz
49 
folly::StringPiece toString(StateEnum state)
Definition: State.cpp:16
context
Definition: CMakeCache.txt:563
TokenBindingMessage decode(folly::io::Cursor &cursor)
Definition: Types.cpp:132
std::shared_ptr< const Cert > readClientCertificate(folly::io::Cursor &cursor)
Definition: TicketCodec.cpp:47
Definition: Actions.h:16
Buf encode(TokenBindingMessage &&message)
Definition: Types.cpp:124
const char * string
Definition: Conv.cpp:212
std::unique_ptr< folly::IOBuf > Buf
Definition: Types.h:22
void appendClientCertificate(CertificateStorage storage, const std::shared_ptr< const Cert > &cert, folly::io::Appender &appender)
Definition: TicketCodec.cpp:26
state
Definition: http_parser.c:272