proxygen
|
#include <JavaCryptoPeerCert.h>
Public Member Functions | |
JavaCryptoPeerCert (Buf certData) | |
~JavaCryptoPeerCert () override=default | |
std::string | getIdentity () const override |
void | verify (SignatureScheme scheme, CertificateVerifyContext context, folly::ByteRange toBeSigned, folly::ByteRange signature) const override |
folly::ssl::X509UniquePtr | getX509 () const override |
Public Member Functions inherited from fizz::PeerCert | |
virtual | ~PeerCert ()=default |
Public Member Functions inherited from folly::AsyncTransportCertificate | |
virtual | ~AsyncTransportCertificate ()=default |
Static Public Member Functions | |
static void | onLoad (JNIEnv *env) |
Private Attributes | |
jobject | jobject_ |
Definition at line 21 of file JavaCryptoPeerCert.h.
|
explicit |
Definition at line 30 of file JavaCryptoPeerCert.cpp.
References fizz::jni::createByteArray(), fizz::jni::getEnv(), jobject_, fizz::jni::maybeThrowException(), folly::gen::move, and fizz::jni::releaseEnv().
|
overridedefault |
|
overridevirtual |
Returns the identity this certificate conveys.
An identity is an opaque string that may be used by the application for authentication or authorization purposes. The exact structure and semantics of the identity string are determined by concrete implementations of AsyncTransport.
Implements folly::AsyncTransportCertificate.
Definition at line 42 of file JavaCryptoPeerCert.cpp.
References fizz::jni::getEnv(), jobject_, fizz::jni::maybeThrowException(), fizz::jni::releaseEnv(), and string.
|
overridevirtual |
Returns an X509 structure associated with this Certificate. This may be null.
Implements folly::AsyncTransportCertificate.
Definition at line 88 of file JavaCryptoPeerCert.cpp.
|
static |
Definition at line 21 of file JavaCryptoPeerCert.cpp.
References fizz::jni::getClass(), and fizz::jni::getMethodID().
Referenced by JNI_OnLoad().
|
overridevirtual |
Verifies that signature is a valid signature of toBeSigned. Throws if it's not.
Implements fizz::PeerCert.
Definition at line 56 of file JavaCryptoPeerCert.cpp.
References fizz::jni::createByteArray(), fizz::ecdsa_secp256r1_sha256, fizz::jni::getEnv(), jobject_, fizz::jni::maybeThrowException(), folly::gen::move, fizz::CertUtils::prepareSignData(), fizz::jni::releaseEnv(), and string.
|
private |
Definition at line 41 of file JavaCryptoPeerCert.h.
Referenced by getIdentity(), JavaCryptoPeerCert(), and verify().