Remove version check in ODK_InitializeSessionValues

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 commit is contained in:
Vicky Min
2023-07-05 11:06:32 -07:00
committed by Robert Shih
parent 48b1aed404
commit 414e928238
5 changed files with 90 additions and 47 deletions

View File

@@ -254,11 +254,6 @@ OEMCryptoResult ODK_InitializeSessionValues(ODK_TimerLimits* timer_limits,
if (timer_limits == NULL || clock_values == NULL || nonce_values == NULL) {
return OEMCrypto_ERROR_INVALID_CONTEXT;
}
/* Check that the API version passed in from OEMCrypto matches the version of
* this ODK library. */
if (api_major_version != ODK_MAJOR_VERSION) {
return OEMCrypto_ERROR_INVALID_CONTEXT;
}
timer_limits->soft_enforce_rental_duration = false;
timer_limits->soft_enforce_playback_duration = false;
timer_limits->earliest_playback_start_seconds = 0;
@@ -268,7 +263,7 @@ OEMCryptoResult ODK_InitializeSessionValues(ODK_TimerLimits* timer_limits,
ODK_InitializeClockValues(clock_values, 0);
nonce_values->api_major_version = ODK_MAJOR_VERSION;
nonce_values->api_major_version = api_major_version;
nonce_values->api_minor_version = ODK_MINOR_VERSION;
nonce_values->nonce = 0;
nonce_values->session_id = session_id;