proxygen
|
#include <DefaultCertificateVerifier.h>
Public Types | |
using | X509VerifyCallback = int(*)(int, X509_STORE_CTX *) |
Public Member Functions | |
DefaultCertificateVerifier (VerificationContext context) | |
DefaultCertificateVerifier (VerificationContext context, folly::ssl::X509StoreUniquePtr &&store) | |
void | verify (const std::vector< std::shared_ptr< const fizz::PeerCert >> &certs) const override |
void | setCustomVerifyCallback (X509VerifyCallback cb) |
void | setX509Store (folly::ssl::X509StoreUniquePtr &&store) |
std::vector< Extension > | getCertificateRequestExtensions () const override |
Public Member Functions inherited from fizz::CertificateVerifier | |
virtual | ~CertificateVerifier ()=default |
Static Public Member Functions | |
static X509_STORE * | getDefaultX509Store () |
static std::unique_ptr< DefaultCertificateVerifier > | createFromCAFile (VerificationContext context, const std::string &caFile) |
Private Member Functions | |
void | createAuthorities () |
Private Attributes | |
CertificateAuthorities | authorities_ |
VerificationContext | context_ |
folly::ssl::X509StoreUniquePtr | x509Store_ |
X509VerifyCallback | customVerifyCallback_ {nullptr} |
Certificate verifier that verifies a certificate against a trusted certificate store
This does not perform any identity or hostname verification.
Definition at line 27 of file DefaultCertificateVerifier.h.
using fizz::DefaultCertificateVerifier::X509VerifyCallback = int (*)(int, X509_STORE_CTX*) |
Definition at line 29 of file DefaultCertificateVerifier.h.
|
inlineexplicit |
Definition at line 31 of file DefaultCertificateVerifier.h.
|
inlineexplicit |
Definition at line 36 of file DefaultCertificateVerifier.h.
References verify().
|
private |
Definition at line 93 of file DefaultCertificateVerifier.cpp.
References fizz::CertificateAuthorities::authorities, folly::IOBuf::create(), fizz::DistinguishedName::encoded_name, i, folly::gen::move, folly::portability::ssl::STACK_OF(), folly::portability::ssl::X509_OBJECT_get0_X509(), and folly::portability::ssl::X509_OBJECT_get_type().
|
static |
Definition at line 21 of file DefaultCertificateVerifier.cpp.
References context, folly::gen::move, and folly::ssl::OpenSSLCertUtils::readStoreFromFile().
|
overridevirtual |
Returns a vector of extensions to send in a certificate request.
Implements fizz::CertificateVerifier.
Definition at line 140 of file DefaultCertificateVerifier.cpp.
References fizz::encodeExtension().
|
static |
Definition at line 121 of file DefaultCertificateVerifier.cpp.
|
inline |
Definition at line 46 of file DefaultCertificateVerifier.h.
|
inline |
Definition at line 50 of file DefaultCertificateVerifier.h.
References context, folly::gen::move, and string.
|
overridevirtual |
Verifies the certificates in certs. The peer has been already proven possession of the first certificate in certs. Throws on error or if verification fails.
Implements fizz::CertificateVerifier.
Definition at line 29 of file DefaultCertificateVerifier.cpp.
References i, fizz::Server, and string.
|
private |
Definition at line 66 of file DefaultCertificateVerifier.h.
|
private |
Definition at line 67 of file DefaultCertificateVerifier.h.
|
private |
Definition at line 69 of file DefaultCertificateVerifier.h.
|
private |
Definition at line 68 of file DefaultCertificateVerifier.h.