Add custom key fetcher callback to Simulcrypt ECMG

This commit is contained in:
Widevine Buildbot
2020-09-19 01:44:51 +00:00
parent ef2deb6761
commit c2ae5214ef
12 changed files with 173 additions and 26 deletions

View File

@@ -1,20 +1,26 @@
// Copyright 2020 Google LLC. All rights reserved.
////////////////////////////////////////////////////////////////////////////////
// Copyright 2020 Google LLC.
//
// This software is licensed under the terms defined in the Widevine Master
// License Agreement. For a copy of this agreement, please contact
// widevine-licensing@google.com.
////////////////////////////////////////////////////////////////////////////////
//
// Description:
// Container of device security profiles. Security profiles indicate rules
// to allow using the profile. The rules are based on DRM capabilities of a
// device.
#ifndef VIDEO_WIDEVINE_EXPORT_COMMON_SECURITY_PROFILE_LIST_H_
#define VIDEO_WIDEVINE_EXPORT_COMMON_SECURITY_PROFILE_LIST_H_
#ifndef COMMON_SECURITY_PROFILE_LIST_H_
#define COMMON_SECURITY_PROFILE_LIST_H_
#include "third_party/absl/synchronization/mutex.h"
#include "video/widevine/protos/public/client_identification.proto.h"
#include "video/widevine/protos/public/device_security_profile_data.proto.h"
#include "video/widevine/protos/public/provisioned_device_info.proto.h"
#include "video/widevine/protos/public/security_profile.proto.h"
#include "absl/synchronization/mutex.h"
#include "protos/public/client_identification.pb.h"
#include "protos/public/device_security_profile_data.pb.h"
#include "protos/public/provisioned_device_info.pb.h"
#include "protos/public/security_profile.pb.h"
namespace video_widevine {
namespace widevine {
using ClientCapabilities = ClientIdentification::ClientCapabilities;
// The SecurityProfileList will hold all security profiles. During license
@@ -76,10 +82,10 @@ class SecurityProfileList {
const ClientIdentification& client_id,
const ProvisionedDeviceInfo& device_info) const;
int64 GetCurrentTimeSeconds() const;
int64_t GetCurrentTimeSeconds() const;
bool IsProfileActive(const SecurityProfile& profile,
int64 current_time_seconds) const;
int64_t current_time_seconds) const;
mutable absl::Mutex mutex_;
// Security profiles
@@ -87,5 +93,5 @@ class SecurityProfileList {
std::vector<SecurityProfile> security_profiles_ ABSL_GUARDED_BY(mutex_);
};
} // namespace video_widevine
#endif // VIDEO_WIDEVINE_EXPORT_COMMON_SECURITY_PROFILE_LIST_H_
} // namespace widevine
#endif // COMMON_SECURITY_PROFILE_LIST_H_