Fix build
This commit is contained in:
@@ -18,6 +18,7 @@ filegroup(
|
||||
proto_library(
|
||||
name = "media_cas_encryption_proto",
|
||||
srcs = ["media_cas_encryption.proto"],
|
||||
deps = ["hash_algorithm_proto"],
|
||||
)
|
||||
|
||||
cc_proto_library(
|
||||
@@ -34,3 +35,18 @@ cc_proto_library(
|
||||
name = "media_cas_cc_proto",
|
||||
deps = [":media_cas_proto"],
|
||||
)
|
||||
|
||||
proto_library(
|
||||
name = "hash_algorithm_proto",
|
||||
srcs = ["hash_algorithm.proto"],
|
||||
)
|
||||
|
||||
cc_proto_library(
|
||||
name = "hash_algorithm_cc_proto",
|
||||
deps = [":hash_algorithm_proto"],
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "hash_algorithm_java_proto",
|
||||
deps = [":hash_algorithm_proto"],
|
||||
)
|
||||
|
||||
20
protos/public/hash_algorithm.proto
Normal file
20
protos/public/hash_algorithm.proto
Normal file
@@ -0,0 +1,20 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// 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.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package widevine;
|
||||
|
||||
// LINT.IfChange
|
||||
enum HashAlgorithmProto {
|
||||
// Unspecified hash algorithm: SHA_256 shall be used for ECC based algorithms
|
||||
// and SHA_1 shall be used otherwise.
|
||||
HASH_ALGORITHM_UNSPECIFIED = 0;
|
||||
HASH_ALGORITHM_SHA_1 = 1;
|
||||
HASH_ALGORITHM_SHA_256 = 2;
|
||||
}
|
||||
@@ -18,4 +18,35 @@ message CaDescriptorPrivateData {
|
||||
|
||||
// Content ID.
|
||||
optional bytes content_id = 2;
|
||||
|
||||
// Entitlement key IDs for current content per track. Each track will allow up
|
||||
// to 2 entitlement key ids (odd and even entitlement keys).
|
||||
repeated bytes entitlement_key_ids = 3;
|
||||
}
|
||||
|
||||
// Widevine fingerprinting.
|
||||
message Fingerprinting {
|
||||
// Channels that will be applied with the controls.
|
||||
repeated bytes channels = 1;
|
||||
// Fingerprinting controls are opaque to Widevine.
|
||||
optional bytes control = 2;
|
||||
}
|
||||
|
||||
// Widevine service blocking.
|
||||
message ServiceBlocking {
|
||||
// Channels that will be blocked.
|
||||
repeated bytes channels = 1;
|
||||
// Device groups that will be blocked. Group definition is opaque to Widevine.
|
||||
repeated bytes device_groups = 2;
|
||||
// Blocking start time in seconds since epoch. Start time is "immediate" if
|
||||
// this field is not set.
|
||||
optional int64 start_time_sec = 3;
|
||||
// Required. Blocking end time in seconds since epoch.
|
||||
optional int64 end_time_sec = 4;
|
||||
}
|
||||
|
||||
// The payload field for an EMM.
|
||||
message EmmPayload {
|
||||
repeated Fingerprinting fingerprinting = 1;
|
||||
repeated ServiceBlocking service_blocking = 2;
|
||||
}
|
||||
|
||||
@@ -12,8 +12,11 @@ syntax = "proto2";
|
||||
|
||||
package widevine;
|
||||
|
||||
import "protos/public/hash_algorithm.proto";
|
||||
|
||||
option java_package = "com.google.video.widevine.mediacasencryption";
|
||||
|
||||
|
||||
message CasEncryptionRequest {
|
||||
optional bytes content_id = 1;
|
||||
optional string provider = 2;
|
||||
@@ -23,6 +26,10 @@ message CasEncryptionRequest {
|
||||
// return one key for EVEN and one key for ODD, otherwise only a single key is
|
||||
// returned.
|
||||
optional bool key_rotation = 4;
|
||||
// Optional value which can be used to indicate a group.
|
||||
// If present the CasEncryptionResponse will return key based on the group
|
||||
// id.
|
||||
optional bytes group_id = 5;
|
||||
}
|
||||
|
||||
message CasEncryptionResponse {
|
||||
@@ -54,6 +61,8 @@ message CasEncryptionResponse {
|
||||
optional string status_message = 2;
|
||||
optional bytes content_id = 3;
|
||||
repeated KeyInfo entitlement_keys = 4;
|
||||
// If this is a group key license, this is the group identifier.
|
||||
optional bytes group_id = 5;
|
||||
}
|
||||
|
||||
message SignedCasEncryptionRequest {
|
||||
@@ -61,6 +70,8 @@ message SignedCasEncryptionRequest {
|
||||
optional bytes signature = 2;
|
||||
// Identifies the entity sending / signing the request.
|
||||
optional string signer = 3;
|
||||
// Optional field that indicates the hash algorithm used in signature scheme.
|
||||
optional HashAlgorithmProto hash_algorithm = 4;
|
||||
}
|
||||
|
||||
message SignedCasEncryptionResponse {
|
||||
|
||||
Reference in New Issue
Block a user