proxygen
JavaCryptoCertificateVerifier.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 
12 
13 namespace fizz {
14 
20 
28  public:
30  : context_(context), x509Store_(nullptr) {
31  createAuthorities();
32  }
36  : context_(context), x509Store_(std::move(store)) {
37  createAuthorities();
38  }
39 
40  void verify(const std::vector<std::shared_ptr<const fizz::PeerCert>>& certs)
41  const override;
42 
44  x509Store_ = std::move(store);
45  createAuthorities();
46  }
47 
48  std::vector<Extension> getCertificateRequestExtensions() const override;
49 
50  static X509_STORE* getDefaultX509Store();
51 
52  static std::unique_ptr<JavaCryptoCertificateVerifier> createFromCAFile(
54  const std::string& caFile);
55 
56  private:
57  void createAuthorities();
61 };
62 } // namespace fizz
void verify(int extras)
context
Definition: CMakeCache.txt:563
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
STL namespace.
#define nullptr
Definition: http_parser.c:41
void setX509Store(folly::ssl::X509StoreUniquePtr &&store)
std::unique_ptr< X509_STORE, X509StoreDeleter > X509StoreUniquePtr
Definition: Actions.h:16
JavaCryptoCertificateVerifier(VerificationContext context, folly::ssl::X509StoreUniquePtr &&store)
const char * string
Definition: Conv.cpp:212
JavaCryptoCertificateVerifier(VerificationContext context)