proxygen
ExportedAuthenticator.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 
13 #include <fizz/protocol/Exporter.h>
14 #include <fizz/protocol/Protocol.h>
15 #include <fizz/record/Extensions.h>
17 #include <fizz/record/Types.h>
18 
19 namespace fizz {
20 
21 enum class Direction : uint8_t {
22  UPSTREAM, // toward the server
23  DOWNSTREAM // toward the client
24 };
25 
33  public:
43  static Buf getAuthenticatorRequest(
44  Buf certificateRequestContext,
45  std::vector<fizz::Extension> extensions);
46 
54  static Buf getAuthenticator(
55  const fizz::AsyncFizzBase& transport,
56  Direction dir,
57  const SelfCert& cert,
58  Buf authenticatorRequest);
59 
60  static Buf makeAuthenticator(
61  std::unique_ptr<KeyDerivation>& kderiver,
62  std::vector<SignatureScheme> supportedSchemes,
63  const SelfCert& cert,
64  Buf authenticatorRequest,
65  Buf handshakeContext,
66  Buf finishedMacKey,
68 
74  static Buf getAuthenticatorContext(Buf authenticator);
75 
82  static folly::Optional<std::vector<CertificateEntry>> validateAuthenticator(
83  const fizz::AsyncFizzBase& transport,
84  Direction dir,
85  Buf authenticatorRequest,
86  Buf authenticator);
87 
89  std::unique_ptr<KeyDerivation>& kderiver,
90  Buf authenticatorRequest,
91  Buf authenticator,
92  Buf handshakeContext,
93  Buf finishedMacKey,
94  CertificateVerifyContext context);
95 };
96 
97 } // namespace fizz
context
Definition: CMakeCache.txt:563
Definition: Actions.h:16
CertificateVerifyContext
Definition: Certificate.h:20
std::unique_ptr< folly::IOBuf > Buf
Definition: Types.h:22