[ Merge from http://go/wvgerrit/16498 ]
The CDM now supports AES CTR and CBC block cipher modes. The license
specifies the mode to be used in the key container. The mode is
also specified in mediaCrypto when calling decrypt. This adds
verification for the cipher block mode.
Change-Id: I2587fc1e4b6d77161f2f8653f8516024c73dd8ac
This is a merge of squashed CLs.
* Cdm Session and Engine interface clean up
[ Merge of http://go/wvgerrit/16387 ]
Key Set Ids have been removed from the CdmSession interface
(GenerateKeyRequest, Addkey) as they can be queried by an accessor.
The CdmEngine interface now allows one to specify or retrieve a session ID,
since both were not being used in a single call. Key set IDs are no longer
returned though GenerateKeyRequest as they was not being used.
* Generate key set ID when session is initialized
[ Merge of http://go/wvgerrit/16370 ]
Key set IDs are currently generated at different times in the
CdmSession lifecycle. Android generates key set IDs when the license
is received, while the CE CDM generates (or overrides them)
when the session is constructed.
The key set IDs are now generated when the session is initialized.
Key set generation cannot occur earlier as it has a dependency on
security level and in turn on crypto session initialization which
occurs when the session is initialized.
Depenencies on Session ID has caused other activities, construction of
PolicyEngine, CdmLicense, setting property CDM client sets to be
deferred from CdmSession constructor to Init().
Android will still retrieve the key set IDs after the offline license is
processed. For streaming requests, the key set will be
unreserved and discarded when the session is terminated.
Change-Id: Ib802d1c043742d62efa9a2c901fcd113e836c33d
(This is a merge of http://go/wvgerrit/16496 )
run_all_unit_tests.sh now aborts and alerts the user if they have
Verity on, as opposed to its current behavior of failing later when
the tests don't copy over successfully.
Bug: 23420350
Change-Id: Ib01d32caaac462974b051f5d019888f7c47bc745
[ Merge of http://go/wvgerrit/16241 and http://go/wvgerrit/16364 ]
This will allow a usage session to be loaded later by key set ID.
This is needed for EME-style secure stop in the new CE CDM API.
b/25816911
Change-Id: I916340047492fbc0556d0e90bd2eac0f3eafe597
Merge of http://go/wvgerrit/16300
This CL removes gtest and boringssl from
build_and_run_all_unit_tests.sh. Instead, we change each "mm"
to "mm || mma". Thus, if mm fails, we assume it is because of a
missing dependency and try mma which builds all dependencies.
bug: 25297287
Change-Id: Ief76fa4077e4cd8653da9306cc92ed14cf080564
[ Merge of http://go/wvgerrit/16364 ]
http://go/wvgerrit/16249 changed the name of the encryption pattern
structure from OEMCrypto_PatternDesc to OEMCrypto_CENCEncryptPatternDesc
to remove ambiguity. These are matching changes to CDM core.
[ Merge of http://go/wvgerrit/16340 ]
This CL passes the cipher mode in the license to OEMCrypto when
keys are loaded and specifies the pattern encryption scheme to
OEMCrypto_DecryptCENC.
b/20630275
Change-Id: I86b82bbdc891fd0100beb9fad385ca2082176271
[ Merge of http://go/wvgerrit/16290 ]
HLS uses an EXT-X-KEY tag and attribute list in the media playlist to
identify the key and method used to encrypt media segments. This allows
for the attributes to be parsed and extracted.
b/20630275
Change-Id: I2c4a419022f933b7b34b64dc48930f167abe65c6
[ Merge from http://go/wvgerrit/16406 ]
This was detected by static analysis tool cppcheck.
b/26348775
Change-Id: Icc6a55b9b4a1ffe882488ac069e3c3df2e796e91
[ Merge of http://go/wvgerrit/16405/ ]
Methods in string conversion and license request tests were not being used.
This was detected by static analysis cppcheck reports.
b/26349052
Change-Id: I44779abf6b6fdc01b5391bff7d47be1d20ef84d2
This CL contains the level 3 oemcrypto library built for android. I
used the toolchain from the mnc-emu-release branch because I'm having
problems with the toolchain on master.
This includes the security patch API, and several bug fixes to the library.
Current versions:
mips/libwvlevel3.a Level3 Library Dec 17 2015 21:26:57
arm/libwvlevel3.a Level3 Library Dec 17 2015 21:09:47
x86/libwvlevel3.a Level3 Library Dec 17 2015 21:19:15
http://go/wvgerrit/16371 Level 3 OEMCrypto library
http://go/wvgerrit/16315 Security Patch Level - haystack version
http://go/wvgerrit/16282 Correctly handle null pointer in GetKeyData
http://go/wvgerrit/16294 Initialize data for generation number
http://go/wvgerrit/16280 Correctly handle bad RSA key
bug: 26089773
bug: 26092100
bug: 26086944
Change-Id: I3ea1b5d219dae0c88deafa742f61d67e97297902
Merge from widevine of http://go/wvgerrit/16363
Add temporary OEMCrypto API to the stub file used by android mips 64
devices.
bug: 26213020
Change-Id: I4b71fd21c5cf5dbb14645f606586af54d03ccaea
The min SDK target is now 21 because of getDrawable change,
so this app will not install on KitKat.
Also, MediaCodecView is obsolete, so there is no need to change
getInput/OutputBiffers and INFO_OUTPUT_BUFFERS_CHANGED, which requires
additional refactoring effort.
bug: 26185358
Change-Id: If83a5fa0eefebb4932fcd4c03162ba2dd94a755e
Merge from the widevine repo of http://go/wvgerrit/16362
A test class holds a default session that it expects to be able to
close in the tear down. This was not true in the TimingTest because
it calls OEMCrypto_Terminate which closes all open sessions.
This CL closes the default session, and then reopens it again after
OEMCrypto_Initialize.
Change-Id: Ib4128ec3c0a33794c03aa934174cb6fff448483e
Merge of widevine change http://go/wvgerrit/16249
This CL adds unit tests and reference code for the security patch
level, which is a new feature in OEMCrypto v11. This CL also adjusts
the dynamic and static adapters to still run with devices that have a
v10 OEMCrypto.
The level 3 haystack code will be updated in a future CL.
bug: 26188985
Change-Id: I518ef46b4098cf3718fe0c0390bfb6825db4fb6b