Commit Graph

1505 Commits

Author SHA1 Message Date
Fred Gylys-Colwell
fbfe1ae0fe am 1d934be5: Merge "Separate and Clarify Cast Reciever Tests" into mnc-dev
* commit '1d934be5d162b40ed4d3ee721b6751440eb51a6e':
  Separate and Clarify Cast Reciever Tests
2015-06-15 20:56:16 +00:00
Fred Gylys-Colwell
1d934be5d1 Merge "Separate and Clarify Cast Reciever Tests" into mnc-dev 2015-06-15 20:24:02 +00:00
Fred Gylys-Colwell
bf484e95de Separate and Clarify Cast Reciever Tests
Merge from widevine of http://go/wvgerrit/14667

This CL updates oemcrypto_test.cpp so that devices that are not cast
recievers do not attempt to run those tests that are only needed by
cast recievers.

bug: 21708882
bug: 18948285

Change-Id: I75f9170cee13e66667db54c5f298ed5c6cf14a48
2015-06-15 11:22:46 -07:00
Rahul Frias
41e5cf16fc am 1b88e370: Merge "Fix for concurrent provisioning attempts" into mnc-dev
* commit '1b88e370cf0a70d93a6f769b766b596af9fb2114':
  Fix for concurrent provisioning attempts
