Commit Graph

197 Commits

Author SHA1 Message Date
John W. Bruce
ea4e6d8c37 Add Windows support for clock-change test.
(This is a merge of http://go/wvgerrit/70363)

Test: Android Unit Tests
Bug: 122953649
Change-Id: I47d2120b4d280be316072c38fd7282e14f68c6a0
2019-04-19 22:20:23 +00:00
John W. Bruce
5ea429ee2b Don't Use StringStream When It's Overkill
(This is a merge of http://go/wvgerrit/76063)

Now that we have C++11, many places that do string formatting or parsing
can be replaced with std::to_string() or one of the std::sto*() family
of functions. This patch updates places that do simple stringifying or
parsing to use these functions. Some parts of the code are left
untouched because they were using StringStream to do more complex
actions, such as constructing more complex output or checking the status
of the parsing.

Bug: 120599938
Test: CE CDM Unit Tests
Test: Android Unit Tests
Change-Id: I482dc234ecd7c6014fa9b6874387ff51e04b772f
2019-04-17 17:46:31 -07:00
Fred Gylys-Colwell
5f7803dedd Add comments to unit tests
Merge from Widevine repo of http://go/wvgerrit/73383

Partners have been requesting more explanation for what each test is
doing.  This is an attempt to clarify some of the tests.

Bug: 119640588
Test: unit tests
Change-Id: I270203b4e8fa7e65abb55297788e4d55856e7dcd
2019-03-03 21:16:55 -08:00
Jacob Trimble
b3dd9c3711 Misc Windows fixes.
(This is a merge of http://go/wvgerrit/70324)

- Add build settings for Windows.
- Conditionally add pthread.
- Add dummy DLLMain method.
- Fix #if checks for Windows.
- Remove designated initializers which aren't supported in MSVC.
- Remove variable length array.

Test: Android Unit Tests
Bug: 122953649
Change-Id: I14f16e7ce4b3ff17ee0139ea6c2f7243ae999aa1
2019-01-25 15:05:00 -08:00
John W. Bruce
777abaef01 Add some platform abstractions.
(This is a merge of http://go/wvgerrit/70303)

This adds a platform.h file to abstract some of the differences
between Windows and POSIX platforms.  This includes ntohl, setenv,
and ssize_t.

Bug: 122953649
Test: Android Unit Tests
Change-Id: I3235f3f284b53d24d7365ff3f4a06dcd9b403697
2019-01-16 11:06:55 -08:00
Srujan Gaddam
80166b37e2 Remove shared license code from OEMCrypto
Bug: b/119881112
Merge of http://go/wvgerrit/68983
Test: Android + Linux tests for ref and L3

This CL removes tests from OEMCrypto that test shared license
functionality and code in the ref and L3 that handle shared licenses.

Change-Id: Ia11510d8db3fa6e471a4ebbdb371fd76b0812984
2019-01-09 13:50:33 -08:00
Fred Gylys-Colwell
9c95e4caae Remove OEMCrypto_InitializeDecryptHash
Merge from Widevine repo of http://go/wvgerrit/68464

The Full Decrypt Path Testing design has changed to remove
OEMCrypto_InitializeDecryptHash.  This CL updates the unit tests and
reference code.

Bug: 120795057
Test: unit tests

Change-Id: Iee28fa9034dc21cee81c5b894c192e260375eeee
2019-01-07 09:53:07 -08:00
Fred Gylys-Colwell
e5161a318e Verify double call to OEMCrypto_DeactivateUsageEntry
Merge of http://go/wvgerrit/68187

This adds a unit test to verify that OEMCrypto_DeactivateUsageEntry
may be called several times without an error or changing the entry's
state.

Bug: 80540710
Test: unit tests
Change-Id: I594594bfde75c3e38a3b9efc51a667613a5da6ed
2018-12-19 12:08:43 -08:00
Rahul Frias
25d29fd22b Use the std::chrono to get the time.
[ Merge of http://go/wvgerrit/67985 ]

Now that we can use C++11, we should use the cross-platform types for
clocks instead of the platform-specific versions.

Test: WV unit/integration tests.
Change-Id: I50318e3d1caf9e814f33f497f83c19c9f3c154a1
2018-12-13 12:09:04 -08:00
Rahul Frias
3c350b677f Use vec.data() instead of &vec[0].
[ Merge of http://go/wvgerrit/67984 ]

Getting the address of the first element is invalid when the size is
0.  Calling data() is valid when the size is zero so long as we
don't use the resulting pointer.  This is important when we pass the
pointer to low-level functions like memcpy.

Also, MSVC is stricter about this and doesn't allow indexing the 0-th
element when it is empty.  But GCC/Clang seem to be fine with it so
long as the object isn't used.

Test: WV unit/integration tests

Change-Id: Ic5d11da41dd3a185a63f86a6ea91e9b954fd699a
2018-12-13 12:05:56 -08:00
Srujan Gaddam
b10d5c2a8f Merge changes from topic "level_3_oecv15"
* changes:
  Changes to adapter + gyp to support v15
  Add full decrypt path testing functionality to Level 3
  Update pointers to substrings in Level 3
  Update level 3 reference API for v15
2018-12-11 19:54:39 +00:00
Srujan Gaddam
732c077f79 Changes to adapter + gyp to support v15
Bug: b/117558570
Test: Android, CE CDM, and Linux tests
Merge of http://go/wvgerrit/67566

This CL adds changes to support the Level 3 upgrade to v15 with both the
dynamic and static adapters. It also rearranges the wvcrc.cpp files so
that the tests have their own copy and Level 3 can just use the one in
ref/src.

Change-Id: Ieee2859601881aa1800622454e6ce0345eb94aa7
2018-12-06 23:04:12 +00:00
John W. Bruce
b771d93514 Google-style override & virtual
(This is a merge of http://go/wvgerrit/66625)

Google C++ Style dictates that methods which override base class or
interface methods should be declared "override" but not "virtual". Since
our codebase has not had access to "override" until now, many of our
classes do not follow this rule. I've updated as many places as I could
find to follow Google C++ Style, which should hopefully help us catch
errors better in the future.

Bug: 111851141
Test: CE CDM Unit Tests
Test: Android Unit Tests
Change-Id: Ic23e2e482e967256da306791532b5fec7b81b2f2
2018-12-06 09:01:18 -08:00
Fred Gylys-Colwell
e59b976625 Update comments and unit tests for InstallKeyboxOrCert
Merge from Widevine repo of http://go/wvgerrit/66865

This CL updates the comments for the code that uses
InstallKeyboxOrCert to install a keybox or oem cert at runtime.  There
is also a new unit test for the device id.  There are not many unit
tests because we don't want to accidentally overwrite the production
keybox or cert on a device when running tests.

bug: 111725154
test: unit tests
Change-Id: Ide9b3d4732f3f96a723a128907babe7e59c02ffc
2018-11-26 14:08:17 -08:00
Fred Gylys-Colwell
0f57ebb5b4 Unit test for pointer alignment
Merge from Widevine repo of http://go/wvgerrit/66708

This adds a unit test to verify that LoadKeys still works if the message is not
word alligned.

Test: unit tests on desktop and taimen (x86 and arm)
Bug: 68783727
Change-Id: Ib081a2c21af710b294772513c2c777ef1ac0daf0
2018-11-20 14:51:28 -08:00
Fred Gylys-Colwell
f18ac47d71 Update oemcrypto adapter for v15 -> v14
Merge from master branch of Widevine repo of http://go/wvgerrit/66081
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/65962

This CL changes function names in the v14 level 3 libraries to work with
the dynamic adapter.  I also excluded several OEMCrypto unit tests from
running with a v14 oemcrypto because they require error code changes
introduced in v15.

Bug: 117888897 Fix backwards compatibility
Bug: 119313532 Integration test failing

Test: unit tests on taimen.  Play Movies, ExoPlayer, Netflix play on taimen.
Some unit tests do not pass because Taimen uses a v13 oemcrypto. Most pass.

Change-Id: Ib8eb8a89591fdba3055064c4bdf90523b01309a8
2018-11-16 17:14:02 -08:00
Fred Gylys-Colwell
246621c5ce Full decrypt path testing
Merge from master branch of Widevine repo of http://go/wvgerrit/66080
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/64002

This CL updates OEMCrypto reference code and unit tests to support full decrypt
path testing.

Test: unit tests
Test: tested as part of http://go/ag/5501993
Bug: 34078913
Change-Id: Ia67374599d6619698a336f41513068ad04294e7f
2018-11-16 17:14:00 -08:00
Fred Gylys-Colwell
4fa255ea51 Add Sandbox ID support
Merge from master branch of Widevine repo of http://go/wvgerrit/66078
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/64022

This CL updates OEMCrypto ref code, unit tests, and core code for
setting the sandbox id before initializing OEMCrypto.

Test: unit tests only
Test: tested as part of http://go/ag/5501993
Bug: 115834255
Change-Id: Id9831680fe4db1c69413815931cae4bc80df0c01
2018-11-16 17:14:00 -08:00
Srujan Gaddam
b7e4b56934 Update OEMCrypto calls to use substrings (addendum)
Merge from master branch of Widevine repo of http://go/wvgerrit/66076
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/64743

http://go/wvgerrit/64083 had some refactorings that weren't completely
accurate or slightly changed the meaning of some tests. This CL is an
addendum to that CL to fix those refactorings.

Test: tested as part of http://go/ag/5501993
Bug: 115874964

Change-Id: I37766a4c34de737eb9ca94ef781805435ee30dfd
2018-11-16 17:14:00 -08:00
Srujan Gaddam
4d5e0f961b Add tests for null kc/kc iv
Merge from master branch of Widevine repo of http://go/wvgerrit/66075
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/64702

Bug: 118172995

Tests OEMCrypto_LoadKeys when given a KeyObject with NULL KeyControl or
KeyControl iv.
Test: tested as part of http://go/ag/5501993

Change-Id: I1a5d26b1e2ff395fbd5ef7769af1165222c1877e
2018-11-16 17:14:00 -08:00
Srujan Gaddam
e6439255ba Update OEMCrypto calls to use substrings
Merge from master branch of Widevine repo of http://go/wvgerrit/66073
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/64083

As part of the update to v15, LoadKeys, RefreshKeys, and
LoadEntitledContentKeys should all use offsets and lengths into the
message rather than a pointer for its parameters. The CDM, tests,
adapters, and OEMCrypto implementations are changed to reflect this.

Test: tested as part of http://go/ag/5501993
Bug: 115874964

Change-Id: I981fa322dec7c565066fd163ca5775dbff71fccf
2018-11-16 17:14:00 -08:00
Fred Gylys-Colwell
4550979f22 OEMCrypto Resource Rating
Merge from master branch of Widevine repo of http://go/wvgerrit/66072
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63764

This adds the function OEMCrypto_ResourceRatingTier to the oemcrypto referenece
code, dynamic adapter, and unit tests.

Bug: 117110800
Test: tested as part of http://go/ag/5501993

Change-Id: Idf47af405f0c69601108b75c788a97b30abdb39d
2018-11-16 17:14:00 -08:00
Fred Gylys-Colwell
52b274a3a4 Add HDCP 2.3 to logs
Merge from master branch of Widevine repo of http://go/wvgerrit/66071
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63842

OEMCrypto tests log the HDCP value.  This CL updates those logs to include logs
for HDCP 2.3.

Test: unit tests
Test: tested as part of http://go/ag/5501993
Bug: 78773763
Change-Id: I7a3003e081c3c848b5d595ac241a0b546dacb747
2018-11-16 17:14:00 -08:00
Fred Gylys-Colwell
43a47a60c0 Add session parameter to OEMCrypto_CopyBuffer
Merge from master branch of Widevine repo of http://go/wvgerrit/66070
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63662

To make the threading model more clear, CopyBuffer is now a session function.
This means we need to pass in which session the current thread locks.

Test: unit tests.
Test: tested as part of http://go/ag/5501993
Bug: 113680369
Change-Id: I2fdd2cfcaab99f3793950b3845941463675f5e4c
2018-11-16 17:14:00 -08:00
Fred Gylys-Colwell
ef067572bc Remove error OEMCrypto_KEY_NOT_LOADED
Merge from master branch of Widevine repo of http://go/wvgerrit/66066
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63628

The error code OEMCrypto_KEY_NOT_LOADED is redundant with
OEMCrypto_ERROR_NO_CONTENT_KEY and OEMCrypto_KEY_NOT_ENTITLED.  The
function LoadEntitledContentKey should return KEY_NOT_ENTITLED if it
does not find the corresponding entitlement key in its key table.  All
other functions that do not find a key id in the key table should
return OEMCrypto_ERROR_NO_CONTENT_KEY.  This includes QueryKeyControl,
SelectKey, and RefreshKeys.

Test: unit tests
Test: tested as part of http://go/ag/5501993
Bug: 115574797
Change-Id: Ida2111f32e331b99f3f0c77fa404a42654d0870c
2018-11-16 17:09:32 -08:00
Fred Gylys-Colwell
f3e9d84484 Add build info API to OEMCrypto
Merge from master branch of Widevine repo of http://go/wvgerrit/66065
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63080

This is for the reference code, the unit tests, and the oemcrypto adapter.

Bug: 116414218
Test: unit tests
Test: tested as part of http://go/ag/5501993

Change-Id: I05a631f6cfcf1584a748b3a0c9ae48633893589f
2018-11-16 15:38:45 -08:00
Fred Gylys-Colwell
f2edb8f2dd Update API version to 15
Merge from master branch of Widevine repo of http://go/wvgerrit/66064
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63063

This is in the reference code for OEMCrypto, and in the unit tetss.

Bug: 111939411
Test: unit tests
Test: tested as part of http://go/ag/5501993

Change-Id: I2cc2e7028f62d1c375eb632452eef94566fa9ae3
2018-11-16 15:38:45 -08:00
Fred Gylys-Colwell
458de2569d Remove old test cert and rest of 4121
Merge from Widevine repo of http://go/wvgerrit/62782

There were still some old test keyboxes in the unit tests for older devices and
in the mod mock.  These are removed.  Also, the cert with system id 7346 has
been removed.

The new test keybox has system ID 7912.
The new test cert has system id 7913.

bug: 76435251
Test: unit tests (unit tests do not pass on v13 oemcrypto)
Test: tested as part of http://go/ag/5501993

Change-Id: I6007b6650162d9dc9d01384faaafc87acdf8ebd7
2018-11-16 15:38:45 -08:00
TreeHugger Robot
fcb428fc26 Merge "Multiple RSA keys unit test" 2018-09-24 21:54:35 +00:00
Fred Gylys-Colwell
20e85635a2 Multiple RSA keys unit test
Merge from Widevine repo of http://go/wvgerrit/55460

This test ensures that different oemcrypto sessions can use different RSA keys.

bug: 110319198 Test concurrent sessions can use different DRM certificates
test: unit tests on taimen
Change-Id: Id75eedea347d453987dfe42894a8a7301e345674
2018-09-18 23:49:47 +00:00
Fred Gylys-Colwell
e288d10026 Unit test with small buffer
Merge from Widevine repo of http://go/wvgerrit/57640

Add a unit test for OEMCrypto to handle a small buffer.

Test: unit tests
bug: 78233951
Change-Id: I5efe088705e2d248ab9ea45d8576daf69ad8bcdb
2018-09-18 16:48:13 -07:00
Fred Gylys-Colwell
562c14b5f1 Use InstallRootKeyCertificate for keybox and cert
Merge from Widevine repo of http://go/wvgerrit/55461

This CL allows provisioning 3.0 devices to install their OEM certs
from an initialization partition.  This method is already used for
keyboxes on Android -- we are just adding the ability to use it for
OEM certs, also.

Also, for v15, we require OEMCrypto to report a valid certificate in
the unit tests.

bug: 111725154
test: unit tests
Change-Id: I142c84a1a67bdb4cee943cfd12a632421901eb24
2018-09-18 16:33:11 -07:00
Fred Gylys-Colwell
e37509dcb2 Remove keybox from OEMCrypto ref
Merge from Widevine repo of http://go/wvgerrit/56526

This CL removes the test keybox from OEMCrypto reference code.

Test: unit tests
Bug: 76393338 split mock into ref and testbed
Change-Id: I4bf0eb777c6851191d0ac9ccf8e2b42c55c8f6b9
2018-09-18 16:33:11 -07:00
Fred Gylys-Colwell
4af5aaf18a Add test base that catches nonce flood
Merge from Widevine repo of http://go/wvgerrit/56520

This CL adds a test base that installs a test keybox and catches nonce
flood errors for all CDM tests.

In order to do this, a new class is added called a
CryptoSessionFactory.  The default factory just creates a new
CryptoSession.  All places in the code that create a new CryptoSession
now call the static method MakeCryptoSession, which uses the current
factory to create a CryptoSession.  If MakeCryptoSession is called and
there is no current factory, a default factory is created.

The CryptoSession constructor is now private, so that we do not
accidentally try to create one without using the factory.

For the new test base, we first create a special test
CryptoSessionFactory that creates a TestCryptoSession.  The test
factory catches the first call to MakeCryptoSession and injects an
installation of the test keybox after OEMCrypto_Initialize is called.

The TestCryptoSession injects a sleep statement and a retry whenever
it detects a nonce flood.

Test: current unit tests still pass.
bug: 72354901 Fix Generic Crypto tests.
bug: 111361440 Remove #ifdef from unit tests
Change-Id: I248e7f3c53721c04d2af412ef835e19bb4d15d9a
2018-09-18 16:33:11 -07:00
Fred Gylys-Colwell
299623e148 Use different time call in TimeRollbackPrevention test
Merge from widevine of http://go/wvgerrit/48885

iOS prohibits using clock_settime. In order to make the test consistent,
we set time using settimeofday instead.

Test: tested as part of http://go/ag/4674759

Change-Id: I8812b9b099fa8160591fafece070c34afeed82fa
2018-09-02 11:45:16 -07:00
Fred Gylys-Colwell
947531a6a9 Refactor oemcrypto mock into stand alone reference code
Merge from Widevine repo of http://go/wvgerrit/46204
Refactor utility code - split the mock, step 1

Merge from Widevine repo of http://go/wvgerrit/46205
Move some OEMCrypto types to common header - split the mock, step 2

Merge from Widevine repo of http://go/wvgerrit/46206
Split mock into two -- step 3

Merge from Widevine repo of http://go/wvgerrit/47460
Split the mock into two -- step 3.5

The CL moves several files used by oemcrypto and cdm into a common
subdirectory, so that it may more easily be shared with partners.

The CORE_DISALLOW_COPY_AND_ASSIGN macro was moved to its own header in
the util/include directory.

This CL removes some references to the mock from other code, and puts
some constants and types, such as the definition of the keybox, into a
header in oemcrypto.

Test: tested as part of http://go/ag/4674759
bug: 76393338
Change-Id: I75b4bde7062ed8ee572c97ebc2f4da018f4be0c9
2018-09-02 11:45:16 -07:00
Fred Gylys-Colwell
5b74e3186a Refine TwoHundredEntries tests
am: a963e90bb8

Change-Id: I38d4ccb9c7e517e72a2b4555557db0de01f01302
2018-08-29 18:10:22 -07:00
Fred Gylys-Colwell
a963e90bb8 Refine TwoHundredEntries tests
Merge from Widevine repo of http://go/wvgerrit/58440

This CL modifies the oemcrypto test TwoHundredEntries so that it
attempts to create more than 200 entries.  A device is allowed to fail
when such an attempt is made, but it must return an insufficient
resources error.

The test then verifies that each of the entries that were succesfully
created can be used to reload its license and the keys can be used for
decryption.

It then shrinks the usage table header, and verifies that the
remaining licenses can still be used for decryption.

bug: 112486006
test: unit tests (test code only)
Change-Id: I6e6edfb00f0553724e0f99fb4e5ea5c817450937
2018-08-29 14:54:25 -07:00
Haibo Huang
3513db8f73 Remove std::tr1::
To be compatible with latest googletest.

Test: compile
Change-Id: I15d857ce7b9b28ba5f75c84c61f1c6a970012ca7
Merged-In: I15d857ce7b9b28ba5f75c84c61f1c6a970012ca7
2018-08-10 21:37:50 +00:00
Fred Gylys-Colwell
b396f9a870 Fix entry count in TwoHundredEntries
Merge from Widevine repo of http://go/wvgerrit/50600

The entry count was really 201 -- it should be 200.

test: This code is unit tests only -- no production code.
bug: 79875327
Change-Id: Ib81253ce9d51a7157ea0a64cddeb6cc266b3e25e
2018-05-16 15:08:35 -07:00
Fred Gylys-Colwell
bd6bbce86f Unit test for kInactiveUnused usage reports
Merge from Widevine repo of http://go/wvgerrit/50422

This CL adds unit tests to verify that a usage report can have the status
kInactiveUnused.

bug: 79556142
test: unit test code only
Change-Id: I10f71ac2e585ef33727aa8f80d867d80fe156ab8
2018-05-15 13:23:30 -07:00
Fred Gylys-Colwell
a313985174 Add unit test for nonce sharing
Merge from Widevine repo of http://go/wvgerrit/49302

This CL adds some unit tests to verify that several OEMCrypto sessions
do not share nonce tables.

bug: 64850992
test: unit tests run on sailfish, taimen, and walleye.
Change-Id: I06cf3fdafb84f8b09cf2f0e58c1866bac511a293
2018-05-08 14:30:37 -07:00
Srujan Gaddam
73c3007c24 Address offline playback with rollbacked time
Merge from http://go/wvgerrit/47640

Test: unit/integration tests

Bug: b/62058202

The usage table keeps track of license duration by using the current
system time. However, if a user were to rollback the time, they can
effectively continue offline playback indefinitely. This changes the way
we compute time by computing offsets by which the user rollbacked the
time and adding it to the current time. This change also includes a test
to verify protection against rollback for usage entries that is only run
when the user is root.

Change-Id: I97c430e1443747b0f9759ae5390b8f5d06bdebf1
2018-04-23 15:44:26 -07:00
Fred Gylys-Colwell
1a25cbdad6 Update Copyright
Merge from Widevine repo of http://go/wvgerrit/47860

This CL updates the copyright notice to indicate that files
shared with partners are shared under the Widevine Master
License Agreement.

bug: 77926774
test: comment change only
Change-Id: I0423668111578b80fb39a932d763df2827e2dfc3
2018-04-16 16:38:05 -07:00
Srujan Gaddam
f217742582 Fixed loading mac keys in mock and Level3
Merge of http://go/wvgerrit/45521/

Bug: b/73818548

Test: request_license_tests and GTS tests on sailfish and taimen

This change loads the mac keys into the session to be used in
GenerateSignature from the last call to one of: DeriveKeysFromSessionKey,
GenerateDerivedKeys, LoadKeys, and LoadUsageEntry. OEMCrypto tests are
changed to reflect this as well (specifically the order in which we call
the above methods).
2018-03-29 10:39:21 -07:00
Fred Gylys-Colwell
9729663671 Adjust nonce flood rate in mock oemcrypto
Merge from Widevine repo of http://go/wvgerrit/43721

This CL allows the tester to change the nonce flood rate from the
default of 20.  A tester would want this value to be larger to make
tests run more quickly.

Setting the rate to 1 makes every other nonce request a flood error.
A tester wants to do this in order to verify cdm code responds to
nonce flood correctly.  Several failing oemcrypto tests have also been
corrected.

This CL changes test code only.

bug: 73607610
test: unit tests
Change-Id: I3f52ff7ea9bcc1db7bc0e010da0b64a12d3b4dd3
2018-02-21 13:34:09 -08:00
Fred Gylys-Colwell
a682329684 Fix backwards compatibility
Merge from Widevine repo of http://go/wvgerrit/42403

This CL changes the names of some unit tests so that they don't run
when testing an older version of oemcrypto.

bug: 68275290
test: ran unit tests against v8-v14 oemcrypto.
Change-Id: I773350adf4df3f3b310478400cd4d4e85789fc37
2018-02-06 21:23:42 +00:00
Fred Gylys-Colwell
dfe6489ca2 Test Carmicahel RSA Keys
Merge from Widevine repo of http://go/wvgerrit/42064

This adds a unit test to verify that OEMCrypto can load a certificate
with an RSA private key generated using the Carmichael Totient.

bug: 67309725
test: No new failures. This code is part of unit tests only.

Change-Id: I492cf6bcff0ac2d1a838e7aa334c4b2b580ac5c7
2018-01-31 01:07:56 +00:00
Fred Gylys-Colwell
8de7caf788 Fix entitlement keys encryption and content key loading.
Merge from Widevine repo of http://go/wvgerrit/41831

Bug: 72418096 OEMCrypto14 entitlement keys failed decryption testing
Test: in child CL

Change-Id: Ie92c34edb6162fb1e4553c5364f478de189ab793
2018-01-30 00:03:29 -08:00
Fred Gylys-Colwell
d72f49e31a Update LoadTestKeybox
Merge from Widevine repo of http://go/wvgerrit/41662

This CL updates oemcrypto unit tests to use the new test keybox.

bug: 69552641 Update OEMCrypto_LoadTestKeybox

test: Unit tests compile and run -- many tests won't pass until merged
with vendor code

Change-Id: I73bdca3958b2c985d4c61801aa95807a2e6d4299
2018-01-24 21:54:34 -08:00