Commit Graph

182 Commits

Author SHA1 Message Date
Jeff Tinker
7e8bea7d8d am 8d08a341: am 50e237cc: Updated gMock to 1.7.0
* commit '8d08a341a75a61a956e889e1650ca1e92f07de20':
  Updated gMock to 1.7.0
2014-03-10 19:45:51 +00:00
Jeff Tinker
8d08a341a7 am 50e237cc: Updated gMock to 1.7.0
* commit '50e237cccd6847cc23977e977f6693ae966794d6':
  Updated gMock to 1.7.0
2014-03-10 19:43:19 +00:00
Jeff Tinker
c4cd207d82 am 04c0ae3c: am f6ec81ff: Updated gMock to 1.7.0
* commit '04c0ae3c65f025b6ec5ef752ce0054e04b414ed4':
  Updated gMock to 1.7.0
2014-03-10 18:59:18 +00:00
Jeff Tinker
04c0ae3c65 am f6ec81ff: Updated gMock to 1.7.0
* commit 'f6ec81ffe782c16e3153ee65a40bfbc25458825f':
  Updated gMock to 1.7.0
2014-03-10 18:57:10 +00: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
0444a6499f am c10898e8: am b2af1e63: OEMCrypto Version 9 API (KLP Modular Version)
* commit 'c10898e8975683ca7243b524f7a0e42b06ebc7e3':
  OEMCrypto Version 9 API (KLP Modular Version)
2014-03-10 18:37:46 +00: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
c10898e897 am b2af1e63: OEMCrypto Version 9 API (KLP Modular Version)
* commit 'b2af1e6303f683833f09eeb3e808597b8ee7f076':
  OEMCrypto Version 9 API (KLP Modular Version)
2014-03-10 18:35:36 +00:00
Jeff Tinker
f794ea70b1 am 4ad288f0: am adfd5991: Remove external links from PDF documents.
* commit '4ad288f0c0ce79a0854edad8c99aa8a2d1396dd5':
  Remove external links from PDF documents.
2014-03-10 18:18:07 +00:00
Jeff Tinker
4ad288f0c0 am adfd5991: Remove external links from PDF documents.
* commit 'adfd599175add15875e6d3924dab82f0d3e359a2':
  Remove external links from PDF documents.
2014-03-10 18:15:12 +00: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
Jeff Tinker
bbb1df3571 Merge "Use the new borg-based proxy server for MediaDrmAPITest" 2014-03-05 19:27:11 +00:00
Jeff Tinker
e49f0e320e Use the new borg-based proxy server for MediaDrmAPITest
Improves availability and reliability of the server.

Change-Id: I53f71e618d9c3b9dcd5df16f8e8140e63a795c3d
2014-03-04 18:43:50 +00:00
Ying Wang
1b50031785 am a79dad48: Now the .pb.h files are generated to arch-neutral dir
* commit 'a79dad48e004d2355317bc486e17c31443694b83':
  Now the .pb.h files are generated to arch-neutral dir
2014-02-25 21:47:16 +00:00
Ying Wang
a79dad48e0 Now the .pb.h files are generated to arch-neutral dir
Change-Id: I950a23fd0e4dd3aca1a85588c65312fcd4c2065a
2014-02-25 11:22:51 -08:00
Ying Wang
0f2f50695a am 4fe637b6: Workaround for the intermediate dir in exported include path for multilib build
* commit '4fe637b638c7eb0b3375e3dc95d409dd38961f84':
  Workaround for the intermediate dir in exported include path for multilib build
2014-02-25 18:03:08 +00:00
Ying Wang
4fe637b638 Workaround for the intermediate dir in exported include path for multilib build
Change-Id: Id8a810f84c6bd383b338df54c2207ce3d0bd4e9a
2014-02-24 18:17:11 -08:00
Colin Cross
6386692315 am d6b79557: widevine: support multilib builds
* commit 'd6b79557aba05ad10f5ad4dda01800f07c11a888':
  widevine: support multilib builds
2014-02-21 13:54:20 +00:00
Colin Cross
d6b79557ab widevine: support multilib builds
Support builds for multiple architectures the same time:
Use LOCAL_MODULE_TARGET_ARCH to restrict building to specific arches
Use LOCAL_C_INCLUDES_x86 to set the include path for only x86 builds

Change-Id: I7c33c27f1c9bfb6e3318a07514698992482f6cd7
2014-02-20 12:48:45 -08:00
Andy Hung
641456cdcc Handle IOException from MediaCodec factory methods
Bug: 11364276
Change-Id: I930f37e8c2cba77e1da3d6a6878186182282b51e
Signed-off-by: Andy Hung <hunga@google.com>
2014-01-16 12:15:26 -08:00
Jeff Tinker
1d708f6bdd am ccecfd71: am 1c5ca642: NULL terminate device unique ID before use
* commit 'ccecfd7192f0f46ccaa4c4f1ee5b2b14c372b472':
  NULL terminate device unique ID before use
