John Bruce
ddef4989ef
Merge "Rework Device File Matchers to Avoid Buffer Overflow" am: 38a8b631be
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11991134
Change-Id: Ica5664d56a0f47e37aabe1e202e2f94fc31b93ff
2020-06-25 22:15:06 +00:00
John Bruce
38a8b631be
Merge "Rework Device File Matchers to Avoid Buffer Overflow"
2020-06-25 21:58:58 +00:00
Alex Dale
dc11ccdaa2
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 3adda0dfe1 am: b535120ccd am: 65211cab08 am: 62b95b4b54
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: I387f11c694163ebea67621aa49e44f77b85825ce
2020-06-25 20:40:19 +00:00
Alex Dale
790dd51fc8
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 62462f4ec5 am: 8453477daa am: a5e30b73a3 am: 03dfb757c4
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: I0fb545fe87b33e49b50e0008e87f24232894f77e
2020-06-25 20:40:09 +00:00
Alex Dale
0923d1fd27
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 3adda0dfe1 am: 52901002a1 am: 33c3fd9085 am: 88fba96dfb
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: I361346a7020d12df7544060cc2d2fb93570cffb0
2020-06-25 20:40:03 +00:00
Alex Dale
62b95b4b54
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 3adda0dfe1 am: b535120ccd am: 65211cab08
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: I71c97cc16dcb10a4c90551f625663714e000e886
2020-06-25 20:27:59 +00:00
Alex Dale
03dfb757c4
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 62462f4ec5 am: 8453477daa am: a5e30b73a3
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: I382d70815918a739dd5e7f4de14d44c007baadbf
2020-06-25 20:27:50 +00:00
Alex Dale
88fba96dfb
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 3adda0dfe1 am: 52901002a1 am: 33c3fd9085
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: I224f1e42089548e2e78318df4c67e650253fde6d
2020-06-25 20:27:27 +00:00
Alex Dale
65211cab08
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 3adda0dfe1 am: b535120ccd
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: I5b906c594c1c3292bdc5aaa20c2071ae56d912a6
2020-06-25 20:03:15 +00:00
Alex Dale
a5e30b73a3
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 62462f4ec5 am: 8453477daa
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: Ic6505cf29342b745a3dfed0047d1e8503b6c6f38
2020-06-25 20:03:02 +00:00
Alex Dale
33c3fd9085
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 3adda0dfe1 am: 52901002a1
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: I4091326a55cc8cb514971b2ea595b10e12f38294
2020-06-25 20:02:55 +00:00
Alex Dale
8453477daa
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 62462f4ec5
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: I46c0b2e57cedfdac19b622c9191e604c05301eeb
2020-06-25 19:50:16 +00:00
Alex Dale
b535120ccd
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 3adda0dfe1
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: I2bf4c438575cb22bd350bb9c364a2543f04423d3
2020-06-25 19:50:04 +00:00
Alex Dale
52901002a1
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 3adda0dfe1
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: I2c3237138f100970ab62dddb377122a980a211f1
2020-06-25 19:50:03 +00:00
Alex Dale
3adda0dfe1
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: Ia63d263ae89bc14836704f1dc2d95f5b06590754
2020-06-25 19:39:21 +00:00
Alex Dale
62462f4ec5
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460
Change-Id: I9d6813c4a20dbc679c1526f73dc1be5593d2fee5
2020-06-25 19:38:17 +00:00
Alex Dale
c628c5aca2
Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev
2020-06-25 19:25:18 +00:00
Alex Dale
be9aa78d3e
INSUFFICIENT_RESOURCE errors are mapped consistently. am: 6a247ab924
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11956161
Change-Id: I25a403be5994ceb29b15b6d6c53d8f02db2d3bd2
2020-06-25 02:06:54 +00:00
John W. Bruce
804c0d470c
Rework Device File Matchers to Avoid Buffer Overflow
...
(This is a merge of http://go/wvgerrit/102104 )
The device file unit tests use some custom matchers that were written
back when we didn't have C++11. Because gMock requires std::tuple to
pass a pointer AND a length to a matcher, these matchers had to estimate
the length of the file. This technically meant they were causing a
benign buffer overrun sometimes.
Since we have C++11 now, we can fix this by using a matcher over a
std::pair of the pointer and length. I also took the opportunity to
refactor the matchers a little. The old matchers had many very specific
overloads and also collided with the names of some standard gMock
matchers. Now there are just two more-general matchers with unique
names.
Test: CE CDM Unit Tests
Test: Android Unit Tests
Bug: 159463905
Change-Id: I758b140226bfe2bae6962ee5c64fd6af186b5819
2020-06-24 14:27:09 -07:00
Alex Dale
6a247ab924
INSUFFICIENT_RESOURCE errors are mapped consistently.
...
[ Merge of http://go/wvgerrit/102109 ]
The CDM was using unique CDM error codes for the various cases
where OEMCrypto would return INSUFFICIENT_RESOURCE. However, these
error codes were being incorrectly mapped at the Android level,
resulting in incorrect errors in the MediaDRM layer.
At no point does the CDM handle different INSUFFICIENT_RESOURCE_x
within the same case, as such the use of unique codes are limited.
This CL removes the unique codes, and unifies them under the same
CDM error code.
This CL also extends SelectKey to handle error codes returned by
LoadEntitledContentKeys.
Bug: 154682842
Test: Unit tests
Change-Id: I319fabf6cac60b0dc19ea891609689daeeaeb435
2020-06-22 16:27:25 -07:00
Rahul Frias
19a9bb8d01
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: 652258d70e am: 999dabbc6e am: cd7be52932 am: 4938628f46
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: I28df941eaebf72e763d906c268098a28fb8d5b9f
2020-06-22 19:04:18 +00:00
Rahul Frias
35b71965f4
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: 652258d70e am: abad87b79f am: a93347ea6d am: f43e898921
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: I2a45f330eb36bd130528af0dfe86a2172ce5097c
2020-06-22 19:03:52 +00:00
Rahul Frias
5c7229c643
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: dffadd204c am: 61f64a00c6 am: 1b6f50a467 am: 992d54d912
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: I566fc89c4e083f2f61ac29939757a981c1cc9453
2020-06-22 19:03:20 +00:00
Rahul Frias
4938628f46
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: 652258d70e am: 999dabbc6e am: cd7be52932
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: If6523b3be0072c73a82737f5d1aadf3526ea54aa
2020-06-22 18:47:27 +00:00
Rahul Frias
f43e898921
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: 652258d70e am: abad87b79f am: a93347ea6d
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: Icbaf28005ac3c386ac51aee0e87e4c76a308c5b2
2020-06-22 18:46:52 +00:00
Rahul Frias
992d54d912
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: dffadd204c am: 61f64a00c6 am: 1b6f50a467
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: Iba9cfe403e14249910d5ba19a3ec4c238d7c09cd
2020-06-22 18:46:13 +00:00
Rahul Frias
cd7be52932
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: 652258d70e am: 999dabbc6e
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: Ibb778d3fe1da64df8bfb048081104ed85f8b4a2c
2020-06-22 18:35:36 +00:00
Rahul Frias
a93347ea6d
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: 652258d70e am: abad87b79f
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: I0bc4b561b9edab32a89fe59d71f9b97bc7a9dbf8
2020-06-22 18:35:20 +00:00
Rahul Frias
1b6f50a467
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: dffadd204c am: 61f64a00c6
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: I1830edae406e16b0c2c47290e660ae5cb3537f04
2020-06-22 18:34:59 +00:00
Rahul Frias
999dabbc6e
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: 652258d70e
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: I6d182f166720bf8a925f6182d03f8ca1150f7ec2
2020-06-22 18:21:54 +00:00
Rahul Frias
abad87b79f
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: 652258d70e
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: I11dff2a7fc64d467cc7e31206b2b3c521c397006
2020-06-22 18:21:38 +00:00
Rahul Frias
61f64a00c6
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: dffadd204c
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: I86a70f3bd0c351932270bfd985fcce6461a1bdbe
2020-06-22 18:21:18 +00:00
Rahul Frias
dffadd204c
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: Ia4c431617789fbbb5f973f076b29408df2b2a2bc
2020-06-22 18:14:28 +00:00
Rahul Frias
652258d70e
Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137
Change-Id: Ifb2d04b609a00905c5c42ee629e83674822b64cb
2020-06-22 18:14:27 +00:00
Rahul Frias
25d1646138
Merge "Handle SPOID calculation for L3" into rvc-dev
2020-06-22 18:04:18 +00:00
Alex Dale
0aaf1df125
Test CDM sessions prevent multiple usage entries.
...
[ Merge of http://go/wvgerrit/102068 ]
CDM sessions should not be able to load multiple usage entries.
OEMCrypto already prevents multiple entries from being loaded by the
same OEMCrypto session; however, restoring a key typically creates a
new OEMCrypto session, which should not be allowed twice within the
same CDM session.
This test verifies that CDM returns an error if restore key is called
multiple times within the same session.
Bug: 136143733
Test: Android integration test
Change-Id: I594c91250217fd958837328162f909bc931d373f
2020-06-19 20:40:54 -07:00
Rahul Frias
7e689a1828
Handle SPOID calculation for L3
...
[ Merge of http://go/wvgerrit/101443 ]
The WVDrmPlugin has a single CdmIdentifier. The CdmIdentifier contains
a SPOID that is calculated from the device ID (keybox or OEM cert),
an application reverse domain name and possibly an origin.
The CdmIdentifier is set and SPOID calculated on certain calls into
WVDrmPlugin. Once it is set, it will not be recalculated. We prevent
certain operations such as modifying the origin once the CdmIdentifier
has been set as this will require recalculating the SPOID.
Recalculating the SPOID may affect open sessions or calls in progress.
In a similar way, modifying the security level, will affect the
Device ID value and in turn the SPOID. The security level cannot be modified
if any sessions are open. This does leave open the possibility that the
SPOID may be calculated at one security level, sessions are then closed,
and the security level is then changed without an error being flagged.
The provisioning certificate file name is based on the SPOID. When
the SPOID does not match the security level, either the provisioning
information may not be found even though that security level has
been provisionined or the provisioning information may be stored
in an incorrect location if provisioning occurs.
The correct solution is to prevent modifications to the security level
once the CdmIdentifier is set. This is a behavior change and might
impact apps. We will reevaluate this for the next release.
For now, we will work around this. When the CdmIdentifier is set for L3,
we will calculate SPOIDs with both L1 and L3 device IDs and check if
provisioning previously occurred with SPOIDs calculated for that level.
If so, use that level, otherwise use L3.
Bug: 147703382
Test: Android unit/integration tests, GtsMediaDrmTests
Change-Id: Ia64adfc5848e431ee3876af03eebdb4b6eb83116
2020-06-17 00:50:14 -07:00
Edwin Wong
7f75977e0d
Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: 656db1857b am: 456caca048 am: 716c07aa46 am: 2c03b461e0
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915
Change-Id: I68902adae8a4f23ef0dc54e64c5a4a693dea4524
2020-06-17 01:54:02 +00:00
Edwin Wong
fe4608dc3b
Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: f596c0929e am: 8ac53ecf87 am: fd385e67dc am: 7a1f1d958e
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915
Change-Id: Ieb6877a3cec75578375532682c06dbee46e6b82a
2020-06-17 01:53:55 +00:00
Edwin Wong
04a54238c5
Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: 656db1857b am: 2efe1ab43a am: 6e3c8f51b6 am: 1c96f07452
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915
Change-Id: Ibab48131b5d3f9e66a401aaecba363a86f601636
2020-06-17 01:53:32 +00:00
Edwin Wong
2c03b461e0
Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: 656db1857b am: 456caca048 am: 716c07aa46
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915
Change-Id: I19cef7f50f93d8d3a6cc30b07096a63a3eabac30
2020-06-17 01:40:57 +00:00
Edwin Wong
7a1f1d958e
Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: f596c0929e am: 8ac53ecf87 am: fd385e67dc
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915
Change-Id: I84d1705c414db7b08e8da71fea0c281f473142df
2020-06-17 01:40:51 +00:00
Edwin Wong
1c96f07452
Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: 656db1857b am: 2efe1ab43a am: 6e3c8f51b6
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915
Change-Id: I16e2c71ba2abe6882d5140a79859a1e84329e198
2020-06-17 01:40:42 +00:00
Edwin Wong
716c07aa46
Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: 656db1857b am: 456caca048
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915
Change-Id: I9bc6265d05b0485b3e3f368abd898d06cd134b32
2020-06-17 01:28:25 +00:00
Edwin Wong
fd385e67dc
Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: f596c0929e am: 8ac53ecf87
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915
Change-Id: Ica09d118bf5cf4efb2a18fb05e09ee9df22b5294
2020-06-17 01:28:16 +00:00
Edwin Wong
6e3c8f51b6
Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: 656db1857b am: 2efe1ab43a
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915
Change-Id: Idc8016ab0f8800491f643026b3335969b008b641
2020-06-17 01:28:07 +00:00
Edwin Wong
8ac53ecf87
Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: f596c0929e
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915
Change-Id: Iecc5344c3f153fa085faeda6e526c7432d960038
2020-06-17 01:14:25 +00:00
Edwin Wong
2efe1ab43a
Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: 656db1857b
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915
Change-Id: Ia81efaffabcb99ab931a8538aa39d88fbf3f5835
2020-06-17 01:14:13 +00:00
Edwin Wong
456caca048
Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: 656db1857b
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915
Change-Id: I3bf7e672c918824a493402022d54c317f02655f6
2020-06-17 01:14:02 +00:00
Edwin Wong
f596c0929e
Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915
Change-Id: I9969623efb2098fecdd9cfd5d38e3477a37dabed
2020-06-17 01:00:02 +00:00