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
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
- 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
After the ODK_MAX_NUM_KEYS change, the core response is a pointer to an
array instead of an array. This check should ensure the index of the key
array can always be accessed.
Bug: 286531859
Change-Id: I44604eb977be722ef692de2b61e1f626266a42a7