Correct CancelKeyRequest behavior
[ Merge of https://widevine-internal-review.googlesource.com/#/c/10659/ from the widevine cdm repo. ] CdmEngine::CancelKeyRequest would earlier release keys by closing and reopening a crypto session. Behavior has been changed to just close the session. b/15984869 Change-Id: I92a1f82fd4a97b5510596d4bc69bf07406cee606
This commit is contained in:
@@ -299,8 +299,7 @@ CdmResponseType CdmEngine::CancelKeyRequest(const CdmSessionId& session_id) {
|
|||||||
return KEY_ERROR;
|
return KEY_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Re-initialize to release crypto session/keys without closing session
|
iter->second->CancelKeyRequest();
|
||||||
iter->second->Init();
|
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -986,6 +986,14 @@ TEST_F(WvCdmRequestLicenseTest, OfflineLicenseRenewal) {
|
|||||||
decryptor_.CloseSession(session_id_);
|
decryptor_.CloseSession(session_id_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(WvCdmRequestLicenseTest, RemoveKeys) {
|
||||||
|
ASSERT_EQ(NO_ERROR, decryptor_.OpenSession(g_key_system, NULL, &session_id_));
|
||||||
|
GenerateKeyRequest(g_key_id, kLicenseTypeStreaming);
|
||||||
|
VerifyKeyRequestResponse(g_license_server, g_client_auth, false);
|
||||||
|
ASSERT_EQ(NO_ERROR, decryptor_.CancelKeyRequest(session_id_));
|
||||||
|
ASSERT_EQ(NO_ERROR, decryptor_.CloseSession(session_id_));
|
||||||
|
}
|
||||||
|
|
||||||
class WvCdmUsageInfoTest
|
class WvCdmUsageInfoTest
|
||||||
: public WvCdmRequestLicenseTest,
|
: public WvCdmRequestLicenseTest,
|
||||||
public ::testing::WithParamInterface<UsageInfoSubSampleInfo*> {};
|
public ::testing::WithParamInterface<UsageInfoSubSampleInfo*> {};
|
||||||
|
|||||||
Reference in New Issue
Block a user