25 using namespace folly;
31 "120000303132333435363738396162636465660008000d000400020403"};
34 "308201ee30820195a003020102020900c569eec901ce86d9300a06082a8648ce3d04030230" 35 "54310b3009060355040613025553310b300906035504080c024e59310b300906035504070c" 36 "024e59310d300b060355040a0c0446697a7a310d300b060355040b0c0446697a7a310d300b" 37 "06035504030c0446697a7a301e170d3137303430343138323930395a170d34313131323431" 38 "38323930395a3054310b3009060355040613025553310b300906035504080c024e59310b30" 39 "0906035504070c024e59310d300b060355040a0c0446697a7a310d300b060355040b0c0446" 40 "697a7a310d300b06035504030c0446697a7a3059301306072a8648ce3d020106082a8648ce" 41 "3d030107034200049d87bcaddb65d8dcf6df8b148a9679b5b710db19c95a9badfff13468cb" 42 "358b4e21d24a5c826112658ebb96d64e2985dfb41c1948334391a4aa81b67837e2dbf0a350" 43 "304e301d0603551d0e041604143c5b8ba954d9752faf3c8ad6d1a62449dccaa850301f0603" 44 "551d230418301680143c5b8ba954d9752faf3c8ad6d1a62449dccaa850300c0603551d1304" 45 "0530030101ff300a06082a8648ce3d04030203470030440220349b7d34d7132fb2756576e0" 46 "bfa36cbe1723337a7a6f5ef9c8d3bf1aa7efa4a5022025c50a91e0aa4272f1f52c3d5583a7" 47 "d7cee14b178835273a0bd814303e62d714"};
49 TEST(SecondaryAuthManagerTest, AuthenticatorRequest) {
53 SignatureScheme::ecdsa_secp256r1_sha256);
54 std::vector<fizz::Extension> extensions;
59 auto requestId = authRequestPair.first;
60 auto authRequest =
std::move(authRequestPair.second);
66 TEST(SecondaryAuthManagerTest, Authenticator) {
71 std::vector<folly::ssl::X509UniquePtr> certs;
73 std::unique_ptr<fizz::SelfCert> certPtr =
74 std::make_unique<SelfCertImpl<KeyType::P256>>(
std::move(key),
82 SignatureScheme::ecdsa_secp256r1_sha256);
83 std::vector<fizz::Extension> extensions;
87 auto requestId = authRequestPair.first;
88 auto authRequest =
std::move(authRequestPair.second);
98 std::vector<SignatureScheme> schemes = {
99 SignatureScheme::ecdsa_secp256r1_sha256};
105 auto authenticatorPair =
110 auto certId = authenticatorPair.first;
111 auto authenticator =
std::move(authenticatorPair.second);
116 auto cachedCertId = authManager.
getCertId(requestId);
constexpr folly::StringPiece kP256Key
#define EXPECT_EQ(val1, val2)
constexpr detail::Map< Move > move
folly::Optional< std::vector< fizz::CertificateEntry > > getPeerCert(uint16_t certId)
EvpPkeyUniquePtr getPrivateKey(StringPiece key)
—— Concurrent Priority Queue Implementation ——
PolymorphicAction< internal::InvokeWithoutArgsAction< FunctionImpl > > InvokeWithoutArgs(FunctionImpl function_impl)
folly::ssl::X509UniquePtr getCert(folly::StringPiece cert)
folly::Optional< uint16_t > getCertId(uint16_t requestId)
StringPiece expected_cert
std::vector< SignatureScheme > supported_signature_algorithms
bool validateAuthenticator(const fizz::AsyncFizzBase &transport, TransportDirection dir, uint16_t certId, std::unique_ptr< folly::IOBuf > authenticator) override
TEST(SecondaryAuthManagerTest, AuthenticatorRequest)
std::pair< uint16_t, std::unique_ptr< folly::IOBuf > > createAuthRequest(std::unique_ptr< folly::IOBuf > certRequestContext, std::vector< fizz::Extension > extensions) override
#define EXPECT_TRUE(condition)
std::unique_ptr< Aead > getCipher(const CipherParams ¶ms)
std::pair< uint16_t, std::unique_ptr< folly::IOBuf > > getAuthenticator(const fizz::AsyncFizzBase &transport, TransportDirection dir, uint16_t requestId, std::unique_ptr< folly::IOBuf > authRequest) override
#define EXPECT_NE(val1, val2)
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
Extension encodeExtension(const TokenBindingParameters ¶ms)
Range< const char * > StringPiece
bool hexlify(const InputString &input, OutputString &output, bool append_output)
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
StringPiece expected_auth_request
constexpr folly::StringPiece kP256Certificate