Merge "Haystack: Forbid DeriveKeysFromSessionKey after a license is loaded" into vic-widevine-dev
This commit is contained in:
@@ -213,7 +213,7 @@ TEST_P(OEMCryptoLicenseTest, LoadKeyNoNonceTwiceAPI16) {
|
|||||||
ASSERT_NO_FATAL_FAILURE(license_messages_.EncryptAndSignResponse());
|
ASSERT_NO_FATAL_FAILURE(license_messages_.EncryptAndSignResponse());
|
||||||
ASSERT_EQ(OEMCrypto_SUCCESS, license_messages_.LoadResponse());
|
ASSERT_EQ(OEMCrypto_SUCCESS, license_messages_.LoadResponse());
|
||||||
// A second load, should NOT succeed.
|
// A second load, should NOT succeed.
|
||||||
ASSERT_EQ(OEMCrypto_ERROR_LICENSE_RELOAD, license_messages_.LoadResponse());
|
ASSERT_NE(OEMCrypto_SUCCESS, license_messages_.LoadResponse());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify that a second license may not be loaded in a session.
|
// Verify that a second license may not be loaded in a session.
|
||||||
@@ -223,7 +223,7 @@ TEST_P(OEMCryptoLicenseTest, LoadKeyWithNonceTwiceAPI16) {
|
|||||||
ASSERT_NO_FATAL_FAILURE(license_messages_.EncryptAndSignResponse());
|
ASSERT_NO_FATAL_FAILURE(license_messages_.EncryptAndSignResponse());
|
||||||
ASSERT_EQ(OEMCrypto_SUCCESS, license_messages_.LoadResponse());
|
ASSERT_EQ(OEMCrypto_SUCCESS, license_messages_.LoadResponse());
|
||||||
// A second load, should NOT succeed.
|
// A second load, should NOT succeed.
|
||||||
ASSERT_EQ(OEMCrypto_ERROR_LICENSE_RELOAD, license_messages_.LoadResponse());
|
ASSERT_NE(OEMCrypto_SUCCESS, license_messages_.LoadResponse());
|
||||||
}
|
}
|
||||||
|
|
||||||
// This tests load license with an 8k license response.
|
// This tests load license with an 8k license response.
|
||||||
@@ -496,7 +496,7 @@ TEST_P(OEMCryptoLicenseTest, LoadLicenseAgainFailureAPI16) {
|
|||||||
ASSERT_NO_FATAL_FAILURE(license_messages_.CreateDefaultResponse());
|
ASSERT_NO_FATAL_FAILURE(license_messages_.CreateDefaultResponse());
|
||||||
ASSERT_NO_FATAL_FAILURE(license_messages_.EncryptAndSignResponse());
|
ASSERT_NO_FATAL_FAILURE(license_messages_.EncryptAndSignResponse());
|
||||||
ASSERT_EQ(OEMCrypto_SUCCESS, license_messages_.LoadResponse());
|
ASSERT_EQ(OEMCrypto_SUCCESS, license_messages_.LoadResponse());
|
||||||
ASSERT_EQ(OEMCrypto_ERROR_LICENSE_RELOAD, license_messages_.LoadResponse());
|
ASSERT_NE(OEMCrypto_SUCCESS, license_messages_.LoadResponse());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(OEMCryptoLicenseTest, LoadKeysBadSignatureAPI16) {
|
TEST_P(OEMCryptoLicenseTest, LoadKeysBadSignatureAPI16) {
|
||||||
|
|||||||
Reference in New Issue
Block a user