From 672a12dd8bc68a02a66ce9507648292eb815e674 Mon Sep 17 00:00:00 2001 From: "John W. Bruce" Date: Fri, 15 Mar 2019 16:04:28 -0700 Subject: [PATCH] Remove Passthrough When L3 is Used w/ Opaque Handles (This is a merge of http://go/wvgerrit/74628) There is some old legacy behavior in CryptoSession for supporting Chromecast. When a platform tries to use a combination of L3 and opaque handles, it silently substitutes the type "clear buffers" instead. No platform uses this behavior anymore. In fact, the CE CDM contains code that explicitly prevents this case from being triggered. That code has broken in every one of the last 3 releases. To allow the CE CDM to end that bug farm, this patch removes the behavior that no one wants. Bug: 112703532 Test: CE CDM Unit Tests Test: Android Unit Tests Change-Id: I7f70483fac46c75637da5378c5a8b1bf7a2c2860 --- libwvdrmengine/cdm/core/src/crypto_session.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libwvdrmengine/cdm/core/src/crypto_session.cpp b/libwvdrmengine/cdm/core/src/crypto_session.cpp index 4af80eee..77bfa357 100644 --- a/libwvdrmengine/cdm/core/src/crypto_session.cpp +++ b/libwvdrmengine/cdm/core/src/crypto_session.cpp @@ -1500,11 +1500,7 @@ CdmResponseType CryptoSession::GenerateNonce(uint32_t* nonce) { bool CryptoSession::SetDestinationBufferType() { if (Properties::oem_crypto_use_secure_buffers()) { - if (GetSecurityLevel() == kSecurityLevelL1) { - destination_buffer_type_ = OEMCrypto_BufferType_Secure; - } else { - destination_buffer_type_ = OEMCrypto_BufferType_Clear; - } + destination_buffer_type_ = OEMCrypto_BufferType_Secure; } else if (Properties::oem_crypto_use_fifo()) { destination_buffer_type_ = OEMCrypto_BufferType_Direct; } else if (Properties::oem_crypto_use_userspace_buffers()) {