/frameworks/native/libs/binder/tests/ |
D | RpcTlsUtilsTest.cpp | 23 std::string toDebugString(EVP_PKEY* pkey) { in toDebugString() argument 25 int res = EVP_PKEY_print_public(bio.get(), pkey, 2, nullptr); in toDebugString() 28 res = EVP_PKEY_print_private(bio.get(), pkey, 2, nullptr); in toDebugString() 45 auto pkey = makeKeyPairForSelfSignedCert(); in TEST_P() local 46 ASSERT_NE(nullptr, pkey); in TEST_P() 47 auto pkeyData = serializeUnencryptedPrivatekey(pkey.get(), GetParam()); in TEST_P() 50 EXPECT_EQ(1, EVP_PKEY_cmp(pkey.get(), deserializedPkey.get())) in TEST_P() 51 << "expected: " << toDebugString(pkey.get()) in TEST_P() 67 auto pkey = makeKeyPairForSelfSignedCert(); in TEST_P() local 68 ASSERT_NE(nullptr, pkey); in TEST_P() [all …]
|
D | RpcTlsTestUtils.cpp | 34 bssl::UniquePtr<EVP_PKEY> pkey(EVP_PKEY_new()); in makeKeyPairForSelfSignedCert() local 37 if (pkey == nullptr || !EVP_PKEY_set1_EC_KEY(pkey.get(), ec_key.get())) { in makeKeyPairForSelfSignedCert() 41 return pkey; in makeKeyPairForSelfSignedCert() 44 bssl::UniquePtr<X509> makeSelfSignedCert(EVP_PKEY* pkey, const uint32_t validSeconds) { in makeSelfSignedCert() argument 65 TEST_AND_RETURN(nullptr, X509_set_pubkey(x509.get(), pkey)); in makeSelfSignedCert() 66 TEST_AND_RETURN(nullptr, X509_sign(x509.get(), pkey, EVP_sha256())); in makeSelfSignedCert() 71 auto pkey = makeKeyPairForSelfSignedCert(); in configure() local 72 TEST_AND_RETURN(UNKNOWN_ERROR, pkey != nullptr); in configure() 73 auto cert = makeSelfSignedCert(pkey.get(), mValidSeconds); in configure() 75 TEST_AND_RETURN(INVALID_OPERATION, SSL_CTX_use_PrivateKey(ctx, pkey.get())); in configure()
|
D | binderRpcBenchmark.cpp | 132 auto pkey = android::makeKeyPairForSelfSignedCert(); in makeFactoryTls() local 133 CHECK_NE(pkey.get(), nullptr); in makeFactoryTls() 134 auto cert = android::makeSelfSignedCert(pkey.get(), android::kCertValidSeconds); in makeFactoryTls() 138 auto auth = std::make_unique<RpcAuthPreSigned>(std::move(pkey), std::move(cert)); in makeFactoryTls()
|
D | binderRpcTest.cpp | 2050 auto pkey = makeKeyPairForSelfSignedCert(); in TEST_P() local 2051 ASSERT_NE(nullptr, pkey); in TEST_P() 2052 auto cert = makeSelfSignedCert(pkey.get(), kCertValidSeconds); in TEST_P() 2054 pkeyData = serializeUnencryptedPrivatekey(pkey.get(), keyFormat); in TEST_P()
|
/frameworks/native/libs/binder/tests/rpc_fuzzer/ |
D | main.cpp | 75 bssl::UniquePtr<EVP_PKEY> pkey; member 86 ret.pkey.reset(PEM_read_bio_PrivateKey(keyBio.get(), nullptr, passwordCallback, nullptr)); in readServerKeyAndCert() 87 CHECK_NE(ret.pkey.get(), nullptr); in readServerKeyAndCert() 100 CHECK(EVP_PKEY_up_ref(sAuth.pkey.get())); in createServerRpcAuth() 101 bssl::UniquePtr<EVP_PKEY> pkey(sAuth.pkey.get()); in createServerRpcAuth() local 105 return std::make_unique<RpcAuthPreSigned>(std::move(pkey), std::move(cert)); in createServerRpcAuth()
|
/frameworks/native/libs/binder/ |
D | RpcTlsUtils.cpp | 100 std::vector<uint8_t> serializeUnencryptedPrivatekey(EVP_PKEY* pkey, RpcKeyFormat format) { in serializeUnencryptedPrivatekey() argument 103 return serialize(pkey, [](BIO* bio, EVP_PKEY* pkey) { in serializeUnencryptedPrivatekey() argument 104 return PEM_write_bio_PrivateKey(bio, pkey, nullptr /* enc */, nullptr /* kstr */, in serializeUnencryptedPrivatekey() 108 return serialize(pkey, i2d_PrivateKey_bio); in serializeUnencryptedPrivatekey()
|
/frameworks/base/keystore/tests/src/android/security/keystore2/ |
D | AndroidKeyStoreEdECPublicKeyTest.java | 96 AndroidKeyStoreEdECPublicKey pkey = new AndroidKeyStoreEdECPublicKey(descriptor(), in testParsingOfValidKeys() local 100 assertEquals(pkey.getPoint().isXOdd(), testVector.isOdd); in testParsingOfValidKeys() 101 assertEquals(pkey.getPoint().getY(), testVector.yValue); in testParsingOfValidKeys()
|
/frameworks/native/libs/binder/tests/include_tls_test_utils/binder/ |
D | RpcTlsTestUtils.h | 49 RpcAuthPreSigned(bssl::UniquePtr<EVP_PKEY> pkey, bssl::UniquePtr<X509> cert) in RpcAuthPreSigned() argument 50 : mPkey(std::move(pkey)), mCert(std::move(cert)) {} in RpcAuthPreSigned()
|
/frameworks/native/libs/binder/include_tls/binder/ |
D | RpcTlsUtils.h | 40 std::vector<uint8_t> serializeUnencryptedPrivatekey(EVP_PKEY* pkey, RpcKeyFormat format);
|