Set rental clock if not already set in ODK_ParseLicense
PiperOrigin-RevId: 535020833 Merged from https://widevine-internal-review.googlesource.com/175851 Change-Id: Idc5e2123e56346b9d7c036683c184057f49ea58a
This commit is contained in:
@@ -97,7 +97,8 @@ typedef struct {
|
|||||||
*
|
*
|
||||||
* @param time_of_license_request_signed: Time that the license request was
|
* @param time_of_license_request_signed: Time that the license request was
|
||||||
* signed, based on OEMCrypto's system clock. This value shall be stored
|
* signed, based on OEMCrypto's system clock. This value shall be stored
|
||||||
* and reloaded with usage entry as time_of_license_received.
|
* and reloaded with usage entry as time_of_license_received. This is
|
||||||
|
* also used to track the start of the rental clock time.
|
||||||
* @param time_of_first_decrypt: Time of the first decrypt or call select key,
|
* @param time_of_first_decrypt: Time of the first decrypt or call select key,
|
||||||
* based on OEMCrypto's system clock. This is 0 if the license has not
|
* based on OEMCrypto's system clock. This is 0 if the license has not
|
||||||
* been used to decrypt any data. This value shall be stored and reloaded
|
* been used to decrypt any data. This value shall be stored and reloaded
|
||||||
|
|||||||
@@ -374,6 +374,12 @@ OEMCryptoResult ODK_ParseLicense(
|
|||||||
nonce_values->nonce = license_response.core_message.nonce_values.nonce;
|
nonce_values->nonce = license_response.core_message.nonce_values.nonce;
|
||||||
nonce_values->session_id =
|
nonce_values->session_id =
|
||||||
license_response.core_message.nonce_values.session_id;
|
license_response.core_message.nonce_values.session_id;
|
||||||
|
/* Start the rental clock if not already started for reloading an offline
|
||||||
|
* license without a nonce. */
|
||||||
|
if (!parsed_license->nonce_required &&
|
||||||
|
clock_values->time_of_license_request_signed == 0) {
|
||||||
|
clock_values->time_of_license_request_signed = system_time_seconds;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
bool license_load =
|
bool license_load =
|
||||||
(parsed_license->renewal_delay_base == OEMCrypto_License_Load);
|
(parsed_license->renewal_delay_base == OEMCrypto_License_Load);
|
||||||
|
|||||||
Reference in New Issue
Block a user