Commit Graph

792 Commits

Author SHA1 Message Date
Rahul Frias
ef875d25ed am 7e5c5c75: am cbcc609d: Update YT CP server URI to point to the UAT server
* commit '7e5c5c75d6f3064ce76b64fa1f389ab24dbeddaf':
  Update YT CP server URI to point to the UAT server
2014-04-01 22:15:09 +00:00
Rahul Frias
7e5c5c75d6 am cbcc609d: Update YT CP server URI to point to the UAT server
* commit 'cbcc609d5b8488b33861a745bf73d3f134dbccad':
  Update YT CP server URI to point to the UAT server
2014-04-01 22:09:31 +00:00
Jeff Tinker
3db90f54c1 Support CAST V2 authentication
bug: 12702350

Squashed commit of these CLs from the widevine cdm repo:

Cast V2 cdm support
https://widevine-internal-review.googlesource.com/#/c/9190/

Add CASTv2 Support to DrmPlugin
https://widevine-internal-review.googlesource.com/#/c/9228/

Test for CastV2 authentication APIs
https://widevine-internal-review.googlesource.com/9550

Change-Id: I6d66bc1bbd653db5542c68687b30b441dd20617f
2014-04-01 14:26:27 -07:00
Rahul Frias
cbcc609d5b Update YT CP server URI to point to the UAT server
Privacy tests from request license were failing as the YTCP drm
server location had changed.

Also updates the MediaDrmAPI test to reference the UAT server

This affects OEMs doing Widevine integrations on KK devices.

Merge of https://widevine-internal-review.googlesource.com/#/c/9233/
from wv cdm git repository

b/13324394

Change-Id: I97152b2a79a9088303e5fc4a5c07a413e4c85e15
2014-04-01 01:36:49 +00:00
John "Juce" Bruce
f111bea1b1 Merge "Add Support for WebM Back" into klp-modular-dev 2014-03-31 23:46:51 +00:00
John "Juce" Bruce
702aadf853 Add Support for WebM Back
Adds support for WebM to the CDM. Decryption remains untouched,
however the initialization data is passed differently for WebM.

The previous version of this change broke playback for certain
apps that were being allowed to pass invalid MIME types before
this change was made. This version maintains backwards-compatiblity
for these apps for now by rewriting their MIME types as "video/mp4".

Merge of https://widevine-internal-review.googlesource.com/9225/
and https://widevine-internal-review.googlesource.com/9611/ from
the Widevine cdm repo.

Bug: 10638562
Change-Id: Ib37e838d08363f07b34b3a2e79a3f80a1f43e9ad
2014-03-31 16:16:18 -07:00
Fred Gylys-Colwell
2069af7771 Remove Test Keybox - DO NOT MERGE
This CL removes the test keybox from the reference
implementation. This keybox is only needed temporarily for Cast
testing with the test server before the real certificate server is
working.

Change-Id: Icb8b5587acc91fd9f3ec35f04f91734437f804e0
2014-03-31 15:35:12 -07:00
Jeff Tinker
66cadaa9fa Revert "Add Support for WebM"
This reverts commit ab95cf27f1.

Change-Id: Ie78c2c14fa9b598b5ea67d6e9e60479e652b0b06
2014-03-29 17:09:28 +00:00
John "Juce" Bruce
ab95cf27f1 Add Support for WebM
Adds support for WebM to the CDM. Decryption remains untouched,
however the initialization data is passed differently for WebM.

Merge of https://widevine-internal-review.googlesource.com/#/c/9225/
from the widevine cdm repo.

Bug: 10638562
Change-Id: I7b8cf4888fa408af77cee103f768f5a7c8ffdc7e
2014-03-27 14:46:45 -07:00
Fred Gylys-Colwell
a59b935928 Support CAST V2 authentication - OEMCrypto Interface - DO NOT MERGE
Squashed commit of these CLs from the widevine cdm repo:

Allow Version 8 OEMCrypto to be linked with CDM (KLP Modular Branch)
https://widevine-internal-review.googlesource.com/#/c/9434/

Allow OEMCrypto v8 or v9 (KLP Modular Branch)
https://widevine-internal-review.googlesource.com/#/c/9172/

Add alternate RSA signing (KLP Modular Branch)
https://widevine-internal-review.googlesource.com/#/c/9171/

