Allows sharing of keys between sessions

This change allows the app to specify that keys may be shared by sessions.
The app enables this by setting the session sharing properties in DRM Plugin.
Keys are shared only amoungst the specified group of sessions.

Merged from widevine CDM repo
 * https://widevine-internal-review.googlesource.com/#/c/8019/
 * https://widevine-internal-review.googlesource.com/#/c/8021/

Bug: 11013707
Change-Id: I52db41a53138b4fc563ebc6d38a623f23f7cdfb5
This commit is contained in:
Rahul Frias
2013-10-10 22:56:57 -07:00
parent 67c794bac3
commit 56bd5d5d82
14 changed files with 308 additions and 34 deletions

View File

@@ -3,6 +3,8 @@
#ifndef CDM_BASE_LICENSE_H_
#define CDM_BASE_LICENSE_H_
#include <set>
#include "wv_cdm_types.h"
namespace video_widevine_server {
@@ -41,6 +43,7 @@ class CdmLicense {
CdmKeyResponse& license_response,
CdmKeyResponse& license_renewal_response);
bool HasInitData() { return !init_data_.empty(); }
bool IsKeyLoaded(const KeyId& key_id);
private:
bool PrepareServiceCertificateRequest(CdmKeyMessage* signed_request,
@@ -58,6 +61,7 @@ class CdmLicense {
std::string service_certificate_;
std::string init_data_;
bool initialized_;
std::set<KeyId> loaded_keys_;
// Used for certificate based licensing
CdmKeyMessage key_request_;