Commit Graph

1482 Commits

Author SHA1 Message Date
John "Juce" Bruce
6fb87d1aa6 am 3efe8758: Merge "Be More Forgiving in EXPECT_ALMOST()" into mnc-dev
* commit '3efe87583d905840d9c0e5a53fbf7846b0e24151':
  Be More Forgiving in EXPECT_ALMOST()
2015-06-19 18:48:25 +00:00
John "Juce" Bruce
098e411673 am b0cfa834: Merge "Fail Test if LoadOfflineLicense() Helper Fails" into mnc-dev
* commit 'b0cfa834f1441352c515f1cc504898c3bb5e5a78':
  Fail Test if LoadOfflineLicense() Helper Fails
2015-06-19 18:48:25 +00:00
John "Juce" Bruce
f0b80ffc64 am 89682556: Fix CanSetServiceCertificate Test
* commit '89682556adb5dd2689ca346e66d924b42d0ff848':
  Fix CanSetServiceCertificate Test
2015-06-19 18:48:24 +00:00
John "Juce" Bruce
3efe87583d Merge "Be More Forgiving in EXPECT_ALMOST()" into mnc-dev 2015-06-19 18:20:30 +00:00
John "Juce" Bruce
b0cfa834f1 Merge "Fail Test if LoadOfflineLicense() Helper Fails" into mnc-dev 2015-06-19 18:17:55 +00:00
Rahul Frias
f08d6fae3a Address compiler warning
[ Merge of http://go/wvgerrit/14788 ]

A retired error code was not being handled when converting from
a WVStatus error code to a ERROR_DRM_VENDOR error code.

b/13976775

Change-Id: Ib4363792e4a5e9a20fc718d169b3e0348413267a
2015-06-19 11:14:21 -07:00
John "Juce" Bruce
e0dca7b54a am 968993cd: Allow Clearing of Privacy Cert
* commit '968993cd05b3c4da324a912a6ca3315bac9fc2b9':
  Allow Clearing of Privacy Cert
2015-06-19 18:01:10 +00:00
John "Juce" Bruce
6a773e3630 Be More Forgiving in EXPECT_ALMOST()
(This is a merge of http://go/wvgerrit/14776)

This change widens the range in EXPECT_ALMOST slightly, to allow for
slight timing errors in the tests.

Bug: 21489628
Change-Id: Ibb074c2d037566c307c0438efdda3841bc48f7ed
2015-06-18 19:00:06 -07:00
John "Juce" Bruce
57fd014f6d Fail Test if LoadOfflineLicense() Helper Fails
(This is a merge of http://go/wvgerrit/14775)

This change causes tests that call LoadOfflineLicense() to fail if
the session is still open after that call. Due to the way that gTest
handles ASSERT_*() macros, failures in LoadOfflineLicense() will leave
the session open, causing unexpected state and cascading failures
throughout the rest of the test. With this change, we will abort
sooner, reducing log noise.

Bug: 21489628
Change-Id: Ic35bc77bbc5f676f23deeefaacd1986e383538c8
2015-06-18 18:59:24 -07:00
John "Juce" Bruce
89682556ad Fix CanSetServiceCertificate Test
(This is a merge of http://go/wvgerrit/14783)

When validation was added to the service certificate property, it
broke the associated test, which sends random data. It also did not
do any testing of the new validation itself.

This fix makes the validation method on WvContentDecryptionModule
non-static so that it can be mocked and handled appropriately in the
test.

Bug: 21923281
Change-Id: Id5d2315709fce35f9347b3545f594371810349f0
2015-06-18 18:54:19 -07:00
John "Juce" Bruce
968993cd05 Allow Clearing of Privacy Cert
(This is a merge of http://go/wvgerrit/14782)

The ability to clear the privacy cert after setting it was
accidentally removed by adding validation, as an empty certificate is
invalid. This restores the ability to clear the certificate by not
validating if the value being set is empty.

Bug: 21923281
Change-Id: Ibb57481a398c9599163ab3512125a9d5b5fcaab4
2015-06-18 18:47:41 -07:00
Rahul Frias
adc1250666 am 99a2346e: Return more descriptive error codes on license generation failure
* commit '99a2346e3a4ad2fdd47adcd3e36d8c3e146e85ff':
  Return more descriptive error codes on license generation failure
2015-06-18 01:57:16 +00:00
Rahul Frias
99a2346e3a Return more descriptive error codes on license generation failure
[ Merge from http://go/wvgerrit/14745 ]

License generation errors previously would result in code -2916 being returned
though the mediaDrm API. More descriptive error codes are now being returned
from -2850 to -2836

b/13976775

Change-Id: I613ad650ab0a072ce9d8029e2af52b72dc617236
2015-06-17 17:32:11 -07:00
Fred Gylys-Colwell
4464d2fd60 am b879cc6c: Merge "Fix QueryKeyControl Unit Test" into mnc-dev
* commit 'b879cc6c3a5518a2cf7f7d461bdf9860d0c53c57':
  Fix QueryKeyControl Unit Test
2015-06-18 00:02:50 +00:00
Fred Gylys-Colwell
672b1be3b2 am 854a409a: Accept Other Error Codes in TestSignatureBoth
* commit '854a409ae6a88bbbe78a5adb492e8051319097c7':
  Accept Other Error Codes in TestSignatureBoth
2015-06-18 00:02:49 +00:00
Fred Gylys-Colwell
b879cc6c3a Merge "Fix QueryKeyControl Unit Test" into mnc-dev 2015-06-17 23:35:23 +00:00
Fred Gylys-Colwell
854a409ae6 Accept Other Error Codes in TestSignatureBoth
Merge from widevine of http://go/wvgerrit/14744

The OEMCrypto unit test TestSignatureBoth verifies that a cast
certificate cannot be used to derive session keys.  This CL relaxes
the requirement that DeriveKeysFromSessionKey returns a specific error
code instead of just failing.

bug: 21708882
Change-Id: I4163a9616122ad709bab76f488d030239029861c
2015-06-17 15:58:58 -07:00
Fred Gylys-Colwell
b6f096d08a Fix QueryKeyControl Unit Test
Merge from widevine repo of http://go/wvgerrit/14720

The QueryKeyControl test expects an error message that the output
buffer is too small.  However, it also gives a bad key id.  Some
devices were correctly returning key not found.  This corrects the key
id length so that the only error is that the buffer is too small.

bug: 21881768
Change-Id: I96f59ede42eeddc9849fbac1e52acecdb562df08
2015-06-17 15:53:12 -07:00
Fred Gylys-Colwell
e23c0d1eac am e16e4c1a: Merge "Replace MockCDM with Android Smart Pointer to MockCDM" into mnc-dev
* commit 'e16e4c1a492878759ff7e65290e226564995d7ea':
  Replace MockCDM with Android Smart Pointer to MockCDM
2015-06-17 22:18:09 +00:00
Fred Gylys-Colwell
e16e4c1a49 Merge "Replace MockCDM with Android Smart Pointer to MockCDM" into mnc-dev 2015-06-17 21:43:25 +00:00
Fred Gylys-Colwell
87dbf0d941 Replace MockCDM with Android Smart Pointer to MockCDM
Merge from widevine repo of http://go/wvgerrit/14742

The CDM object can no longer be created on the stack because it
inherits from RefBase.  This caused some unit tests to hang in the
MockCDM destructor.

bug: 21881298

Change-Id: Ieeb7863031609f12ad3d9188c4525aa2fa1eb736
2015-06-17 13:57:44 -07:00
Fred Gylys-Colwell
6592e0d81b am f9453190: Improve RSA performance in Level 3 OEMCrypto
* commit 'f9453190fdaba308d253536ed6d05937d3894562':
  Improve RSA performance in Level 3 OEMCrypto
2015-06-17 19:51:24 +00:00
Fred Gylys-Colwell
f9453190fd Improve RSA performance in Level 3 OEMCrypto
Merge from widevine repo of http://go/wvgerrit/14668

This CL modifies the multiplication routine to avoid memory cache
misses.  This shows a 10-20% speed improvment in license requests on
an x86.

Level 3 library version:
level3/arm/libwvlevel3.a  Level3 Library Jun 15 2015 14:09:24
level3/x86/libwvlevel3.a  Level3 Library Jun 15 2015 14:09:10

bug: 18252910

Change-Id: I4429324374de46d1d710d5fcac80f7ed363c696c
2015-06-17 11:28:27 -07:00
Fred Gylys-Colwell
cdaa790365 am 82bf03f0: Verify OEMCrypto supports Level 1
* commit '82bf03f062e635127fb827146ce9baea89918d15':
  Verify OEMCrypto supports Level 1
2015-06-17 18:05:07 +00:00
Fred Gylys-Colwell
82bf03f062 Verify OEMCrypto supports Level 1
Merge from widevine repo of http://go/wvgerrit/14708

This CL adds a test to verify that oemcrypto is a level 1 device.  It
is part of oemcrypto_test_android.cpp, so it only applies to android
devices and to the widevine buildbot which also runs the android tests.

bug: 21814204

Change-Id: Icbcdd3496fb8a656891bd7c873c60cba23c9666a
2015-06-16 17:46:52 -07:00
Fred Gylys-Colwell
28cc77007a am 8bd1a40c: Verify Key Rewrapping Does Not Leave Key in Clear
* commit '8bd1a40cd2e3de3aee1efeb861f77c6b69795a71':
  Verify Key Rewrapping Does Not Leave Key in Clear
2015-06-16 22:02:48 +00:00
Fred Gylys-Colwell
8bd1a40cd2 Verify Key Rewrapping Does Not Leave Key in Clear
Merge from widevine repo of http:/go/wvgerrit/14707

This CL adds a check to oemcrypto_test to verify that when a
certificate is rewrapped, it does not show up in the clear.  We can't
really verify that it is encrypted well, but we can check this.

bug: 21871738

Change-Id: I07c87c38a1e2a099a90a5be4e3350e91e09f6722
2015-06-16 11:16:46 -07:00
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