proxygen
JavaCryptoPeerCert.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/record/Types.h>
15 #include <jni.h>
16 
17 namespace fizz {
18 
20 
21 class JavaCryptoPeerCert : public PeerCert {
22  public:
23  static void onLoad(JNIEnv* env);
24 
25  explicit JavaCryptoPeerCert(Buf certData);
26 
27  ~JavaCryptoPeerCert() override = default;
28 
29  // Returns the full Distinguished Name of the certificate
30  std::string getIdentity() const override;
31 
32  void verify(
33  SignatureScheme scheme,
35  folly::ByteRange toBeSigned,
36  folly::ByteRange signature) const override;
37 
38  folly::ssl::X509UniquePtr getX509() const override;
39 
40  private:
41  jobject jobject_;
42 };
43 
44 } // namespace fizz
std::unique_ptr< X509, X509Deleter > X509UniquePtr
context
Definition: CMakeCache.txt:563
SignatureScheme
Definition: Types.h:257
Definition: Actions.h:16
CertificateVerifyContext
Definition: Certificate.h:20
void verify(SignatureScheme scheme, CertificateVerifyContext context, folly::ByteRange toBeSigned, folly::ByteRange signature) const override
const char * string
Definition: Conv.cpp:212
std::unique_ptr< folly::IOBuf > Buf
Definition: Types.h:22
std::string getIdentity() const override
~JavaCryptoPeerCert() override=default
static void onLoad(JNIEnv *env)
folly::ssl::X509UniquePtr getX509() const override