Source release 17.1.1
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#include <unordered_set>
|
||||
|
||||
#include "cdm_version.h"
|
||||
#include "device_cert.h"
|
||||
#include "file_store.h"
|
||||
#include "log.h"
|
||||
|
||||
@@ -16,20 +15,30 @@ using namespace widevine;
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr char kCertificateFilename[] = "cert.bin";
|
||||
|
||||
// Some files are expected to go in global storage. All other files are expected
|
||||
// to go in per-origin storage. To help us enforce this in tests, this set
|
||||
// tracks the filenames that belong in global storage. TestHost::Storage will
|
||||
// reject attempts to access these files via per-origin storage or to access
|
||||
// files not in this list via global storage.
|
||||
const std::unordered_set<std::string> kGlobalFilenames = {
|
||||
"usgtable.bin",
|
||||
"StoredUsageTime.dat",
|
||||
"GenerationNumber.dat",
|
||||
"persistent.dat",
|
||||
"usgtable.bin", // CDM usage table data
|
||||
"StoredUsageTime.dat", // Reference OEMCrypto usage table data
|
||||
"GenerationNumber.dat", // Reference OEMCrypto master generation number
|
||||
"persistent.dat", // Persistent data storage for certain TEE
|
||||
// implementations
|
||||
"keybox.dat", // Legacy file for storing keybox in non-secure storage.
|
||||
// CDM data for OTA keybox renewal.
|
||||
"okp.bin",
|
||||
"keybox.dat",
|
||||
"debug_ignore_keybox_count.txt",
|
||||
"debug_allow_test_keybox.txt",
|
||||
// Widevine L3 data files.
|
||||
"ay64.dat",
|
||||
"ay64.dat2",
|
||||
"ay64.dat3",
|
||||
"ay64.dat4",
|
||||
"ay64.dat5",
|
||||
"ay64.dat6",
|
||||
"l3_failure_file",
|
||||
wvutil::kOemCertificateFileName,
|
||||
};
|
||||
|
||||
@@ -109,10 +118,6 @@ TestHost::Storage::Storage(bool is_global) : is_global_(is_global) { Reset(); }
|
||||
|
||||
void TestHost::Storage::Reset() {
|
||||
files_.clear();
|
||||
if (!is_global_) {
|
||||
files_[kCertificateFilename] =
|
||||
std::string((const char*)kDeviceCert, kDeviceCertSize);
|
||||
}
|
||||
}
|
||||
|
||||
bool TestHost::Storage::read(const std::string& name, std::string* data) {
|
||||
|
||||
Reference in New Issue
Block a user