Infrastructure changes to support big usage tables
[ Merge of http://go/wvgerrit/23161 ] The usage table redesign will require storing usage table headers and usage entries in non-secure persistent store. This information will be signed by the TEE to prevent against modification. New Storage and retrieval methods have been added for usage table headers, while usage entries will be stored alongside (offline) licenses and (secure stops/)usage info. b/34327459 Test: All unittests, including newly introduced ones other than some oemcrypto, request_license_test passed. Those tests failed with or without this CL. Change-Id: I9b8d6210e33774b0803f8af1711b2d593d467aec
This commit is contained in:
@@ -43,6 +43,7 @@ message License {
|
||||
// contains the playback_start_time we should use as an override. This is
|
||||
// ignored if there is no grace period.
|
||||
optional int64 grace_period_end_time = 11 [default = 0];
|
||||
optional bytes usage_entry = 12;
|
||||
}
|
||||
|
||||
message UsageInfo {
|
||||
@@ -51,13 +52,14 @@ message UsageInfo {
|
||||
optional bytes license_request = 2;
|
||||
optional bytes license = 3;
|
||||
optional bytes key_set_id = 4;
|
||||
optional bytes usage_entry = 5;
|
||||
}
|
||||
|
||||
repeated ProviderSession sessions = 1;
|
||||
}
|
||||
|
||||
message HlsAttributes {
|
||||
enum Method {
|
||||
enum Method {
|
||||
AES_128 = 1;
|
||||
SAMPLE_AES = 2;
|
||||
}
|
||||
@@ -65,12 +67,30 @@ message HlsAttributes {
|
||||
optional bytes media_segment_iv = 2;
|
||||
}
|
||||
|
||||
message UsageTableInfo {
|
||||
message UsageEntryInfo {
|
||||
enum UsageEntryStorage {
|
||||
LICENSE = 1;
|
||||
USAGE_INFO = 2;
|
||||
}
|
||||
|
||||
optional UsageEntryStorage storage = 1;
|
||||
optional bytes key_set_id = 2; // used if storage is LICENSE
|
||||
optional bytes provider_session_token = 3; // used if storage is USAGE_INFO
|
||||
optional bytes app_id = 4; // used if storage is USAGE_INFO
|
||||
}
|
||||
|
||||
optional bytes usage_table_header = 1;
|
||||
repeated UsageEntryInfo usage_entry_info = 2;
|
||||
}
|
||||
|
||||
message File {
|
||||
enum FileType {
|
||||
DEVICE_CERTIFICATE = 1;
|
||||
LICENSE = 2;
|
||||
USAGE_INFO = 3;
|
||||
HLS_ATTRIBUTES = 4;
|
||||
USAGE_TABLE_INFO = 5;
|
||||
}
|
||||
|
||||
enum FileVersion {
|
||||
@@ -83,6 +103,7 @@ message File {
|
||||
optional License license = 4;
|
||||
optional UsageInfo usage_info = 5;
|
||||
optional HlsAttributes hls_attributes = 6;
|
||||
optional UsageTableInfo usage_table_info = 7;
|
||||
}
|
||||
|
||||
message HashedFile {
|
||||
|
||||
Reference in New Issue
Block a user