Initialize renewal request time

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
This commit is contained in:
Fred Gylys-Colwell
2023-07-06 17:01:49 -07:00
committed by Robert Shih
parent d0752047fc
commit 84e27c660d
3 changed files with 6 additions and 4 deletions

View File

@@ -295,6 +295,7 @@ OEMCryptoResult ODK_InitializeClockValues(ODK_ClockValues* clock_values,
clock_values->time_of_license_request_signed = system_time_seconds;
clock_values->time_of_first_decrypt = 0;
clock_values->time_of_last_decrypt = 0;
clock_values->time_of_renewal_request = 0;
clock_values->time_when_timer_expires = 0;
clock_values->timer_status = ODK_CLOCK_TIMER_STATUS_LICENSE_NOT_LOADED;
clock_values->status = kUnused;