diff --git a/libwvdrmengine/oemcrypto/odk/include/odk_structs.h b/libwvdrmengine/oemcrypto/odk/include/odk_structs.h index 6e663b51..d0d1a135 100644 --- a/libwvdrmengine/oemcrypto/odk/include/odk_structs.h +++ b/libwvdrmengine/oemcrypto/odk/include/odk_structs.h @@ -97,7 +97,8 @@ typedef struct { * * @param time_of_license_request_signed: Time that the license request was * 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, * 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 diff --git a/libwvdrmengine/oemcrypto/odk/src/odk.c b/libwvdrmengine/oemcrypto/odk/src/odk.c index 60adca5b..fafa0ab6 100644 --- a/libwvdrmengine/oemcrypto/odk/src/odk.c +++ b/libwvdrmengine/oemcrypto/odk/src/odk.c @@ -374,6 +374,12 @@ OEMCryptoResult ODK_ParseLicense( nonce_values->nonce = license_response.core_message.nonce_values.nonce; 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 = (parsed_license->renewal_delay_base == OEMCrypto_License_Load);