diff options
author | jrummell <jrummell@chromium.org> | 2015-02-20 18:17:30 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-21 02:18:18 +0000 |
commit | 0961c42c5a18859d6b4b5202f816c6a1304b3ac5 (patch) | |
tree | d9c44042cf1b2ed4a8bcc0e1ab08f535b61dfffb /media/cdm/json_web_key.cc | |
parent | 01f8886bebfb9eab8dfb370db065a81a613feee1 (diff) | |
download | chromium_src-0961c42c5a18859d6b4b5202f816c6a1304b3ac5.zip chromium_src-0961c42c5a18859d6b4b5202f816c6a1304b3ac5.tar.gz chromium_src-0961c42c5a18859d6b4b5202f816c6a1304b3ac5.tar.bz2 |
Handle 'cenc' Initialization Data Type in Clear Key.
Initialization data is provided as concatentated PSSH boxes. Parse the
PSSH boxes and extract the keys, if present. Only process the PSSH
boxes that contain the Clear Key SystemID, all other PSSH boxes are
skipped.
This handles both version 0 and version 1 PSSH boxes.
BUG=459850
TEST=new tests pass
Review URL: https://codereview.chromium.org/936953005
Cr-Commit-Position: refs/heads/master@{#317490}
Diffstat (limited to 'media/cdm/json_web_key.cc')
-rw-r--r-- | media/cdm/json_web_key.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/media/cdm/json_web_key.cc b/media/cdm/json_web_key.cc index 1de3c9e..cd50a8c 100644 --- a/media/cdm/json_web_key.cc +++ b/media/cdm/json_web_key.cc @@ -226,14 +226,14 @@ bool ExtractKeysFromJWKSet(const std::string& jwk_set, return true; } -void CreateLicenseRequest(const uint8* key_id, - int key_id_length, +void CreateLicenseRequest(const KeyIdList& key_ids, MediaKeys::SessionType session_type, std::vector<uint8>* license) { // Create the license request. scoped_ptr<base::DictionaryValue> request(new base::DictionaryValue()); scoped_ptr<base::ListValue> list(new base::ListValue()); - list->AppendString(EncodeBase64Url(key_id, key_id_length)); + for (const auto& key_id : key_ids) + list->AppendString(EncodeBase64Url(&key_id[0], key_id.size())); request->Set(kKeyIdsTag, list.release()); switch (session_type) { |