Home
last modified time | relevance | path

Searched refs:cert_chain (Results 1 – 22 of 22) sorted by relevance

/system/keymaster/contexts/
Dkeymaster2_passthrough_context.cpp128 const AuthorizationSet& attest_params, CertChainPtr* cert_chain) const { in GenerateAttestation()
129 if (!cert_chain) return KM_ERROR_UNEXPECTED_NULL_POINTER; in GenerateAttestation()
135 cert_chain->reset(new keymaster_cert_chain_t); in GenerateAttestation()
136 **cert_chain = { new keymaster_blob_t[cchain.entry_count], cchain.entry_count }; in GenerateAttestation()
138 (*cert_chain)->entries[i] = { dup_array(cchain.entries[i].data, in GenerateAttestation()
Dsoft_keymaster_device.cpp1072 keymaster_cert_chain_t* cert_chain) { in attest_key() argument
1073 if (!dev || !key_to_attest || !attest_params || !cert_chain) in attest_key()
1079 *cert_chain = {}; in attest_key()
1100 cert_chain->entries = reinterpret_cast<keymaster_blob_t*>( in attest_key()
1101 malloc(rsp_chain.entry_count * sizeof(*cert_chain->entries))); in attest_key()
1102 if (!cert_chain->entries) in attest_key()
1104 cert_chain->entry_count = rsp_chain.entry_count; in attest_key()
1105 for (keymaster_blob_t& entry : array_range(cert_chain->entries, cert_chain->entry_count)) in attest_key()
1111 cert_chain->entries[i].data = reinterpret_cast<uint8_t*>(malloc(entry.data_length)); in attest_key()
1112 if (!cert_chain->entries[i].data) { in attest_key()
[all …]
Dkeymaster1_passthrough_context.cpp233 const AuthorizationSet& attest_params, CertChainPtr* cert_chain) const { in GenerateAttestation()
254 *attestation_chain, *attestation_key, *this, cert_chain); in GenerateAttestation()
Dsoft_keymaster_context.cpp447 const AuthorizationSet& attest_params, CertChainPtr* cert_chain) const { in GenerateAttestation()
469 *attestation_chain, *attestation_key, *this, cert_chain); in GenerateAttestation()
Dpure_soft_keymaster_context.cpp263 CertChainPtr* cert_chain) const { in GenerateAttestation()
285 *attestation_chain, *attestation_key, *this, cert_chain); in GenerateAttestation()
/system/security/keystore/
Dlegacy_keymaster_device_wrapper.cpp150 kmCertChain2Hidl(const keymaster_cert_chain_t* cert_chain) { in kmCertChain2Hidl() argument
152 if (!cert_chain || cert_chain->entry_count == 0 || !cert_chain->entries) return result; in kmCertChain2Hidl()
154 result.resize(cert_chain->entry_count); in kmCertChain2Hidl()
155 for (size_t i = 0; i < cert_chain->entry_count; ++i) { in kmCertChain2Hidl()
156 auto& entry = cert_chain->entries[i]; in kmCertChain2Hidl()
375 keymaster_cert_chain_t cert_chain = {}; in attestKey() local
381 &cert_chain); in attestKey()
384 resultCertChain = kmCertChain2Hidl(&cert_chain); in attestKey()
389 keymaster_free_cert_chain(&cert_chain); in attestKey()
/system/core/adb/tls/
Dtls_connection.cpp250 std::vector<CRYPTO_BUFFER*> cert_chain = { in DoHandshake() local
253 if (!SSL_CTX_set_chain_and_key(ssl_ctx_.get(), cert_chain.data(), cert_chain.size(), in DoHandshake()
381 std::vector<CRYPTO_BUFFER*> cert_chain = { in SetCertAndKey() local
384 if (!SSL_set_chain_and_key(ssl, cert_chain.data(), cert_chain.size(), evp_pkey.get(), in SetCertAndKey()
/system/core/trusty/keymaster/3.0/
DTrustyKeymaster3Device.cpp143 const keymaster_cert_chain_t& cert_chain) { in kmCertChain2Hidl() argument
145 if (!cert_chain.entry_count || !cert_chain.entries) return result; in kmCertChain2Hidl()
147 result.resize(cert_chain.entry_count); in kmCertChain2Hidl()
148 for (size_t i = 0; i < cert_chain.entry_count; ++i) { in kmCertChain2Hidl()
149 result[i] = kmBlob2hidlVec(cert_chain.entries[i]); in kmCertChain2Hidl()
/system/keymaster/ng/
DAndroidKeymaster3Device.cpp155 kmCertChain2Hidl(const keymaster_cert_chain_t& cert_chain) { in kmCertChain2Hidl() argument
157 if (!cert_chain.entry_count || !cert_chain.entries) return result; in kmCertChain2Hidl()
159 result.resize(cert_chain.entry_count); in kmCertChain2Hidl()
160 for (size_t i = 0; i < cert_chain.entry_count; ++i) { in kmCertChain2Hidl()
161 result[i] = kmBlob2hidlVec(cert_chain.entries[i]); in kmCertChain2Hidl()
DAndroidKeymaster4Device.cpp107 kmCertChain2Hidl(const keymaster_cert_chain_t& cert_chain) { in kmCertChain2Hidl() argument
109 if (!cert_chain.entry_count || !cert_chain.entries) in kmCertChain2Hidl()
112 result.resize(cert_chain.entry_count); in kmCertChain2Hidl()
113 for (size_t i = 0; i < cert_chain.entry_count; ++i) { in kmCertChain2Hidl()
114 result[i] = kmBlob2hidlVec(cert_chain.entries[i]); in kmCertChain2Hidl()
/system/core/trusty/keymaster/include/trusty_keymaster/legacy/
Dtrusty_keymaster_device.h66 keymaster_cert_chain_t* cert_chain);
123 keymaster_cert_chain_t* cert_chain);
/system/core/adb/tls/include/adb/tls/
Dtls_connection.h119 static bool SetCertAndKey(SSL* ssl, std::string_view cert_chain, std::string_view priv_key);
/system/keymaster/include/keymaster/contexts/
Dkeymaster2_passthrough_context.h103 CertChainPtr* cert_chain) const override;
Dkeymaster1_passthrough_context.h110 CertChainPtr* cert_chain) const override;
Dpure_soft_keymaster_context.h73 CertChainPtr* cert_chain) const override;
Dsoft_keymaster_context.h85 CertChainPtr* cert_chain) const override;
/system/keymaster/include/keymaster/
Dkeymaster_context.h139 CertChainPtr* cert_chain) const = 0;
Dsoft_keymaster_device.h210 keymaster_cert_chain_t* cert_chain);
/system/core/trusty/keymaster/4.0/
DTrustyKeymaster4Device.cpp195 const keymaster_cert_chain_t& cert_chain) { in kmCertChain2Hidl() argument
197 if (!cert_chain.entry_count || !cert_chain.entries) return result; in kmCertChain2Hidl()
199 result.resize(cert_chain.entry_count); in kmCertChain2Hidl()
200 for (size_t i = 0; i < cert_chain.entry_count; ++i) { in kmCertChain2Hidl()
201 result[i] = kmBlob2hidlVec(cert_chain.entries[i]); in kmCertChain2Hidl()
/system/keymaster/km_openssl/
Dattestation_utils.cpp130 inline size_t noOfCert(const keymaster_cert_chain_t& cert_chain) { return cert_chain.entry_count; } in noOfCert() argument
/system/keymaster/tests/
Dandroid_keymaster_test.cpp4063 keymaster_cert_chain_t cert_chain; in TEST_P() local
4064 EXPECT_EQ(KM_ERROR_OK, AttestKey("challenge", "attest_app_id", &cert_chain)); in TEST_P()
4065 ASSERT_EQ(3U, cert_chain.entry_count); in TEST_P()
4066 EXPECT_TRUE(verify_chain(cert_chain)); in TEST_P()
4081 expected_keymaster_security_level, cert_chain.entries[0])); in TEST_P()
4083 keymaster_free_cert_chain(&cert_chain); in TEST_P()
4101 keymaster_cert_chain_t cert_chain; in TEST_P() local
4102 EXPECT_EQ(KM_ERROR_OK, AttestKey("challenge", "attest_app_id", &cert_chain)); in TEST_P()
4103 ASSERT_EQ(3U, cert_chain.entry_count); in TEST_P()
4104 EXPECT_TRUE(verify_chain(cert_chain)); in TEST_P()
[all …]
Dandroid_keymaster_test_utils.cpp339 keymaster_cert_chain_t* cert_chain) { in AttestKey() argument
347 return device()->attest_key(device(), &blob_, &attest_params, cert_chain); in AttestKey()