bug: 12702350
Change-Id: Ifd0c88c566bb10efe2411af49bc83265ed56cb23
2014-03-24 13:46:38 -07:00
Jeff Tinker
f1e87b1b04 resolved conflicts for merge of a0714170 to klp-modular-dev 2014-03-14 15:19:44 -07:00
Edwin Wong
349f48ef69 am 338968b3: am dc3eebaf: Upgrade Widevine Classic to 4.5.0.10120
* commit '338968b338facdb4a627774b264b768d517d3ceb':
  Upgrade Widevine Classic to 4.5.0.10120
2014-03-14 21:54:53 +00:00
Rahul Frias
1dab7bb3b4 am 47a4d355: am 21304f16: Correct encoding of make/model information
* commit '47a4d355906000a9355222ce582d634b77640c11':
  Correct encoding of make/model information
2014-03-14 21:42:55 +00:00
Jeff Tinker
a071417071 am 47d85ef5: Merge "Remove external links from PDF documents." into klp-dev
* commit '47d85ef54ba162b77aae6a62264c23c141ae3173':
  Remove external links from PDF documents.
2014-03-14 20:51:36 +00:00
Jeff Tinker
47d85ef54b Merge "Remove external links from PDF documents." into klp-dev 2014-03-14 20:44:13 +00:00
Edwin Wong
338968b338 am dc3eebaf: Upgrade Widevine Classic to 4.5.0.10120
* commit 'dc3eebafa69ebd064cef14ac391b0e27ca3a19f0':
  Upgrade Widevine Classic to 4.5.0.10120
2014-03-14 08:48:05 +00:00
Edwin Wong
dc3eebafa6 Upgrade Widevine Classic to 4.5.0.10120
Fix crash in WV_Teardown() causes by deleting shared output parser object.

We used to have a single output parser object and a single memory chunk object
that are shared by multiple sessions. When we delete the output parser, another
session may still be using it. The deletion causes a native crash intermittently.

The fix addresses these two issues: i)output parser object is now created per
session, and ii)add reference count to keep track of the single memory chunk
object use so we do not delet it while other sessions are still using it.

Merge of https://widevine-internal-review.googlesource.com/#/c/9253/ and
https://widevine-internal-review.googlesource.com/#/c/9271/ from widevine repo
RC/4.5.0/601_AndroidOS_K branch.

Change-Id: I6426b544a6d0c264ec91a89e92153862b87607f3
related-to-bug: 13208359
2014-03-13 20:30:05 -07:00
Rahul Frias
47a4d35590 am 21304f16: Correct encoding of make/model information
* commit '21304f16fe4415c33a63042b242b69b64f45c789':
  Correct encoding of make/model information
2014-03-13 22:52:20 +00:00
Rahul Frias
21304f16fe Correct encoding of make/model information
Some make and model information was not being reported correctly to the
license server. "HTC One X+" was encoded as "HTC+One+X+" instead of
"HTC+One+X%2B", which when decoded becomes "HTC One X ". Make and model
information is now correctly url encoded.

Merge of https://widevine-internal-review.googlesource.com/#/c/9240/
from the widevine repo.

b/12722013

Change-Id: I987691c850648f92b408f8749327ff43b13b43a7
2014-03-13 11:14:44 -07:00
Jeff Tinker
50e237cccd Updated gMock to 1.7.0
This change updates gMock to the new release, 1.7.0.  This is
necessary for Android, as Android Master has updated their gTest to
1.7.0, and we must always use the matching version of gMock.

This CL cleans up some removed files that were missed in the
previous commit.

Change-Id: I67ab17425aea8d44fff765f79737b6eb23d16b52
2014-03-10 11:55:41 -07:00
Jeff Tinker
f6ec81ffe7 Updated gMock to 1.7.0
This change updates gMock to the new release, 1.7.0.  This is
necessary for Android, as Android Master has updated their gTest to
1.7.0, and we must always use the matching version of gMock.

This should not break any existing tests, as 1.7.0 is
backwards-compatible with 1.6.0 code in nearly all cases.  There are
a few bugfixes around being too generous with type coercion in
EXPECT_THAT() and ASSERT_THAT() that could break code that was
accepted by the compiler before but was never technically safe.