2013-12-27 21:02:05 +00: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
0379dcd48c am 32579c9e: am 78a9d5cd: Merge "Add tests for key sharing mode and decrypting without keys" into klp-dev
* commit '32579c9e074a77bc525336b9915671340005548a':
  Add tests for key sharing mode and decrypting without keys
2013-12-19 22:12:52 +00: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
07a88c6c23 am 61c77cd9: am 623920d8: Fix seg fault when playing WV video on Molly with the MediaShell
* commit '61c77cd95dbd48288f8986389375cbd7843e3654':
  Fix seg fault when playing WV video on Molly with the MediaShell
2013-12-13 22:57:27 +00: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
46b2668c26 am da019f95: am 5d5d1baf: Merge "Address unit test failures" into klp-dev
* commit 'da019f95568a7833e2490094017f4afcaae44bfd':
  Address unit test failures
2013-12-12 19:37:47 +00:00
Jeff Tinker
04b1c25788 am 2dffd3db: am 88063a8d: Merge "Add additional MediaDrm API tests" into klp-dev
* commit '2dffd3db32d5ef6f79843831d4ac8f8f628d5321':
  Add additional MediaDrm API tests
2013-12-12 19:37:47 +00:00
Jeff Tinker
b0aa5714cc am 4b9f05c1: am 38cc7122: Improve unit test build script
* commit '4b9f05c131643b756aeb998b76d3e5d164fc5150':
  Improve unit test build script
2013-12-12 19:37:47 +00: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
2db60fbb8c am 78d44c37: am 68e1e7c5: Merge "Generate a unique license request ID" into klp-dev
* commit '78d44c3792d19a74b4fd4bdcd509d785b86c1f83':
  Generate a unique license request ID
2013-12-12 18:28:36 +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
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
Fred Gylys-Colwell
dadf69783a am 5905e530: am c53e0c77: Correct SelectKey return value when no keys loaded
* commit '5905e530c91b01ec43ed99752067c5431da12469':
  Correct SelectKey return value when no keys loaded
2013-11-20 18:40:23 -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
ff77c24030 am 4028bba8: am 113d4d07: Add end-to-end generic encrypt/decrypt/sign/verify tests
* commit '4028bba8a777d977f3bd0d28c5bc17a0ff2d8919':
  Add end-to-end generic encrypt/decrypt/sign/verify tests
2013-11-13 09:58:15 -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
235fb36f8a am 40311d0c: am 357e6c41: Merge "Haystack and Obfuscated OEMCrypto Level 3" into klp-dev
* commit '40311d0c6c44a3d876ce843534cd98c58f65ca4d':
  Haystack and Obfuscated OEMCrypto Level 3
2013-11-07 21:30:28 -08:00
Jeff Tinker
357e6c419c Merge "Haystack and Obfuscated OEMCrypto Level 3" into klp-dev 2013-11-08 01:54:44 +00:00
Jeff Tinker
ad51a53db4 am 48742bba: am 8e5bc02e: Merge "Allow license renewals after expiry" into klp-dev
* commit '48742bba5bd9b4c39fb41359a62e15a6503f1a5e':
  Allow license renewals after expiry
2013-11-07 15:13:05 -08:00
Jeff Tinker
8e5bc02e51 Merge "Allow license renewals after expiry" into klp-dev 2013-11-07 19:09:50 +00:00
Jeff Tinker
83b22d3030 am 98872de3: am 0553f411: Add ExoPlayerDemo.apk to vendor/widevine so partners can access it and use to verify integrations.
* commit '98872de379decad058bee872a37bf880144644e2':
  Add ExoPlayerDemo.apk to vendor/widevine so partners can access it and use to verify integrations.
2013-11-07 09:52:15 -08:00
Andy Hung
1fda9bd213 Merge "Revert "Add "throws IOException" to MediaCodec constructors (8)"" 2013-11-07 05:06:01 +00:00
Andy Hung
b0c5ecc86d Revert "Add "throws IOException" to MediaCodec constructors (8)"
This reverts commit 35133e2bc5.

Change-Id: Iba6767447262ae092e4d38cccf9a4caf5aa75adb
2013-11-07 05:05:08 +00:00
Jeff Tinker
0553f411db Add ExoPlayerDemo.apk to vendor/widevine so partners can access
it and use to verify integrations.

bug: 11357407

Change-Id: Ie38cef1dfd2fe685721e7fb4f37e881326321727
2013-11-06 14:28:09 -08:00