diff --git a/libwvdrmengine/cdm/core/src/crypto_session.cpp b/libwvdrmengine/cdm/core/src/crypto_session.cpp index f8e11ad2..61321942 100644 --- a/libwvdrmengine/cdm/core/src/crypto_session.cpp +++ b/libwvdrmengine/cdm/core/src/crypto_session.cpp @@ -1303,7 +1303,7 @@ CdmResponseType CryptoSession::PrepareAndSignProvisioningRequest( const OEMCryptoResult status = OEMCrypto_LoadOEMPrivateKey(oec_session_id_); if (status != OEMCrypto_SUCCESS) { return MapOEMCryptoResult(status, GET_TOKEN_FROM_OEM_CERT_ERROR, - "GetTokenFromOemCert"); + "PrepareAndSignProvisioningRequest"); } } else { LOGE("Unknown method %d", pre_provision_token_type_); @@ -1385,20 +1385,6 @@ CdmResponseType CryptoSession::LoadEntitledContentKeys( CdmResponseType CryptoSession::LoadCertificatePrivateKey( const CryptoWrappedKey& private_key) { - // TODO(b/141655126): Getting the OEM Cert no longer loads the private key. - // Call OEMCrypto_GetOEMPublicCertificate before OEMCrypto_LoadDRMPrivateKey - // so it caches the OEMCrypto Public Key and then throw away result - std::string temp_buffer(CERTIFICATE_DATA_SIZE, '\0'); - size_t buf_size = temp_buffer.size(); - uint8_t* buf = reinterpret_cast(&temp_buffer[0]); - OEMCryptoResult sts = WithOecSessionLock( - "LoadCertificatePrivateKey() calling OEMCrypto_GetOEMPublicCertificate", - [&] { - return OEMCrypto_GetOEMPublicCertificate(buf, &buf_size, - requested_security_level_); - }); - metrics_->oemcrypto_get_oem_public_certificate_.Increment(sts); - const OEMCrypto_PrivateKeyType key_type = (private_key.type() == CryptoWrappedKey::kEcc) ? OEMCrypto_ECC_Private_Key @@ -1407,6 +1393,7 @@ CdmResponseType CryptoSession::LoadCertificatePrivateKey( LOGV("Loading device DRM key: id = %u", oec_session_id_); // TODO(b/140813486): determine if cert is RSA or ECC. + OEMCryptoResult sts; WithOecSessionLock( "LoadCertificatePrivateKey() calling OEMCrypto_LoadDRMPrivateKey()", [&] { M_TIME(sts = OEMCrypto_LoadDRMPrivateKey(