From c32e8d0490ecaf7425ad52b9fa1a52a8f3063485 Mon Sep 17 00:00:00 2001 From: "John W. Bruce" Date: Tue, 21 Aug 2018 14:56:44 -0700 Subject: [PATCH] Source release 14.1.2 --- CHANGELOG.md | 7 +++++++ README.md | 4 ++-- cdm/include/cdm_version.h | 2 +- cdm/src/cdm.cpp | 4 +++- cdm/test/cdm_test.cpp | 18 ++++++++++++++++++ 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 667bc6b9..659dd65c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ [TOC] +## 14.1.2 (2018-08-21) + +Bugfixes: + - Fixed an assert that would always fail when using opaque handles for the + output type. This bug was introduced in CE CDM 14.0.0. All partners using + 14.0.0 through 14.1.1 and opaque handles should update to 14.1.2. + ## 14.1.1 (2018-07-25) Bugfixes: diff --git a/README.md b/README.md index 2b5fb53d..e577c726 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Widevine CE CDM 14.1.1 +# Widevine CE CDM 14.1.2 -Released 2018-07-25 +Released 2018-08-21 ## Getting started diff --git a/cdm/include/cdm_version.h b/cdm/include/cdm_version.h index cf43c86b..a6cf7df0 100644 --- a/cdm/include/cdm_version.h +++ b/cdm/include/cdm_version.h @@ -1,3 +1,3 @@ // Widevine CE CDM Version -#define CDM_VERSION "14.1.1" +#define CDM_VERSION "14.1.2" #define EME_VERSION "https://www.w3.org/TR/2017/REC-encrypted-media-20170918" diff --git a/cdm/src/cdm.cpp b/cdm/src/cdm.cpp index 94af2146..44597c8c 100644 --- a/cdm/src/cdm.cpp +++ b/cdm/src/cdm.cpp @@ -18,6 +18,7 @@ #include "file_store.h" #include "license.h" #include "log.h" +#include "metrics_collections.h" #include "properties.h" #include "service_certificate.h" #include "string_conversions.h" @@ -1407,7 +1408,8 @@ Cdm::Status CdmImpl::ConvertHdcpLevel(const std::string& query_value, } bool VerifyL1() { - CryptoSession cs(NULL); + metrics::CryptoMetrics throwaway_metrics; + CryptoSession cs(&throwaway_metrics); return cs.GetSecurityLevel() == kSecurityLevelL1; } diff --git a/cdm/test/cdm_test.cpp b/cdm/test/cdm_test.cpp index 23df93e5..e45e600e 100644 --- a/cdm/test/cdm_test.cpp +++ b/cdm/test/cdm_test.cpp @@ -231,6 +231,8 @@ class CdmTest : public Test, public Cdm::IEventListener { if (result != OEMCrypto_ERROR_NOT_IMPLEMENTED) { EXPECT_EQ(OEMCrypto_SUCCESS, result); } + std::string oec_level = OEMCrypto_SecurityLevel(); + is_oec_l1_ = (oec_level == "L1"); ASSERT_EQ(OEMCrypto_SUCCESS, OEMCrypto_Terminate()); // Reinit the library. @@ -484,6 +486,7 @@ class CdmTest : public Test, public Cdm::IEventListener { } scoped_ptr cdm_; + bool is_oec_l1_; }; @@ -631,6 +634,21 @@ TEST_F(CdmTest, Initialize) { g_host, g_host, NULL, static_cast(g_cutoff)); EXPECT_EQ(Cdm::kTypeError, status); + // Try all output types. + status = Cdm::initialize( + Cdm::kDirectRender, working_client_info, + g_host, g_host, g_host, static_cast(g_cutoff)); + EXPECT_EQ(Cdm::kSuccess, status); + + status = Cdm::initialize( + Cdm::kOpaqueHandle, working_client_info, + g_host, g_host, g_host, static_cast(g_cutoff)); + if (is_oec_l1_) { + EXPECT_EQ(Cdm::kSuccess, status); + } else { + EXPECT_EQ(Cdm::kNotSupported, status); + } + // One last init with everything correct and working. status = Cdm::initialize( Cdm::kNoSecureOutput, working_client_info,