proxygen
|
#include <ExportedAuthenticator.h>
Static Public Member Functions | |
static Buf | getAuthenticatorRequest (Buf certificateRequestContext, std::vector< fizz::Extension > extensions) |
static Buf | getAuthenticator (const fizz::AsyncFizzBase &transport, Direction dir, const SelfCert &cert, Buf authenticatorRequest) |
static Buf | makeAuthenticator (std::unique_ptr< KeyDerivation > &kderiver, std::vector< SignatureScheme > supportedSchemes, const SelfCert &cert, Buf authenticatorRequest, Buf handshakeContext, Buf finishedMacKey, CertificateVerifyContext context) |
static Buf | getAuthenticatorContext (Buf authenticator) |
static folly::Optional< std::vector< CertificateEntry > > | validateAuthenticator (const fizz::AsyncFizzBase &transport, Direction dir, Buf authenticatorRequest, Buf authenticator) |
static folly::Optional< std::vector< CertificateEntry > > | validate (std::unique_ptr< KeyDerivation > &kderiver, Buf authenticatorRequest, Buf authenticator, Buf handshakeContext, Buf finishedMacKey, CertificateVerifyContext context) |
Public facing interface for Exported Authenticators (draft-ietf-tls-exported-authenticator) which enable application layer protocols to request or export "authenticators" that can convey proof of additionally identities after the TLS session is established.
Definition at line 32 of file ExportedAuthenticator.h.
|
static |
"authenticate" API
Constructs an authenticator in response to the authenticator request given in |authenticatorRequest|, conveying the identity in |cert|.
Definition at line 31 of file ExportedAuthenticator.cpp.
References cipher, fizz::AsyncFizzBase::getCipher(), fizz::AsyncFizzBase::getEkm(), fizz::AsyncFizzBase::getSupportedSigSchemes(), fizz::Factory::makeKeyDeriver(), and folly::gen::move.
Referenced by proxygen::SecondaryAuthManager::getAuthenticator().
"get context" API
Returns the certificate_request_context given an authenticator
Definition at line 63 of file ExportedAuthenticator.cpp.
References folly::IOBufQueue::cacheChainLength(), fizz::ReadRecordLayer::decodeHandshakeMessage(), and folly::gen::move.
Referenced by proxygen::SecondaryAuthManager::verifyContext().
|
static |
"request" API
Returns an opaque string that should be transmitted by the application over a secure channel to request an authenticator.
|certificateRequestContext| is an arbitrary sequence of bytes that should be used to prevent replays.
Definition at line 16 of file ExportedAuthenticator.cpp.
References fizz::CertificateRequest::certificate_request_context, fizz::encode< CertificateRequest >(), fizz::CertificateRequest::extensions, and folly::gen::move.
Referenced by proxygen::SecondaryAuthManager::createAuthRequest().
|
static |
Definition at line 103 of file ExportedAuthenticator.cpp.
References fizz::CertificateVerify::algorithm, fizz::certificate, fizz::detail::computeFinishedTranscript(), fizz::detail::computeTranscript(), fizz::detail::computeTranscriptHash(), fizz::detail::decodeAuthRequest(), fizz::encodeHandshake(), fizz::finished, fizz::SelfCert::getCertMessage(), fizz::detail::getEmptyAuthenticator(), fizz::detail::getFinishedData(), fizz::detail::getSignatureScheme(), folly::gen::move, folly::sig, fizz::SelfCert::sign(), fizz::CertificateVerify::signature, verify(), and fizz::Finished::verify_data.
|
static |
Definition at line 155 of file ExportedAuthenticator.cpp.
References folly::IOBufQueue::cacheChainLength(), fizz::detail::computeFinishedTranscript(), fizz::detail::computeTranscript(), fizz::detail::computeTranscriptHash(), folly::IOBuf::create(), fizz::ReadRecordLayer::decodeHandshakeMessage(), encodedCertVerify, fizz::encodeHandshake(), fizz::finished, fizz::detail::getEmptyAuthenticator(), fizz::detail::getFinishedData(), folly::gen::move, folly::none, uint16_t, and fizz::detail::writeBuf().
|
static |
"validate" API
Returns the certificate chain and extensions. If the authenticator was empty, the certificate chain will contain no certificates.
Definition at line 72 of file ExportedAuthenticator.cpp.
References cipher, fizz::AsyncFizzBase::getCipher(), fizz::AsyncFizzBase::getEkm(), fizz::Factory::makeKeyDeriver(), and folly::gen::move.
Referenced by proxygen::SecondaryAuthManager::validateAuthenticator().