For a full list of changes, including all the awesome new matchers
you can now use in your tests, see CHANGES, which is included from
gMock unchanged.

For a full list of modifications made to allow this to work on
Android Master, see the updated README.android.

No changes to the GYP files were necessary as part of this upgrade.

Change-Id: Ib1445044e78c9fe0cf16031d544577d65ebbf6df
2014-03-10 11:37:24 -07:00
Jeff Tinker
b2af1e6303 OEMCrypto Version 9 API (KLP Modular Version)
This CL changes the header file and documentation for OEMCrypto
version 9.

It is a cherry pick of Change-Id: I1a43a686ef5d345132affc672bc1c6acf7b3f661

I modified the reference implementation and the calling functions just
enough that existing unit tests still pass.  Acutal implementation of this
API will be in future CLs.

Comments on the documentation can be made in the Google Doc here:
    https://docs.google.com/a/google.com/document/d/1pHSJ2IKL0axmQz2gmDZ7olxPWb_ZcULaJrYwDZAeS7k/edit?usp=sharing

Merge of https://widevine-internal-review.googlesource.com/#/c/9170/
from the widevine cdm repo.

Change-Id: I0197b1dfadedd6cc85710c7408e739cedeb45dce
2014-03-10 11:08:41 -07:00
Jeff Tinker
adfd599175 Remove external links from PDF documents.
A bug (b/8132682) in "Download as PDF" from Google Docs makes table of
contents links point back to the original document.  This causes
problems with external customers.

This change uses the following work around: print the document, and
select "Save as PDF" as the printer.

This only removes the links.  It does not fix them.  When bug 8132682
is fixed we can re-download the documents with proper links.

bug: 12585419

Merge of https://widevine-internal-review.googlesource.com/#/c/8775/
from the widevine cdm repo.

Change-Id: I5344b85bee213aba3a99913a4bb7be824fdd7acf
2014-03-10 10:25:35 -07:00
Fred Gylys-Colwell
9b6540b148 Remove external links from PDF documents.
A bug (8132682) in "Download as PDF" from Google Docs makes table of
contents links point back to the original document.  This causes
problems with external customers.

This change uses the following work around: print the document, and
select "Save as PDF" as the printer.

This only removes the links.  It does not fix them.  When bug 8132682
is fixed we can re-download the documents with proper links.

bug: 12585419
Change-Id: I4e4b0ff8d083192fd2db6a569d1c3f84c8ec4fa9
2014-01-31 11:21:34 -08:00
Jeff Tinker
ccecfd7192 am 1c5ca642: NULL terminate device unique ID before use
* commit '1c5ca642cb2021ffcdd253d929e40c393cf3fe07':
  NULL terminate device unique ID before use
2013-12-27 12:54:33 -08:00
Jeff Tinker
1c5ca642cb NULL terminate device unique ID before use
bug: 12228689

If the device ID returned from OEMCrypto_GetDeviceUniqueId is
not NULL terminated in the OEM code, trailing garbage characters
may be included in the license request's client_identification
field, which could be rejected by the server's utf8 parser if
they are invalid characters, causing a license request failure.

The code for CryptoSession::GetDeviceUniqueId should use the
updated id_length from OEMCrypto_GetDeviceUniqueId to adjust
the length of the *device_id string before returning the result
to the caller.

Change-Id: I659866d4234d4f21ec051590fc7bc6367904a48a
2013-12-19 16:05:06 -08:00
Jeff Tinker
32579c9e07 am 78a9d5cd: Merge "Add tests for key sharing mode and decrypting without keys" into klp-dev
* commit '78a9d5cd9a33e72df173accb6ce5a4b9dd0ffd2a':
  Add tests for key sharing mode and decrypting without keys
2013-12-19 13:53:55 -08:00
Jeff Tinker
78a9d5cd9a Merge "Add tests for key sharing mode and decrypting without keys" into klp-dev 2013-12-19 21:51:56 +00:00
Jeff Tinker
61c77cd95d am 623920d8: Fix seg fault when playing WV video on Molly with the MediaShell
* commit '623920d83f55011b7ce59c1224cbe7e7f335b0e5':
  Fix seg fault when playing WV video on Molly with the MediaShell
