Clearify usage and paremeters of OEMCrypto_GetDeviceSignedCsrPayload()
and OEMCrypto_GetDeviceInformation().
Bug: 291625901
Merged from https://widevine-internal-review.googlesource.com/179470
Change-Id: I0c69bd6fadded6d749fd6f33553bb4a51d69e719
If the BCC has an RSA key, then it needs to be parsed by
BoringSSL, which expects rsaEncryption as the encoding type.
Bug: 272102162
Change-Id: I9b7dc374d8db80efda062b47f6b17720d9bc2ba2
GetDeviceInformation() and GetDeviceSignedCsrPayload() are added to
cdm_engine and crypto_session, so that they can be queried by DRM
plugin. This is to allow the wv drm HAL to be able to extract BCC and
CSR payload to build CSR for prov 4 device registration, such that we
don't need a separate RKP HAL to do this job.
Changes to the DRM plugin to use the exposed methods will be in the
coming CL.
Bug: 286556950
Test: request_license_test
Merged from https://widevine-internal-review.googlesource.com/178890
Merged from https://widevine-internal-review.googlesource.com/179730
Change-Id: Ibafa3a58c99fbb8f1f25f8951d3749110bd32176
The `time_of_renewal_request` field in the clock_values struct was not being initialized. With this CL, we use a value of 0 to indicate a renewal has not been requested yet.
We also modify the check in `ODK_ParseRenewal` to use a value of 0 for the `time_of_renewal_request` to skip the check for a stale renewal. This is done because now that a "renew on license load" license starts the playback clock immediately, we need a different way to decide if a renewal from a previous session can be loaded.
PiperOrigin-RevId: 546129556
Merged from https://widevine-internal-review.googlesource.com/177998
Change-Id: I17282cf918d0cdb4d9b5108a41914ecd7d87cc8f
It seems ODK_InitializeSessionValues is only used in initializing the session in OEMCrypto, so we can remove this check.
PiperOrigin-RevId: 545729842
Merged from https://widevine-internal-review.googlesource.com/169914
Change-Id: Idcc58166f64116214540591dc71a774f3ce3f3d1
This change brings the odk/Android.bp in sync with the Android repo. Change was originally made in ag/22120778
PiperOrigin-RevId: 540398693
Merged from https://widevine-internal-review.googlesource.com/177000
Change-Id: Id3bf7193da8de3b9942da052c32065f031102d9b
This data was generated using the code in CLs go/wvgerrit/163726 (for v16),
go/wvgerrit/171730 (for v17), and go/wvgerrit/171750 (for v18).
PiperOrigin-RevId: 535679470
Change-Id: Ib644bbed7e7329dfea30ce25d325fd0556fdb7a7
Merged from http://go/wvgerrit/175855
This includes testing overflow functions that are only used in the Widevine client repository.
This patch also includes the following fix for the previous commit:
Add type casting for ODK overflow function unit tests
Merged from http://go/wvgerrit/175893
The new ODK overflow unit tests are causing some unit test failures in oemcrypto-v18 due to mismatched type comparisons.
PiperOrigin-RevId: 535308670
PiperOrigin-RevId: 534890798
Change-Id: I8bb67e47193a92191a91c83bf8a0de61e1b87793
The core message had been throttled to only generate v17 messages because we wanted to stabilize the format before making the code live.
PiperOrigin-RevId: 524309559
Merged from https://widevine-internal-review.googlesource.com/170311
Change-Id: I2d09c9f6c73f844fd509531e86285ad71d22690f
- Replace assert with odk_static_assert for checks that can be handled
at compile time.
- Use explicit bool conversion with memcmp.
Merged from https://widevine-internal-review.googlesource.com/170414
PiperOrigin-RevId: 524277743
Change-Id: I8b32e886e780e80406afceea562be2033d75d340
The previous code fixed a backwards compatibility error for v18 provisioning requests being parsed by a v17 or older server. This bumped the minor version number to v18.1. v17 servers are still expected to fail when trying to parse v18.0 provisioning requests, and v18.1 requests will pass.
However, it did not correctly account for existing v18.0 requests on v18.1+ servers. v18.0 messages were naively detected by a failure to parse, and the parse function was not run again. This left the resulting nonce and session_id values uninitialized.
This CL fixes that by explicitly handling the v18.0 and v18.1+ cases, ensuring that the parse function succeeds and all relevant information is copied over. Furthermore, the unit test that was meant to catch this edge case has been improved to validate the resulting parsed message.
All code changes affect the server. This does not affect the client code eg OEMCrypto
PiperOrigin-RevId: 523714529
Merged from https://widevine-internal-review.googlesource.com/170110
Change-Id: I21911c4bb4304de2d93f092f356402bbd4240874
Generate core message request and responses for
golden data tests.
This CL does not have any golden data. The golden data
will be added to a google3 CL.
To turn on dumping of golden data, set the environment
variable DUMP_GOLDEN_DATA to "yes".
Merged from https://widevine-internal-review.googlesource.com/171750
Change-Id: I7ae2d76ec7330d9131aae98dfd07b7909d10f726
There are three changes here that should help reduce the
amount of duration test failures caused by clock skew.
First, we reported some skew when the test expected playback
to start immediately after loading the license. However,
with round-off, this could easily be more than 1 second. So
this does not warrent even a warning.
Second, the fake and real clocks were only synced after
computing how long to sleep. This is fixed by moving
SleepUntil to the TestSleep class and having it sync before
computing the delta and after doing the sleep.
Third, I am guessing that some failures due to unexpected
lenience were caused by the rental or playback clock being
started at the end of signing the license or the end of the
first decrypt instead of the beginning. We work around this
by recording how long these operations take, and then adding
this extra time at the end of the check for FailDecrypt.
Bug: 275003529
Bug: 279249646
Bug: 207500749
Merged from https://widevine-internal-review.googlesource.com/176070
Change-Id: I6a973565edfbebca53ee7f239b4b93f8f73d1e0a
- Add details for triaging crashes and writing fuzz tests.
- Move internal documentation not needed by partners to g3doc.
- Remove infrastructure details covered in the design document.
Change-Id: Ib60b2bea954f4371595b0f891434e2274366fdd2