2015-06-15 18:02:18 +00:00
Rahul Frias
1b88e370cf Merge "Fix for concurrent provisioning attempts" into mnc-dev 2015-06-15 17:29:40 +00:00
Rahul Frias
b33298a742 Fix for concurrent provisioning attempts
[ Merge from http://go/wvgerrit/14670 ]

Concurrent provisioning attempts are declared successful if any one of them
succeeds. Earlier only the successful ones were declared as such.

b/21727698

Change-Id: I67dedca44790a4ae236e14f90a8fc91775273905
2015-06-12 14:37:41 -07:00
John "Juce" Bruce
06339504be am 6dbc3749: Merge "Validate Service Certificates Before Accepting Them" into mnc-dev
* commit '6dbc3749b08226f4aea4cd5500db82a792095d6d':
  Validate Service Certificates Before Accepting Them
2015-06-12 20:21:58 +00:00
Jeff Tinker
d4181602ad am 69df7f61: Merge "Fix session count properties" into mnc-dev
* commit '69df7f61e64d10a8c561b0f4d6d3c82324d6d7f5':
  Fix session count properties
2015-06-12 20:21:57 +00:00
John "Juce" Bruce
6dbc3749b0 Merge "Validate Service Certificates Before Accepting Them" into mnc-dev 2015-06-12 19:49:46 +00:00
Jeff Tinker
69df7f61e6 Merge "Fix session count properties" into mnc-dev 2015-06-12 19:43:51 +00:00
John "Juce" Bruce
c400a37d19 Validate Service Certificates Before Accepting Them
(This is a merge of http://go/wvgerrit/14630)

To create a better flow when an application sets a service certificate
manually, we will now validate the certificate when it is given to us,
and if it is invalid, we will not allow the property to be set.

Bug: 21307186
Change-Id: If980ad075604223fc962a859fae93e98d86a7f4f
2015-06-12 11:46:32 -07:00
Edwin Wong
6bc316b6dd am e6ea4ff2: Change url to test content page to a more accessible Google URL.
* commit 'e6ea4ff2d06f98bb0a24c6b2872ee7614514ebf4':
  Change url to test content page to a more accessible Google URL.
2015-06-11 23:31:20 +00:00
Edwin Wong
43cac02069 am 49ef93cc: Update Widevine Classic Library to 4.5.0.10136.
* commit '49ef93ccb382224680fa26a4e866f027c39d5d44':
  Update Widevine Classic Library to 4.5.0.10136.
2015-06-11 22:53:48 +00:00
Edwin Wong
e6ea4ff2d0 Change url to test content page to a more accessible Google URL.
Replace "http://pmweb.widevine.net/html/android/oem.html" with a more
accessible Google URL.

bug: 16630664
Change-Id: I90350ceb11bb9f53dc4c265c910e3a8258ff82a7
2015-06-11 15:31:46 -07:00
Edwin Wong
49ef93ccb3 Update Widevine Classic Library to 4.5.0.10136.
Update license request URL references. Replaces URL ending with
.../GetEMMs.cgi with the new url. Update portal to widevine.

Widevine repo reference: https://widevine-internal-review.googlesource.com/#/c/14659/.

bug: 16630664
Change-Id: I7b263c239af75ce35e5c7a0b6856d129ee25332c
2015-06-11 14:59:59 -07:00
Jeff Tinker
e1ba3ee601 Fix session count properties
bug: 21787354

merge of http://go/wvgerrit/14663 from the widevine repo

Change-Id: Ia8618c9daba2526234c5c5c84590e74d6feebf95
2015-06-11 14:57:18 -07:00
John "Juce" Bruce
b4658a6198 am a8328dd2: Delete Singleton on Library Unload
* commit 'a8328dd2f945e8357b3a58c76b0a71a4a2463aa1':
  Delete Singleton on Library Unload
2015-06-10 02:32:14 +00:00
John "Juce" Bruce
a8328dd2f9 Delete Singleton on Library Unload
(This is a merge of http://go/wvgerrit/14531)

As an optimization, the Media Server now unloads our library when not
in use. This has exposed a bug by which we were never deleting the CDM
singleton. Fix is to make WvContentDecryptionModule an Android smart
pointer ref base and then make sure all the plugins store a strong
pointer to it. The singleton is a weak pointer, so when the last
plugin is cleaned up, the CDM will be as well. And on the off chance
that the library isn't immediately unloaded, the singleton code will
generate a new CDM next time one is needed.

Bug: 21153732
Change-Id: Ifaf02fa9afe0a70a8b53e8b92ee0a3d1359ca001
2015-06-09 14:58:01 -07:00
Jeff Tinker
8ef609a4ff am a54ae37c: Merge "Correct mapping for too many open sessions" into mnc-dev
* commit 'a54ae37ceb536329fbd8d62aa8124d7c5453523b':
  Correct mapping for too many open sessions
2015-06-08 19:55:43 +00:00
Jeff Tinker
a54ae37ceb Merge "Correct mapping for too many open sessions" into mnc-dev 2015-06-08 16:52:25 +00:00
Fred Gylys-Colwell
d4312bb81d am 30abdd58: Merge "Add Tests With Different Sized Key IDs" into mnc-dev
* commit '30abdd58a038dde301957e63fd64d894025455dc':
  Add Tests With Different Sized Key IDs
2015-06-05 18:19:55 +00:00
Fred Gylys-Colwell
30abdd58a0 Merge "Add Tests With Different Sized Key IDs" into mnc-dev 2015-06-05 17:40:12 +00:00
Fred Gylys-Colwell
3304f088bd am 92958a0e: Protect OEMCrypto Mock and Level 3 From Null Pointers
* commit '92958a0e6aad8dd9ffeab8f494a26a084b3eede7':
  Protect OEMCrypto Mock and Level 3 From Null Pointers
2015-06-05 00:48:43 +00:00
Jeff Tinker
2478c36b51 Correct mapping for too many open sessions
The drm resource manager expects openSession to fail
with ERROR_DRM_RESOURCE_BUSY, but in some cases the
WV DRM plugin is returning a vendor-specific code
kErrorTooManySessions instead.  This change updates
the error code mapping to match what the resource
manager expects.

Merge of http://go/wvgerrit/14564 from widevine repo

bug: 21640598
Change-Id: I0b296ff5eeef8a6b94cfe0fd450b15f15cf03eab
2015-06-05 00:03:00 +00:00
Fred Gylys-Colwell
177c59033e Add Tests With Different Sized Key IDs
Merge from widevine repo of http://go/wvgerrit/14550

This CL adds several tests with different sized key ids to
oemcrypto_test.

bug: 21643096
Change-Id: I62a89c557f3f746f09ee5a2fe5bdd3ca821448e4
2015-06-04 15:57:56 -07:00
Fred Gylys-Colwell
92958a0e6a Protect OEMCrypto Mock and Level 3 From Null Pointers
Merge from widevine repo of http://go/wvgerrit/14502

If any OEMCrypto session call is made after Terminate is called, then
there was a null pointer access.  This is protected by the oemcrypto
adapter, but could still be a problem in unit tests which by-pass the
adapter.

bug: 21642892

Level 3 versions:
level3/arm/libwvlevel3.a  Level3 Library May 29 2015 14:03:11
level3/x86/libwvlevel3.a  Level3 Library May 29 2015 14:03:12

Change-Id: I84fd098c2faea71a79bc21658485593e22a8e994
2015-06-04 15:54:08 -07:00
John "Juce" Bruce
c8b4eaefb7 am 4fce36e9: Use ToVector Everywhere
* commit '4fce36e91f426421172ab006d84ccfcaa0b06809':
  Use ToVector Everywhere
2015-06-02 19:24:08 +00:00
John "Juce" Bruce
4fce36e91f Use ToVector Everywhere
(This is a merge of http://go/wvgerrit/14390)

Expands usage of the ToVector() helper that kqyang@ wrote across the
entire DRM Plugin.

Bug: 20037441
Change-Id: I55112245af6fdf21ea3d3db87b1564af2f54929d
2015-06-01 16:47:13 -07:00
Jeff Tinker
27103166b1 am 71a17797: Merge "Fix possible infinite loop in test code" into mnc-dev
* commit '71a177977618e54db6f2ea9b67493ddec851d2b3':
  Fix possible infinite loop in test code
2015-06-01 17:34:19 +00:00
Fred Gylys-Colwell
2ebb5a1a77 am 9dfa85ae: Replace some arrays with vectors and initialize
* commit '9dfa85ae2a988bbd96175ee544d3967f2ec902d5':
  Replace some arrays with vectors and initialize
2015-06-01 16:39:50 +00:00
Fred Gylys-Colwell
5b2a6bfb8f am 994a7fc4: Update OEMCrypto Offset Tests
* commit '994a7fc4c1f696226e08fe2d9f1e4852fca147bc':
  Update OEMCrypto Offset Tests
2015-06-01 15:48:41 +00:00
Jeff Tinker
71a1779776 Merge "Fix possible infinite loop in test code" into mnc-dev 2015-05-29 23:15:51 +00:00
Rahul Frias
05c8160ca7 am 93d32612: Enable tests that cover renewals/releases with client IDs
* commit '93d326129ad48966ff1cff768d0426ff43a7baf4':
  Enable tests that cover renewals/releases with client IDs
2015-05-29 21:07:08 +00:00
Fred Gylys-Colwell
9dfa85ae2a Replace some arrays with vectors and initialize
Merge from widevine side of http://go/wvgerrit/14462

This cleans up some tests in oemcrypto_test.cpp so that they use
vectors instead of arrays.  The two reasons this is needed are that
arrays are more likely to use up stack space, and that arrays on the
stack are not initialized.

The lack of initialization caused some negative tests to fail because
buffers that were reused from unencrypted data still contained values
that the test expected not to be there.

Change-Id: Ic1705b6bc581084a9fe3cd573adf34d8219a1a45
2015-05-29 13:53:08 -07:00
Fred Gylys-Colwell
994a7fc4c1 Update OEMCrypto Offset Tests
Merge from widevine repo of http://go/wvgerrit/14321

It is expected that OEMCrypto will only be given subsamples with a
block offset when there are multiple subsamples, so that the entire
sample may be decrypted after all calls are made.  This CL modifies
the existing tests so that the result of DecryptCTR is only checked
after all subsamples have been decrypted.

Also, the QueryKeyControl test has been modified so that failure does
not require a specific error code.

bug: 20757848
bug: 21063276
Change-Id: Ie2b12b287b0c9c661cd14111b2ae9eab004cd8b8
2015-05-29 13:50:20 -07:00
Rahul Frias
93d326129a Enable tests that cover renewals/releases with client IDs
[ Merge of http://go/wvgerrit/14480 ]

Server upgrades have been completed and allow these tests to run successfully
against UAT. They were earlier tested against staging.

b/21479112

Change-Id: Ifc5e5780fa5305c6ddfd662ada204db599cb5c6e
2015-05-28 00:33:00 -07:00
Jeff Tinker
92bf971ea8 Fix possible infinite loop in test code
Also handle ResourceBusyException

merge of http://go/wvgerrit/14470 from widevine repo

bug: 21172957
Change-Id: I6815786eb7a678725cf2632f1009c7f566ba7499
2015-05-27 16:52:28 -07:00
Rahul Frias
710382ed35 am 997ea4f4: Accept signed service certificates
* commit '997ea4f44712be9ffbaf5847bbb0942a4d1f0f3d':
  Accept signed service certificates
2015-05-26 19:17:15 +00:00
Rahul Frias
997ea4f447 Accept signed service certificates
[ Merge of http://go/wvgerrit/14410 ]

When specifying a service certificate though mediaDrm, the CDM earlier expected
serialized service certificates rather than signed ones.

b/21334970

Change-Id: I39af2aa25e8dc2a651cbdce84eb32f266b5b3382
2015-05-26 10:34:18 -07:00
Kongqun Yang
b16ec4fc93 am 3cdc43ca: Use 0 to represent unexpired license in OnExpirationUpdate
* commit '3cdc43caeb37173bc5bc60bd3f414da540640e03':
  Use 0 to represent unexpired license in OnExpirationUpdate
2015-05-23 00:39:31 +00:00
Kongqun Yang
3cdc43caeb Use 0 to represent unexpired license in OnExpirationUpdate
Also fix a missing change for
"playback duration should override license duration".

Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/14435/

Bug: 21393975
Change-Id: Ibfcf3ae4c13db8944ea285bcc79b6312ea621e1b
2015-05-22 15:47:42 -07:00
Rahul Frias
a3b714762c am 5f227dd8: Avoid throwing exceptions when sessions are closed
* commit '5f227dd85d5407620cd68c17caae6e1949cd06c9':
  Avoid throwing exceptions when sessions are closed
2015-05-22 22:23:41 +00:00
Rahul Frias
5f227dd85d Avoid throwing exceptions when sessions are closed
[ Merge of http://go/wvgerrit/14404 ]

Closing a non-existant (already closed) session results in an exception
being thrown though mediaDrm. The mediaDrm plugin will now ignore
errors when called though MediaDrm.closeSession.

b/21122725

Change-Id: Ib1c48ade4bdb131195ee56ce2af32bf0cd2166da
2015-05-22 11:17:25 -07:00
Fred Gylys-Colwell
18d7469b96 am 3a7ef263: Merge "Update padding scheme in mock" into mnc-dev
* commit '3a7ef2637500f5879165e2fc15883595bbcab9ed':
  Update padding scheme in mock
2015-05-22 01:50:09 +00:00
Fred Gylys-Colwell
3a7ef26375 Merge "Update padding scheme in mock" into mnc-dev 2015-05-22 01:14:54 +00:00
Kongqun Yang
9736d87707 am ce68b8ee: Fix expiry time overflow if it is unlimited
* commit 'ce68b8ee8835cd202e40a2d1246023dcd22fcc05':
  Fix expiry time overflow if it is unlimited
2015-05-21 19:10:18 +00:00
Kongqun Yang
ce68b8ee88 Fix expiry time overflow if it is unlimited
Bug: 21324836

Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/14392

Change-Id: I2a8da14c98f8ae0fece3667b6f6b8517577f8a98
2015-05-20 18:31:06 -07:00
Fred Gylys-Colwell
6639965d30 Update padding scheme in mock
Merge from widevine repo of http://go/wvgerrit/14370

In order to run on android, we need the mock to compile with
BoringSSL, which uses a different function call for
RSA_padding_add_PKCS1_PSS.

Change-Id: I9cad4e7d5c1d4a3117fe7c0fc1e27590809a7ac3
2015-05-19 21:05:29 -07:00
Kyle Alexander
2955097ba1 am b513c016: Merge "Updating expected Android version to M" into mnc-dev
* commit 'b513c016ed6ba6db18bbad464b3ace24d667fad1':
  Updating expected Android version to M
2015-05-15 20:35:39 +00:00
Rahul Frias
6e7e6122e3 am 6e7339f4: Merge "Playback duration should override license duration" into mnc-dev
* commit '6e7339f40fac42b67079401a40d2c78742b6736f':
  Playback duration should override license duration
2015-05-15 20:35:39 +00:00