2013-12-13 13:34:33 -08:00
Jeff Tinker
623920d83f Fix seg fault when playing WV video on Molly with the MediaShell
During session sharing, when a sample contains both clear and encrypted
subsamples, subsample flags would on occasion be set incorrectly. Clear
subsamples would be sent to the current session, while encrypted ones
would incur a key id to session lookup and be sent to the appropriate session.
The sessions would then receive decrypt calls with subsample flags
incorrectly set.

In order for this to work correctly all subsamples within a sample need to be
sent to the same session. This requires that key ids be specified and
checked if at least one of the subsamples is encrypted. If however none of
the subsamples are encrypted then a valid key id may not have been provided
to MediaCrypto, and the subsamples may be sent to any session.
In order to support this, the CDM decrypt will now allow the caller to
specify whether to validate the key Id.

Then a check is added to wvcrypto determine whether to ask the CDM to
validate the key ID based on the clear/encrypted states of the subsamples.
The list of subsamples is already being preprocessed, so this
additional check just determines if any subsamples are encrypted, and sets
the validation flag appropriately.

b/11967440

Merge of https://widevine-internal-review.googlesource.com/#/c/8510/3 and
https://widevine-internal-review.googlesource.com/#/c/8520/2 from the
widevine cdm repo.

Change-Id: If65c36a31e56b69f514f0cc547a0becf0c54c40a
2013-12-12 17:25:01 -08:00
Jeff Tinker
711a98164f Add tests for key sharing mode and decrypting without keys
Merge of https://widevine-internal-review.googlesource.com/#/c/8480/ from
widevine cdm repo.

Change-Id: Idb5ab83bceeb97016075c26c428aba692f017929
related-to-bug: 11967440
2013-12-12 16:23:19 -08:00
Jeff Tinker
da019f9556 am 5d5d1baf: Merge "Address unit test failures" into klp-dev
* commit '5d5d1baf7a12b200418342e48a3fb7c5547692da':
  Address unit test failures
2013-12-12 11:27:16 -08:00
Jeff Tinker
2dffd3db32 am 88063a8d: Merge "Add additional MediaDrm API tests" into klp-dev
* commit '88063a8d20505d276d0700e705ea868c66ca3268':
  Add additional MediaDrm API tests
2013-12-12 11:27:15 -08:00
Jeff Tinker
4b9f05c131 am 38cc7122: Improve unit test build script
* commit '38cc7122fd9359bbda7428777d03bb51020e0c54':
  Improve unit test build script
2013-12-12 11:27:15 -08:00
Jeff Tinker
5d5d1baf7a Merge "Address unit test failures" into klp-dev 2013-12-12 19:26:03 +00:00
Jeff Tinker
88063a8d20 Merge "Add additional MediaDrm API tests" into klp-dev 2013-12-12 19:25:48 +00:00
Jeff Tinker
38cc7122fd Improve unit test build script
Make the build_and_run_all_unit_tests script push individual tests
instead of doing a full sync, makes it easier to run unit tests
against release builds.

Merge of https://widevine-internal-review.googlesource.com/#/c/8405/
from the widevine cdm repo.

Change-Id: I8efda77be9ab863f616fab88c4782b7c9edb8858
2013-12-12 10:58:42 -08:00
Jeff Tinker
4ab8efc21d Add additional MediaDrm API tests
bug: 12033958

Merge of https://widevine-internal-review.googlesource.com/#/c/8402/
from the Widevine CDM repo.

Change-Id: I441eb816db69620feff0bd72c485bd3ad7ec8031
2013-12-12 10:56:51 -08:00
Jeff Tinker
78d44c3792 am 68e1e7c5: Merge "Generate a unique license request ID" into klp-dev
* commit '68e1e7c5784b8c189ff59c06517c7b5ae103631e':
  Generate a unique license request ID
2013-12-12 10:19:31 -08:00
Jeff Tinker
68e1e7c578 Merge "Generate a unique license request ID" into klp-dev 2013-12-12 18:17:34 +00:00
Rahul Frias
f32baf91b5 Address unit test failures
A number of failures were observed,
* GPlay dev license server is being worked on. This causes random
  failures when running unit tests. Switching to the staging
  server for now.
