From a0961a8834b85e029cfb84c7526a6e913f26fcdb Mon Sep 17 00:00:00 2001 From: Fred Gylys-Colwell Date: Sun, 2 Sep 2018 13:18:18 -0700 Subject: [PATCH] Merge common code Merge from Widevine repo of http://go/wvgerrit/57720 Now that we have oemcrypto mock split into reference and testbed code, it is time to remove the part of testbed that is an exact copy of the reference code and just use the reference code. Test: unit tests Bug: 76393338 Change-Id: I3831a3f0118221c21ff1c28e6b6101b27b889012 --- libwvdrmengine/cdm/core/src/oemcrypto_adapter_dynamic.cpp | 5 ++--- libwvdrmengine/oemcrypto/ref/src/oemcrypto_auth_ref.cpp | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libwvdrmengine/cdm/core/src/oemcrypto_adapter_dynamic.cpp b/libwvdrmengine/cdm/core/src/oemcrypto_adapter_dynamic.cpp index 0f016133..c96ef9cd 100644 --- a/libwvdrmengine/cdm/core/src/oemcrypto_adapter_dynamic.cpp +++ b/libwvdrmengine/cdm/core/src/oemcrypto_adapter_dynamic.cpp @@ -1063,7 +1063,7 @@ bool OEMCrypto_SupportsUsageTable(SecurityLevel level) { const FunctionPointers* fcn = kAdapter->get(level); if (!fcn) return false; if (fcn->version == 8) return false; - if (fcn->SupportsUsageTable == NULL) return OEMCrypto_ERROR_NOT_IMPLEMENTED; + if (fcn->SupportsUsageTable == NULL) return false; return fcn->SupportsUsageTable(); } @@ -1072,8 +1072,7 @@ bool OEMCrypto_IsAntiRollbackHwPresent(SecurityLevel level) { const FunctionPointers* fcn = kAdapter->get(level); if (!fcn) return false; if (fcn->version < 10) return false; - if (fcn->IsAntiRollbackHwPresent == NULL) - return OEMCrypto_ERROR_NOT_IMPLEMENTED; + if (fcn->IsAntiRollbackHwPresent == NULL) return false; return fcn->IsAntiRollbackHwPresent(); } diff --git a/libwvdrmengine/oemcrypto/ref/src/oemcrypto_auth_ref.cpp b/libwvdrmengine/oemcrypto/ref/src/oemcrypto_auth_ref.cpp index 53df923a..9ed3f6de 100644 --- a/libwvdrmengine/oemcrypto/ref/src/oemcrypto_auth_ref.cpp +++ b/libwvdrmengine/oemcrypto/ref/src/oemcrypto_auth_ref.cpp @@ -10,7 +10,6 @@ #include "keys.h" #include "log.h" -#include "oemcrypto_key_ref.h" #include "oemcrypto_rsa_key_shared.h" namespace {