* Occasionally, the license server times out. Introducing a retry
  mechanism do deal with HTTP responses (merge from master #45e8ddd5f)
* Release license tests are now disabled. Tests were previously passing,
  even though they were not in fact supported by the GPlay license server.
  The response included just enough information to be a valid license and
  passed minimal verification that was taking place. Additional verification
  was not necessary because session is torndown and resources released as
  soon as the response has been received.
  A change at the GPlay server now causes the release license request to be
  flagged as an error and the tests to fail. Work is in progress to
  support release of licenses at the GPlay server.
* The wrong message test (from request license tests) fails. This is
  because GPlay behaviour changed from returning a HTTP 500, when
  processing an invalid PSSH, to returning a HTTP 200 without any included
  license.
* Security level path backward compatibility tests on L3 which failed and
  caused the succeeding license request tests to fail.

b/12000457

Change-Id: I8e6adc490504475d1039793ea555a17799cb78c4
2013-12-11 16:22:58 -08:00
Madan Ankapura
15c2973b43 am 3567597a: Merge "Add x86 Builds for Widevine Classic 4.5.0.10113 - DO NOT MERGE" into klp-dev
* commit '3567597ada615fe8e914732284212e1e6a2569f3':
  Add x86 Builds for Widevine Classic 4.5.0.10113 - DO NOT MERGE
2013-12-06 19:19:11 -08:00
Madan Ankapura
3567597ada Merge "Add x86 Builds for Widevine Classic 4.5.0.10113 - DO NOT MERGE" into klp-dev 2013-12-07 02:33:12 +00:00
Rahul Frias
1b22c80568 Generate a unique license request ID
The request ID was set to a fixed value, which caused license requests
to be rejected by the YT server with TOO_MANY_STREAMS_PER_VIDEO

The request ID is now a combination of a randomly generated value and
a rolling index. This is based off a fix by gmorgan@ on the eureka
branch #98fa6e5e.

Merge of https://widevine-internal-review.googlesource.com/#/c/8496/
from the widevine cdm repo.

b/12018697

Change-Id: I6c05fea885d46aea53a07235c3e5ac65a6971eaf
2013-12-06 12:26:55 -08:00
John "Juce" Bruce
33a223dcf1 Add x86 Builds for Widevine Classic 4.5.0.10113 - DO NOT MERGE
Adds L1 x86 build of Widevine Classic that has been verified by partners.

Change-Id: Id85fea0e0311d06f0875a4aaedebaa9b00d17efa
2013-12-03 19:03:47 -08:00
Fred Gylys-Colwell
5905e530c9 am c53e0c77: Correct SelectKey return value when no keys loaded
* commit 'c53e0c778c172ac3dc411726649a2e7de17b3d82':
  Correct SelectKey return value when no keys loaded
2013-11-20 18:32:58 -08:00
Fred Gylys-Colwell
c53e0c778c Correct SelectKey return value when no keys loaded
Previously, Level 3 SelectKey returned no error when called before
any keys were loaded.  After this CL, it will return
OEMCrypto_ERROR_NO_CONTENT_KEY.

Library version:
arm  - Level3 Library Nov 20 2013 18:09:31
mips - Level3 Library Nov 20 2013 17:58:56
x86  - Level3 Library Nov 20 2013 18:13:01

bug: 11769839
Change-Id: I1b3f057e3ae9f2f174cae91f6849080345f02003
2013-11-20 18:18:43 -08:00
Jeff Tinker
4028bba8a7 am 113d4d07: Add end-to-end generic encrypt/decrypt/sign/verify tests
* commit '113d4d0755dc47348db40ad5d9f73f13355f86c4':
  Add end-to-end generic encrypt/decrypt/sign/verify tests
2013-11-13 09:52:05 -08:00
Jeff Tinker
113d4d0755 Add end-to-end generic encrypt/decrypt/sign/verify tests
bug: 11534771

Merge of https://widevine-internal-review.googlesource.com/#/c/8291/
from the Widevine CDM repo.

Change-Id: I76110013838f91c8009fe710586226c96de890be
2013-11-12 14:19:58 -08:00
Jeff Tinker
40311d0c6c am 357e6c41: Merge "Haystack and Obfuscated OEMCrypto Level 3" into klp-dev
* commit '357e6c419c55a492c8f79845664af68c9b4e7127':
  Haystack and Obfuscated OEMCrypto Level 3
2013-11-07 17:57:45 -08:00